summaryrefslogtreecommitdiff
path: root/platform/ios/vendor/mapbox-accounts-ios/MBXSKUToken.h
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2019-05-15 14:35:18 -0700
committerJason Wray <jason@mapbox.com>2019-05-15 14:35:18 -0700
commitcbef953ce39c5892adf0f468de5b065f23e6ac54 (patch)
tree8a00c25f35d50f9530fbecc646b597c43e688706 /platform/ios/vendor/mapbox-accounts-ios/MBXSKUToken.h
parent3a6ff7710fcf201f82ddc2090488ef585bd8ab17 (diff)
downloadqtlocation-mapboxgl-upstream/friedbunny-libmbxaccounts-0.0.5.tar.gz
[ios] Update to libmbxaccounts 0.0.5upstream/friedbunny-libmbxaccounts-0.0.5
Diffstat (limited to 'platform/ios/vendor/mapbox-accounts-ios/MBXSKUToken.h')
-rw-r--r--platform/ios/vendor/mapbox-accounts-ios/MBXSKUToken.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/platform/ios/vendor/mapbox-accounts-ios/MBXSKUToken.h b/platform/ios/vendor/mapbox-accounts-ios/MBXSKUToken.h
index e83ffd2288..8a02d9641c 100644
--- a/platform/ios/vendor/mapbox-accounts-ios/MBXSKUToken.h
+++ b/platform/ios/vendor/mapbox-accounts-ios/MBXSKUToken.h
@@ -2,13 +2,26 @@
NS_ASSUME_NONNULL_BEGIN
-extern NSString *const MBXAccountsMapsSKUIDMaps;
-extern NSString *const MBXAccountsNavigationSKUIDMaps;
+typedef NSString *MBXAccountsSKUID NS_TYPED_ENUM;
+FOUNDATION_EXTERN const MBXAccountsSKUID MBXAccountsSKUIDMaps;
+FOUNDATION_EXTERN const MBXAccountsSKUID MBXAccountsSKUIDNavigation;
+
+typedef NS_ENUM(NSInteger, MBXAccountsSKUType) {
+ MBXAccountsSKUTypeUser,
+ MBXAccountsSKUTypeSession
+};
@interface MBXSKUToken : NSObject
-@property (class, nonatomic, readonly) NSString *mapsToken;
-@property (class, nonatomic, readonly) NSString *navigationToken;
+/**
+ Generates a token for the given identifier and type.
+
+ @param skuId The sku identifier, e.g. maps or navigation.
+ @param type The type of token, e.g. user or session.
+
+ @return A SKU token for use with API requests.
+ */
++ (NSString *)tokenForSKUID:(MBXAccountsSKUID)skuId type:(MBXAccountsSKUType)type NS_SWIFT_NAME(token(for:type:));
@end