IEMGroupManager.h 76 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619
  1. /*!
  2. * \~chinese
  3. * @header IEMGroupManager.h
  4. * @abstract 此协议定义了群组相关操作
  5. * @author Hyphenate
  6. * @version 3.00
  7. *
  8. * \~english
  9. * @header IEMGroupManager.h
  10. * @abstract This protocol defines the group operations
  11. * @author Hyphenate
  12. * @version 3.00
  13. */
  14. #import <Foundation/Foundation.h>
  15. #import "EMCommonDefs.h"
  16. #import "EMGroupManagerDelegate.h"
  17. #import "EMGroup.h"
  18. #import "EMGroupOptions.h"
  19. #import "EMCursorResult.h"
  20. #import "EMGroupSharedFile.h"
  21. /*!
  22. * \~chinese
  23. * 群组相关操作
  24. *
  25. * \~english
  26. * Group operations
  27. */
  28. @protocol IEMGroupManager <NSObject>
  29. @required
  30. #pragma mark - Delegate
  31. /*!
  32. * \~chinese
  33. * 添加回调代理
  34. *
  35. * @param aDelegate 要添加的代理
  36. * @param aQueue 添加回调代理
  37. *
  38. * \~english
  39. * Add delegate
  40. *
  41. * @param aDelegate Delegate
  42. * @param aQueue (optional) The queue of calling delegate methods. Pass in nil to run on main thread.
  43. */
  44. - (void)addDelegate:(id<EMGroupManagerDelegate>)aDelegate
  45. delegateQueue:(dispatch_queue_t)aQueue;
  46. /*!
  47. * \~chinese
  48. * 移除回调代理
  49. *
  50. * @param aDelegate 要移除的代理
  51. *
  52. * \~english
  53. * Remove delegate
  54. *
  55. * @param aDelegate Delegate
  56. */
  57. - (void)removeDelegate:(id)aDelegate;
  58. #pragma mark - Get Group
  59. /*!
  60. * \~chinese
  61. * 获取用户所有群组
  62. *
  63. * @result 群组列表<EMGroup>
  64. *
  65. * \~english
  66. * Get all groups
  67. *
  68. * @result Group list<EMGroup>
  69. *
  70. */
  71. - (NSArray *)getJoinedGroups;
  72. /*!
  73. * \~chinese
  74. * 从内存中获取屏蔽了推送的群组ID列表
  75. *
  76. * @param pError 错误信息
  77. *
  78. * \~english
  79. * Get the list of groups which have disabled Apple Push Notification Service
  80. *
  81. * @param pError Error
  82. */
  83. - (NSArray *)getGroupsWithoutPushNotification:(EMError **)pError;
  84. #pragma mark - Get group from server
  85. /*!
  86. * \~chinese
  87. * 按数目从服务器获取自己加入的群组
  88. *
  89. * 同步方法,会阻塞当前线程
  90. *
  91. * @param aPageNum 获取自己加入群的cursor,首次调用传空
  92. * @param aPageSize 期望返回结果的数量, 如果 < 0 则一次返回所有结果
  93. * @param pError 出错信息
  94. *
  95. * @return 群组列表<EMGroup>
  96. *
  97. * \~english
  98. * Get pagesize number group you joined from the server.
  99. *
  100. * Synchronization method will block the current thread
  101. *
  102. * @param aPageNum Page number
  103. * @param aPageSize Page size
  104. * @param pError Error
  105. *
  106. * @return Group list<EMGroup>
  107. */
  108. - (NSArray *)getJoinedGroupsFromServerWithPage:(NSInteger)aPageNum
  109. pageSize:(NSInteger)aPageSize
  110. error:(EMError **)pError;
  111. /*!
  112. * \~chinese
  113. * 按数目从服务器获取自己加入的群组
  114. *
  115. * @param aPageNum 获取自己加入群的cursor,首次调用传空
  116. * @param aPageSize 期望返回结果的数量, 如果 < 0 则一次返回所有结果
  117. * @param aCompletionBlock 完成的回调
  118. *
  119. * \~english
  120. * Get pagesize number group you joined from the server.
  121. *
  122. * @param aPageNum Page number
  123. * @param aPageSize Page size
  124. * @param aCompletionBlock The callback block of completion
  125. *
  126. */
  127. - (void)getJoinedGroupsFromServerWithPage:(NSInteger)aPageNum
  128. pageSize:(NSInteger)aPageSize
  129. completion:(void (^)(NSArray *aList, EMError *aError))aCompletionBlock;
  130. /*!
  131. * \~chinese
  132. * 从服务器获取指定范围内的公开群
  133. *
  134. * 同步方法,会阻塞当前线程
  135. *
  136. * @param aCursor 获取公开群的cursor,首次调用传空
  137. * @param aPageSize 期望返回结果的数量, 如果 < 0 则一次返回所有结果
  138. * @param pError 出错信息
  139. *
  140. * @return 获取的公开群结果
  141. *
  142. * \~english
  143. * Get public groups with the specified range from the server
  144. *
  145. * Synchronization method will block the current thread
  146. *
  147. * @param aCursor Cursor, input nil the first time
  148. * @param aPageSize Expect result count, return all results if count is less than zero
  149. * @param pError Error
  150. *
  151. * @return The result
  152. */
  153. - (EMCursorResult *)getPublicGroupsFromServerWithCursor:(NSString *)aCursor
  154. pageSize:(NSInteger)aPageSize
  155. error:(EMError **)pError;
  156. /*!
  157. * \~chinese
  158. * 从服务器获取指定范围内的公开群
  159. *
  160. * @param aCursor 获取公开群的cursor,首次调用传空
  161. * @param aPageSize 期望返回结果的数量, 如果 < 0 则一次返回所有结果
  162. * @param aCompletionBlock 完成的回调
  163. *
  164. *
  165. * \~english
  166. * Get public groups with the specified range from the server
  167. *
  168. * @param aCursor Cursor, input nil the first time
  169. * @param aPageSize Expect result count, return all results if count is less than zero
  170. * @param aCompletionBlock The callback block of completion
  171. *
  172. */
  173. - (void)getPublicGroupsFromServerWithCursor:(NSString *)aCursor
  174. pageSize:(NSInteger)aPageSize
  175. completion:(void (^)(EMCursorResult *aResult, EMError *aError))aCompletionBlock;
  176. /*!
  177. * \~chinese
  178. * 根据群ID搜索公开群
  179. *
  180. * 同步方法,会阻塞当前线程
  181. *
  182. * @param aGroundId 群组id
  183. * @param pError 错误信息
  184. *
  185. * @return 搜索到的群组
  186. *
  187. * \~english
  188. * Search a public group with the id
  189. *
  190. * Synchronization method will block the current thread
  191. *
  192. * @param aGroundId Group id
  193. * @param pError Error
  194. *
  195. * @return The group with the id
  196. */
  197. - (EMGroup *)searchPublicGroupWithId:(NSString *)aGroundId
  198. error:(EMError **)pError;
  199. /*!
  200. * \~chinese
  201. * 根据群ID搜索公开群
  202. *
  203. * @param aGroundId 群组id
  204. * @param aCompletionBlock 完成的回调
  205. *
  206. *
  207. * \~english
  208. * Search public group with group id
  209. *
  210. * @param aGroundId Group id
  211. * @param aCompletionBlock The callback block of completion
  212. *
  213. */
  214. - (void)searchPublicGroupWithId:(NSString *)aGroundId
  215. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  216. #pragma mark - Create
  217. /*!
  218. * \~chinese
  219. * 创建群组
  220. *
  221. * 同步方法,会阻塞当前线程
  222. *
  223. * @param aSubject 群组名称
  224. * @param aDescription 群组描述
  225. * @param aInvitees 群组成员(不包括创建者自己)
  226. * @param aMessage 邀请消息
  227. * @param aSetting 群组属性
  228. * @param pError 出错信息
  229. *
  230. * @return 创建的群组
  231. *
  232. * \~english
  233. * Create a group
  234. *
  235. * Synchronization method will block the current thread
  236. *
  237. * @param aSubject Group subject
  238. * @param aDescription Group description
  239. * @param aInvitees Group members, without creater
  240. * @param aMessage Invitation message
  241. * @param aSetting Group options
  242. * @param pError Error
  243. *
  244. * @return Created group
  245. */
  246. - (EMGroup *)createGroupWithSubject:(NSString *)aSubject
  247. description:(NSString *)aDescription
  248. invitees:(NSArray *)aInvitees
  249. message:(NSString *)aMessage
  250. setting:(EMGroupOptions *)aSetting
  251. error:(EMError **)pError;
  252. /*!
  253. * \~chinese
  254. * 创建群组
  255. *
  256. * @param aSubject 群组名称
  257. * @param aDescription 群组描述
  258. * @param aInvitees 群组成员(不包括创建者自己)
  259. * @param aMessage 邀请消息
  260. * @param aSetting 群组属性
  261. * @param aCompletionBlock 完成的回调
  262. *
  263. *
  264. * \~english
  265. * Create a group
  266. *
  267. * @param aSubject Group subject
  268. * @param aDescription Group description
  269. * @param aInvitees Group members, without creater
  270. * @param aMessage Invitation message
  271. * @param aSetting Group options
  272. * @param aCompletionBlock The callback block of completion
  273. *
  274. */
  275. - (void)createGroupWithSubject:(NSString *)aSubject
  276. description:(NSString *)aDescription
  277. invitees:(NSArray *)aInvitees
  278. message:(NSString *)aMessage
  279. setting:(EMGroupOptions *)aSetting
  280. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  281. #pragma mark - Fetch Info
  282. /*!
  283. * \~chinese
  284. * 获取群组详情,包含群组ID,群组名称,群组描述,群组基本属性,群组Owner, 群组管理员
  285. *
  286. * 同步方法,会阻塞当前线程
  287. *
  288. * @param aGroupId 群组ID
  289. * @param pError 错误信息
  290. *
  291. * @return 群组
  292. *
  293. * \~english
  294. * Fetch group info,include ID, name, description,setting, owner, admins
  295. *
  296. * Synchronization method will block the current thread
  297. *
  298. * @param aGroupId Group id
  299. * @param pError Error
  300. *
  301. * @return Group instance
  302. */
  303. - (EMGroup *)getGroupSpecificationFromServerWithId:(NSString *)aGroupId
  304. error:(EMError **)pError;
  305. /*!
  306. * \~chinese
  307. * 获取群组详情,包含群组ID,群组名称,群组描述,群组基本属性,群组Owner, 群组管理员
  308. *
  309. * @param aGroupId 群组ID
  310. * @param aCompletionBlock 完成的回调
  311. *
  312. *
  313. * \~english
  314. * Fetch group specification, including: ID, name, description, setting, owner, admins
  315. *
  316. * @param aGroupId Group id
  317. * @param aCompletionBlock The callback block of completion
  318. *
  319. */
  320. - (void)getGroupSpecificationFromServerWithId:(NSString *)aGroupId
  321. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  322. /*!
  323. * \~chinese
  324. * 获取群组成员列表
  325. *
  326. * @param aGroupId 群组ID
  327. * @param aCursor 游标,,首次调用传空
  328. * @param aPageSize 获取多少条
  329. * @param pError 错误信息
  330. *
  331. * @return 列表和游标
  332. *
  333. * \~english
  334. * Get the list of group members from the server
  335. *
  336. * @param aGroupId Group id
  337. * @param aCursor Cursor, input nil the first time
  338. * @param aPageSize Page size
  339. * @param pError Error
  340. *
  341. * @return List and cursor
  342. *
  343. */
  344. - (EMCursorResult *)getGroupMemberListFromServerWithId:(NSString *)aGroupId
  345. cursor:(NSString *)aCursor
  346. pageSize:(NSInteger)aPageSize
  347. error:(EMError **)pError;
  348. /*!
  349. * \~chinese
  350. * 获取群组成员列表
  351. *
  352. * @param aGroupId 群组ID
  353. * @param aCursor 游标,首次调用传空
  354. * @param aPageSize 获取多少条
  355. * @param aCompletionBlock 完成的回调
  356. *
  357. *
  358. * \~english
  359. * Get the list of group members from the server
  360. *
  361. * @param aGroupId Group id
  362. * @param aCursor Cursor, input nil the first time
  363. * @param aPageSize Page size
  364. * @param aCompletionBlock The callback block of completion
  365. *
  366. */
  367. - (void)getGroupMemberListFromServerWithId:(NSString *)aGroupId
  368. cursor:(NSString *)aCursor
  369. pageSize:(NSInteger)aPageSize
  370. completion:(void (^)(EMCursorResult *aResult, EMError *aError))aCompletionBlock;
  371. /*!
  372. * \~chinese
  373. * 获取群组黑名单列表, 需要owner/admin权限
  374. *
  375. * @param aGroupId 群组ID
  376. * @param aPageNum 获取第几页
  377. * @param aPageSize 获取多少条
  378. * @param pError 错误信息
  379. *
  380. *
  381. * \~english
  382. * Get the blacklist of group from the server, need owner / admin permissions
  383. *
  384. * @param aGroupId Group id
  385. * @param aPageNum Page number
  386. * @param aPageSize Page size
  387. * @param pError Error
  388. *
  389. */
  390. - (NSArray *)getGroupBlacklistFromServerWithId:(NSString *)aGroupId
  391. pageNumber:(NSInteger)aPageNum
  392. pageSize:(NSInteger)aPageSize
  393. error:(EMError **)pError;
  394. /*!
  395. * \~chinese
  396. * 获取群组黑名单列表, 需要owner/admin权限
  397. *
  398. * @param aGroupId 群组ID
  399. * @param aPageNum 获取第几页
  400. * @param aPageSize 获取多少条
  401. * @param aCompletionBlock 完成的回调
  402. *
  403. *
  404. * \~english
  405. * Get group's blacklist, need owner / admin permissions
  406. *
  407. * @param aGroupId Group id
  408. * @param aPageNum Page number
  409. * @param aPageSize Page size
  410. * @param aCompletionBlock The callback block of completion
  411. *
  412. */
  413. - (void)getGroupBlacklistFromServerWithId:(NSString *)aGroupId
  414. pageNumber:(NSInteger)aPageNum
  415. pageSize:(NSInteger)aPageSize
  416. completion:(void (^)(NSArray *aList, EMError *aError))aCompletionBlock;
  417. /*!
  418. * \~chinese
  419. * 获取群组被禁言列表
  420. *
  421. * @param aGroupId 群组ID
  422. * @param aPageNum 获取第几页
  423. * @param aPageSize 获取多少条
  424. * @param pError 错误信息
  425. *
  426. *
  427. * \~english
  428. * Get the mutes of group from the server
  429. *
  430. * @param aGroupId Group id
  431. * @param aPageNum Page number
  432. * @param aPageSize Page size
  433. * @param pError Error
  434. *
  435. */
  436. - (NSArray *)getGroupMuteListFromServerWithId:(NSString *)aGroupId
  437. pageNumber:(NSInteger)aPageNum
  438. pageSize:(NSInteger)aPageSize
  439. error:(EMError **)pError;
  440. /*!
  441. * \~chinese
  442. * 获取群组被禁言列表
  443. *
  444. * @param aGroupId 群组ID
  445. * @param aPageNum 获取第几页
  446. * @param aPageSize 获取多少条
  447. * @param aCompletionBlock 完成的回调
  448. *
  449. *
  450. * \~english
  451. * Get the mutes of group from the server
  452. *
  453. * @param aGroupId Group id
  454. * @param aPageNum Page number
  455. * @param aPageSize Page size
  456. * @param aCompletionBlock The callback block of completion
  457. *
  458. */
  459. - (void)getGroupMuteListFromServerWithId:(NSString *)aGroupId
  460. pageNumber:(NSInteger)aPageNum
  461. pageSize:(NSInteger)aPageSize
  462. completion:(void (^)(NSArray *aList, EMError *aError))aCompletionBlock;
  463. /*!
  464. * \~chinese
  465. * 获取群共享文件列表
  466. *
  467. * @param aGroupId 群组ID
  468. * @param aPageNum 获取第几页
  469. * @param aPageSize 获取多少条
  470. * @param pError 错误信息
  471. *
  472. * @result 群共享文件列表
  473. *
  474. * \~english
  475. * Get the share files of group from the server
  476. *
  477. * @param aGroupId Group id
  478. * @param aPageNum Page number
  479. * @param aPageSize Page size
  480. * @param pError error
  481. *
  482. * @result The share files of group
  483. */
  484. - (NSArray *)getGroupFileListWithId:(NSString *)aGroupId
  485. pageNumber:(NSInteger)aPageNum
  486. pageSize:(NSInteger)aPageSize
  487. error:(EMError **)pError;
  488. /*!
  489. * \~chinese
  490. * 获取群共享文件列表
  491. *
  492. * @param aGroupId 群组ID
  493. * @param aPageNum 获取第几页
  494. * @param aPageSize 获取多少条
  495. * @param aCompletionBlock 完成的回调
  496. *
  497. * \~english
  498. * Get the share files of group from the server
  499. *
  500. * @param aGroupId Group id
  501. * @param aPageNum Page number
  502. * @param aPageSize Page size
  503. * @param aCompletionBlock The callback block of completion
  504. */
  505. - (void)getGroupFileListWithId:(NSString *)aGroupId
  506. pageNumber:(NSInteger)aPageNum
  507. pageSize:(NSInteger)aPageSize
  508. completion:(void (^)(NSArray *aList, EMError *aError))aCompletionBlock;
  509. /*!
  510. * \~chinese
  511. * 获取群公告
  512. *
  513. * @param aGroupId 群组ID
  514. * @param pError 错误信息
  515. *
  516. * @result 群声明, 失败返回nil
  517. *
  518. * \~english
  519. * Get the announcement of group from the server
  520. *
  521. * @param aGroupId Group id
  522. * @param pError error
  523. *
  524. * @result Group Announcement, return nil if fail
  525. */
  526. - (NSString *)getGroupAnnouncementWithId:(NSString *)aGroupId
  527. error:(EMError **)pError;
  528. /*!
  529. * \~chinese
  530. * 获取群公告
  531. *
  532. * @param aGroupId 群组ID
  533. * @param aCompletionBlock 完成的回调
  534. *
  535. *
  536. * \~english
  537. * Get the announcement of group from the server
  538. *
  539. * @param aGroupId Group id
  540. * @param aCompletionBlock The callback block of completion
  541. *
  542. */
  543. - (void)getGroupAnnouncementWithId:(NSString *)aGroupId
  544. completion:(void (^)(NSString *aAnnouncement, EMError *aError))aCompletionBlock;
  545. #pragma mark - Edit Group
  546. /*!
  547. * \~chinese
  548. * 邀请用户加入群组
  549. *
  550. * 同步方法,会阻塞当前线程
  551. *
  552. * @param aOccupants 被邀请的用户名列表
  553. * @param aGroupId 群组ID
  554. * @param aWelcomeMessage 欢迎信息
  555. * @param pError 错误信息
  556. *
  557. * @result 群组实例, 失败返回nil
  558. *
  559. * \~english
  560. * Invite User to join a group
  561. *
  562. * Synchronization method will block the current thread
  563. *
  564. * @param aOccupants Invited users
  565. * @param aGroupId Group id
  566. * @param aWelcomeMessage Welcome message
  567. * @param pError Error
  568. *
  569. * @result Group instance, return nil if fail
  570. */
  571. - (EMGroup *)addOccupants:(NSArray *)aOccupants
  572. toGroup:(NSString *)aGroupId
  573. welcomeMessage:(NSString *)aWelcomeMessage
  574. error:(EMError **)pError;
  575. /*!
  576. * \~chinese
  577. * 邀请用户加入群组
  578. *
  579. * @param aUsers 被邀请的用户名列表
  580. * @param aGroupId 群组ID
  581. * @param aMessage 欢迎信息
  582. * @param aCompletionBlock 完成的回调
  583. *
  584. *
  585. * \~english
  586. * Invite User to join a group
  587. *
  588. * @param aUsers Invited users
  589. * @param aGroupId Group id
  590. * @param aMessage Welcome message
  591. * @param aCompletionBlock The callback block of completion
  592. *
  593. */
  594. - (void)addMembers:(NSArray *)aUsers
  595. toGroup:(NSString *)aGroupId
  596. message:(NSString *)aMessage
  597. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  598. /*!
  599. * \~chinese
  600. * 将群成员移出群组, 需要owner权限
  601. *
  602. * 同步方法,会阻塞当前线程
  603. *
  604. * @param aOccupants 要移出群组的用户列表
  605. * @param aGroupId 群组ID
  606. * @param pError 错误信息
  607. *
  608. * @result 群组实例
  609. *
  610. * \~english
  611. * Remove members from a group, required owner‘s authority
  612. *
  613. * Synchronization method will block the current thread
  614. *
  615. * @param aOccupants Users to be removed
  616. * @param aGroupId Group id
  617. * @param pError Error
  618. *
  619. * @result Group instance
  620. */
  621. - (EMGroup *)removeOccupants:(NSArray *)aOccupants
  622. fromGroup:(NSString *)aGroupId
  623. error:(EMError **)pError;
  624. /*!
  625. * \~chinese
  626. * 将群成员移出群组, 需要owner权限
  627. *
  628. * @param aUsers 要移出群组的用户列表
  629. * @param aGroupId 群组ID
  630. * @param aCompletionBlock 完成的回调
  631. *
  632. *
  633. * \~english
  634. * Remove members from a group, owner‘s authority is required
  635. *
  636. * @param aUsers Users to be removed
  637. * @param aGroupId Group id
  638. * @param aCompletionBlock The callback block of completion
  639. *
  640. */
  641. - (void)removeMembers:(NSArray *)aUsers
  642. fromGroup:(NSString *)aGroupId
  643. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  644. /*!
  645. * \~chinese
  646. * 加人到群组黑名单, 需要owner权限
  647. *
  648. * 同步方法,会阻塞当前线程
  649. *
  650. * @param aOccupants 要加入黑名单的用户
  651. * @param aGroupId 群组ID
  652. * @param pError 错误信息
  653. *
  654. * @result 群组实例
  655. *
  656. * \~english
  657. * Add users to group blacklist, required owner‘s authority
  658. *
  659. * Synchronization method will block the current thread
  660. *
  661. * @param aOccupants Users to be added
  662. * @param aGroupId Group id
  663. * @param pError Error
  664. *
  665. * @result Group instance
  666. */
  667. - (EMGroup *)blockOccupants:(NSArray *)aOccupants
  668. fromGroup:(NSString *)aGroupId
  669. error:(EMError **)pError;
  670. /*!
  671. * \~chinese
  672. * 加人到群组黑名单, 需要owner权限
  673. *
  674. * @param aMembers 要加入黑名单的用户
  675. * @param aGroupId 群组ID
  676. * @param aCompletionBlock 完成的回调
  677. *
  678. *
  679. * \~english
  680. * Add users to group blacklist, owner‘s authority is required
  681. *
  682. * @param aMembers Users to be added
  683. * @param aGroupId Group id
  684. * @param aCompletionBlock The callback block of completion
  685. *
  686. */
  687. - (void)blockMembers:(NSArray *)aMembers
  688. fromGroup:(NSString *)aGroupId
  689. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  690. /*!
  691. * \~chinese
  692. * 从群组黑名单中减人, 需要owner权限
  693. *
  694. * 同步方法,会阻塞当前线程
  695. *
  696. * @param aOccupants 要从黑名单中移除的用户名列表
  697. * @param aGroupId 群组ID
  698. * @param pError 错误信息
  699. *
  700. * @result 群组对象
  701. *
  702. * \~english
  703. * Remove users from group blacklist, required owner‘s authority
  704. *
  705. * Synchronization method will block the current thread
  706. *
  707. * @param aOccupants Users to be removed
  708. * @param aGroupId Group id
  709. * @param pError Error
  710. *
  711. * @result Group instance
  712. */
  713. - (EMGroup *)unblockOccupants:(NSArray *)aOccupants
  714. forGroup:(NSString *)aGroupId
  715. error:(EMError **)pError;
  716. /*!
  717. * \~chinese
  718. * 从群组黑名单中减人, 需要owner权限
  719. *
  720. * @param aMembers 要从黑名单中移除的用户名列表
  721. * @param aGroupId 群组ID
  722. * @param aCompletionBlock 完成的回调
  723. *
  724. *
  725. * \~english
  726. * Remove users out of group blacklist, owner‘s authority is required
  727. *
  728. * @param aMembers Users to be removed
  729. * @param aGroupId Group id
  730. * @param aCompletionBlock The callback block of completion
  731. *
  732. */
  733. - (void)unblockMembers:(NSArray *)aMembers
  734. fromGroup:(NSString *)aGroupId
  735. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  736. /*!
  737. * \~chinese
  738. * 更改群组主题, 需要owner权限
  739. *
  740. * 同步方法,会阻塞当前线程
  741. *
  742. * @param aSubject 新主题
  743. * @param aGroupId 群组ID
  744. * @param pError 错误信息
  745. *
  746. * @result 群组对象
  747. *
  748. * \~english
  749. * Change group subject, owner‘s authority is required
  750. *
  751. * Synchronization method will block the current thread
  752. *
  753. * @param aSubject New group subject
  754. * @param aGroupId Group id
  755. * @param pError Error
  756. *
  757. * @result Group instance
  758. */
  759. - (EMGroup *)changeGroupSubject:(NSString *)aSubject
  760. forGroup:(NSString *)aGroupId
  761. error:(EMError **)pError;
  762. /*!
  763. * \~chinese
  764. * 更改群组主题, 需要owner权限
  765. *
  766. * @param aSubject 新主题
  767. * @param aGroupId 群组ID
  768. * @param aCompletionBlock 完成的回调
  769. *
  770. *
  771. * \~english
  772. * Change the group subject, owner‘s authority is required
  773. *
  774. * @param aSubject New group‘s subject
  775. * @param aGroupId Group id
  776. * @param aCompletionBlock The callback block of completion
  777. *
  778. */
  779. - (void)updateGroupSubject:(NSString *)aSubject
  780. forGroup:(NSString *)aGroupId
  781. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  782. /*!
  783. * \~chinese
  784. * 更改群组说明信息, 需要owner权限
  785. *
  786. * 同步方法,会阻塞当前线程
  787. *
  788. * @param aDescription 说明信息
  789. * @param aGroupId 群组ID
  790. * @param pError 错误信息
  791. *
  792. * @result 群组对象
  793. *
  794. * \~english
  795. * Change group description, owner‘s authority is required
  796. *
  797. * Synchronization method will block the current thread
  798. *
  799. * @param aDescription New group description
  800. * @param aGroupId Group id
  801. * @param pError Error
  802. *
  803. * @result Group
  804. */
  805. - (EMGroup *)changeDescription:(NSString *)aDescription
  806. forGroup:(NSString *)aGroupId
  807. error:(EMError **)pError;
  808. /*!
  809. * \~chinese
  810. * 更改群组说明信息, 需要owner权限
  811. *
  812. * @param aDescription 说明信息
  813. * @param aGroupId 群组ID
  814. * @param aCompletionBlock 完成的回调
  815. *
  816. *
  817. * \~english
  818. * Change the group description, owner‘s authority is required
  819. *
  820. * @param aDescription New group‘s description
  821. * @param aGroupId Group id
  822. * @param aCompletionBlock The callback block of completion
  823. *
  824. */
  825. - (void)updateDescription:(NSString *)aDescription
  826. forGroup:(NSString *)aGroupId
  827. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  828. /*!
  829. * \~chinese
  830. * 退出群组,owner不能退出群,只能销毁群
  831. *
  832. * 同步方法,会阻塞当前线程
  833. *
  834. * @param aGroupId 群组ID
  835. * @param pError 错误信息
  836. *
  837. *
  838. * \~english
  839. * Leave a group, owner can't leave the group, can only destroy the group
  840. *
  841. * Synchronization method will block the current thread
  842. *
  843. * @param aGroupId Group id
  844. * @param pError Error
  845. *
  846. */
  847. - (void)leaveGroup:(NSString *)aGroupId
  848. error:(EMError **)pError;
  849. /*!
  850. * \~chinese
  851. * 退出群组,owner不能退出群,只能销毁群
  852. *
  853. * @param aGroupId 群组ID
  854. * @param aCompletionBlock 完成的回调
  855. *
  856. *
  857. * \~english
  858. * Leave a group, owner can't leave the group, can only destroy the group
  859. *
  860. * @param aGroupId Group id
  861. * @param aCompletionBlock The callback block of completion
  862. *
  863. */
  864. - (void)leaveGroup:(NSString *)aGroupId
  865. completion:(void (^)(EMError *aError))aCompletionBlock;
  866. /*!
  867. * \~chinese
  868. * 解散群组, 需要owner权限
  869. *
  870. * 同步方法,会阻塞当前线程
  871. *
  872. * @param aGroupId 群组ID
  873. *
  874. * @result 错误信息, 成功返回nil
  875. *
  876. * \~english
  877. * Destroy a group, owner‘s authority is required
  878. *
  879. * Synchronization method will block the current thread
  880. *
  881. * @param aGroupId Group id
  882. *
  883. * @result Error, return nil if success
  884. */
  885. - (EMError *)destroyGroup:(NSString *)aGroupId;
  886. /*!
  887. * \~chinese
  888. * 解散群组, 需要owner权限
  889. *
  890. * @param aGroupId 群组ID
  891. * @param aCompletionBlock 完成的回调
  892. *
  893. * \~english
  894. * Destroy a group, owner‘s authority is required
  895. *
  896. * @param aGroupId Group id
  897. * @param aCompletionBlock The callback block of completion
  898. *
  899. */
  900. - (void)destroyGroup:(NSString *)aGroupId
  901. finishCompletion:(void (^)(EMError *aError))aCompletionBlock;
  902. /*!
  903. * \~chinese
  904. * 屏蔽群消息,服务器不再发送此群的消息给用户,owner不能屏蔽群消息
  905. *
  906. * 同步方法,会阻塞当前线程
  907. *
  908. * @param aGroupId 要屏蔽的群ID
  909. * @param pError 错误信息
  910. *
  911. * @result 群组实例
  912. *
  913. * \~english
  914. * Block group messages, server will blocks the messages from the group, owner can't block the group's message
  915. *
  916. * Synchronization method will block the current thread
  917. *
  918. * @param aGroupId Group id
  919. * @param pError Error
  920. *
  921. * @result Group instance
  922. */
  923. - (EMGroup *)blockGroup:(NSString *)aGroupId
  924. error:(EMError **)pError;
  925. /*!
  926. * \~chinese
  927. * 屏蔽群消息,服务器不再发送此群的消息给用户,owner不能屏蔽群消息
  928. *
  929. * @param aGroupId 要屏蔽的群ID
  930. * @param aCompletionBlock 完成的回调
  931. *
  932. * \~english
  933. * Block group messages, server blocks the messages from the group, owner can't block the group's messages
  934. *
  935. * @param aGroupId Group id
  936. * @param aCompletionBlock The callback block of completion
  937. *
  938. */
  939. - (void)blockGroup:(NSString *)aGroupId
  940. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  941. /*!
  942. * \~chinese
  943. * 取消屏蔽群消息
  944. *
  945. * 同步方法,会阻塞当前线程
  946. *
  947. * @param aGroupId 要取消屏蔽的群ID
  948. * @param pError 错误信息
  949. *
  950. * @result 返回群组实例
  951. *
  952. * \~english
  953. * Unblock group messages
  954. *
  955. * Synchronization method will block the current thread
  956. *
  957. * @param aGroupId Group id
  958. * @param pError Error
  959. *
  960. * @result Group instance
  961. */
  962. - (EMGroup *)unblockGroup:(NSString *)aGroupId
  963. error:(EMError **)pError;
  964. /*!
  965. * \~chinese
  966. * 取消屏蔽群消息
  967. *
  968. * @param aGroupId 要取消屏蔽的群ID
  969. * @param aCompletionBlock 完成的回调
  970. *
  971. * \~english
  972. * Unblock group message
  973. *
  974. * @param aGroupId Group id
  975. * @param aCompletionBlock The callback block of completion
  976. *
  977. */
  978. - (void)unblockGroup:(NSString *)aGroupId
  979. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  980. /*!
  981. * \~chinese
  982. * 改变群主,需要Owner权限
  983. *
  984. * 同步方法,会阻塞当前线程
  985. *
  986. * @param aGroupId 群ID
  987. * @param aNewOwner 新群主
  988. * @param pError 错误信息
  989. *
  990. * @result 返回群组实例
  991. *
  992. * \~english
  993. * Change group owner, need Owner permissions
  994. *
  995. * Synchronization method will block the current thread
  996. *
  997. * @param aGroupId Group id
  998. * @param aNewOwner New group owner
  999. * @param pError Error
  1000. *
  1001. * @result Group instance
  1002. */
  1003. - (EMGroup *)updateGroupOwner:(NSString *)aGroupId
  1004. newOwner:(NSString *)aNewOwner
  1005. error:(EMError **)pError;
  1006. /*!
  1007. * \~chinese
  1008. * 改变群主,需要Owner权限
  1009. *
  1010. * @param aGroupId 群ID
  1011. * @param aNewOwner 新群主
  1012. * @param aCompletionBlock 完成的回调
  1013. *
  1014. *
  1015. * \~english
  1016. * Change group owner, need Owner permissions
  1017. *
  1018. * @param aGroupId Group id
  1019. * @param aNewOwner New group owner
  1020. * @param aCompletionBlock The callback block of completion
  1021. *
  1022. */
  1023. - (void)updateGroupOwner:(NSString *)aGroupId
  1024. newOwner:(NSString *)aNewOwner
  1025. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  1026. /*!
  1027. * \~chinese
  1028. * 添加群组管理员,需要Owner权限
  1029. *
  1030. * 同步方法,会阻塞当前线程
  1031. *
  1032. * @param aAdmin 要添加的群组管理员
  1033. * @param aGroupId 群ID
  1034. * @param pError 错误信息
  1035. * @result 返回群组实例
  1036. *
  1037. * \~english
  1038. * Add group admin, need Owner permissions
  1039. *
  1040. * Synchronization method will block the current thread
  1041. *
  1042. * @param aAdmin Admin
  1043. * @param aGroupId Group id
  1044. * @param pError Error
  1045. * @result Group instance
  1046. */
  1047. - (EMGroup *)addAdmin:(NSString *)aAdmin
  1048. toGroup:(NSString *)aGroupId
  1049. error:(EMError **)pError;
  1050. /*!
  1051. * \~chinese
  1052. * 添加群组管理员,需要Owner权限
  1053. *
  1054. * @param aAdmin 要添加的群组管理员
  1055. * @param aGroupId 群ID
  1056. * @param aCompletionBlock 完成的回调
  1057. *
  1058. *
  1059. * \~english
  1060. * Add group admin, need Owner permissions
  1061. *
  1062. * @param aAdmin Admin
  1063. * @param aGroupId Group id
  1064. * @param aCompletionBlock The callback block of completion
  1065. *
  1066. */
  1067. - (void)addAdmin:(NSString *)aAdmin
  1068. toGroup:(NSString *)aGroupId
  1069. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  1070. /*!
  1071. * \~chinese
  1072. * 移除群组管理员,需要Owner权限
  1073. *
  1074. * 同步方法,会阻塞当前线程
  1075. *
  1076. * @param aAdmin 要移除的群组管理员
  1077. * @param aGroupId 群ID
  1078. * @param pError 错误信息
  1079. *
  1080. * @result 返回群组实例
  1081. *
  1082. * \~english
  1083. * Remove group admin, need Owner permissions
  1084. *
  1085. * Synchronization method will block the current thread
  1086. *
  1087. * @param aAdmin Admin
  1088. * @param aGroupId Group id
  1089. * @param pError Error
  1090. *
  1091. * @result Group instance
  1092. */
  1093. - (EMGroup *)removeAdmin:(NSString *)aAdmin
  1094. fromGroup:(NSString *)aGroupId
  1095. error:(EMError **)pError;
  1096. /*!
  1097. * \~chinese
  1098. * 移除群组管理员,需要Owner权限
  1099. *
  1100. * @param aAdmin 要移除的群组管理员
  1101. * @param aGroupId 群ID
  1102. * @param aCompletionBlock 完成的回调
  1103. *
  1104. *
  1105. * \~english
  1106. * Remove group admin, need Owner permissions
  1107. *
  1108. * @param aAdmin Admin
  1109. * @param aGroupId Group id
  1110. * @param aCompletionBlock The callback block of completion
  1111. *
  1112. */
  1113. - (void)removeAdmin:(NSString *)aAdmin
  1114. fromGroup:(NSString *)aGroupId
  1115. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  1116. /*!
  1117. * \~chinese
  1118. * 将一组成员禁言,需要Owner / Admin权限
  1119. *
  1120. * 同步方法,会阻塞当前线程
  1121. *
  1122. * @param aMuteMembers 要禁言的成员列表<NSString>
  1123. * @param aMuteMilliseconds 禁言时长
  1124. * @param aGroupId 群ID
  1125. * @param pError 错误信息
  1126. *
  1127. * @result 返回群组实例
  1128. *
  1129. * \~english
  1130. * Mute group members, need Owner / Admin permissions
  1131. *
  1132. * Synchronization method will block the current thread
  1133. *
  1134. * @param aMuteMembers The list of mute, type is <NSString>
  1135. * @param aMuteMilliseconds Muted time duration in millisecond
  1136. * @param aGroupId Group id
  1137. * @param pError Error
  1138. *
  1139. * @result Group instance
  1140. */
  1141. - (EMGroup *)muteMembers:(NSArray *)aMuteMembers
  1142. muteMilliseconds:(NSInteger)aMuteMilliseconds
  1143. fromGroup:(NSString *)aGroupId
  1144. error:(EMError **)pError;
  1145. /*!
  1146. * \~chinese
  1147. * 将一组成员禁言,需要Owner / Admin权限
  1148. *
  1149. * @param aMuteMembers 要禁言的成员列表<NSString>
  1150. * @param aMuteMilliseconds 禁言时长
  1151. * @param aGroupId 群ID
  1152. * @param aCompletionBlock 完成的回调
  1153. *
  1154. * \~english
  1155. * Mute group members, need Owner / Admin permissions
  1156. *
  1157. * Synchronization method will block the current thread
  1158. *
  1159. * @param aMuteMembers The list of mute, type is <NSString>
  1160. * @param aMuteMilliseconds Muted time duration in millisecond
  1161. * @param aGroupId Group id
  1162. * @param aCompletionBlock The callback block of completion
  1163. *
  1164. */
  1165. - (void)muteMembers:(NSArray *)aMuteMembers
  1166. muteMilliseconds:(NSInteger)aMuteMilliseconds
  1167. fromGroup:(NSString *)aGroupId
  1168. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  1169. /*!
  1170. * \~chinese
  1171. * 解除禁言,需要Owner / Admin权限
  1172. *
  1173. * 同步方法,会阻塞当前线程
  1174. *
  1175. * @param aMuteMembers 被解除的列表<NSString>
  1176. * @param aGroupId 群ID
  1177. * @param pError 错误信息
  1178. *
  1179. * @result 返回群组实例
  1180. *
  1181. * \~english
  1182. * Unmute group members, need Owner / Admin permissions
  1183. *
  1184. * Synchronization method will block the current thread
  1185. *
  1186. * @param aMembers The list of unmute, type is <NSString>
  1187. * @param aGroupId Group id
  1188. * @param pError Error
  1189. *
  1190. * @result Group instance
  1191. */
  1192. - (EMGroup *)unmuteMembers:(NSArray *)aMembers
  1193. fromGroup:(NSString *)aGroupId
  1194. error:(EMError **)pError;
  1195. /*!
  1196. * \~chinese
  1197. * 解除禁言,需要Owner / Admin权限
  1198. *
  1199. * @param aMuteMembers 被解除的列表<NSString>
  1200. * @param aGroupId 群ID
  1201. * @param aCompletionBlock 完成的回调
  1202. *
  1203. * \~english
  1204. * Unmute group members, need Owner / Admin permissions
  1205. *
  1206. * Synchronization method will block the current thread
  1207. *
  1208. * @param aMembers The list of unmute, type is <NSString>
  1209. * @param aGroupId Group id
  1210. * @param aCompletionBlock The callback block of completion
  1211. *
  1212. */
  1213. - (void)unmuteMembers:(NSArray *)aMembers
  1214. fromGroup:(NSString *)aGroupId
  1215. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  1216. /*!
  1217. * \~chinese
  1218. * 上传群共享文件
  1219. *
  1220. * @param aGroupId 群ID
  1221. * @param aFilePath 文件路径
  1222. * @param pError 错误信息
  1223. *
  1224. * @result 群实例
  1225. *
  1226. * \~english
  1227. * Upload the share file of group
  1228. *
  1229. * @param aGroupId Group id
  1230. * @param aFilePath Path of file
  1231. * @param pError error
  1232. *
  1233. * @result Group instance
  1234. */
  1235. - (void)uploadGroupSharedFileWithId:(NSString *)aGroupId
  1236. filePath:(NSString*)aFilePath
  1237. progress:(void (^)(int progress))aProgressBlock
  1238. completion:(void (^)(EMGroupSharedFile *aSharedFile, EMError *aError))aCompletionBlock;
  1239. /*!
  1240. * \~chinese
  1241. * 下载群共享文件
  1242. *
  1243. * @param aGroupId 群ID
  1244. * @param aFilePath 文件路径
  1245. * @param aSharedFileId 共享文件ID
  1246. * @param aProgressBlock 文件下载进度回调block
  1247. * @param aCompletionBlock 完成回调block
  1248. *
  1249. * \~english
  1250. * Download the share file of group
  1251. *
  1252. * @param aGroupId Group id
  1253. * @param aFilePath Path of file
  1254. * @param aSharedFileId share file id
  1255. * @param aProgressBlock The block of attachment upload progress
  1256. * @param aCompletionBlock The callback block of completion
  1257. */
  1258. - (void)downloadGroupSharedFileWithId:(NSString *)aGroupId
  1259. filePath:(NSString *)aFilePath
  1260. sharedFileId:(NSString *)aSharedFileId
  1261. progress:(void (^)(int progress))aProgressBlock
  1262. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  1263. /*!
  1264. * \~chinese
  1265. * 删除群共享文件
  1266. *
  1267. * @param aGroupId 群ID
  1268. * @param aSharedFileId 共享文件ID
  1269. * @param pError 错误信息
  1270. *
  1271. * @result 群实例
  1272. *
  1273. * \~english
  1274. * Remove the share file of group
  1275. *
  1276. * Synchronization method will block the current thread
  1277. *
  1278. * @param aGroupId Group id
  1279. * @param aSharedFileId share file Id
  1280. * @param pError error
  1281. *
  1282. * @result Group instance
  1283. */
  1284. - (EMGroup *)removeGroupSharedFileWithId:(NSString *)aGroupId
  1285. sharedFileId:(NSString *)aSharedFileId
  1286. error:(EMError **)pError;
  1287. /*!
  1288. * \~chinese
  1289. * 删除群共享文件
  1290. *
  1291. * @param aGroupId 群ID
  1292. * @param aSharedFileId 共享文件ID
  1293. * @param aCompletionBlock 完成的回调
  1294. *
  1295. * \~english
  1296. * Remove the share file of group
  1297. *
  1298. * @param aGroupId Group id
  1299. * @param aSharedFileId share file Id
  1300. * @param aCompletionBlock The callback block of completion
  1301. */
  1302. - (void)removeGroupSharedFileWithId:(NSString *)aGroupId
  1303. sharedFileId:(NSString *)aSharedFileId
  1304. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  1305. /*!
  1306. * \~chinese
  1307. * 修改群公告,需要Owner / Admin权限
  1308. *
  1309. * @param aGroupId 群ID
  1310. * @param aAnnouncement 群公告
  1311. * @param pError 错误信息
  1312. *
  1313. * @result 群实例
  1314. *
  1315. * \~english
  1316. * Update the announcement of group, need Owner / Admin permissions
  1317. *
  1318. * Synchronization method will block the current thread
  1319. *
  1320. * @param aGroupId Group id
  1321. * @param aAnnouncement announcement of group
  1322. * @param pError error
  1323. *
  1324. * @result Group instance
  1325. */
  1326. - (EMGroup *)updateGroupAnnouncementWithId:(NSString *)aGroupId
  1327. announcement:(NSString *)aAnnouncement
  1328. error:(EMError **)pError;
  1329. /*!
  1330. * \~chinese
  1331. * 修改群公告,需要Owner / Admin权限
  1332. *
  1333. * @param aGroupId 群ID
  1334. * @param aAnnouncement 群公告
  1335. * @param aCompletionBlock 完成的回调
  1336. *
  1337. * \~english
  1338. * Update the announcement of group, need Owner / Admin permissions
  1339. *
  1340. * @param aGroupId Group id
  1341. * @param aAnnouncement announcement of group
  1342. * @param aCompletionBlock The callback block of completion
  1343. *
  1344. */
  1345. - (void)updateGroupAnnouncementWithId:(NSString *)aGroupId
  1346. announcement:(NSString *)aAnnouncement
  1347. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  1348. /*!
  1349. * \~chinese
  1350. * 修改群扩展信息,需要Owner权限
  1351. *
  1352. * @param aGroupId 群ID
  1353. * @param aExt 扩展信息
  1354. * @param pError 错误信息
  1355. *
  1356. * @result 群实例
  1357. *
  1358. * \~english
  1359. * Update the extended of the group, need Owner
  1360. *
  1361. * Synchronization method will block the current thread
  1362. *
  1363. * @param aGroupId Group id
  1364. * @param aExt Extended of the group
  1365. * @param pError error
  1366. *
  1367. * @result Group instance
  1368. */
  1369. - (EMGroup *)updateGroupExtWithId:(NSString *)aGroupId
  1370. ext:(NSString *)aExt
  1371. error:(EMError **)pError;
  1372. /*!
  1373. * \~chinese
  1374. * 修改群扩展信息,需要Owner权限
  1375. *
  1376. * @param aGroupId 群ID
  1377. * @param aExt 扩展信息
  1378. * @param aCompletionBlock 完成的回调
  1379. *
  1380. * \~english
  1381. * Update the extended of the group, need Owner
  1382. *
  1383. * @param aGroupId Group id
  1384. * @param aExt Extended of the group
  1385. * @param aCompletionBlock The callback block of completion
  1386. *
  1387. */
  1388. - (void)updateGroupExtWithId:(NSString *)aGroupId
  1389. ext:(NSString *)aExt
  1390. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  1391. #pragma mark - Edit Public Group
  1392. /*!
  1393. * \~chinese
  1394. * 加入一个公开群组,群类型应该是EMGroupStylePublicOpenJoin
  1395. *
  1396. * 同步方法,会阻塞当前线程
  1397. *
  1398. * @param aGroupId 公开群组的ID
  1399. * @param pError 错误信息
  1400. *
  1401. * @result 所加入的公开群组
  1402. *
  1403. * \~english
  1404. * Join a public group, group style should be EMGroupStylePublicOpenJoin
  1405. *
  1406. * Synchronization method will block the current thread
  1407. *
  1408. * @param aGroupId Public group id
  1409. * @param pError Error
  1410. *
  1411. * @result Joined public group
  1412. */
  1413. - (EMGroup *)joinPublicGroup:(NSString *)aGroupId
  1414. error:(EMError **)pError;
  1415. /*!
  1416. * \~chinese
  1417. * 加入一个公开群组,群类型应该是EMGroupStylePublicOpenJoin
  1418. *
  1419. * @param aGroupId 公开群组的ID
  1420. * @param aCompletionBlock 完成的回调
  1421. *
  1422. * \~english
  1423. * Join a public group, group style should be EMGroupStylePublicOpenJoin
  1424. *
  1425. * @param aGroupId Public group id
  1426. * @param aCompletionBlock The callback block of completion
  1427. *
  1428. */
  1429. - (void)joinPublicGroup:(NSString *)aGroupId
  1430. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  1431. /*!
  1432. * \~chinese
  1433. * 申请加入一个需批准的公开群组,群类型应该是EMGroupStylePublicJoinNeedApproval
  1434. *
  1435. * 同步方法,会阻塞当前线程
  1436. *
  1437. * @param aGroupId 公开群组的ID
  1438. * @param aMessage 请求加入的信息
  1439. * @param pError 错误信息
  1440. *
  1441. * @result 申请加入的公开群组
  1442. *
  1443. * \~english
  1444. * Request to join a public group, group style should be EMGroupStylePublicJoinNeedApproval
  1445. *
  1446. * Synchronization method will block the current thread
  1447. *
  1448. * @param aGroupId Public group id
  1449. * @param aMessage Request info
  1450. * @param pError Error
  1451. *
  1452. * @result Group instance
  1453. */
  1454. - (EMGroup *)applyJoinPublicGroup:(NSString *)aGroupId
  1455. message:(NSString *)aMessage
  1456. error:(EMError **)pError;
  1457. /*!
  1458. * \~chinese
  1459. * 申请加入一个需批准的公开群组,群类型应该是EMGroupStylePublicJoinNeedApproval
  1460. *
  1461. * @param aGroupId 公开群组的ID
  1462. * @param aMessage 请求加入的信息
  1463. * @param aCompletionBlock 完成的回调
  1464. *
  1465. *
  1466. * \~english
  1467. * Request to join a public group, group style should be EMGroupStylePublicJoinNeedApproval
  1468. *
  1469. * @param aGroupId Public group id
  1470. * @param aMessage Apply info
  1471. * @param aCompletionBlock The callback block of completion
  1472. *
  1473. */
  1474. - (void)requestToJoinPublicGroup:(NSString *)aGroupId
  1475. message:(NSString *)aMessage
  1476. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  1477. #pragma mark - Application
  1478. /*!
  1479. * \~chinese
  1480. * 批准入群申请, 需要Owner权限
  1481. *
  1482. * 同步方法,会阻塞当前线程
  1483. *
  1484. * @param aGroupId 所申请的群组ID
  1485. * @param aUsername 申请人
  1486. *
  1487. * @result 错误信息
  1488. *
  1489. * \~english
  1490. * Accept a group request, owner‘s authority is required
  1491. *
  1492. * Synchronization method will block the current thread
  1493. *
  1494. * @param aGroupId Group id
  1495. * @param aUsername The applicant
  1496. *
  1497. * @result Error
  1498. */
  1499. - (EMError *)acceptJoinApplication:(NSString *)aGroupId
  1500. applicant:(NSString *)aUsername;
  1501. /*!
  1502. * \~chinese
  1503. * 批准入群申请, 需要Owner权限
  1504. *
  1505. * @param aGroupId 所申请的群组ID
  1506. * @param aUsername 申请人
  1507. * @param aCompletionBlock 完成的回调
  1508. *
  1509. *
  1510. * \~english
  1511. * Approve a group request, owner‘s authority is required
  1512. *
  1513. * @param aGroupId Group id
  1514. * @param aUsername Group request sender
  1515. * @param aCompletionBlock The callback block of completion
  1516. *
  1517. */
  1518. - (void)approveJoinGroupRequest:(NSString *)aGroupId
  1519. sender:(NSString *)aUsername
  1520. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  1521. /*!
  1522. * \~chinese
  1523. * 拒绝入群申请, 需要Owner权限
  1524. *
  1525. * 同步方法,会阻塞当前线程
  1526. *
  1527. * @param aGroupId 被拒绝的群组ID
  1528. * @param aUsername 申请人
  1529. * @param aReason 拒绝理由
  1530. *
  1531. * @result 错误信息
  1532. *
  1533. * \~english
  1534. * Decline a group request, owner‘s authority is required
  1535. *
  1536. * Synchronization method will block the current thread
  1537. *
  1538. * @param aGroupId Group id
  1539. * @param aUsername Group request sender
  1540. * @param aReason Decline reason
  1541. *
  1542. * @result Error
  1543. */
  1544. - (EMError *)declineJoinApplication:(NSString *)aGroupId
  1545. applicant:(NSString *)aUsername
  1546. reason:(NSString *)aReason;
  1547. /*!
  1548. * \~chinese
  1549. * 拒绝入群申请, 需要Owner权限
  1550. *
  1551. * @param aGroupId 被拒绝的群组ID
  1552. * @param aUsername 申请人
  1553. * @param aReason 拒绝理由
  1554. * @param aCompletionBlock 完成的回调
  1555. *
  1556. *
  1557. * \~english
  1558. * Decline a group request, owner‘s authority is required
  1559. *
  1560. * @param aGroupId Group id
  1561. * @param aUsername Group request sender
  1562. * @param aReason Decline reason
  1563. * @param aCompletionBlock The callback block of completion
  1564. *
  1565. */
  1566. - (void)declineJoinGroupRequest:(NSString *)aGroupId
  1567. sender:(NSString *)aUsername
  1568. reason:(NSString *)aReason
  1569. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  1570. /*!
  1571. * \~chinese
  1572. * 接受入群邀请
  1573. *
  1574. * 同步方法,会阻塞当前线程
  1575. *
  1576. * @param groupId 接受的群组ID
  1577. * @param aUsername 邀请者
  1578. * @param pError 错误信息
  1579. *
  1580. * @result 接受的群组实例
  1581. *
  1582. * \~english
  1583. * Accept a group invitation
  1584. *
  1585. * Synchronization method will block the current thread
  1586. *
  1587. * @param aGroupId Group id
  1588. * @param aUsername Inviter
  1589. * @param pError Error
  1590. *
  1591. * @result Joined group instance
  1592. */
  1593. - (EMGroup *)acceptInvitationFromGroup:(NSString *)aGroupId
  1594. inviter:(NSString *)aUsername
  1595. error:(EMError **)pError;
  1596. /*!
  1597. * \~chinese
  1598. * 接受入群邀请
  1599. *
  1600. * @param groupId 接受的群组ID
  1601. * @param aUsername 邀请者
  1602. * @param pError 错误信息
  1603. * @param aCompletionBlock 完成的回调
  1604. *
  1605. *
  1606. * \~english
  1607. * Accept a group invitation
  1608. *
  1609. * @param aGroupId Group id
  1610. * @param aUsername Inviter
  1611. * @param aCompletionBlock The callback block of completion
  1612. *
  1613. */
  1614. - (void)acceptInvitationFromGroup:(NSString *)aGroupId
  1615. inviter:(NSString *)aUsername
  1616. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  1617. /*!
  1618. * \~chinese
  1619. * 拒绝入群邀请
  1620. *
  1621. * 同步方法,会阻塞当前线程
  1622. *
  1623. * @param aGroupId 被拒绝的群组ID
  1624. * @param aUsername 邀请人
  1625. * @param aReason 拒绝理由
  1626. *
  1627. * @result 错误信息
  1628. *
  1629. * \~english
  1630. * Decline a group invitation
  1631. *
  1632. * Synchronization method will block the current thread
  1633. *
  1634. * @param aGroupId Group id
  1635. * @param aUsername Inviter
  1636. * @param aReason Decline reason
  1637. *
  1638. * @result Error
  1639. */
  1640. - (EMError *)declineInvitationFromGroup:(NSString *)aGroupId
  1641. inviter:(NSString *)aUsername
  1642. reason:(NSString *)aReason;
  1643. /*!
  1644. * \~chinese
  1645. * 拒绝入群邀请
  1646. *
  1647. * @param aGroupId 被拒绝的群组ID
  1648. * @param aInviter 邀请人
  1649. * @param aReason 拒绝理由
  1650. * @param aCompletionBlock 完成的回调
  1651. *
  1652. *
  1653. * \~english
  1654. * Decline a group invitation
  1655. *
  1656. * @param aGroupId Group id
  1657. * @param aInviter Inviter
  1658. * @param aReason Decline reason
  1659. * @param aCompletionBlock The callback block of completion
  1660. *
  1661. */
  1662. - (void)declineGroupInvitation:(NSString *)aGroupId
  1663. inviter:(NSString *)aInviter
  1664. reason:(NSString *)aReason
  1665. completion:(void (^)(EMError *aError))aCompletionBlock;
  1666. #pragma mark - Apns
  1667. /*!
  1668. * \~chinese
  1669. * 屏蔽/取消屏蔽群组消息的推送
  1670. *
  1671. * 同步方法,会阻塞当前线程
  1672. *
  1673. * @param aGroupId 群组ID
  1674. * @param aIgnore 是否屏蔽
  1675. *
  1676. * @result 错误信息
  1677. *
  1678. * \~english
  1679. * Block/unblock group message‘s push notification
  1680. *
  1681. * Synchronization method will block the current thread
  1682. *
  1683. * @param aGroupId Group id
  1684. * @param aIsIgnore Show/ignore push notificatino
  1685. *
  1686. * @result Error
  1687. */
  1688. - (EMError *)ignoreGroupPush:(NSString *)aGroupId
  1689. ignore:(BOOL)aIsIgnore;
  1690. /*!
  1691. * \~chinese
  1692. * 屏蔽/取消屏蔽群组消息的推送
  1693. *
  1694. * 同步方法,会阻塞当前线程
  1695. *
  1696. * @param aGroupIDs 群组ID列表
  1697. * @param aIgnore 是否屏蔽
  1698. *
  1699. * @result 错误信息
  1700. *
  1701. * \~english
  1702. * Block/unblock group message‘s push notification
  1703. *
  1704. * Synchronization method will block the current thread
  1705. *
  1706. * @param aGroupIDs Group ids list
  1707. * @param aIsIgnore Show or ignore push notification
  1708. *
  1709. * @result Error
  1710. */
  1711. - (EMError *)ignoreGroupsPush:(NSArray *)aGroupIDs
  1712. ignore:(BOOL)aIsIgnore;
  1713. /*!
  1714. * \~chinese
  1715. * 屏蔽/取消屏蔽群组消息的推送
  1716. *
  1717. * @param aGroupId 群组ID
  1718. * @param aIsEnable 是否允许推送
  1719. * @param aCompletionBlock 完成的回调
  1720. *
  1721. *
  1722. * \~english
  1723. * Block/unblock group message‘s push notification
  1724. *
  1725. * @param aGroupId Group id
  1726. * @param aIsEnable Whether enable
  1727. * @param aCompletionBlock The callback block of completion
  1728. *
  1729. */
  1730. - (void)updatePushServiceForGroup:(NSString *)aGroupId
  1731. isPushEnabled:(BOOL)aIsEnable
  1732. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
  1733. /*!
  1734. * \~chinese
  1735. * 屏蔽/取消屏蔽群组消息的推送
  1736. *
  1737. * @param aGroupIDs 群组ID列表
  1738. * @param aIsEnable 是否允许推送
  1739. * @param aCompletionBlock 完成的回调
  1740. *
  1741. *
  1742. * \~english
  1743. * Block/unblock group message‘s push notification
  1744. *
  1745. * @param aGroupIDs Group ids list
  1746. * @param aIsEnable Whether enable
  1747. * @param aCompletionBlock The callback block of completion
  1748. *
  1749. */
  1750. - (void)updatePushServiceForGroups:(NSArray *)aGroupIDs
  1751. isPushEnabled:(BOOL)aIsEnable
  1752. completion:(void (^)(NSArray *groups, EMError *aError))aCompletionBlock;
  1753. #pragma mark - EM_DEPRECATED_IOS 3.3.0
  1754. /**
  1755. * \~chinese
  1756. * 从服务器获取用户所有的群组,成功后更新DB和内存中的群组列表
  1757. *
  1758. * 同步方法,会阻塞当前线程
  1759. *
  1760. * @param pError 错误信息
  1761. *
  1762. * @return 群组列表<EMGroup>
  1763. *
  1764. * \~english
  1765. * Get all of user's groups from server
  1766. *
  1767. * Synchronization method will block the current thread
  1768. *
  1769. * @param pError Error
  1770. *
  1771. * @result Group list<EMGroup>
  1772. */
  1773. - (NSArray *)getMyGroupsFromServerWithError:(EMError **)pError EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[IEMGroupManager getJoinedGroupsFromServerWithPage:pageSize:error:]");
  1774. /**
  1775. * \~chinese
  1776. * 从服务器获取用户所有的群组,成功后更新DB和内存中的群组列表
  1777. *
  1778. * @param aCompletionBlock 完成的回调
  1779. *
  1780. *
  1781. * \~english
  1782. * Get all of user's groups from server
  1783. *
  1784. * @param aCompletionBlock The callback block of completion
  1785. *
  1786. */
  1787. - (void)getJoinedGroupsFromServerWithCompletion:(void (^)(NSArray *aList, EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[IEMGroupManager getJoinedGroupsFromServerWithPage:pageSize:completion:]");
  1788. /*!
  1789. * \~chinese
  1790. * 获取群组详情
  1791. *
  1792. * 同步方法,会阻塞当前线程
  1793. *
  1794. * @param aGroupId 群组ID
  1795. * @param aIncludeMembersList 是否获取成员列表,为YES时,返回200个成员
  1796. * @param pError 错误信息
  1797. *
  1798. * @return 群组
  1799. *
  1800. * \~english
  1801. * Fetch group info
  1802. *
  1803. * Synchronization method will block the current thread
  1804. *
  1805. * @param aGroupId Group id
  1806. * @param aIncludeMembersList Whether to get member list,When YES, returns 200 members
  1807. * @param pError Error
  1808. *
  1809. * @return Group instance
  1810. */
  1811. - (EMGroup *)fetchGroupInfo:(NSString *)aGroupId
  1812. includeMembersList:(BOOL)aIncludeMembersList
  1813. error:(EMError **)pError EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[IEMGroupManager getGroupSpecificationFromServerWithId:error:]");
  1814. /*!
  1815. * \~chinese
  1816. * 获取群组详情
  1817. *
  1818. * @param aGroupId 群组ID
  1819. * @param aIncludeMembersList 是否获取成员列表,为YES时,返回200个成员
  1820. * @param aCompletionBlock 完成的回调
  1821. *
  1822. *
  1823. * \~english
  1824. * Fetch group specification
  1825. *
  1826. * @param aGroupId Group id
  1827. * @param aIncludeMembersList Whether to get member list,When YES, returns 200 members
  1828. * @param aCompletionBlock The callback block of completion
  1829. *
  1830. */
  1831. - (void)getGroupSpecificationFromServerByID:(NSString *)aGroupID
  1832. includeMembersList:(BOOL)aIncludeMembersList
  1833. completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[IEMGroupManager getGroupSpecificationFromServerWithId:completion:]");
  1834. /*!
  1835. * \~chinese
  1836. * 获取群组黑名单列表, 需要owner权限
  1837. *
  1838. * 同步方法,会阻塞当前线程
  1839. *
  1840. * @param aGroupId 群组ID
  1841. * @param pError 错误信息
  1842. *
  1843. * @return 群组黑名单列表<NSString>
  1844. *
  1845. * \~english
  1846. * Get group‘s blacklist, required owner’s authority
  1847. *
  1848. * Synchronization method will block the current thread
  1849. *
  1850. * @param aGroupId Group id
  1851. * @param pError Error
  1852. *
  1853. * @return Group blacklist<NSString>
  1854. */
  1855. - (NSArray *)fetchGroupBansList:(NSString *)aGroupId
  1856. error:(EMError **)pError EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[IEMGroupManager getGroupBlacklistFromServerWithId:pageNumber:pageSize:error:]");
  1857. /*!
  1858. * \~chinese
  1859. * 获取群组黑名单列表, 需要owner权限
  1860. *
  1861. * @param aGroupId 群组ID
  1862. * @param aCompletionBlock 完成的回调
  1863. *
  1864. *
  1865. * \~english
  1866. * Get group's blacklist, owner’s authority is required
  1867. *
  1868. * @param aGroupId Group id
  1869. * @param aCompletionBlock The callback block of completion
  1870. *
  1871. */
  1872. - (void)getGroupBlackListFromServerByID:(NSString *)aGroupId
  1873. completion:(void (^)(NSArray *aList, EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[IEMGroupManager getGroupBlacklistFromServerWithId:pageNumber:pageSize:completion:]");
  1874. /*!
  1875. * \~chinese
  1876. * 解散群组, 需要owner权限
  1877. *
  1878. * 同步方法,会阻塞当前线程
  1879. *
  1880. * @param aGroupId 群组ID
  1881. * @param pError 错误信息
  1882. *
  1883. * @result 销毁的群组实例, 失败返回nil
  1884. *
  1885. * \~english
  1886. * Destroy a group, owner‘s authority is required
  1887. *
  1888. * Synchronization method will block the current thread
  1889. *
  1890. * @param aGroupId Group id
  1891. * @param pError Error
  1892. *
  1893. * @result Destroyed group, return nil if failed
  1894. */
  1895. - (EMGroup *)destroyGroup:(NSString *)aGroupId
  1896. error:(EMError **)pError EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[IEMGroupManager destroyGroup:]");
  1897. /*!
  1898. * \~chinese
  1899. * 解散群组, 需要owner权限
  1900. *
  1901. * @param aGroupId 群组ID
  1902. * @param aCompletionBlock 完成的回调
  1903. *
  1904. * \~english
  1905. * Destroy a group, owner‘s authority is required
  1906. *
  1907. * @param aGroupId Group id
  1908. * @param aCompletionBlock The callback block of completion
  1909. *
  1910. */
  1911. - (void)destroyGroup:(NSString *)aGroupId
  1912. completion:(void (^)(EMGroup* aGroup, EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[IEMGroupManager destroyGroup:finishCompletion:]");
  1913. #pragma mark - EM_DEPRECATED_IOS 3.2.3
  1914. /*!
  1915. * \~chinese
  1916. * 添加回调代理
  1917. *
  1918. * @param aDelegate 要添加的代理
  1919. *
  1920. * \~english
  1921. * Add delegate
  1922. *
  1923. * @param aDelegate Delegate
  1924. */
  1925. - (void)addDelegate:(id<EMGroupManagerDelegate>)aDelegate EM_DEPRECATED_IOS(3_1_0, 3_2_2, "Use -[IEMGroupManager addDelegate:delegateQueue:]");
  1926. #pragma mark - EM_DEPRECATED_IOS < 3.2.3
  1927. /*!
  1928. * \~chinese
  1929. * 获取所有群组,如果内存中不存在,则先从DB加载
  1930. *
  1931. * @result 群组列表<EMGroup>
  1932. *
  1933. * \~english
  1934. * Get all groups, will load from DB if not exist in memory
  1935. *
  1936. * @result Group list<EMGroup>
  1937. */
  1938. - (NSArray *)getAllGroups __deprecated_msg("Use -getJoinedGroups");
  1939. /*!
  1940. * \~chinese
  1941. * 从数据库加载所有群组,加载后更新内存中的群组列表
  1942. *
  1943. * @result 群组列表<EMGroup>
  1944. *
  1945. * \~english
  1946. * Load all groups from DB, will update group list in memory after loading
  1947. *
  1948. * @result Group list<EMGroup>
  1949. */
  1950. - (NSArray *)loadAllMyGroupsFromDB __deprecated_msg("Use -getJoinedGroups");
  1951. /*!
  1952. * \~chinese
  1953. * 从内存中获取屏蔽了推送的群组ID列表
  1954. *
  1955. * @result 群组ID列表<NSString>
  1956. *
  1957. * \~english
  1958. * Get ID list of groups which block push from memory
  1959. *
  1960. * @result Group id list<NSString>
  1961. */
  1962. - (NSArray *)getAllIgnoredGroupIds __deprecated_msg("Use -getGroupsWithoutPushNotification");
  1963. /**
  1964. * \~chinese
  1965. * 从服务器获取用户所有的群组,成功后更新DB和内存中的群组列表
  1966. *
  1967. * @param aSuccessBlock 成功的回调
  1968. * @param aFailureBlock 失败的回调
  1969. *
  1970. *
  1971. * \~english
  1972. * Get all of user's groups from server, will update group list in memory and DB after success
  1973. *
  1974. * @param aSuccessBlock The callback block of success
  1975. * @param aFailureBlock The callback block of failure
  1976. *
  1977. */
  1978. - (void)asyncGetMyGroupsFromServer:(void (^)(NSArray *aList))aSuccessBlock
  1979. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -getJoinedGroupsFromServerWithCompletion:");
  1980. /*!
  1981. * \~chinese
  1982. * 从服务器获取指定范围内的公开群
  1983. *
  1984. * @param aCursor 获取公开群的cursor,首次调用传空
  1985. * @param aPageSize 期望返回结果的数量, 如果 < 0 则一次返回所有结果
  1986. * @param aSuccessBlock 成功的回调
  1987. * @param aFailureBlock 失败的回调
  1988. *
  1989. *
  1990. * \~english
  1991. * Get public groups in the specified range from the server
  1992. *
  1993. * @param aCursor Cursor, input nil the first time
  1994. * @param aPageSize Expect result count, will return all results if < 0
  1995. * @param aSuccessBlock The callback block of success
  1996. * @param aFailureBlock The callback block of failure
  1997. *
  1998. */
  1999. - (void)asyncGetPublicGroupsFromServerWithCursor:(NSString *)aCursor
  2000. pageSize:(NSInteger)aPageSize
  2001. success:(void (^)(EMCursorResult *aCursor))aSuccessBlock
  2002. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -getPublicGroupsFromServerWithCursor:pageSize:completion:");
  2003. /*!
  2004. * \~chinese
  2005. * 根据群ID搜索公开群
  2006. *
  2007. * @param aGroundId 群组id
  2008. * @param aSuccessBlock 成功的回调
  2009. * @param aFailureBlock 失败的回调
  2010. *
  2011. *
  2012. * \~english
  2013. * Search public group with the id
  2014. *
  2015. * @param aGroundId Group id
  2016. * @param aSuccessBlock The callback block of success
  2017. * @param aFailureBlock The callback block of failure
  2018. *
  2019. */
  2020. - (void)asyncSearchPublicGroupWithId:(NSString *)aGroundId
  2021. success:(void (^)(EMGroup *aGroup))aSuccessBlock
  2022. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -searchPublicGroupWithId:completion:");
  2023. /*!
  2024. * \~chinese
  2025. * 创建群组
  2026. *
  2027. * @param aSubject 群组名称
  2028. * @param aDescription 群组描述
  2029. * @param aInvitees 群组成员(不包括创建者自己)
  2030. * @param aMessage 邀请消息
  2031. * @param aSetting 群组属性
  2032. * @param aSuccessBlock The callback block of success
  2033. * @param aFailureBlock The callback block of failure
  2034. *
  2035. *
  2036. * \~english
  2037. * Create a group
  2038. *
  2039. * @param aSubject Group subject
  2040. * @param aDescription Group description
  2041. * @param aInvitees Group members, without creater
  2042. * @param aMessage Invitation message
  2043. * @param aSetting Group options
  2044. * @param aSuccessBlock The callback block of success
  2045. * @param aFailureBlock The callback block of failure
  2046. *
  2047. */
  2048. - (void)asyncCreateGroupWithSubject:(NSString *)aSubject
  2049. description:(NSString *)aDescription
  2050. invitees:(NSArray *)aInvitees
  2051. message:(NSString *)aMessage
  2052. setting:(EMGroupOptions *)aSetting
  2053. success:(void (^)(EMGroup *aGroup))aSuccessBlock
  2054. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -createGroupWithSubject:description:invitees:message:setting:completion");
  2055. /*!
  2056. * \~chinese
  2057. * 获取群组详情
  2058. *
  2059. * @param aGroupId 群组ID
  2060. * @param aIncludeMembersList 是否获取成员列表
  2061. * @param aSuccessBlock 成功的回调
  2062. * @param aFailureBlock 失败的回调
  2063. *
  2064. *
  2065. * \~english
  2066. * Fetch group info
  2067. *
  2068. * @param aGroupId Group id
  2069. * @param aIncludeMembersList Whether get member list
  2070. * @param aSuccessBlock The callback block of success
  2071. * @param aFailureBlock The callback block of failure
  2072. *
  2073. */
  2074. - (void)asyncFetchGroupInfo:(NSString *)aGroupId
  2075. includeMembersList:(BOOL)aIncludeMembersList
  2076. success:(void (^)(EMGroup *aGroup))aSuccessBlock
  2077. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -getGroupSpecificationFromServerByID:includeMembersList:completion:");
  2078. /*!
  2079. * \~chinese
  2080. * 获取群组黑名单列表, 需要owner权限
  2081. *
  2082. * @param aGroupId 群组ID
  2083. * @param aSuccessBlock 成功的回调
  2084. * @param aFailureBlock 失败的回调
  2085. *
  2086. *
  2087. * \~english
  2088. * Get group‘s blacklist, need owner’s authority
  2089. *
  2090. * @param aGroupId Group id
  2091. * @param aSuccessBlock The callback block of success
  2092. * @param aFailureBlock The callback block of failure
  2093. *
  2094. */
  2095. - (void)asyncFetchGroupBansList:(NSString *)aGroupId
  2096. success:(void (^)(NSArray *aList))aSuccessBlock
  2097. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -getGroupBlackListFromServerByID:completion:");
  2098. /*!
  2099. * \~chinese
  2100. * 邀请用户加入群组
  2101. *
  2102. * @param aOccupants 被邀请的用户名列表
  2103. * @param aGroupId 群组ID
  2104. * @param aWelcomeMessage 欢迎信息
  2105. * @param aSuccessBlock 成功的回调
  2106. * @param aFailureBlock 失败的回调
  2107. *
  2108. *
  2109. * \~english
  2110. * Invite User to join a group
  2111. *
  2112. * @param aOccupants Invited users
  2113. * @param aGroupId Group id
  2114. * @param aWelcomeMessage Welcome message
  2115. * @param aSuccessBlock The callback block of success
  2116. * @param aFailureBlock The callback block of failure
  2117. *
  2118. */
  2119. - (void)asyncAddOccupants:(NSArray *)aOccupants
  2120. toGroup:(NSString *)aGroupId
  2121. welcomeMessage:(NSString *)aWelcomeMessage
  2122. success:(void (^)(EMGroup *aGroup))aSuccessBlock
  2123. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -addMembers:toGroup:message:completion:");
  2124. /*!
  2125. * \~chinese
  2126. * 将群成员移出群组, 需要owner权限
  2127. *
  2128. * @param aOccupants 要移出群组的用户列表
  2129. * @param aGroupId 群组ID
  2130. * @param aSuccessBlock 成功的回调
  2131. * @param aFailureBlock 失败的回调
  2132. *
  2133. *
  2134. * \~english
  2135. * Remove members from group, need owner‘s authority
  2136. *
  2137. * @param aOccupants Users to be removed
  2138. * @param aGroupId Group id
  2139. * @param aSuccessBlock The callback block of success
  2140. * @param aFailureBlock The callback block of failure
  2141. *
  2142. */
  2143. - (void)asyncRemoveOccupants:(NSArray *)aOccupants
  2144. fromGroup:(NSString *)aGroupId
  2145. success:(void (^)(EMGroup *aGroup))aSuccessBlock
  2146. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -removeMembers:fromGroup:completion:");
  2147. /*!
  2148. * \~chinese
  2149. * 加人到群组黑名单, 需要owner权限
  2150. *
  2151. * @param aOccupants 要加入黑名单的用户
  2152. * @param aGroupId 群组ID
  2153. * @param aSuccessBlock 成功的回调
  2154. * @param aFailureBlock 失败的回调
  2155. *
  2156. *
  2157. * \~english
  2158. * Add users to group’s blacklist, need owner‘s authority
  2159. *
  2160. * @param aOccupants Users to be added
  2161. * @param aGroupId Group id
  2162. * @param aSuccessBlock The callback block of success
  2163. * @param aFailureBlock The callback block of failure
  2164. *
  2165. */
  2166. - (void)asyncBlockOccupants:(NSArray *)aOccupants
  2167. fromGroup:(NSString *)aGroupId
  2168. success:(void (^)(EMGroup *aGroup))aSuccessBlock
  2169. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -blockMembers:fromGroup:completion:");
  2170. /*!
  2171. * \~chinese
  2172. * 从群组黑名单中减人, 需要owner权限
  2173. *
  2174. * @param aOccupants 要从黑名单中移除的用户名列表
  2175. * @param aGroupId 群组ID
  2176. * @param aSuccessBlock 成功的回调
  2177. * @param aFailureBlock 失败的回调
  2178. *
  2179. *
  2180. * \~english
  2181. * Remove users from group‘s blacklist, need owner‘s authority
  2182. *
  2183. * @param aOccupants Users to be removed
  2184. * @param aGroupId Group id
  2185. * @param aSuccessBlock The callback block of success
  2186. * @param aFailureBlock The callback block of failure
  2187. *
  2188. */
  2189. - (void)asyncUnblockOccupants:(NSArray *)aOccupants
  2190. forGroup:(NSString *)aGroupId
  2191. success:(void (^)(EMGroup *aGroup))aSuccessBlock
  2192. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -unblockMembers:fromGroup:completion:");
  2193. /*!
  2194. * \~chinese
  2195. * 更改群组主题, 需要owner权限
  2196. *
  2197. * @param aSubject 新主题
  2198. * @param aGroupId 群组ID
  2199. * @param aSuccessBlock 成功的回调
  2200. * @param aFailureBlock 失败的回调
  2201. *
  2202. *
  2203. * \~english
  2204. * Change group’s subject, need owner‘s authority
  2205. *
  2206. * @param aSubject New group‘s subject
  2207. * @param aGroupId Group id
  2208. * @param aSuccessBlock The callback block of success
  2209. * @param aFailureBlock The callback block of failure
  2210. *
  2211. */
  2212. - (void)asyncChangeGroupSubject:(NSString *)aSubject
  2213. forGroup:(NSString *)aGroupId
  2214. success:(void (^)(EMGroup *aGroup))aSuccessBlock
  2215. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -updateGroupSubject:forGroup:completion");
  2216. /*!
  2217. * \~chinese
  2218. * 更改群组说明信息, 需要owner权限
  2219. *
  2220. * @param aDescription 说明信息
  2221. * @param aGroupId 群组ID
  2222. * @param aSuccessBlock 成功的回调
  2223. * @param aFailureBlock 失败的回调
  2224. *
  2225. *
  2226. * \~english
  2227. * Change group’s description, need owner‘s authority
  2228. *
  2229. * @param aDescription New group‘s description
  2230. * @param aGroupId Group id
  2231. * @param aSuccessBlock The callback block of success
  2232. * @param aFailureBlock The callback block of failure
  2233. *
  2234. */
  2235. - (void)asyncChangeDescription:(NSString *)aDescription
  2236. forGroup:(NSString *)aGroupId
  2237. success:(void (^)(EMGroup *aGroup))aSuccessBlock
  2238. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -updateDescription:forGroup:completion");
  2239. /*!
  2240. * \~chinese
  2241. * 退出群组,owner不能退出群,只能销毁群
  2242. *
  2243. * @param aGroupId 群组ID
  2244. * @param aSuccessBlock 成功的回调
  2245. * @param aFailureBlock 失败的回调
  2246. *
  2247. *
  2248. * \~english
  2249. * Leave a group, owner can't leave the group, can only destroy the group
  2250. *
  2251. * @param aGroupId Group id
  2252. * @param aSuccessBlock The callback block of success
  2253. * @param aFailureBlock The callback block of failure
  2254. *
  2255. */
  2256. - (void)asyncLeaveGroup:(NSString *)aGroupId
  2257. success:(void (^)(EMGroup *aGroup))aSuccessBlock
  2258. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -leaveGroup:completion");
  2259. /*!
  2260. * \~chinese
  2261. * 解散群组, 需要owner权限
  2262. *
  2263. * @param aGroupId 群组ID
  2264. * @param aSuccessBlock 成功的回调
  2265. * @param aFailureBlock 失败的回调
  2266. *
  2267. * \~english
  2268. * Destroy a group, need owner‘s authority
  2269. *
  2270. * @param aGroupId Group id
  2271. * @param aSuccessBlock The callback block of success
  2272. * @param aFailureBlock The callback block of failure
  2273. *
  2274. */
  2275. - (void)asyncDestroyGroup:(NSString *)aGroupId
  2276. success:(void (^)(EMGroup *aGroup))aSuccessBlock
  2277. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -destroyGroup:completion");
  2278. /*!
  2279. * \~chinese
  2280. * 屏蔽群消息,服务器不再发送此群的消息给用户,owner不能屏蔽群消息
  2281. *
  2282. * @param aGroupId 要屏蔽的群ID
  2283. * @param aSuccessBlock 成功的回调
  2284. * @param aFailureBlock 失败的回调
  2285. *
  2286. * \~english
  2287. * Block group’s message, server will blocks the messages of the group to user, owner can't block the group's message
  2288. *
  2289. * @param aGroupId Group id
  2290. * @param aSuccessBlock The callback block of success
  2291. * @param aFailureBlock The callback block of failure
  2292. *
  2293. */
  2294. - (void)asyncBlockGroup:(NSString *)aGroupId
  2295. success:(void (^)(EMGroup *aGroup))aSuccessBlock
  2296. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -blockGroup:completion:");
  2297. /*!
  2298. * \~chinese
  2299. * 取消屏蔽群消息
  2300. *
  2301. * @param aGroupId 要取消屏蔽的群ID
  2302. * @param aSuccessBlock 成功的回调
  2303. * @param aFailureBlock 失败的回调
  2304. *
  2305. * \~english
  2306. * Unblock group message
  2307. *
  2308. * @param aGroupId Group id
  2309. * @param aSuccessBlock The callback block of success
  2310. * @param aFailureBlock The callback block of failure
  2311. *
  2312. */
  2313. - (void)asyncUnblockGroup:(NSString *)aGroupId
  2314. success:(void (^)(EMGroup *aGroup))aSuccessBlock
  2315. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -unblockGroup:completion");
  2316. /*!
  2317. * \~chinese
  2318. * 加入一个公开群组,群类型应该是EMGroupStylePublicOpenJoin
  2319. *
  2320. * @param aGroupId 公开群组的ID
  2321. * @param aSuccessBlock 成功的回调
  2322. * @param aFailureBlock 失败的回调
  2323. *
  2324. * \~english
  2325. * Join a public group, group style should be EMGroupStylePublicOpenJoin
  2326. *
  2327. * @param aGroupId Public group id
  2328. * @param aSuccessBlock The callback block of success
  2329. * @param aFailureBlock The callback block of failure
  2330. *
  2331. */
  2332. - (void)asyncJoinPublicGroup:(NSString *)aGroupId
  2333. success:(void (^)(EMGroup *aGroup))aSuccessBlock
  2334. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -joinPublicGroup:completion");
  2335. /*!
  2336. * \~chinese
  2337. * 申请加入一个需批准的公开群组,群类型应该是EMGroupStylePublicJoinNeedApproval
  2338. *
  2339. * @param aGroupId 公开群组的ID
  2340. * @param aMessage 请求加入的信息
  2341. * @param aSuccessBlock 成功的回调
  2342. * @param aFailureBlock 失败的回调
  2343. *
  2344. *
  2345. * \~english
  2346. * Apply to join a public group, group style should be EMGroupStylePublicJoinNeedApproval
  2347. *
  2348. * @param aGroupId Public group id
  2349. * @param aMessage Apply info
  2350. * @param aSuccessBlock The callback block of success
  2351. * @param aFailureBlock The callback block of failure
  2352. *
  2353. */
  2354. - (void)asyncApplyJoinPublicGroup:(NSString *)aGroupId
  2355. message:(NSString *)aMessage
  2356. success:(void (^)(EMGroup *aGroup))aSuccessBlock
  2357. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -requestToJoinPublicGroup:message:completion:");
  2358. /*!
  2359. * \~chinese
  2360. * 批准入群申请, 需要Owner权限
  2361. *
  2362. * @param aGroupId 所申请的群组ID
  2363. * @param aUsername 申请人
  2364. * @param aSuccessBlock 成功的回调
  2365. * @param aFailureBlock 失败的回调
  2366. *
  2367. *
  2368. * \~english
  2369. * Accept user's application, need owner‘s authority
  2370. *
  2371. * @param aGroupId Group id
  2372. * @param aUsername The applicant
  2373. * @param aSuccessBlock The callback block of success
  2374. * @param aFailureBlock The callback block of failure
  2375. *
  2376. */
  2377. - (void)asyncAcceptJoinApplication:(NSString *)aGroupId
  2378. applicant:(NSString *)aUsername
  2379. success:(void (^)())aSuccessBlock
  2380. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -approveJoinGroupRequest:sender:completion:");
  2381. /*!
  2382. * \~chinese
  2383. * 拒绝入群申请, 需要Owner权限
  2384. *
  2385. * @param aGroupId 被拒绝的群组ID
  2386. * @param aUsername 申请人
  2387. * @param aReason 拒绝理由
  2388. * @param aSuccessBlock 成功的回调
  2389. * @param aFailureBlock 失败的回调
  2390. *
  2391. *
  2392. * \~english
  2393. * Decline user's application, need owner‘s authority
  2394. *
  2395. * @param aGroupId Group id
  2396. * @param aUsername The applicant
  2397. * @param aReason Decline reason
  2398. * @param aSuccessBlock The callback block of success
  2399. * @param aFailureBlock The callback block of failure
  2400. *
  2401. */
  2402. - (void)asyncDeclineJoinApplication:(NSString *)aGroupId
  2403. applicant:(NSString *)aUsername
  2404. reason:(NSString *)aReason
  2405. success:(void (^)())aSuccessBlock
  2406. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -declineJoinGroupRequest:sender:reason:completion:");
  2407. /*!
  2408. * \~chinese
  2409. * 接受入群邀请
  2410. *
  2411. * @param groupId 接受的群组ID
  2412. * @param aUsername 邀请者
  2413. * @param pError 错误信息
  2414. * @param aSuccessBlock 成功的回调
  2415. * @param aFailureBlock 失败的回调
  2416. *
  2417. *
  2418. * \~english
  2419. * Accept group's invitation
  2420. *
  2421. * @param groupId Group id
  2422. * @param aUsername Inviter
  2423. * @param aSuccessBlock The callback block of success
  2424. * @param aFailureBlock The callback block of failure
  2425. *
  2426. */
  2427. - (void)asyncAcceptInvitationFromGroup:(NSString *)aGroupId
  2428. inviter:(NSString *)aUsername
  2429. success:(void (^)(EMGroup *aGroup))aSuccessBlock
  2430. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -acceptInvitationFromGroup:inviter:completion");
  2431. /*!
  2432. * \~chinese
  2433. * 拒绝入群邀请
  2434. *
  2435. * @param aGroupId 被拒绝的群组ID
  2436. * @param aUsername 邀请人
  2437. * @param aReason 拒绝理由
  2438. * @param aSuccessBlock 成功的回调
  2439. * @param aFailureBlock 失败的回调
  2440. *
  2441. *
  2442. * \~english
  2443. * Decline a group invitation
  2444. *
  2445. * @param aGroupId Group id
  2446. * @param aUsername Inviter
  2447. * @param aReason Decline reason
  2448. * @param aSuccessBlock The callback block of success
  2449. * @param aFailureBlock The callback block of failure
  2450. *
  2451. */
  2452. - (void)asyncDeclineInvitationFromGroup:(NSString *)aGroupId
  2453. inviter:(NSString *)aUsername
  2454. reason:(NSString *)aReason
  2455. success:(void (^)())aSuccessBlock
  2456. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -declineGroupInvitation:inviter:reason:completion:");
  2457. /*!
  2458. * \~chinese
  2459. * 屏蔽/取消屏蔽群组消息的推送
  2460. *
  2461. * @param aGroupId 群组ID
  2462. * @param aIgnore 是否屏蔽
  2463. * @param aSuccessBlock 成功的回调
  2464. * @param aFailureBlock 失败的回调
  2465. *
  2466. *
  2467. * \~english
  2468. * Block / unblock group message‘s push notification
  2469. *
  2470. * @param aGroupId Group id
  2471. * @param aIgnore Whether block
  2472. * @param aSuccessBlock The callback block of success
  2473. * @param aFailureBlock The callback block of failure
  2474. *
  2475. */
  2476. - (void)asyncIgnoreGroupPush:(NSString *)aGroupId
  2477. ignore:(BOOL)aIsIgnore
  2478. success:(void (^)())aSuccessBlock
  2479. failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -updatePushServiceForGroup:isPushEnabled:completion:");
  2480. @end