mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.3 KiB
Objective-C
44 lines
1.3 KiB
Objective-C
//
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
/**
|
|
* TSNetworkManager imports all TSRequests to prevent massive imports
|
|
in classes that call TSNetworkManager
|
|
*/
|
|
#import "TSAllocAttachmentRequest.h"
|
|
#import "TSAttachmentRequest.h"
|
|
#import "TSAvailablePreKeysCountRequest.h"
|
|
#import "TSContactsIntersectionRequest.h"
|
|
#import "TSCurrentSignedPreKeyRequest.h"
|
|
#import "TSRecipientPrekeyRequest.h"
|
|
#import "TSRegisterForPushRequest.h"
|
|
#import "TSRegisterPrekeysRequest.h"
|
|
#import "TSRequestVerificationCodeRequest.h"
|
|
#import "TSSubmitMessageRequest.h"
|
|
#import "TSUnregisterAccountRequest.h"
|
|
#import "TSUpdateAttributesRequest.h"
|
|
#import "TSVerifyCodeRequest.h"
|
|
#import <AFNetworking/AFHTTPSessionManager.h>
|
|
#import <Foundation/Foundation.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
extern NSString *const TSNetworkManagerDomain;
|
|
|
|
BOOL IsNSErrorNetworkFailure(NSError *_Nullable error);
|
|
|
|
@interface TSNetworkManager : NSObject
|
|
|
|
- (instancetype)init NS_UNAVAILABLE;
|
|
|
|
+ (instancetype)sharedManager;
|
|
|
|
- (void)makeRequest:(TSRequest *)request
|
|
success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
|
|
failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure NS_SWIFT_NAME(makeRequest(_:success:failure:));
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|