Files
MapLibreParticleLab/platform/darwin/include/mbgl/interface/native_apple_interface.h
2024-06-11 19:01:50 +02:00

52 lines
1.2 KiB
Objective-C

#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class MLNNativeNetworkManager;
@protocol MLNNativeNetworkDelegate <NSObject>
@optional
- (NSURLSession *)sessionForNetworkManager:(MLNNativeNetworkManager *)networkManager;
@required
- (NSURLSessionConfiguration *)sessionConfiguration;
- (void)startDownloadEvent:(NSString *)event type:(NSString *)type;
- (void)cancelDownloadEventForResponse:(NSURLResponse *)response;
- (void)stopDownloadEventForResponse:(NSURLResponse *)response;
- (void)debugLog:(NSString *)message;
- (void)errorLog:(NSString *)message;
@end
#define MLN_APPLE_EXPORT __attribute__((visibility("default")))
@interface MLNNativeNetworkManager : NSObject
+ (MLNNativeNetworkManager *)sharedManager;
@property (nonatomic, weak) id<MLNNativeNetworkDelegate> delegate;
@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