diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-03-25 17:02:08 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-03-29 11:46:25 -0700 |
commit | a1e5701fa3fa7041cbbdd3edabd1c6a8006ce68b (patch) | |
tree | 4ad07a8c03277f4f9d4700ad27fd351ded166139 /platform/darwin/src/MGLOfflinePack_Private.h | |
parent | bbab5a5b5e9b3cd2461a1c088f8610e6f1938686 (diff) | |
download | qtlocation-mapboxgl-a1e5701fa3fa7041cbbdd3edabd1c6a8006ce68b.tar.gz |
[ios, osx] Centralized offline pack management
MGLOfflineStorage now maintains a centralized, strongly held, KVO-compliant collection of all extant offline packs. MGLOfflineStorage issues notifications for progress updates. Client code can now react to the successful addition of an offline pack either via the completion block or via a KVO insertion.
Fixes #4287.
Diffstat (limited to 'platform/darwin/src/MGLOfflinePack_Private.h')
-rw-r--r-- | platform/darwin/src/MGLOfflinePack_Private.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLOfflinePack_Private.h b/platform/darwin/src/MGLOfflinePack_Private.h index e29018fc36..c1637ab4a8 100644 --- a/platform/darwin/src/MGLOfflinePack_Private.h +++ b/platform/darwin/src/MGLOfflinePack_Private.h @@ -11,6 +11,16 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)initWithMBGLRegion:(mbgl::OfflineRegion *)region; /** + Request an asynchronous update to the pack’s `state` and `progress` properties. + + The state and progress of an inactive or completed pack are computed lazily. If + you need the state or progress of a pack inside an + `MGLOfflinePackListingCompletionHandler`, set the `delegate` property then call + this method. + */ +- (void)requestProgress; + +/** Invalidates the pack and ensures that no future progress update can ever revalidate it. */ |