QQApiInterface#isQQInstalled
和QQApiInterface#isQQSupportApi
检测发现QQ没安装或当前版本QQ不支持API调用,可引导用户通过打开此链接下载最新版QQ。
104 | \return iPhoneQQ下载地址
105 | */
106 | + (NSString *)getQQInstallUrl;
107 |
108 | @end
109 |
--------------------------------------------------------------------------------
/WTShare/WTShare/Lib/Tencent3.1.0/TencentOpenAPI.framework/Headers/QQApiInterfaceObject.h:
--------------------------------------------------------------------------------
1 | ///
2 | /// \file QQApiInterfaceObject.h
3 | /// \brief QQApiInterface所依赖的请求及应答消息对象封装帮助类
4 | ///
5 | /// Created by Tencent on 12-5-15.
6 | /// Copyright (c) 2012年 Tencent. All rights reserved.
7 | ///
8 |
9 | #ifndef QQApiInterface_QQAPIOBJECT_h
10 | #define QQApiInterface_QQAPIOBJECT_h
11 |
12 | #import error | errorDescription | 注释 |
0 | nil | 成功 |
-1 | param error | 参数错误 |
-2 | group code is invalid | 该群不在自己的群列表里面 |
-3 | upload photo failed | 上传图片失败 |
-4 | user give up the current operation | 用户放弃当前操作 |
-5 | client internal error | 客户端内部处理错误 |
QQApiExtendObject
实例
156 | */
157 | + (id)objectWithData:(NSData*)data previewImageData:(NSData*)previewImageData title:(NSString*)title description:(NSString*)description;
158 |
159 | /**
160 | helper方法获取一个autorelease的QQApiExtendObject
对象
161 | @param data 数据内容
162 | @param previewImageData 用于预览的图片
163 | @param title 标题
164 | @param description 此对象,分享的描述
165 | @param imageDataArray 发送的多张图片队列
166 | @return
167 | 一个自动释放的QQApiExtendObject
实例
168 | */
169 | + (id)objectWithData:(NSData*)data previewImageData:(NSData*)previewImageData title:(NSString*)title description:(NSString*)description imageDataArray:(NSArray*)imageDataArray;
170 |
171 | @end
172 |
173 | // QQApiImageObject
174 | /** @brief 图片对象
175 | 用于分享图片内容的对象,是一个指定为图片类型的QQApiExtendObject
176 | */
177 | @interface QQApiImageObject : QQApiExtendObject
178 | @end
179 |
180 | // QQApiImageArrayForQZoneObject
181 | /** @brief 图片对象
182 | 用于分享图片到空间,走写说说路径,是一个指定为图片类型的,当图片数组为空时,默认走文本写说说QQApiObject
183 | */
184 | @interface QQApiImageArrayForQZoneObject : QQApiObject
185 |
186 | @property(nonatomic,retain) NSArray* imageDataArray;///图片数组
187 |
188 | /**
189 | 初始化方法
190 | @param imageDataArray 图片数组
191 | @param title 写说说的内容,可以为空
192 | */
193 | - (id)initWithImageArrayData:(NSArray*)imageDataArray title:(NSString*)title;
194 |
195 | /**
196 | helper方法获取一个autorelease的QQApiExtendObject
对象
197 | @param title 写说说的内容,可以为空
198 | @param imageDataArray 发送的多张图片队列
199 | @return
200 | 一个自动释放的QQApiExtendObject
实例
201 | */
202 | + (id)objectWithimageDataArray:(NSArray*)imageDataArray title:(NSString*)title;
203 |
204 | @end
205 |
206 | // QQApiVideoForQZoneObject
207 | /** @brief 视频对象
208 | 用于分享视频到空间,走写说说路径QQApiObject
209 | assetURL可传ALAsset的ALAssetPropertyAssetURL,或者PHAsset的localIdentifier
210 | */
211 | @interface QQApiVideoForQZoneObject : QQApiObject
212 |
213 | @property(nonatomic, retain) NSString *assetURL;
214 |
215 | - (id)initWithAssetURL:(NSString*)assetURL title:(NSString*)title;
216 |
217 | + (id)objectWithAssetURL:(NSString*)assetURL title:(NSString*)title;
218 |
219 | @end
220 |
221 | // QQApiWebImageObject
222 | /** @brief 图片对象
223 | 用于分享网络图片内容的对象,是一个指定网络图片url的: 该类型只在2.9.0的h5分享中才支持,
224 | 原有的手q分享是不支持该类型的。
225 | */
226 | @interface QQApiWebImageObject : QQApiObject
227 |
228 | @property(nonatomic, retain) NSURL *previewImageURL; ///<预览图像URL
229 |
230 | /**
231 | 初始化方法
232 | @param previewImageURL 用于预览的图片
233 | @param title 标题
234 | @param description 此对象,分享的描述
235 | */
236 | - (id)initWithPreviewImageURL:(NSURL*)previewImageURL title:(NSString*)title description:(NSString*)description;
237 |
238 | /**
239 | helper方法获取一个autorelease的QQApiWebImageObject
对象
240 | @param previewImageURL 用于预览的图片
241 | @param title 标题
242 | @param description 此对象,分享的描述
243 | */
244 | + (id)objectWithPreviewImageURL:(NSURL*)previewImageURL title:(NSString*)title description:(NSString*)description;
245 |
246 | @end
247 |
248 | // QQApiGroupTribeImageObject
249 | /** @brief 群部落图片对象
250 | 用于分享图片内容的对象,是一个指定为图片类型的 可以指定一些其他的附加数据QQApiExtendObject
251 | */
252 | @interface QQApiGroupTribeImageObject : QQApiImageObject
253 | {
254 | NSString *_bid;
255 | NSString *_bname;
256 | }
257 | // 群部落id
258 | @property (nonatomic, retain)NSString* bid;
259 |
260 | // 群部落名称
261 | @property (nonatomic, retain)NSString* bname;
262 |
263 | @end
264 |
265 |
266 | //QQApiFileObject
267 | /** @brief 本地文件对象(暂只支持分享到手机QQ数据线功能)
268 | 用于分享文件内容的对象,是一个指定为文件类型的QQApiExtendObject
269 | */
270 | @interface QQApiFileObject : QQApiExtendObject
271 | {
272 | NSString* _fileName;
273 | }
274 | @property(nonatomic, retain)NSString* fileName;
275 | @end
276 |
277 | // QQApiAudioObject
278 | /** @brief 音频URL对象
279 | 用于分享目标内容为音频的URL的对象
280 | */
281 | @interface QQApiAudioObject : QQApiURLObject
282 |
283 | @property (nonatomic, retain) NSURL *flashURL; ///<音频URL地址,最长512个字符
284 |
285 | /**
286 | 获取一个autorelease的QQApiAudioObject
287 | @param url 音频内容的目标URL
288 | @param title 分享内容的标题
289 | @param description 分享内容的描述
290 | @param data 分享内容的预览图像
291 | @note 如果url为空,调用QQApi#sendMessage:
时将返回FALSE
292 | */
293 | +(id)objectWithURL:(NSURL*)url title:(NSString*)title description:(NSString*)description previewImageData:(NSData*)data;
294 |
295 | /**
296 | 获取一个autorelease的QQApiAudioObject
297 | @param url 音频内容的目标URL
298 | @param title 分享内容的标题
299 | @param description 分享内容的描述
300 | @param previewURL 分享内容的预览图像URL
301 | @note 如果url为空,调用QQApi#sendMessage:
时将返回FALSE
302 | */
303 | +(id)objectWithURL:(NSURL*)url title:(NSString*)title description:(NSString*)description previewImageURL:(NSURL*)previewURL;
304 |
305 | @end
306 |
307 | // QQApiVideoObject
308 | /** @brief 视频URL对象
309 | 用于分享目标内容为视频的URL的对象
310 |
311 | QQApiVideoObject类型的分享,目前在Android和PC QQ上接收消息时,展现有待完善,待手机QQ版本以后更新支持
312 | 目前如果要分享视频,推荐使用 QQApiNewsObject 类型
313 | */
314 | @interface QQApiVideoObject : QQApiURLObject
315 |
316 | @property (nonatomic, retain) NSURL *flashURL; ///<视频URL地址,最长512个字符
317 |
318 | /**
319 | 获取一个autorelease的QQApiVideoObject
320 | @param url 视频内容的目标URL
321 | @param title 分享内容的标题
322 | @param description 分享内容的描述
323 | @param data 分享内容的预览图像
324 | @note 如果url为空,调用QQApi#sendMessage:
时将返回FALSE
325 | */
326 | +(id)objectWithURL:(NSURL*)url title:(NSString*)title description:(NSString*)description previewImageData:(NSData*)data;
327 |
328 | /**
329 | 获取一个autorelease的QQApiVideoObject
330 | @param url 视频内容的目标URL
331 | @param title 分享内容的标题
332 | @param description 分享内容的描述
333 | @param previewURL 分享内容的预览图像URL
334 | @note 如果url为空,调用QQApi#sendMessage:
时将返回FALSE
335 | */
336 | +(id)objectWithURL:(NSURL*)url title:(NSString*)title description:(NSString*)description previewImageURL:(NSURL*)previewURL;
337 |
338 | @end
339 |
340 | // QQApiNewsObject
341 | /** @brief 新闻URL对象
342 | 用于分享目标内容为新闻的URL的对象
343 | */
344 | @interface QQApiNewsObject : QQApiURLObject
345 | /**
346 | 获取一个autorelease的QQApiNewsObject
347 | @param url 视频内容的目标URL
348 | @param title 分享内容的标题
349 | @param description 分享内容的描述
350 | @param data 分享内容的预览图像
351 | @note 如果url为空,调用QQApi#sendMessage:
时将返回FALSE
352 | */
353 | +(id)objectWithURL:(NSURL*)url title:(NSString*)title description:(NSString*)description previewImageData:(NSData*)data;
354 |
355 | /**
356 | 获取一个autorelease的QQApiNewsObject
357 | @param url 视频内容的目标URL
358 | @param title 分享内容的标题
359 | @param description 分享内容的描述
360 | @param previewURL 分享内容的预览图像URL
361 | @note 如果url为空,调用QQApi#sendMessage:
时将返回FALSE
362 | */
363 | +(id)objectWithURL:(NSURL*)url title:(NSString*)title description:(NSString*)description previewImageURL:(NSURL*)previewURL;
364 |
365 | @end
366 |
367 | // QQApiPayObject
368 | /** \brief 支付对象
369 | */
370 | @interface QQApiPayObject : QQApiObject
371 | @property(nonatomic,retain)NSString* OrderNo; ///<支付订单号,必填
372 | @property(nonatomic,retain)NSString* AppInfo; ///<支付来源信息,必填
373 |
374 | -(id)initWithOrderNo:(NSString*)OrderNo AppInfo:(NSString*)AppInfo; ///<初始化方法
375 | +(id)objectWithOrderNo:(NSString*)OrderNo AppInfo:(NSString*)AppInfo;///<工厂方法,获取一个QQApiPayObject对象.
376 | @end
377 |
378 | // QQApiCommonContentObject;
379 | /** @brief 通用模板类型对象
380 | 用于分享一个固定显示模板的图文混排对象
381 | @note 图片列表和文本列表不能同时为空
382 | */
383 | @interface QQApiCommonContentObject : QQApiObject
384 | /**
385 | 预定义的界面布局类型
386 | */
387 | @property(nonatomic,assign) unsigned int layoutType;
388 | @property(nonatomic,assign) NSData* previewImageData;///<预览图
389 | @property(nonatomic,retain) NSArray* textArray;///<文本列表
390 | @property(nonatomic,retain) NSArray* pictureDataArray;///<图片列表
391 | +(id)objectWithLayoutType:(int)layoutType textArray:(NSArray*)textArray pictureArray:(NSArray*)pictureArray previewImageData:(NSData*)data;
392 | /**
393 | 将一个NSDictionary对象转化为QQApiCommomContentObject,如果无法转换,则返回空
394 | */
395 | +(id)objectWithDictionary:(NSDictionary*)dic;
396 | -(NSDictionary*)toDictionary;
397 | @end
398 |
399 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////
400 | // Ad item object definition
401 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////
402 | /** @brief 广告数据对象
403 | */
404 | @interface QQApiAdItem : NSObject
405 | @property(nonatomic,retain) NSString* title; ///<名称
406 | @property(nonatomic,retain) NSString* description;///<描述
407 | @property(nonatomic,retain) NSData* imageData;///<广告图片
408 | @property(nonatomic,retain) NSURL* target;///<广告目标链接
409 | @end
410 |
411 | // QQApiWPAObject
412 | /** \brief 发起WPA对象
413 | */
414 | @interface QQApiWPAObject : QQApiObject
415 | @property(nonatomic,retain)NSString* uin; ///<想要对话的QQ号
416 |
417 | -(id)initWithUin:(NSString*)uin; ///<初始化方法
418 | +(id)objectWithUin:(NSString*)uin;///<工厂方法,获取一个QQApiWPAObject对象.
419 | @end
420 |
421 | // QQApiAddFriendObject
422 | /** \brief 添加好友
423 | */
424 | @interface QQApiAddFriendObject : QQApiObject
425 | @property (nonatomic,retain)NSString* openID;
426 | @property (nonatomic,retain)NSString* subID;
427 | @property (nonatomic,retain)NSString* remark;
428 |
429 | -(id)initWithOpenID:(NSString*)openID; ///<初始化方法
430 | +(id)objecWithOpenID:(NSString*)openID; ///<工厂方法,获取一个QQApiAddFriendObject对象.
431 |
432 | @end
433 |
434 | // QQApiGameConsortiumBindingGroupObject
435 | /** \brief 游戏公会绑定群
436 | */
437 | @interface QQApiGameConsortiumBindingGroupObject : QQApiObject
438 | @property (nonatomic,retain)NSString* signature;
439 | @property (nonatomic,retain)NSString* unionid;
440 | @property (nonatomic,retain)NSString* zoneID;
441 | @property (nonatomic,retain)NSString* appDisplayName;
442 |
443 | -(id)initWithGameConsortium:(NSString*)signature unionid:(NSString*)unionid zoneID:(NSString*)zoneID appDisplayName:(NSString*)appDisplayName; ///<初始化方法
444 | +(id)objectWithGameConsortium:(NSString*)signature unionid:(NSString*)unionid zoneID:(NSString*)zoneID appDisplayName:(NSString*)appDisplayName; ///<工厂方法,获取一个QQApiAddFriendObject对象.
445 |
446 | @end
447 |
448 | // QQApiGameConsortiumBindingGroupObject
449 | /** \brief 加入群
450 | */
451 | @interface QQApiJoinGroupObject : QQApiObject
452 | @property (nonatomic,retain)NSString* groupUin;
453 | @property (nonatomic,retain)NSString* groupKey;
454 |
455 | - (id)initWithGroupInfo:(NSString*)groupUin key:(NSString*)groupKey; ///<初始化方法
456 | + (id)objectWithGroupInfo:(NSString*)groupUin key:(NSString*)groupKey; ///<同时提供群号和群KEY 工厂方法,获取一个QQApiAddFriendObject对象.
457 | + (id)objectWithGroupKey:(NSString*)groupKey; ///<只需要群的KEY 工厂方法,获取一个QQApiAddFriendObject对象.
458 |
459 | @end
460 |
461 | // QQApiGroupChatObject
462 | /** \brief 发起群会话对象
463 | */
464 | @interface QQApiGroupChatObject : QQApiObject
465 | @property(nonatomic,retain)NSString* groupID; ///<想要对话的群号
466 |
467 | -(id)initWithGroup:(NSString*)groupID; ///<初始化方法
468 | +(id)objectWithGroup:(NSString*)groupID;///<工厂方法,获取一个QQApiGroupChatObject对象.
469 | @end
470 |
471 | #pragma mark - QQApi请求消息类型
472 |
473 | /**
474 | QQApi请求消息类型
475 | */
476 | enum QQApiInterfaceReqType
477 | {
478 | EGETMESSAGEFROMQQREQTYPE = 0, ///< 手Q -> 第三方应用,请求第三方应用向手Q发送消息
479 | ESENDMESSAGETOQQREQTYPE = 1, ///< 第三方应用 -> 手Q,第三方应用向手Q分享消息
480 | ESHOWMESSAGEFROMQQREQTYPE = 2 ///< 手Q -> 第三方应用,请求第三方应用展现消息中的数据
481 | };
482 |
483 | /**
484 | QQApi应答消息类型
485 | */
486 | enum QQApiInterfaceRespType
487 | {
488 | ESHOWMESSAGEFROMQQRESPTYPE = 0, ///< 第三方应用 -> 手Q,第三方应用应答消息展现结果
489 | EGETMESSAGEFROMQQRESPTYPE = 1, ///< 第三方应用 -> 手Q,第三方应用回应发往手Q的消息
490 | ESENDMESSAGETOQQRESPTYPE = 2 ///< 手Q -> 第三方应用,手Q应答处理分享消息的结果
491 | };
492 |
493 | /**
494 | QQApi请求消息基类
495 | */
496 | @interface QQBaseReq : NSObject
497 |
498 | /** 请求消息类型,参见\ref QQApiInterfaceReqType */
499 | @property (nonatomic, assign) int type;
500 |
501 | @end
502 |
503 | /**
504 | QQApi应答消息基类
505 | */
506 | @interface QQBaseResp : NSObject
507 |
508 | /** 请求处理结果 */
509 | @property (nonatomic, copy) NSString* result;
510 |
511 | /** 具体错误描述信息 */
512 | @property (nonatomic, copy) NSString* errorDescription;
513 |
514 | /** 应答消息类型,参见\ref QQApiInterfaceRespType */
515 | @property (nonatomic, assign) int type;
516 |
517 | /** 扩展信息 */
518 | @property (nonatomic, assign) NSString* extendInfo;
519 |
520 | @end
521 |
522 | /**
523 | GetMessageFromQQReq请求帮助类
524 | */
525 | @interface GetMessageFromQQReq : QQBaseReq
526 |
527 | /**
528 | 创建一个GetMessageFromQQReq请求实例
529 | */
530 | + (GetMessageFromQQReq *)req;
531 |
532 | @end
533 |
534 | /**
535 | GetMessageFromQQResp应答帮助类
536 | */
537 | @interface GetMessageFromQQResp : QQBaseResp
538 |
539 | /**
540 | 创建一个GetMessageFromQQResp应答实例
541 | \param message 具体分享消息实例
542 | \return 新创建的GetMessageFromQQResp应答实例
543 | */
544 | + (GetMessageFromQQResp *)respWithContent:(QQApiObject *)message;
545 |
546 | /** 具体分享消息 */
547 | @property (nonatomic, retain) QQApiObject *message;
548 |
549 | @end
550 |
551 | /**
552 | SendMessageToQQReq请求帮助类
553 | */
554 | @interface SendMessageToQQReq : QQBaseReq
555 |
556 | /**
557 | 创建一个SendMessageToQQReq请求实例
558 | \param message 具体分享消息实例
559 | \return 新创建的SendMessageToQQReq请求实例
560 | */
561 | + (SendMessageToQQReq *)reqWithContent:(QQApiObject *)message;
562 |
563 | /** 具体分享消息 */
564 | @property (nonatomic, retain) QQApiObject *message;
565 |
566 | @end
567 |
568 | /**
569 | SendMessageToQQResp应答帮助类
570 | */
571 | @interface SendMessageToQQResp : QQBaseResp
572 |
573 | /**
574 | 创建一个SendMessageToQQResp应答实例
575 | \param result 请求处理结果
576 | \param errDesp 具体错误描述信息
577 | \param extendInfo 扩展信息
578 | \return 新创建的SendMessageToQQResp应答实例
579 | */
580 | + (SendMessageToQQResp *)respWithResult:(NSString *)result errorDescription:(NSString *)errDesp extendInfo:(NSString*)extendInfo;
581 |
582 | @end
583 |
584 | /**
585 | ShowMessageFromQQReq请求帮助类
586 | */
587 | @interface ShowMessageFromQQReq : QQBaseReq
588 |
589 | /**
590 | 创建一个ShowMessageFromQQReq请求实例
591 | \param message 具体待展现消息实例
592 | \return 新创建的ShowMessageFromQQReq请求实例
593 | */
594 | + (ShowMessageFromQQReq *)reqWithContent:(QQApiObject *)message;
595 |
596 | /** 具体待展现消息 */
597 | @property (nonatomic, retain) QQApiObject *message;
598 |
599 | @end
600 |
601 | /**
602 | ShowMessageFromQQResp应答帮助类
603 | */
604 | @interface ShowMessageFromQQResp : QQBaseResp
605 |
606 | /**
607 | 创建一个ShowMessageFromQQResp应答实例
608 | \param result 展现消息结果
609 | \param errDesp 具体错误描述信息
610 | \return 新创建的ShowMessageFromQQResp应答实例
611 | */
612 | + (ShowMessageFromQQResp *)respWithResult:(NSString *)result errorDescription:(NSString *)errDesp;
613 |
614 | @end
615 |
616 | #endif
617 |
--------------------------------------------------------------------------------
/WTShare/WTShare/Lib/Tencent3.1.0/TencentOpenAPI.framework/Headers/TencentApiInterface.h:
--------------------------------------------------------------------------------
1 | //
2 | // TencentMessage.h
3 | // TencentOpenApi_IOS
4 | //
5 | // Created by qqconnect on 13-5-29.
6 | // Copyright (c) 2013年 Tencent. All rights reserved.
7 | //
8 |
9 | #ifndef QQ_OPEN_SDK_LITE
10 |
11 | #import