diff options
Diffstat (limited to 'platform/darwin/include/MGLDownloadController.h')
-rw-r--r-- | platform/darwin/include/MGLDownloadController.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/platform/darwin/include/MGLDownloadController.h b/platform/darwin/include/MGLDownloadController.h new file mode 100644 index 0000000000..86bd1e6573 --- /dev/null +++ b/platform/darwin/include/MGLDownloadController.h @@ -0,0 +1,30 @@ +#import <Foundation/Foundation.h> + +#import "MGLTypes.h" + +NS_ASSUME_NONNULL_BEGIN + +@class MGLDownloadable; +@protocol MGLDownloadRegion; + +typedef void (^MGLDownloadableRegistrationCompletionHandler)(MGLDownloadable *downloadable, NSError *error); +typedef void (^MGLDownloadableRemovalCompletionHandler)(NSError *error); +typedef void (^MGLDownloadablesRequestCompletionHandler)(NS_ARRAY_OF(MGLDownloadable *) *downloadables, NSError *error); + +@interface MGLDownloadController : NSObject + ++ (instancetype)sharedController; + +- (instancetype)init NS_UNAVAILABLE; + +- (void)addDownloadableForRegion:(id <MGLDownloadRegion>)downloadRegion withContext:(NSData *)context completionHandler:(MGLDownloadableRegistrationCompletionHandler)completion; + +- (void)removeDownloadable:(MGLDownloadable *)downloadable withCompletionHandler:(MGLDownloadableRemovalCompletionHandler)completion; + +- (void)requestDownloadablesWithCompletionHandler:(MGLDownloadablesRequestCompletionHandler)completion; + +- (void)setMaximumAllowedMapboxTiles:(uint64_t)maximumCount; + +@end + +NS_ASSUME_NONNULL_END |