blob: 59e5d5431f7a4f87ead1b206460a31753e0924e5 (
plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol MGLNativeNetworkDelegate <NSObject>
@optional
- (NSString *)skuToken;
@required
- (NSURLSessionConfiguration *)sessionConfiguration;
- (void)startDownloadEvent:(NSString *)event type:(NSString *)type;
- (void)cancelDownloadEventForResponse:(NSURLResponse *)response;
- (void)stopDownloadEventForResponse:(NSURLResponse *)response;
- (void)debugLog:(NSString *)format, ...;
- (void)errorLog:(NSString *)format, ...;
@end
#define MGL_APPLE_EXPORT __attribute__((visibility ("default")))
@interface MGLNativeNetworkManager: NSObject
+ (MGLNativeNetworkManager *)sharedManager;
@property (nonatomic, weak) id<MGLNativeNetworkDelegate> delegate;
@property (nonatomic, readonly) NSString *skuToken;
@property (nonatomic, readonly) NSURLSessionConfiguration *sessionConfiguration;
/*
For testing. Since we get a `nil` return when SDK is modualar, we use this for testing network.
Same as `[MGLNetworkConfiguration defaultSessionConfiguration]` in `MGLNetworkConfiguration.m`.
*/
@property (nonatomic, readonly) NSURLSessionConfiguration *testSessionConfiguration;
- (void)startDownloadEvent:(NSString *)event type:(NSString *)type;
- (void)cancelDownloadEventForResponse:(NSURLResponse *)response;
- (void)stopDownloadEventForResponse:(NSURLResponse *)response;
- (void)debugLog:(NSString *)format, ...;
- (void)errorLog:(NSString *)format, ...;
@end
NS_ASSUME_NONNULL_END
|