forked from Countly/countly-sdk-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCountlyConnectionManager.h
43 lines (36 loc) · 1.4 KB
/
CountlyConnectionManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// CountlyConnectionManager.h
//
// This code is provided under the MIT License.
//
// Please visit www.count.ly for more information.
#import <Foundation/Foundation.h>
#if TARGET_OS_IOS
#import <UIKit/UIKit.h>
#endif
@interface CountlyConnectionManager : NSObject <NSURLSessionDelegate>
@property (nonatomic, strong) NSString* appKey;
@property (nonatomic, strong) NSString* appHost;
@property (nonatomic, strong) NSURLSessionTask* connection;
@property (nonatomic) BOOL isTestDevice;
@property (nonatomic) NSTimeInterval updateSessionPeriod;
@property (nonatomic, strong) NSArray* pinnedCertificates;
@property (nonatomic, strong) NSString* customHeaderFieldName;
@property (nonatomic, strong) NSString* customHeaderFieldValue;
@property (nonatomic, strong) NSString* secretSalt;
@property (nonatomic) BOOL alwaysUsePOST;
+ (instancetype)sharedInstance;
- (void)beginSession;
- (void)updateSessionWithDuration:(int)duration;
- (void)endSessionWithDuration:(int)duration;
- (void)sendEvents;
- (void)sendUserDetails:(NSString *)userDetails;
- (void)sendPushToken:(NSString *)token;
- (void)sendCrashReportLater:(NSString *)report;
- (void)sendOldDeviceID:(NSString *)oldDeviceID;
- (void)sendParentDeviceID:(NSString *)parentDeviceID;
- (void)sendLocation:(CLLocationCoordinate2D)coordinate;
- (NSString *)queryEssentials;
- (NSString *)boundary;
- (BOOL)isRequestSuccessful:(NSURLResponse *)response;
- (void)tick;
@end