diff options
author | Eimantas Vaiciunas <eimantas@walkingsmarts.com> | 2017-02-06 15:47:39 +0200 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2017-02-06 12:39:11 -0800 |
commit | 7b0881030fdc60130458c2a798de696888c87c7c (patch) | |
tree | 5c018664d3ed3ba54e973a309cd5279b7ad11afb /platform/darwin/src/MGLOfflinePack_Private.h | |
parent | 631c5a2f9314aaea558986f02a9b158c48fd8771 (diff) | |
download | qtlocation-mapboxgl-7b0881030fdc60130458c2a798de696888c87c7c.tar.gz |
Make `MGLOfflinePack` instances post notifications
This commit also gets rid of private `MGLOfflinePackDelegate` protocol.
`userInfo` dictionary in notification objects retain the `state` and
`progress` values for backwards compatibility. They can be removed in
later major release.
Diffstat (limited to 'platform/darwin/src/MGLOfflinePack_Private.h')
-rw-r--r-- | platform/darwin/src/MGLOfflinePack_Private.h | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/platform/darwin/src/MGLOfflinePack_Private.h b/platform/darwin/src/MGLOfflinePack_Private.h index 65156b4e90..8a63152dca 100644 --- a/platform/darwin/src/MGLOfflinePack_Private.h +++ b/platform/darwin/src/MGLOfflinePack_Private.h @@ -4,19 +4,8 @@ NS_ASSUME_NONNULL_BEGIN -@protocol MGLOfflinePackDelegate; - @interface MGLOfflinePack (Private) -/** - The pack’s delegate. - - You can use the offline pack delegate to be notified of any changes in the - pack’s progress and of any errors while downloading. For more information, see - the `MGLOfflinePackDelegate` documentation. - */ -@property (nonatomic, weak, nullable) id <MGLOfflinePackDelegate> delegate; - @property (nonatomic, nullable) mbgl::OfflineRegion *mbglOfflineRegion; @property (nonatomic, readwrite) MGLOfflinePackState state; @@ -31,47 +20,4 @@ NS_ASSUME_NONNULL_BEGIN @end -/** - The `MGLOfflinePackDelegate` protocol defines methods that a delegate of an - `MGLOfflinePack` object can optionally implement to be notified of any changes - in the pack’s download progress and of any errors while downloading. - */ -@protocol MGLOfflinePackDelegate <NSObject> - -/** - Sent whenever the pack’s state or download progress changes. Every change to a - field in the `progress` property corresponds to an invocation of this method. - - @param pack The pack whose state of progress changed. - @param progress The updated progress. To get the updated state, refer to the - `state` property. - */ -- (void)offlinePack:(MGLOfflinePack *)pack progressDidChange:(MGLOfflinePackProgress)progress; - -/** - Sent whenever the pack encounters an error while downloading. - - Download errors may be recoverable. For example, this pack’s implementation may - attempt to re-request failed resources based on an exponential backoff - strategy or upon the restoration of network access. - - @param pack The pack that encountered an error. - @param error A download error. For a list of possible error codes, see - `MGLErrorCode`. - */ -- (void)offlinePack:(MGLOfflinePack *)pack didReceiveError:(NSError *)error; - -/** - Sent when the maximum number of Mapbox-hosted tiles has been downloaded and - stored on the current device. - - Once this limit is reached, no instance of `MGLOfflinePack` can download - additional tiles from Mapbox APIs until already downloaded tiles are removed by - calling the `-[MGLOfflineStorage removePack:withCompletionHandler:]` method. - Contact your Mapbox sales representative to have the limit raised. - */ -- (void)offlinePack:(MGLOfflinePack *)pack didReceiveMaximumAllowedMapboxTiles:(uint64_t)maximumCount; - -@end - NS_ASSUME_NONNULL_END |