diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-11-01 22:48:37 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-11-02 12:40:40 -0700 |
commit | e2797d1f24ac9ea5436921f97fbdac0ddc39d51b (patch) | |
tree | 3f5d6eabf2a42b0451d4b4033fb428ddcea511ca /platform/darwin/src/MGLOfflineStorage.h | |
parent | c2e37f062be6848a73eb5659f253775aa0abfe02 (diff) | |
download | qtlocation-mapboxgl-e2797d1f24ac9ea5436921f97fbdac0ddc39d51b.tar.gz |
[ios, macos] Rationalized string enum names
Renamed MGLGeoJSONSourceOption and MGLOfflinePackUserInfoKey constants for clarity and to remove redundancy in the Swift-bridged names. Left the old MGLOfflinePackUserInfoKey constants in place as deprecated aliases.
Diffstat (limited to 'platform/darwin/src/MGLOfflineStorage.h')
-rw-r--r-- | platform/darwin/src/MGLOfflineStorage.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/platform/darwin/src/MGLOfflineStorage.h b/platform/darwin/src/MGLOfflineStorage.h index c6676cf0bd..b3fb7a2d54 100644 --- a/platform/darwin/src/MGLOfflineStorage.h +++ b/platform/darwin/src/MGLOfflineStorage.h @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN alternatively observe KVO change notifications to the pack’s `progress` key path. */ -extern NSNotificationName const MGLOfflinePackProgressChangedNotification; +extern const NSNotificationName MGLOfflinePackProgressChangedNotification; /** Posted by the shared `MGLOfflineStorage` object whenever an `MGLOfflinePack` @@ -37,7 +37,7 @@ extern NSNotificationName const MGLOfflinePackProgressChangedNotification; `userInfo` dictionary contains the error object in the `MGLOfflinePackErrorUserInfoKey` key. */ -extern NSNotificationName const MGLOfflinePackErrorNotification; +extern const NSNotificationName MGLOfflinePackErrorNotification; /** Posted by the shared `MGLOfflineStorage` object when the maximum number of @@ -52,7 +52,7 @@ extern NSNotificationName const MGLOfflinePackErrorNotification; calling the `-[MGLOfflineStorage removePack:withCompletionHandler:]` method. Contact your Mapbox sales representative to have the limit raised. */ -extern NSNotificationName const MGLOfflinePackMaximumMapboxTilesReachedNotification; +extern const NSNotificationName MGLOfflinePackMaximumMapboxTilesReachedNotification; /** A key in the `userInfo` property of a notification posted by `MGLOfflinePack`. @@ -65,7 +65,9 @@ typedef NSString *MGLOfflinePackUserInfoKey NS_EXTENSIBLE_STRING_ENUM; `MGLOfflinePackProgressChangedNotification` notification. Call `-integerValue` on the object to receive the `MGLOfflinePackState`-typed state. */ -extern MGLOfflinePackUserInfoKey const MGLOfflinePackStateUserInfoKey; +extern const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyState; + +extern NSString * const MGLOfflinePackStateUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyState"))); /** The key for an `NSValue` object that indicates an offline pack’s current @@ -74,7 +76,9 @@ extern MGLOfflinePackUserInfoKey const MGLOfflinePackStateUserInfoKey; `-MGLOfflinePackProgressValue` on the object to receive the `MGLOfflinePackProgress`-typed progress. */ -extern MGLOfflinePackUserInfoKey const MGLOfflinePackProgressUserInfoKey; +extern const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyProgress; + +extern NSString * const MGLOfflinePackProgressUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyProgress"))); /** The key for an `NSError` object that is encountered in the course of @@ -82,7 +86,9 @@ extern MGLOfflinePackUserInfoKey const MGLOfflinePackProgressUserInfoKey; an `MGLOfflinePackErrorNotification` notification. The error’s domain is `MGLErrorDomain`. See `MGLErrorCode` for possible error codes. */ -extern MGLOfflinePackUserInfoKey const MGLOfflinePackErrorUserInfoKey; +extern const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyError; + +extern NSString * const MGLOfflinePackErrorUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyError"))); /** The key for an `NSNumber` object that indicates the maximum number of @@ -92,7 +98,9 @@ extern MGLOfflinePackUserInfoKey const MGLOfflinePackErrorUserInfoKey; `-unsignedLongLongValue` on the object to receive the `uint64_t`-typed tile limit. */ -extern MGLOfflinePackUserInfoKey const MGLOfflinePackMaximumCountUserInfoKey; +extern const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyMaximumCount; + +extern NSString * const MGLOfflinePackMaximumCountUserInfoKey __attribute__((deprecated("Use MGLOfflinePackUserInfoKeyMaximumCount"))); /** A block to be called once an offline pack has been completely created and |