mirror of https://github.com/oxen-io/session-ios
Elaborate request factory.
parent
c17a819366
commit
004479a2ce
@ -1,13 +0,0 @@
|
|||||||
//
|
|
||||||
// TSAvailablePreKeysCountRequest.h
|
|
||||||
// Signal
|
|
||||||
//
|
|
||||||
// Created by Frederic Jacobs on 27/01/15.
|
|
||||||
// Copyright (c) 2015 Open Whisper Systems. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "TSRequest.h"
|
|
||||||
|
|
||||||
@interface TSAvailablePreKeysCountRequest : TSRequest
|
|
||||||
|
|
||||||
@end
|
|
@ -1,27 +0,0 @@
|
|||||||
//
|
|
||||||
// TSAvailablePreKeysCountRequest.m
|
|
||||||
// Signal
|
|
||||||
//
|
|
||||||
// Created by Frederic Jacobs on 27/01/15.
|
|
||||||
// Copyright (c) 2015 Open Whisper Systems. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "TSAvailablePreKeysCountRequest.h"
|
|
||||||
|
|
||||||
#import "TSConstants.h"
|
|
||||||
|
|
||||||
@implementation TSAvailablePreKeysCountRequest
|
|
||||||
|
|
||||||
- (instancetype)init {
|
|
||||||
NSString *path = [NSString stringWithFormat:@"%@", textSecureKeysAPI];
|
|
||||||
|
|
||||||
self = [super initWithURL:[NSURL URLWithString:path]];
|
|
||||||
|
|
||||||
if (self) {
|
|
||||||
[self setHTTPMethod:@"GET"];
|
|
||||||
}
|
|
||||||
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
@ -1,15 +0,0 @@
|
|||||||
//
|
|
||||||
// TSContactsIntersection.h
|
|
||||||
// TextSecureiOS
|
|
||||||
//
|
|
||||||
// Created by Frederic Jacobs on 10/12/13.
|
|
||||||
// Copyright (c) 2013 Open Whisper Systems. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "TSRequest.h"
|
|
||||||
|
|
||||||
@interface TSContactsIntersectionRequest : TSRequest
|
|
||||||
|
|
||||||
- (id)initWithHashesArray:(NSArray *)hashes;
|
|
||||||
|
|
||||||
@end
|
|
@ -1,27 +0,0 @@
|
|||||||
//
|
|
||||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "TSContactsIntersectionRequest.h"
|
|
||||||
#import "TSConstants.h"
|
|
||||||
|
|
||||||
@implementation TSContactsIntersectionRequest
|
|
||||||
|
|
||||||
- (id)initWithHashesArray:(NSArray *)hashes {
|
|
||||||
self = [self
|
|
||||||
initWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", textSecureDirectoryAPI, @"tokens"]]];
|
|
||||||
|
|
||||||
if (!self) {
|
|
||||||
return nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
self.HTTPMethod = @"PUT";
|
|
||||||
|
|
||||||
self.parameters = @{
|
|
||||||
@"contacts" : hashes,
|
|
||||||
};
|
|
||||||
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
@ -1,13 +0,0 @@
|
|||||||
//
|
|
||||||
// TSCurrentSignedPreKeyRequest.h
|
|
||||||
// Signal
|
|
||||||
//
|
|
||||||
// Created by Frederic Jacobs on 27/01/15.
|
|
||||||
// Copyright (c) 2015 Open Whisper Systems. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "TSRequest.h"
|
|
||||||
|
|
||||||
@interface TSCurrentSignedPreKeyRequest : TSRequest
|
|
||||||
|
|
||||||
@end
|
|
@ -1,22 +0,0 @@
|
|||||||
//
|
|
||||||
// TSCurrentSignedPreKeyRequest.m
|
|
||||||
// Signal
|
|
||||||
//
|
|
||||||
// Created by Frederic Jacobs on 27/01/15.
|
|
||||||
// Copyright (c) 2015 Open Whisper Systems. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "TSConstants.h"
|
|
||||||
#import "TSCurrentSignedPreKeyRequest.h"
|
|
||||||
|
|
||||||
@implementation TSCurrentSignedPreKeyRequest
|
|
||||||
|
|
||||||
- (instancetype)init {
|
|
||||||
self = [super initWithURL:[NSURL URLWithString:textSecureSignedKeysAPI]];
|
|
||||||
|
|
||||||
self.HTTPMethod = @"GET";
|
|
||||||
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
@ -1,15 +0,0 @@
|
|||||||
//
|
|
||||||
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "TSRequest.h"
|
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
|
||||||
|
|
||||||
@interface TSProfileAvatarUploadFormRequest : TSRequest
|
|
||||||
|
|
||||||
- (instancetype)init;
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
|
@ -1,23 +0,0 @@
|
|||||||
//
|
|
||||||
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "TSProfileAvatarUploadFormRequest.h"
|
|
||||||
#import "TSConstants.h"
|
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
|
||||||
|
|
||||||
@implementation TSProfileAvatarUploadFormRequest
|
|
||||||
|
|
||||||
- (instancetype)init
|
|
||||||
{
|
|
||||||
self = [super initWithURL:[NSURL URLWithString:textSecureProfileAvatarFormAPI]];
|
|
||||||
|
|
||||||
self.HTTPMethod = @"GET";
|
|
||||||
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
|
@ -1,15 +0,0 @@
|
|||||||
//
|
|
||||||
// TSGetRecipientPrekey.h
|
|
||||||
// TextSecureiOS
|
|
||||||
//
|
|
||||||
// Created by Christine Corbett Moran on 11/30/13.
|
|
||||||
// Copyright (c) 2013 Open Whisper Systems. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "TSRequest.h"
|
|
||||||
@class TSContact;
|
|
||||||
@interface TSRecipientPrekeyRequest : TSRequest
|
|
||||||
|
|
||||||
- (TSRequest *)initWithRecipient:(NSString *)recipientNumber deviceId:(NSString *)deviceId;
|
|
||||||
|
|
||||||
@end
|
|
@ -1,26 +0,0 @@
|
|||||||
//
|
|
||||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "TSRecipientPrekeyRequest.h"
|
|
||||||
#import "TSConstants.h"
|
|
||||||
|
|
||||||
@implementation TSRecipientPrekeyRequest
|
|
||||||
|
|
||||||
- (TSRequest *)initWithRecipient:(NSString *)recipientNumber deviceId:(NSString *)deviceId {
|
|
||||||
self = [super
|
|
||||||
initWithURL:[NSURL
|
|
||||||
URLWithString:[NSString
|
|
||||||
stringWithFormat:@"%@/%@/%@", textSecureKeysAPI, recipientNumber, deviceId]]];
|
|
||||||
|
|
||||||
if (!self) {
|
|
||||||
return nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
self.HTTPMethod = @"GET";
|
|
||||||
self.parameters = nil;
|
|
||||||
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
Loading…
Reference in New Issue