* add source/header * add ios files * add configs * modify name * http_file_source * add interface delegate when map init * fix name * fix delegate name * support mac os * add mac os support * make optional delegate when mac os * mac/ios difference * add ios change log * cancel iOS/mac OS judgement * cancel iOS/mac OS judgement * cancel judgement in .m * update * update * update http_file_source * update ios * update mac os * add mac os file * add mac os file to `.cmake` * change names * add log & fix format * reset changelog commit * update changelog * rename iOS network manager * Add a test configuration(same as default configuration) when mac os run tests * re-add account type into `http_file_source` * refactor
52 lines
1.1 KiB
Objective-C
52 lines
1.1 KiB
Objective-C
#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;
|
|
|
|
- (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
|