Map Doc  1.0
iOS-引擎SDK-开放平台
MBAuth.h
浏览该文件的文档.
1 //
2 // MBAuth.h
3 // iNaviCore
4 //
5 // Created by delon on 13-7-11.
6 // Copyright (c) 2013年 Mapbar. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 
11 #import "MBNaviCoreBase.h"
12 #import "MBEngine.h"
13 
14 @class MBDataPackageDesc;
15 @protocol MBAuthDelegate;
16 
20 @interface MBAuth : NSObject
24 @property (nonatomic, copy) NSString *token;
25 
29 @property (nonatomic, weak) id<MBAuthDelegate> delegate;
30 
36 + (instancetype)sharedAuth;
37 
42 - (void)setLicenseBaseUrl:(NSString *)baseUrl;
43 
47 - (void)updateLicense;
48 
56 - (void)updateLicenseWithParamString:(NSString *)param;
57 
68 - (MBDataPackageDesc *)dataInfoWith:(NSString *)dataId error:(MBAuthError *)error;
69 
75 - (BOOL)dataIsAvailable:(NSString *)dataId;
76 
80 - (NSArray *)dataIds;
81 - (NSArray *)dataPackageDescs;
82 
89 
95 - (void)closeAuth;
96 
100 + (void)cleanup;
101 @end
102 
106 @interface MBDataPackageDesc : NSObject
110 @property (nonatomic, readonly, copy) NSString *dataId;
111 
115 @property (nonatomic, readonly, copy) NSDate *expiredTime;
116 @end
117 
121 @protocol MBAuthDelegate
122  @optional
129 - (void)mbAuth:(MBAuth *)auth udpateState:(MBAuthUpdateState)state code:(NSInteger)code;
130 @end
MBAuthUpdateState
Definition: MBEngine.h:57
instancetype sharedAuth()
void closeAuth()
void cleanup()
MBAuthError
Definition: MBEngine.h:12
NSArray * dataPackageDescs()
NSString * token
Definition: MBAuth.h:24
Definition: MBAuth.h:20
Definition: MBAuth.h:121
Definition: MBAuth.h:106
MBAuthError checkLicense()
id< MBAuthDelegate > delegate
Definition: MBAuth.h:29
NSArray * dataIds()
void updateLicense()