75 lines
2.5 KiB
Objective-C
75 lines
2.5 KiB
Objective-C
//
|
|
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@class OWSDevice;
|
|
@class PreKeyRecord;
|
|
@class SignedPreKeyRecord;
|
|
@class TSRequest;
|
|
|
|
typedef NS_ENUM(NSUInteger, TSVerificationTransport) { TSVerificationTransportVoice = 1, TSVerificationTransportSMS };
|
|
|
|
@interface OWSRequestFactory : NSObject
|
|
|
|
- (instancetype)init NS_UNAVAILABLE;
|
|
|
|
+ (TSRequest *)enable2FARequestWithPin:(NSString *)pin;
|
|
|
|
+ (TSRequest *)disable2FARequest;
|
|
|
|
+ (TSRequest *)acknowledgeMessageDeliveryRequestWithSource:(NSString *)source timestamp:(UInt64)timestamp;
|
|
|
|
+ (TSRequest *)deleteDeviceRequestWithDevice:(OWSDevice *)device;
|
|
|
|
+ (TSRequest *)deviceProvisioningCodeRequest;
|
|
|
|
+ (TSRequest *)deviceProvisioningRequestWithMessageBody:(NSData *)messageBody ephemeralDeviceId:(NSString *)deviceId;
|
|
|
|
+ (TSRequest *)getDevicesRequest;
|
|
|
|
+ (TSRequest *)getMessagesRequest;
|
|
|
|
+ (TSRequest *)getProfileRequestWithRecipientId:(NSString *)recipientId;
|
|
|
|
+ (TSRequest *)turnServerInfoRequest;
|
|
|
|
+ (TSRequest *)allocAttachmentRequest;
|
|
|
|
+ (TSRequest *)attachmentRequestWithAttachmentId:(UInt64)attachmentId;
|
|
|
|
+ (TSRequest *)availablePreKeysCountRequest;
|
|
|
|
+ (TSRequest *)contactsIntersectionRequestWithHashesArray:(NSArray<NSString *> *)hashes;
|
|
|
|
+ (TSRequest *)currentSignedPreKeyRequest;
|
|
|
|
+ (TSRequest *)profileAvatarUploadFormRequest;
|
|
|
|
+ (TSRequest *)recipientPrekeyRequestWithRecipient:(NSString *)recipientNumber deviceId:(NSString *)deviceId;
|
|
|
|
+ (TSRequest *)registerForPushRequestWithPushIdentifier:(NSString *)identifier voipIdentifier:(NSString *)voipId;
|
|
|
|
+ (TSRequest *)updateAttributesRequestWithManualMessageFetching:(BOOL)enableManualMessageFetching;
|
|
|
|
+ (TSRequest *)unregisterAccountRequest;
|
|
|
|
+ (TSRequest *)requestVerificationCodeRequestWithPhoneNumber:(NSString *)phoneNumber
|
|
transport:(TSVerificationTransport)transport;
|
|
|
|
+ (TSRequest *)submitMessageRequestWithRecipient:(NSString *)recipientId
|
|
messages:(NSArray *)messages
|
|
timeStamp:(uint64_t)timeStamp;
|
|
|
|
+ (TSRequest *)registerSignedPrekeyRequestWithSignedPreKeyRecord:(SignedPreKeyRecord *)signedPreKey;
|
|
|
|
+ (TSRequest *)registerPrekeysRequestWithPrekeyArray:(NSArray *)prekeys
|
|
identityKey:(NSData *)identityKeyPublic
|
|
signedPreKey:(SignedPreKeyRecord *)signedPreKey
|
|
preKeyLastResort:(PreKeyRecord *)preKeyLastResort;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|