Files
comaps/platform/background_downloader_ios.h
Konstantin Pastbin e3e4a1985a Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
2025-05-08 21:10:51 +07:00

24 lines
748 B
Objective-C

#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef void (^DownloadCompleteBlock)(NSError *_Nullable error);
typedef void (^DownloadProgressBlock)(int64_t bytesWritten, int64_t bytesExpected);
/// Note: this class is NOT thread-safe and must be used from main thread only.
@interface BackgroundDownloader : NSObject
@property(copy, nonatomic, nullable) void (^backgroundCompletionHandler)(void);
+ (BackgroundDownloader *)sharedBackgroundMapDownloader;
- (NSUInteger)downloadWithUrl:(NSURL *)url
completion:(DownloadCompleteBlock)completion
progress:(DownloadProgressBlock)progress;
- (void)cancelTaskWithIdentifier:(NSUInteger)taskIdentifier;
- (void)clear;
@end
NS_ASSUME_NONNULL_END