TencentOpenAPI iOS SDK  v1.4 Beta
QQ互联开放平台 iOS SDK
 全部  文件 函数 变量 类型定义 枚举 枚举值 属性 
TencentOAuth.h
浏览该文件的文档.
1 
2 
3 
4 
5 
6 
7 
8 
9 #import "sdkdef.h"
10 #import <UIKit/UIKit.h>
11 
12 @protocol TencentSessionDelegate;
13 @protocol TencentLoginDelegate;
14 
20 @interface TencentOAuth : NSObject
21 {
22  NSMutableDictionary* _apiRequests;
23  NSString* _accessToken;
24  NSDate* _expirationDate;
25  id<TencentSessionDelegate> _sessionDelegate;
26  NSString* _localAppId;
27  NSString* _openId;
28  NSString* _redirectURI;
29  NSArray* _permissions;
30 }
31 
33 @property(nonatomic, copy) NSString* accessToken;
34 
36 @property(nonatomic, copy) NSDate* expirationDate;
37 
39 @property(nonatomic, assign) id<TencentSessionDelegate> sessionDelegate;
40 
42 @property(nonatomic, copy) NSString* localAppId;
43 
45 @property(nonatomic, copy) NSString* openId;
46 
48 @property(nonatomic, copy) NSString* redirectURI;
49 
51 @property(nonatomic, retain) NSString* appId;
52 
59 - (id)initWithAppId:(NSString *)appId
60  andDelegate:(id<TencentSessionDelegate>)delegate;
61 
67 - (BOOL)authorize:(NSArray *)permissions
68  inSafari:(BOOL)bInSafari;
69 
76 - (BOOL)authorize:(NSArray *)permissions
77  localAppId:(NSString *)localAppId
78  inSafari:(BOOL)bInSafari;
79 
85 - (BOOL)incrAuthWithPermissions:(NSArray *)permissions;
86 
92 - (BOOL)reauthorizeWithPermissions:(NSArray *)permissions;
93 
99 - (BOOL)handleOpenURL:(NSURL *)url;
100 
106 + (BOOL)HandleOpenURL:(NSURL *)url;
107 
112 - (void)logout:(id<TencentSessionDelegate>)delegate;
113 
118 - (BOOL)isSessionValid;
119 
121 // APIs, can be called after accesstoken and openid have received
122 
127 - (BOOL)getUserInfo;
128 
134 - (BOOL)getListAlbum;
135 
142 - (BOOL)getListPhotoWithParams:(NSMutableDictionary *)params;
143 
144 
150 - (BOOL)addShareWithParams:(NSMutableDictionary *)params;
151 
152 
159 - (BOOL)uploadPicWithParams:(NSMutableDictionary *)params;
160 
167 - (BOOL)addAlbumWithParams:(NSMutableDictionary *)params;
168 
174 - (BOOL)checkPageFansWithParams:(NSMutableDictionary *)params;
175 
182 - (BOOL)addOneBlogWithParams:(NSMutableDictionary *)params;
183 
190 - (BOOL)addTopicWithParams:(NSMutableDictionary *)params;
191 
198 - (BOOL)setUserHeadpic:(NSMutableDictionary *)params;
199 
200 
208 - (BOOL)setUserHeadpic:(NSMutableDictionary *)params andViewController:(UIViewController **)viewController;
209 
215 - (BOOL)getVipInfo;
216 
222 - (BOOL)getVipRichInfo;
223 
229 - (BOOL)matchNickTips:(NSMutableDictionary *)params;
230 
236 - (BOOL)getIntimateFriends:(NSMutableDictionary *)params;
237 
243 - (BOOL)cancel:(id)userData;
244 @end
245 
247 
252 @protocol TencentLoginDelegate <NSObject>
253 
254 @required
255 
259 - (void)tencentDidLogin;
260 
265 - (void)tencentDidNotLogin:(BOOL)cancelled;
266 
270 - (void)tencentDidNotNetWork;
271 
272 @optional
276 - (NSArray *)getAuthorizedPermissions:(NSArray *)permissions withExtraParams:(NSDictionary *)extraParams;
277 
278 @end
279 
286 
287 @optional
288 
292 - (void)tencentDidLogout;
293 
301 - (BOOL)tencentNeedPerformIncrAuth:(TencentOAuth *)tencentOAuth withPermissions:(NSArray *)permissions;
302 
309 - (BOOL)tencentNeedPerformReAuth:(TencentOAuth *)tencentOAuth;
310 
316 - (void)tencentDidUpdate:(TencentOAuth *)tencentOAuth;
317 
322 - (void)tencentFailedUpdate:(UpdateFailType)reason;
323 
330 - (void)getUserInfoResponse:(APIResponse*) response;
331 
338 - (void)getListAlbumResponse:(APIResponse*) response;
339 
346 - (void)getListPhotoResponse:(APIResponse*) response;
347 
354 - (void)checkPageFansResponse:(APIResponse*) response;
355 
362 - (void)addShareResponse:(APIResponse*) response;
363 
370 - (void)addAlbumResponse:(APIResponse*) response;
371 
378 - (void)uploadPicResponse:(APIResponse*) response;
379 
380 
387 - (void)addOneBlogResponse:(APIResponse*) response;
388 
395 - (void)addTopicResponse:(APIResponse*) response;
396 
403 - (void)setUserHeadpicResponse:(APIResponse*) response;
404 
411 - (void)getVipInfoResponse:(APIResponse*) response;
412 
417 - (void)getVipRichInfoResponse:(APIResponse*) response;
418 
425 - (void)matchNickTipsResponse:(APIResponse*) response;
426 
433 - (void)getIntimateFriendsResponse:(APIResponse*) response;
434 
439 - (void)sendStoryResponse:(APIResponse*) response;
440 
444 - (void)tencentOAuth:(TencentOAuth *)tencentOAuth didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite userData:(id)userData;
445 
446 
450 - (void)tencentOAuth:(TencentOAuth *)tencentOAuth doCloseViewController:(UIViewController *)viewController;
451 
452 @end