1515typedef enum
1616{
1717 EQQAPISENDSUCESS = 0 ,
18- EQQAPIQQNOTINSTALLED = 1 ,
19- EQQAPIQQNOTSUPPORTAPI = 2 ,
18+ EQQAPIQQNOTINSTALLED = 1 , // QQ未安装
19+ EQQAPIQQNOTSUPPORTAPI = 2 , // QQ api不支持
2020 EQQAPIMESSAGETYPEINVALID = 3 ,
2121 EQQAPIMESSAGECONTENTNULL = 4 ,
2222 EQQAPIMESSAGECONTENTINVALID = 5 ,
2323 EQQAPIAPPNOTREGISTED = 6 ,
2424 EQQAPIAPPSHAREASYNC = 7 ,
25- EQQAPIQQNOTSUPPORTAPI_WITH_ERRORSHOW = 8 ,
26- EQQAPISENDFAILD = -1 ,
25+ EQQAPIQQNOTSUPPORTAPI_WITH_ERRORSHOW = 8 , // QQ api不支持 && SDK显示error提示(已废弃)
26+ EQQAPIMESSAGEARKCONTENTNULL = 9 , // ark内容为空
27+ EQQAPISENDFAILD = -1 , // 发送失败
2728 EQQAPISHAREDESTUNKNOWN = -2 , // 未指定分享到QQ或TIM
29+ EQQAPITIMSENDFAILD = -3 , // 发送失败
2830
2931 EQQAPITIMNOTINSTALLED = 11 , // TIM未安装
3032 EQQAPITIMNOTSUPPORTAPI = 12 , // TIM api不支持
31- // qzone分享不支持text类型分享
32- EQQAPIQZONENOTSUPPORTTEXT = 10000 ,
33- // qzone分享不支持image类型分享
34- EQQAPIQZONENOTSUPPORTIMAGE = 10001 ,
35- // 当前QQ版本太低,需要更新至新版本才可以支持
36- EQQAPIVERSIONNEEDUPDATE = 10002 ,
37- ETIMAPIVERSIONNEEDUPDATE = 10004 ,
33+
34+ EQQAPIQZONENOTSUPPORTTEXT = 10000 , // qzone分享不支持text类型分享
35+ EQQAPIQZONENOTSUPPORTIMAGE = 10001 , // qzone分享不支持image类型分享
36+ EQQAPIVERSIONNEEDUPDATE = 10002 , // 当前QQ版本太低,需要更新至新版本才可以支持
37+ ETIMAPIVERSIONNEEDUPDATE = 10004 , // 当前TIM版本太低,需要更新至新版本才可以支持
3838} QQApiSendResultCode;
3939
4040#pragma mark - QQApiObject(分享对象类型)
4747 kQQAPICtrlFlagQQShare = 0x04 ,
4848 kQQAPICtrlFlagQQShareFavorites = 0x08 , // 收藏
4949 kQQAPICtrlFlagQQShareDataline = 0x10 , // 数据线
50+ kQQAPICtrlFlagQQShareEnableArk = 0x20 , // 支持ARK
5051};
5152
5253// 分享到QQ或TIM
5354typedef enum ShareDestType {
54- ShareDestTypeQQ,
55+ ShareDestTypeQQ = 0 ,
5556 ShareDestTypeTIM,
5657}ShareDestType;
5758
@@ -63,7 +64,23 @@ __attribute__((visibility("default"))) @interface QQApiObject : NSObject
6364@property(nonatomic,retain) NSString * description; // /<简要描述,最长512个字符
6465
6566@property (nonatomic, assign) uint64_t cflag;
66- @property (nonatomic, assign) ShareDestType shareDestType; // 分享到QQ或TIM,必须指定
67+ /*
68+ * 分享到QQ/TIM
69+ * SDK根据是否安装对应客户端进行判断,判断顺序:QQ > TIM
70+ * 默认分享到QQ,如果QQ未安装检测TIM是否安装
71+ */
72+ @property (nonatomic, assign) ShareDestType shareDestType;
73+ @end
74+
75+ // ArkObject
76+ /* * \brief 支持Ark的根类。
77+ */
78+ __attribute__ ((visibility(" default" ))) @interface ArkObject : NSObject
79+ @property(nonatomic,retain) NSString* arkData; // /< 显示Ark所需的数据,json串,长度暂不限制
80+ @property(nonatomic,assign) QQApiObject* qqApiObject; // /<原有老版本的QQApiObject
81+
82+ - (id )initWithData:(NSString *)arkData qqApiObject:(QQApiObject*)qqApiObject;
83+ + (id )objectWithData:(NSString *)arkData qqApiObject:(QQApiObject*)qqApiObject;
6784@end
6885
6986// QQApiResultObject
@@ -195,37 +212,42 @@ __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject
195212@interface QQApiImageArrayForQZoneObject : QQApiObject
196213
197214@property (nonatomic ,retain ) NSArray * imageDataArray;// /图片数组
215+ @property (nonatomic ,retain ) NSDictionary * extMap; // 扩展字段
198216
199217/* *
200218 初始化方法
201219 @param imageDataArray 图片数组
202220 @param title 写说说的内容,可以为空
221+ @param extMap 扩展字段
203222 */
204- - (id )initWithImageArrayData : (NSArray *)imageDataArray title : (NSString *)title ;
223+ - (id )initWithImageArrayData : (NSArray *)imageDataArray title : (NSString *)title extMap : ( NSDictionary *) extMap ;
205224
206225/* *
207226 helper方法获取一个autorelease的<code>QQApiExtendObject</code>对象
208227 @param title 写说说的内容,可以为空
209228 @param imageDataArray 发送的多张图片队列
229+ @param extMap 扩展字段
210230 @return
211231 一个自动释放的<code>QQApiExtendObject</code>实例
212232 */
213- + (id )objectWithimageDataArray : (NSArray *)imageDataArray title : (NSString *)title ;
233+ + (id )objectWithimageDataArray : (NSArray *)imageDataArray title : (NSString *)title extMap : ( NSDictionary *) extMap ;
214234
215235@end
216236
217237// QQApiVideoForQZoneObject
218238/* * @brief 视频对象
219239 用于分享视频到空间,走写说说路径<code>QQApiObject</code>
220240 assetURL可传ALAsset的ALAssetPropertyAssetURL,或者PHAsset的localIdentifier
241+ @param extMap 扩展字段
221242 */
222243@interface QQApiVideoForQZoneObject : QQApiObject
223244
224245@property (nonatomic , retain ) NSString *assetURL;
246+ @property (nonatomic ,retain ) NSDictionary * extMap; // 扩展字段
225247
226- - (id )initWithAssetURL : (NSString *)assetURL title : (NSString *)title ;
248+ - (id )initWithAssetURL : (NSString *)assetURL title : (NSString *)title extMap : ( NSDictionary *) extMap ;
227249
228- + (id )objectWithAssetURL : (NSString *)assetURL title : (NSString *)title ;
250+ + (id )objectWithAssetURL : (NSString *)assetURL title : (NSString *)title extMap : ( NSDictionary *) extMap ;
229251
230252@end
231253
@@ -256,23 +278,6 @@ __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject
256278
257279@end
258280
259- // QQApiGroupTribeImageObject
260- /* * @brief 群部落图片对象
261- 用于分享图片内容的对象,是一个指定为图片类型的 可以指定一些其他的附加数据<code>QQApiExtendObject</code>
262- */
263- @interface QQApiGroupTribeImageObject : QQApiImageObject
264- {
265- NSString *_bid;
266- NSString *_bname;
267- }
268- // 群部落id
269- @property (nonatomic , retain )NSString * bid;
270-
271- // 群部落名称
272- @property (nonatomic , retain )NSString * bname;
273-
274- @end
275-
276281
277282// QQApiFileObject
278283/* * @brief 本地文件对象(暂只支持分享到手机QQ数据线功能)
@@ -375,17 +380,6 @@ __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject
375380
376381@end
377382
378- // QQApiPayObject
379- /* * \brief 支付对象
380- */
381- @interface QQApiPayObject : QQApiObject
382- @property (nonatomic ,retain )NSString * OrderNo; // /<支付订单号,必填
383- @property (nonatomic ,retain )NSString * AppInfo; // /<支付来源信息,必填
384-
385- -(id )initWithOrderNo : (NSString *)OrderNo AppInfo : (NSString *)AppInfo ; // /<初始化方法
386- +(id )objectWithOrderNo : (NSString *)OrderNo AppInfo : (NSString *)AppInfo ;// /<工厂方法,获取一个QQApiPayObject对象.
387- @end
388-
389383// QQApiCommonContentObject;
390384/* * @brief 通用模板类型对象
391385 用于分享一个固定显示模板的图文混排对象
@@ -419,15 +413,7 @@ __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject
419413@property (nonatomic ,retain ) NSURL * target;// /<广告目标链接
420414@end
421415
422- // QQApiWPAObject
423- /* * \brief 发起WPA对象
424- */
425- @interface QQApiWPAObject : QQApiObject
426- @property (nonatomic ,retain )NSString * uin; // /<想要对话的QQ号
427-
428- -(id )initWithUin : (NSString *)uin ; // /<初始化方法
429- +(id )objectWithUin : (NSString *)uin ;// /<工厂方法,获取一个QQApiWPAObject对象.
430- @end
416+ #pragma mark - QQApiObject(关系链对象)
431417
432418// QQApiAddFriendObject
433419/* * \brief 添加好友
@@ -469,16 +455,6 @@ __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject
469455
470456@end
471457
472- // QQApiGroupChatObject
473- /* * \brief 发起群会话对象
474- */
475- @interface QQApiGroupChatObject : QQApiObject
476- @property (nonatomic ,retain )NSString * groupID; // /<想要对话的群号
477-
478- -(id )initWithGroup : (NSString *)groupID ; // /<初始化方法
479- +(id )objectWithGroup : (NSString *)groupID ;// /<工厂方法,获取一个QQApiGroupChatObject对象.
480- @end
481-
482458#pragma mark - QQApi请求消息类型
483459
484460/* *
@@ -488,7 +464,8 @@ enum QQApiInterfaceReqType
488464{
489465 EGETMESSAGEFROMQQREQTYPE = 0 , // /< 手Q -> 第三方应用,请求第三方应用向手Q发送消息
490466 ESENDMESSAGETOQQREQTYPE = 1 , // /< 第三方应用 -> 手Q,第三方应用向手Q分享消息
491- ESHOWMESSAGEFROMQQREQTYPE = 2 // /< 手Q -> 第三方应用,请求第三方应用展现消息中的数据
467+ ESHOWMESSAGEFROMQQREQTYPE = 2 , // /< 手Q -> 第三方应用,请求第三方应用展现消息中的数据
468+ ESENDMESSAGEARKTOQQREQTYPE = 3 // /< 第三方应用 -> 手Q,第三方应用向手Q分享Ark消息
492469};
493470
494471/* *
@@ -542,38 +519,28 @@ enum QQApiInterfaceRespType
542519
543520@end
544521
545- /* *
546- GetMessageFromQQResp应答帮助类
547- */
548- @interface GetMessageFromQQResp : QQBaseResp
522+ @interface SendMessageToQQReq : QQBaseReq
549523
550524/* *
551- 创建一个GetMessageFromQQResp应答实例
525+ 创建一个SendMessageToQQReq请求实例
552526 \param message 具体分享消息实例
553- \return 新创建的GetMessageFromQQResp应答实例
554- */
555- + (GetMessageFromQQResp *)respWithContent : (QQApiObject *)message ;
556-
557- /* * 具体分享消息 */
558- @property (nonatomic , retain ) QQApiObject *message;
559-
560- @end
561-
562- /* *
563- SendMessageToQQReq请求帮助类
527+ \return 新创建的SendMessageToQQReq请求实例
564528 */
565- @interface SendMessageToQQReq : QQBaseReq
529+ + ( SendMessageToQQReq *) reqWithContent : (QQApiObject *) message ;
566530
567531/* *
568- 创建一个SendMessageToQQReq请求实例
532+ 创建一个支持Ark的SendMessageToQQReq请求实例
569533 \param message 具体分享消息实例
570534 \return 新创建的SendMessageToQQReq请求实例
571535 */
572- + (SendMessageToQQReq *)reqWithContent : (QQApiObject *)message ;
536+ + (SendMessageToQQReq *)reqWithArkContent : (ArkObject *)message ;
573537
574538/* * 具体分享消息 */
575539@property (nonatomic , retain ) QQApiObject *message;
576540
541+ /* * 支持Ark的具体分享消息 */
542+ @property (nonatomic , retain ) ArkObject *arkMessage;
543+
577544@end
578545
579546/* *
@@ -609,19 +576,5 @@ enum QQApiInterfaceRespType
609576
610577@end
611578
612- /* *
613- ShowMessageFromQQResp应答帮助类
614- */
615- @interface ShowMessageFromQQResp : QQBaseResp
616-
617- /* *
618- 创建一个ShowMessageFromQQResp应答实例
619- \param result 展现消息结果
620- \param errDesp 具体错误描述信息
621- \return 新创建的ShowMessageFromQQResp应答实例
622- */
623- + (ShowMessageFromQQResp *)respWithResult : (NSString *)result errorDescription : (NSString *)errDesp ;
624-
625- @end
626579
627580#endif
0 commit comments