session-ios/Signal/src/network/http/RPAPICall.h

48 lines
1.5 KiB
C
Raw Normal View History

2014-10-06 01:28:45 +02:00
//
// RedPhoneAPICall.h
// Signal
//
// Created by Frederic Jacobs on 05/10/14.
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AFNetworking/AFNetworking.h>
@class PhoneNumber;
@interface RPAPICall : NSObject
typedef NS_ENUM(NSInteger, HTTPMethod) {
HTTP_GET,
HTTP_POST,
HTTP_PUT,
HTTP_DELETE,
SIGNAL_RING,
SIGNAL_BUSY
};
#pragma mark API Call Properties
@property (nonatomic, readonly) NSString *endPoint;
@property (nonatomic, readonly) HTTPMethod method;
@property (nonatomic, readonly) NSDictionary *parameters;
@property (nonatomic, readonly) AFHTTPRequestSerializer <AFURLRequestSerialization> *requestSerializer;
@property (nonatomic, readonly) AFHTTPResponseSerializer <AFURLResponseSerialization> *responseSerializer;
#pragma mark API Call Contstructors
+ (RPAPICall*)requestVerificationCode;
+ (RPAPICall*)requestVerificationCodeWithVoice;
+ (RPAPICall*)verifyVerificationCode:(NSString*)verificationCode;
+ (RPAPICall*)registerPushNotificationWithPushToken:(NSData*)pushToken voipToken:(NSData*)voipToken;
2014-11-20 21:36:20 +01:00
+ (RPAPICall*)requestTextSecureVerificationCode;
2015-01-25 23:38:52 +01:00
+ (RPAPICall*)unregisterWithPushToken:(NSData*)pushToken;
2014-10-06 01:28:45 +02:00
+ (RPAPICall*)fetchBloomFilter;
//+ (RPAPICall*)requestToOpenPortWithSessionId:(int64_t)sessionId;
//+ (RPAPICall*)requestToRingWithSessionId:(int64_t)sessionId;
//+ (RPAPICall*)requestToSignalBusyWithSessionId:(int64_t)sessionId;
//+ (RPAPICall*)requestToInitiateToRemoteNumber:(PhoneNumber*)remoteNumber;
@end