123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619 |
- /*!
- * \~chinese
- * @header IEMGroupManager.h
- * @abstract 此协议定义了群组相关操作
- * @author Hyphenate
- * @version 3.00
- *
- * \~english
- * @header IEMGroupManager.h
- * @abstract This protocol defines the group operations
- * @author Hyphenate
- * @version 3.00
- */
- #import <Foundation/Foundation.h>
- #import "EMCommonDefs.h"
- #import "EMGroupManagerDelegate.h"
- #import "EMGroup.h"
- #import "EMGroupOptions.h"
- #import "EMCursorResult.h"
- #import "EMGroupSharedFile.h"
- /*!
- * \~chinese
- * 群组相关操作
- *
- * \~english
- * Group operations
- */
- @protocol IEMGroupManager <NSObject>
- @required
- #pragma mark - Delegate
- /*!
- * \~chinese
- * 添加回调代理
- *
- * @param aDelegate 要添加的代理
- * @param aQueue 添加回调代理
- *
- * \~english
- * Add delegate
- *
- * @param aDelegate Delegate
- * @param aQueue (optional) The queue of calling delegate methods. Pass in nil to run on main thread.
- */
- - (void)addDelegate:(id<EMGroupManagerDelegate>)aDelegate
- delegateQueue:(dispatch_queue_t)aQueue;
- /*!
- * \~chinese
- * 移除回调代理
- *
- * @param aDelegate 要移除的代理
- *
- * \~english
- * Remove delegate
- *
- * @param aDelegate Delegate
- */
- - (void)removeDelegate:(id)aDelegate;
- #pragma mark - Get Group
- /*!
- * \~chinese
- * 获取用户所有群组
- *
- * @result 群组列表<EMGroup>
- *
- * \~english
- * Get all groups
- *
- * @result Group list<EMGroup>
- *
- */
- - (NSArray *)getJoinedGroups;
- /*!
- * \~chinese
- * 从内存中获取屏蔽了推送的群组ID列表
- *
- * @param pError 错误信息
- *
- * \~english
- * Get the list of groups which have disabled Apple Push Notification Service
- *
- * @param pError Error
- */
- - (NSArray *)getGroupsWithoutPushNotification:(EMError **)pError;
- #pragma mark - Get group from server
- /*!
- * \~chinese
- * 按数目从服务器获取自己加入的群组
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aPageNum 获取自己加入群的cursor,首次调用传空
- * @param aPageSize 期望返回结果的数量, 如果 < 0 则一次返回所有结果
- * @param pError 出错信息
- *
- * @return 群组列表<EMGroup>
- *
- * \~english
- * Get pagesize number group you joined from the server.
- *
- * Synchronization method will block the current thread
- *
- * @param aPageNum Page number
- * @param aPageSize Page size
- * @param pError Error
- *
- * @return Group list<EMGroup>
- */
- - (NSArray *)getJoinedGroupsFromServerWithPage:(NSInteger)aPageNum
- pageSize:(NSInteger)aPageSize
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 按数目从服务器获取自己加入的群组
- *
- * @param aPageNum 获取自己加入群的cursor,首次调用传空
- * @param aPageSize 期望返回结果的数量, 如果 < 0 则一次返回所有结果
- * @param aCompletionBlock 完成的回调
- *
- * \~english
- * Get pagesize number group you joined from the server.
- *
- * @param aPageNum Page number
- * @param aPageSize Page size
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)getJoinedGroupsFromServerWithPage:(NSInteger)aPageNum
- pageSize:(NSInteger)aPageSize
- completion:(void (^)(NSArray *aList, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 从服务器获取指定范围内的公开群
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aCursor 获取公开群的cursor,首次调用传空
- * @param aPageSize 期望返回结果的数量, 如果 < 0 则一次返回所有结果
- * @param pError 出错信息
- *
- * @return 获取的公开群结果
- *
- * \~english
- * Get public groups with the specified range from the server
- *
- * Synchronization method will block the current thread
- *
- * @param aCursor Cursor, input nil the first time
- * @param aPageSize Expect result count, return all results if count is less than zero
- * @param pError Error
- *
- * @return The result
- */
- - (EMCursorResult *)getPublicGroupsFromServerWithCursor:(NSString *)aCursor
- pageSize:(NSInteger)aPageSize
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 从服务器获取指定范围内的公开群
- *
- * @param aCursor 获取公开群的cursor,首次调用传空
- * @param aPageSize 期望返回结果的数量, 如果 < 0 则一次返回所有结果
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Get public groups with the specified range from the server
- *
- * @param aCursor Cursor, input nil the first time
- * @param aPageSize Expect result count, return all results if count is less than zero
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)getPublicGroupsFromServerWithCursor:(NSString *)aCursor
- pageSize:(NSInteger)aPageSize
- completion:(void (^)(EMCursorResult *aResult, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 根据群ID搜索公开群
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aGroundId 群组id
- * @param pError 错误信息
- *
- * @return 搜索到的群组
- *
- * \~english
- * Search a public group with the id
- *
- * Synchronization method will block the current thread
- *
- * @param aGroundId Group id
- * @param pError Error
- *
- * @return The group with the id
- */
- - (EMGroup *)searchPublicGroupWithId:(NSString *)aGroundId
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 根据群ID搜索公开群
- *
- * @param aGroundId 群组id
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Search public group with group id
- *
- * @param aGroundId Group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)searchPublicGroupWithId:(NSString *)aGroundId
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- #pragma mark - Create
- /*!
- * \~chinese
- * 创建群组
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aSubject 群组名称
- * @param aDescription 群组描述
- * @param aInvitees 群组成员(不包括创建者自己)
- * @param aMessage 邀请消息
- * @param aSetting 群组属性
- * @param pError 出错信息
- *
- * @return 创建的群组
- *
- * \~english
- * Create a group
- *
- * Synchronization method will block the current thread
- *
- * @param aSubject Group subject
- * @param aDescription Group description
- * @param aInvitees Group members, without creater
- * @param aMessage Invitation message
- * @param aSetting Group options
- * @param pError Error
- *
- * @return Created group
- */
- - (EMGroup *)createGroupWithSubject:(NSString *)aSubject
- description:(NSString *)aDescription
- invitees:(NSArray *)aInvitees
- message:(NSString *)aMessage
- setting:(EMGroupOptions *)aSetting
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 创建群组
- *
- * @param aSubject 群组名称
- * @param aDescription 群组描述
- * @param aInvitees 群组成员(不包括创建者自己)
- * @param aMessage 邀请消息
- * @param aSetting 群组属性
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Create a group
- *
- * @param aSubject Group subject
- * @param aDescription Group description
- * @param aInvitees Group members, without creater
- * @param aMessage Invitation message
- * @param aSetting Group options
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)createGroupWithSubject:(NSString *)aSubject
- description:(NSString *)aDescription
- invitees:(NSArray *)aInvitees
- message:(NSString *)aMessage
- setting:(EMGroupOptions *)aSetting
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- #pragma mark - Fetch Info
- /*!
- * \~chinese
- * 获取群组详情,包含群组ID,群组名称,群组描述,群组基本属性,群组Owner, 群组管理员
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aGroupId 群组ID
- * @param pError 错误信息
- *
- * @return 群组
- *
- * \~english
- * Fetch group info,include ID, name, description,setting, owner, admins
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Group id
- * @param pError Error
- *
- * @return Group instance
- */
- - (EMGroup *)getGroupSpecificationFromServerWithId:(NSString *)aGroupId
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 获取群组详情,包含群组ID,群组名称,群组描述,群组基本属性,群组Owner, 群组管理员
- *
- * @param aGroupId 群组ID
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Fetch group specification, including: ID, name, description, setting, owner, admins
- *
- * @param aGroupId Group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)getGroupSpecificationFromServerWithId:(NSString *)aGroupId
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 获取群组成员列表
- *
- * @param aGroupId 群组ID
- * @param aCursor 游标,,首次调用传空
- * @param aPageSize 获取多少条
- * @param pError 错误信息
- *
- * @return 列表和游标
- *
- * \~english
- * Get the list of group members from the server
- *
- * @param aGroupId Group id
- * @param aCursor Cursor, input nil the first time
- * @param aPageSize Page size
- * @param pError Error
- *
- * @return List and cursor
- *
- */
- - (EMCursorResult *)getGroupMemberListFromServerWithId:(NSString *)aGroupId
- cursor:(NSString *)aCursor
- pageSize:(NSInteger)aPageSize
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 获取群组成员列表
- *
- * @param aGroupId 群组ID
- * @param aCursor 游标,首次调用传空
- * @param aPageSize 获取多少条
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Get the list of group members from the server
- *
- * @param aGroupId Group id
- * @param aCursor Cursor, input nil the first time
- * @param aPageSize Page size
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)getGroupMemberListFromServerWithId:(NSString *)aGroupId
- cursor:(NSString *)aCursor
- pageSize:(NSInteger)aPageSize
- completion:(void (^)(EMCursorResult *aResult, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 获取群组黑名单列表, 需要owner/admin权限
- *
- * @param aGroupId 群组ID
- * @param aPageNum 获取第几页
- * @param aPageSize 获取多少条
- * @param pError 错误信息
- *
- *
- * \~english
- * Get the blacklist of group from the server, need owner / admin permissions
- *
- * @param aGroupId Group id
- * @param aPageNum Page number
- * @param aPageSize Page size
- * @param pError Error
- *
- */
- - (NSArray *)getGroupBlacklistFromServerWithId:(NSString *)aGroupId
- pageNumber:(NSInteger)aPageNum
- pageSize:(NSInteger)aPageSize
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 获取群组黑名单列表, 需要owner/admin权限
- *
- * @param aGroupId 群组ID
- * @param aPageNum 获取第几页
- * @param aPageSize 获取多少条
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Get group's blacklist, need owner / admin permissions
- *
- * @param aGroupId Group id
- * @param aPageNum Page number
- * @param aPageSize Page size
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)getGroupBlacklistFromServerWithId:(NSString *)aGroupId
- pageNumber:(NSInteger)aPageNum
- pageSize:(NSInteger)aPageSize
- completion:(void (^)(NSArray *aList, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 获取群组被禁言列表
- *
- * @param aGroupId 群组ID
- * @param aPageNum 获取第几页
- * @param aPageSize 获取多少条
- * @param pError 错误信息
- *
- *
- * \~english
- * Get the mutes of group from the server
- *
- * @param aGroupId Group id
- * @param aPageNum Page number
- * @param aPageSize Page size
- * @param pError Error
- *
- */
- - (NSArray *)getGroupMuteListFromServerWithId:(NSString *)aGroupId
- pageNumber:(NSInteger)aPageNum
- pageSize:(NSInteger)aPageSize
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 获取群组被禁言列表
- *
- * @param aGroupId 群组ID
- * @param aPageNum 获取第几页
- * @param aPageSize 获取多少条
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Get the mutes of group from the server
- *
- * @param aGroupId Group id
- * @param aPageNum Page number
- * @param aPageSize Page size
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)getGroupMuteListFromServerWithId:(NSString *)aGroupId
- pageNumber:(NSInteger)aPageNum
- pageSize:(NSInteger)aPageSize
- completion:(void (^)(NSArray *aList, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 获取群共享文件列表
- *
- * @param aGroupId 群组ID
- * @param aPageNum 获取第几页
- * @param aPageSize 获取多少条
- * @param pError 错误信息
- *
- * @result 群共享文件列表
- *
- * \~english
- * Get the share files of group from the server
- *
- * @param aGroupId Group id
- * @param aPageNum Page number
- * @param aPageSize Page size
- * @param pError error
- *
- * @result The share files of group
- */
- - (NSArray *)getGroupFileListWithId:(NSString *)aGroupId
- pageNumber:(NSInteger)aPageNum
- pageSize:(NSInteger)aPageSize
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 获取群共享文件列表
- *
- * @param aGroupId 群组ID
- * @param aPageNum 获取第几页
- * @param aPageSize 获取多少条
- * @param aCompletionBlock 完成的回调
- *
- * \~english
- * Get the share files of group from the server
- *
- * @param aGroupId Group id
- * @param aPageNum Page number
- * @param aPageSize Page size
- * @param aCompletionBlock The callback block of completion
- */
- - (void)getGroupFileListWithId:(NSString *)aGroupId
- pageNumber:(NSInteger)aPageNum
- pageSize:(NSInteger)aPageSize
- completion:(void (^)(NSArray *aList, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 获取群公告
- *
- * @param aGroupId 群组ID
- * @param pError 错误信息
- *
- * @result 群声明, 失败返回nil
- *
- * \~english
- * Get the announcement of group from the server
- *
- * @param aGroupId Group id
- * @param pError error
- *
- * @result Group Announcement, return nil if fail
- */
- - (NSString *)getGroupAnnouncementWithId:(NSString *)aGroupId
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 获取群公告
- *
- * @param aGroupId 群组ID
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Get the announcement of group from the server
- *
- * @param aGroupId Group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)getGroupAnnouncementWithId:(NSString *)aGroupId
- completion:(void (^)(NSString *aAnnouncement, EMError *aError))aCompletionBlock;
- #pragma mark - Edit Group
- /*!
- * \~chinese
- * 邀请用户加入群组
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aOccupants 被邀请的用户名列表
- * @param aGroupId 群组ID
- * @param aWelcomeMessage 欢迎信息
- * @param pError 错误信息
- *
- * @result 群组实例, 失败返回nil
- *
- * \~english
- * Invite User to join a group
- *
- * Synchronization method will block the current thread
- *
- * @param aOccupants Invited users
- * @param aGroupId Group id
- * @param aWelcomeMessage Welcome message
- * @param pError Error
- *
- * @result Group instance, return nil if fail
- */
- - (EMGroup *)addOccupants:(NSArray *)aOccupants
- toGroup:(NSString *)aGroupId
- welcomeMessage:(NSString *)aWelcomeMessage
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 邀请用户加入群组
- *
- * @param aUsers 被邀请的用户名列表
- * @param aGroupId 群组ID
- * @param aMessage 欢迎信息
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Invite User to join a group
- *
- * @param aUsers Invited users
- * @param aGroupId Group id
- * @param aMessage Welcome message
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)addMembers:(NSArray *)aUsers
- toGroup:(NSString *)aGroupId
- message:(NSString *)aMessage
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 将群成员移出群组, 需要owner权限
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aOccupants 要移出群组的用户列表
- * @param aGroupId 群组ID
- * @param pError 错误信息
- *
- * @result 群组实例
- *
- * \~english
- * Remove members from a group, required owner‘s authority
- *
- * Synchronization method will block the current thread
- *
- * @param aOccupants Users to be removed
- * @param aGroupId Group id
- * @param pError Error
- *
- * @result Group instance
- */
- - (EMGroup *)removeOccupants:(NSArray *)aOccupants
- fromGroup:(NSString *)aGroupId
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 将群成员移出群组, 需要owner权限
- *
- * @param aUsers 要移出群组的用户列表
- * @param aGroupId 群组ID
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Remove members from a group, owner‘s authority is required
- *
- * @param aUsers Users to be removed
- * @param aGroupId Group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)removeMembers:(NSArray *)aUsers
- fromGroup:(NSString *)aGroupId
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 加人到群组黑名单, 需要owner权限
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aOccupants 要加入黑名单的用户
- * @param aGroupId 群组ID
- * @param pError 错误信息
- *
- * @result 群组实例
- *
- * \~english
- * Add users to group blacklist, required owner‘s authority
- *
- * Synchronization method will block the current thread
- *
- * @param aOccupants Users to be added
- * @param aGroupId Group id
- * @param pError Error
- *
- * @result Group instance
- */
- - (EMGroup *)blockOccupants:(NSArray *)aOccupants
- fromGroup:(NSString *)aGroupId
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 加人到群组黑名单, 需要owner权限
- *
- * @param aMembers 要加入黑名单的用户
- * @param aGroupId 群组ID
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Add users to group blacklist, owner‘s authority is required
- *
- * @param aMembers Users to be added
- * @param aGroupId Group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)blockMembers:(NSArray *)aMembers
- fromGroup:(NSString *)aGroupId
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 从群组黑名单中减人, 需要owner权限
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aOccupants 要从黑名单中移除的用户名列表
- * @param aGroupId 群组ID
- * @param pError 错误信息
- *
- * @result 群组对象
- *
- * \~english
- * Remove users from group blacklist, required owner‘s authority
- *
- * Synchronization method will block the current thread
- *
- * @param aOccupants Users to be removed
- * @param aGroupId Group id
- * @param pError Error
- *
- * @result Group instance
- */
- - (EMGroup *)unblockOccupants:(NSArray *)aOccupants
- forGroup:(NSString *)aGroupId
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 从群组黑名单中减人, 需要owner权限
- *
- * @param aMembers 要从黑名单中移除的用户名列表
- * @param aGroupId 群组ID
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Remove users out of group blacklist, owner‘s authority is required
- *
- * @param aMembers Users to be removed
- * @param aGroupId Group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)unblockMembers:(NSArray *)aMembers
- fromGroup:(NSString *)aGroupId
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 更改群组主题, 需要owner权限
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aSubject 新主题
- * @param aGroupId 群组ID
- * @param pError 错误信息
- *
- * @result 群组对象
- *
- * \~english
- * Change group subject, owner‘s authority is required
- *
- * Synchronization method will block the current thread
- *
- * @param aSubject New group subject
- * @param aGroupId Group id
- * @param pError Error
- *
- * @result Group instance
- */
- - (EMGroup *)changeGroupSubject:(NSString *)aSubject
- forGroup:(NSString *)aGroupId
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 更改群组主题, 需要owner权限
- *
- * @param aSubject 新主题
- * @param aGroupId 群组ID
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Change the group subject, owner‘s authority is required
- *
- * @param aSubject New group‘s subject
- * @param aGroupId Group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)updateGroupSubject:(NSString *)aSubject
- forGroup:(NSString *)aGroupId
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 更改群组说明信息, 需要owner权限
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aDescription 说明信息
- * @param aGroupId 群组ID
- * @param pError 错误信息
- *
- * @result 群组对象
- *
- * \~english
- * Change group description, owner‘s authority is required
- *
- * Synchronization method will block the current thread
- *
- * @param aDescription New group description
- * @param aGroupId Group id
- * @param pError Error
- *
- * @result Group
- */
- - (EMGroup *)changeDescription:(NSString *)aDescription
- forGroup:(NSString *)aGroupId
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 更改群组说明信息, 需要owner权限
- *
- * @param aDescription 说明信息
- * @param aGroupId 群组ID
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Change the group description, owner‘s authority is required
- *
- * @param aDescription New group‘s description
- * @param aGroupId Group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)updateDescription:(NSString *)aDescription
- forGroup:(NSString *)aGroupId
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 退出群组,owner不能退出群,只能销毁群
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aGroupId 群组ID
- * @param pError 错误信息
- *
- *
- * \~english
- * Leave a group, owner can't leave the group, can only destroy the group
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Group id
- * @param pError Error
- *
- */
- - (void)leaveGroup:(NSString *)aGroupId
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 退出群组,owner不能退出群,只能销毁群
- *
- * @param aGroupId 群组ID
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Leave a group, owner can't leave the group, can only destroy the group
- *
- * @param aGroupId Group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)leaveGroup:(NSString *)aGroupId
- completion:(void (^)(EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 解散群组, 需要owner权限
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aGroupId 群组ID
- *
- * @result 错误信息, 成功返回nil
- *
- * \~english
- * Destroy a group, owner‘s authority is required
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Group id
- *
- * @result Error, return nil if success
- */
- - (EMError *)destroyGroup:(NSString *)aGroupId;
- /*!
- * \~chinese
- * 解散群组, 需要owner权限
- *
- * @param aGroupId 群组ID
- * @param aCompletionBlock 完成的回调
- *
- * \~english
- * Destroy a group, owner‘s authority is required
- *
- * @param aGroupId Group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)destroyGroup:(NSString *)aGroupId
- finishCompletion:(void (^)(EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 屏蔽群消息,服务器不再发送此群的消息给用户,owner不能屏蔽群消息
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aGroupId 要屏蔽的群ID
- * @param pError 错误信息
- *
- * @result 群组实例
- *
- * \~english
- * Block group messages, server will blocks the messages from the group, owner can't block the group's message
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Group id
- * @param pError Error
- *
- * @result Group instance
- */
- - (EMGroup *)blockGroup:(NSString *)aGroupId
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 屏蔽群消息,服务器不再发送此群的消息给用户,owner不能屏蔽群消息
- *
- * @param aGroupId 要屏蔽的群ID
- * @param aCompletionBlock 完成的回调
- *
- * \~english
- * Block group messages, server blocks the messages from the group, owner can't block the group's messages
- *
- * @param aGroupId Group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)blockGroup:(NSString *)aGroupId
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 取消屏蔽群消息
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aGroupId 要取消屏蔽的群ID
- * @param pError 错误信息
- *
- * @result 返回群组实例
- *
- * \~english
- * Unblock group messages
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Group id
- * @param pError Error
- *
- * @result Group instance
- */
- - (EMGroup *)unblockGroup:(NSString *)aGroupId
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 取消屏蔽群消息
- *
- * @param aGroupId 要取消屏蔽的群ID
- * @param aCompletionBlock 完成的回调
- *
- * \~english
- * Unblock group message
- *
- * @param aGroupId Group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)unblockGroup:(NSString *)aGroupId
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 改变群主,需要Owner权限
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aGroupId 群ID
- * @param aNewOwner 新群主
- * @param pError 错误信息
- *
- * @result 返回群组实例
- *
- * \~english
- * Change group owner, need Owner permissions
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Group id
- * @param aNewOwner New group owner
- * @param pError Error
- *
- * @result Group instance
- */
- - (EMGroup *)updateGroupOwner:(NSString *)aGroupId
- newOwner:(NSString *)aNewOwner
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 改变群主,需要Owner权限
- *
- * @param aGroupId 群ID
- * @param aNewOwner 新群主
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Change group owner, need Owner permissions
- *
- * @param aGroupId Group id
- * @param aNewOwner New group owner
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)updateGroupOwner:(NSString *)aGroupId
- newOwner:(NSString *)aNewOwner
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 添加群组管理员,需要Owner权限
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aAdmin 要添加的群组管理员
- * @param aGroupId 群ID
- * @param pError 错误信息
- * @result 返回群组实例
- *
- * \~english
- * Add group admin, need Owner permissions
- *
- * Synchronization method will block the current thread
- *
- * @param aAdmin Admin
- * @param aGroupId Group id
- * @param pError Error
- * @result Group instance
- */
- - (EMGroup *)addAdmin:(NSString *)aAdmin
- toGroup:(NSString *)aGroupId
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 添加群组管理员,需要Owner权限
- *
- * @param aAdmin 要添加的群组管理员
- * @param aGroupId 群ID
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Add group admin, need Owner permissions
- *
- * @param aAdmin Admin
- * @param aGroupId Group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)addAdmin:(NSString *)aAdmin
- toGroup:(NSString *)aGroupId
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 移除群组管理员,需要Owner权限
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aAdmin 要移除的群组管理员
- * @param aGroupId 群ID
- * @param pError 错误信息
- *
- * @result 返回群组实例
- *
- * \~english
- * Remove group admin, need Owner permissions
- *
- * Synchronization method will block the current thread
- *
- * @param aAdmin Admin
- * @param aGroupId Group id
- * @param pError Error
- *
- * @result Group instance
- */
- - (EMGroup *)removeAdmin:(NSString *)aAdmin
- fromGroup:(NSString *)aGroupId
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 移除群组管理员,需要Owner权限
- *
- * @param aAdmin 要移除的群组管理员
- * @param aGroupId 群ID
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Remove group admin, need Owner permissions
- *
- * @param aAdmin Admin
- * @param aGroupId Group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)removeAdmin:(NSString *)aAdmin
- fromGroup:(NSString *)aGroupId
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 将一组成员禁言,需要Owner / Admin权限
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aMuteMembers 要禁言的成员列表<NSString>
- * @param aMuteMilliseconds 禁言时长
- * @param aGroupId 群ID
- * @param pError 错误信息
- *
- * @result 返回群组实例
- *
- * \~english
- * Mute group members, need Owner / Admin permissions
- *
- * Synchronization method will block the current thread
- *
- * @param aMuteMembers The list of mute, type is <NSString>
- * @param aMuteMilliseconds Muted time duration in millisecond
- * @param aGroupId Group id
- * @param pError Error
- *
- * @result Group instance
- */
- - (EMGroup *)muteMembers:(NSArray *)aMuteMembers
- muteMilliseconds:(NSInteger)aMuteMilliseconds
- fromGroup:(NSString *)aGroupId
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 将一组成员禁言,需要Owner / Admin权限
- *
- * @param aMuteMembers 要禁言的成员列表<NSString>
- * @param aMuteMilliseconds 禁言时长
- * @param aGroupId 群ID
- * @param aCompletionBlock 完成的回调
- *
- * \~english
- * Mute group members, need Owner / Admin permissions
- *
- * Synchronization method will block the current thread
- *
- * @param aMuteMembers The list of mute, type is <NSString>
- * @param aMuteMilliseconds Muted time duration in millisecond
- * @param aGroupId Group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)muteMembers:(NSArray *)aMuteMembers
- muteMilliseconds:(NSInteger)aMuteMilliseconds
- fromGroup:(NSString *)aGroupId
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 解除禁言,需要Owner / Admin权限
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aMuteMembers 被解除的列表<NSString>
- * @param aGroupId 群ID
- * @param pError 错误信息
- *
- * @result 返回群组实例
- *
- * \~english
- * Unmute group members, need Owner / Admin permissions
- *
- * Synchronization method will block the current thread
- *
- * @param aMembers The list of unmute, type is <NSString>
- * @param aGroupId Group id
- * @param pError Error
- *
- * @result Group instance
- */
- - (EMGroup *)unmuteMembers:(NSArray *)aMembers
- fromGroup:(NSString *)aGroupId
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 解除禁言,需要Owner / Admin权限
- *
- * @param aMuteMembers 被解除的列表<NSString>
- * @param aGroupId 群ID
- * @param aCompletionBlock 完成的回调
- *
- * \~english
- * Unmute group members, need Owner / Admin permissions
- *
- * Synchronization method will block the current thread
- *
- * @param aMembers The list of unmute, type is <NSString>
- * @param aGroupId Group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)unmuteMembers:(NSArray *)aMembers
- fromGroup:(NSString *)aGroupId
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 上传群共享文件
- *
- * @param aGroupId 群ID
- * @param aFilePath 文件路径
- * @param pError 错误信息
- *
- * @result 群实例
- *
- * \~english
- * Upload the share file of group
- *
- * @param aGroupId Group id
- * @param aFilePath Path of file
- * @param pError error
- *
- * @result Group instance
- */
- - (void)uploadGroupSharedFileWithId:(NSString *)aGroupId
- filePath:(NSString*)aFilePath
- progress:(void (^)(int progress))aProgressBlock
- completion:(void (^)(EMGroupSharedFile *aSharedFile, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 下载群共享文件
- *
- * @param aGroupId 群ID
- * @param aFilePath 文件路径
- * @param aSharedFileId 共享文件ID
- * @param aProgressBlock 文件下载进度回调block
- * @param aCompletionBlock 完成回调block
- *
- * \~english
- * Download the share file of group
- *
- * @param aGroupId Group id
- * @param aFilePath Path of file
- * @param aSharedFileId share file id
- * @param aProgressBlock The block of attachment upload progress
- * @param aCompletionBlock The callback block of completion
- */
- - (void)downloadGroupSharedFileWithId:(NSString *)aGroupId
- filePath:(NSString *)aFilePath
- sharedFileId:(NSString *)aSharedFileId
- progress:(void (^)(int progress))aProgressBlock
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 删除群共享文件
- *
- * @param aGroupId 群ID
- * @param aSharedFileId 共享文件ID
- * @param pError 错误信息
- *
- * @result 群实例
- *
- * \~english
- * Remove the share file of group
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Group id
- * @param aSharedFileId share file Id
- * @param pError error
- *
- * @result Group instance
- */
- - (EMGroup *)removeGroupSharedFileWithId:(NSString *)aGroupId
- sharedFileId:(NSString *)aSharedFileId
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 删除群共享文件
- *
- * @param aGroupId 群ID
- * @param aSharedFileId 共享文件ID
- * @param aCompletionBlock 完成的回调
- *
- * \~english
- * Remove the share file of group
- *
- * @param aGroupId Group id
- * @param aSharedFileId share file Id
- * @param aCompletionBlock The callback block of completion
- */
- - (void)removeGroupSharedFileWithId:(NSString *)aGroupId
- sharedFileId:(NSString *)aSharedFileId
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 修改群公告,需要Owner / Admin权限
- *
- * @param aGroupId 群ID
- * @param aAnnouncement 群公告
- * @param pError 错误信息
- *
- * @result 群实例
- *
- * \~english
- * Update the announcement of group, need Owner / Admin permissions
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Group id
- * @param aAnnouncement announcement of group
- * @param pError error
- *
- * @result Group instance
- */
- - (EMGroup *)updateGroupAnnouncementWithId:(NSString *)aGroupId
- announcement:(NSString *)aAnnouncement
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 修改群公告,需要Owner / Admin权限
- *
- * @param aGroupId 群ID
- * @param aAnnouncement 群公告
- * @param aCompletionBlock 完成的回调
- *
- * \~english
- * Update the announcement of group, need Owner / Admin permissions
- *
- * @param aGroupId Group id
- * @param aAnnouncement announcement of group
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)updateGroupAnnouncementWithId:(NSString *)aGroupId
- announcement:(NSString *)aAnnouncement
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 修改群扩展信息,需要Owner权限
- *
- * @param aGroupId 群ID
- * @param aExt 扩展信息
- * @param pError 错误信息
- *
- * @result 群实例
- *
- * \~english
- * Update the extended of the group, need Owner
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Group id
- * @param aExt Extended of the group
- * @param pError error
- *
- * @result Group instance
- */
- - (EMGroup *)updateGroupExtWithId:(NSString *)aGroupId
- ext:(NSString *)aExt
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 修改群扩展信息,需要Owner权限
- *
- * @param aGroupId 群ID
- * @param aExt 扩展信息
- * @param aCompletionBlock 完成的回调
- *
- * \~english
- * Update the extended of the group, need Owner
- *
- * @param aGroupId Group id
- * @param aExt Extended of the group
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)updateGroupExtWithId:(NSString *)aGroupId
- ext:(NSString *)aExt
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- #pragma mark - Edit Public Group
- /*!
- * \~chinese
- * 加入一个公开群组,群类型应该是EMGroupStylePublicOpenJoin
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aGroupId 公开群组的ID
- * @param pError 错误信息
- *
- * @result 所加入的公开群组
- *
- * \~english
- * Join a public group, group style should be EMGroupStylePublicOpenJoin
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Public group id
- * @param pError Error
- *
- * @result Joined public group
- */
- - (EMGroup *)joinPublicGroup:(NSString *)aGroupId
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 加入一个公开群组,群类型应该是EMGroupStylePublicOpenJoin
- *
- * @param aGroupId 公开群组的ID
- * @param aCompletionBlock 完成的回调
- *
- * \~english
- * Join a public group, group style should be EMGroupStylePublicOpenJoin
- *
- * @param aGroupId Public group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)joinPublicGroup:(NSString *)aGroupId
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 申请加入一个需批准的公开群组,群类型应该是EMGroupStylePublicJoinNeedApproval
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aGroupId 公开群组的ID
- * @param aMessage 请求加入的信息
- * @param pError 错误信息
- *
- * @result 申请加入的公开群组
- *
- * \~english
- * Request to join a public group, group style should be EMGroupStylePublicJoinNeedApproval
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Public group id
- * @param aMessage Request info
- * @param pError Error
- *
- * @result Group instance
- */
- - (EMGroup *)applyJoinPublicGroup:(NSString *)aGroupId
- message:(NSString *)aMessage
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 申请加入一个需批准的公开群组,群类型应该是EMGroupStylePublicJoinNeedApproval
- *
- * @param aGroupId 公开群组的ID
- * @param aMessage 请求加入的信息
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Request to join a public group, group style should be EMGroupStylePublicJoinNeedApproval
- *
- * @param aGroupId Public group id
- * @param aMessage Apply info
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)requestToJoinPublicGroup:(NSString *)aGroupId
- message:(NSString *)aMessage
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- #pragma mark - Application
- /*!
- * \~chinese
- * 批准入群申请, 需要Owner权限
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aGroupId 所申请的群组ID
- * @param aUsername 申请人
- *
- * @result 错误信息
- *
- * \~english
- * Accept a group request, owner‘s authority is required
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Group id
- * @param aUsername The applicant
- *
- * @result Error
- */
- - (EMError *)acceptJoinApplication:(NSString *)aGroupId
- applicant:(NSString *)aUsername;
- /*!
- * \~chinese
- * 批准入群申请, 需要Owner权限
- *
- * @param aGroupId 所申请的群组ID
- * @param aUsername 申请人
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Approve a group request, owner‘s authority is required
- *
- * @param aGroupId Group id
- * @param aUsername Group request sender
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)approveJoinGroupRequest:(NSString *)aGroupId
- sender:(NSString *)aUsername
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 拒绝入群申请, 需要Owner权限
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aGroupId 被拒绝的群组ID
- * @param aUsername 申请人
- * @param aReason 拒绝理由
- *
- * @result 错误信息
- *
- * \~english
- * Decline a group request, owner‘s authority is required
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Group id
- * @param aUsername Group request sender
- * @param aReason Decline reason
- *
- * @result Error
- */
- - (EMError *)declineJoinApplication:(NSString *)aGroupId
- applicant:(NSString *)aUsername
- reason:(NSString *)aReason;
- /*!
- * \~chinese
- * 拒绝入群申请, 需要Owner权限
- *
- * @param aGroupId 被拒绝的群组ID
- * @param aUsername 申请人
- * @param aReason 拒绝理由
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Decline a group request, owner‘s authority is required
- *
- * @param aGroupId Group id
- * @param aUsername Group request sender
- * @param aReason Decline reason
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)declineJoinGroupRequest:(NSString *)aGroupId
- sender:(NSString *)aUsername
- reason:(NSString *)aReason
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 接受入群邀请
- *
- * 同步方法,会阻塞当前线程
- *
- * @param groupId 接受的群组ID
- * @param aUsername 邀请者
- * @param pError 错误信息
- *
- * @result 接受的群组实例
- *
- * \~english
- * Accept a group invitation
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Group id
- * @param aUsername Inviter
- * @param pError Error
- *
- * @result Joined group instance
- */
- - (EMGroup *)acceptInvitationFromGroup:(NSString *)aGroupId
- inviter:(NSString *)aUsername
- error:(EMError **)pError;
- /*!
- * \~chinese
- * 接受入群邀请
- *
- * @param groupId 接受的群组ID
- * @param aUsername 邀请者
- * @param pError 错误信息
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Accept a group invitation
- *
- * @param aGroupId Group id
- * @param aUsername Inviter
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)acceptInvitationFromGroup:(NSString *)aGroupId
- inviter:(NSString *)aUsername
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 拒绝入群邀请
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aGroupId 被拒绝的群组ID
- * @param aUsername 邀请人
- * @param aReason 拒绝理由
- *
- * @result 错误信息
- *
- * \~english
- * Decline a group invitation
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Group id
- * @param aUsername Inviter
- * @param aReason Decline reason
- *
- * @result Error
- */
- - (EMError *)declineInvitationFromGroup:(NSString *)aGroupId
- inviter:(NSString *)aUsername
- reason:(NSString *)aReason;
- /*!
- * \~chinese
- * 拒绝入群邀请
- *
- * @param aGroupId 被拒绝的群组ID
- * @param aInviter 邀请人
- * @param aReason 拒绝理由
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Decline a group invitation
- *
- * @param aGroupId Group id
- * @param aInviter Inviter
- * @param aReason Decline reason
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)declineGroupInvitation:(NSString *)aGroupId
- inviter:(NSString *)aInviter
- reason:(NSString *)aReason
- completion:(void (^)(EMError *aError))aCompletionBlock;
- #pragma mark - Apns
- /*!
- * \~chinese
- * 屏蔽/取消屏蔽群组消息的推送
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aGroupId 群组ID
- * @param aIgnore 是否屏蔽
- *
- * @result 错误信息
- *
- * \~english
- * Block/unblock group message‘s push notification
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Group id
- * @param aIsIgnore Show/ignore push notificatino
- *
- * @result Error
- */
- - (EMError *)ignoreGroupPush:(NSString *)aGroupId
- ignore:(BOOL)aIsIgnore;
- /*!
- * \~chinese
- * 屏蔽/取消屏蔽群组消息的推送
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aGroupIDs 群组ID列表
- * @param aIgnore 是否屏蔽
- *
- * @result 错误信息
- *
- * \~english
- * Block/unblock group message‘s push notification
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupIDs Group ids list
- * @param aIsIgnore Show or ignore push notification
- *
- * @result Error
- */
- - (EMError *)ignoreGroupsPush:(NSArray *)aGroupIDs
- ignore:(BOOL)aIsIgnore;
- /*!
- * \~chinese
- * 屏蔽/取消屏蔽群组消息的推送
- *
- * @param aGroupId 群组ID
- * @param aIsEnable 是否允许推送
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Block/unblock group message‘s push notification
- *
- * @param aGroupId Group id
- * @param aIsEnable Whether enable
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)updatePushServiceForGroup:(NSString *)aGroupId
- isPushEnabled:(BOOL)aIsEnable
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock;
- /*!
- * \~chinese
- * 屏蔽/取消屏蔽群组消息的推送
- *
- * @param aGroupIDs 群组ID列表
- * @param aIsEnable 是否允许推送
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Block/unblock group message‘s push notification
- *
- * @param aGroupIDs Group ids list
- * @param aIsEnable Whether enable
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)updatePushServiceForGroups:(NSArray *)aGroupIDs
- isPushEnabled:(BOOL)aIsEnable
- completion:(void (^)(NSArray *groups, EMError *aError))aCompletionBlock;
- #pragma mark - EM_DEPRECATED_IOS 3.3.0
- /**
- * \~chinese
- * 从服务器获取用户所有的群组,成功后更新DB和内存中的群组列表
- *
- * 同步方法,会阻塞当前线程
- *
- * @param pError 错误信息
- *
- * @return 群组列表<EMGroup>
- *
- * \~english
- * Get all of user's groups from server
- *
- * Synchronization method will block the current thread
- *
- * @param pError Error
- *
- * @result Group list<EMGroup>
- */
- - (NSArray *)getMyGroupsFromServerWithError:(EMError **)pError EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[IEMGroupManager getJoinedGroupsFromServerWithPage:pageSize:error:]");
- /**
- * \~chinese
- * 从服务器获取用户所有的群组,成功后更新DB和内存中的群组列表
- *
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Get all of user's groups from server
- *
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)getJoinedGroupsFromServerWithCompletion:(void (^)(NSArray *aList, EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[IEMGroupManager getJoinedGroupsFromServerWithPage:pageSize:completion:]");
- /*!
- * \~chinese
- * 获取群组详情
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aGroupId 群组ID
- * @param aIncludeMembersList 是否获取成员列表,为YES时,返回200个成员
- * @param pError 错误信息
- *
- * @return 群组
- *
- * \~english
- * Fetch group info
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Group id
- * @param aIncludeMembersList Whether to get member list,When YES, returns 200 members
- * @param pError Error
- *
- * @return Group instance
- */
- - (EMGroup *)fetchGroupInfo:(NSString *)aGroupId
- includeMembersList:(BOOL)aIncludeMembersList
- error:(EMError **)pError EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[IEMGroupManager getGroupSpecificationFromServerWithId:error:]");
- /*!
- * \~chinese
- * 获取群组详情
- *
- * @param aGroupId 群组ID
- * @param aIncludeMembersList 是否获取成员列表,为YES时,返回200个成员
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Fetch group specification
- *
- * @param aGroupId Group id
- * @param aIncludeMembersList Whether to get member list,When YES, returns 200 members
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)getGroupSpecificationFromServerByID:(NSString *)aGroupID
- includeMembersList:(BOOL)aIncludeMembersList
- completion:(void (^)(EMGroup *aGroup, EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[IEMGroupManager getGroupSpecificationFromServerWithId:completion:]");
- /*!
- * \~chinese
- * 获取群组黑名单列表, 需要owner权限
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aGroupId 群组ID
- * @param pError 错误信息
- *
- * @return 群组黑名单列表<NSString>
- *
- * \~english
- * Get group‘s blacklist, required owner’s authority
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Group id
- * @param pError Error
- *
- * @return Group blacklist<NSString>
- */
- - (NSArray *)fetchGroupBansList:(NSString *)aGroupId
- error:(EMError **)pError EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[IEMGroupManager getGroupBlacklistFromServerWithId:pageNumber:pageSize:error:]");
- /*!
- * \~chinese
- * 获取群组黑名单列表, 需要owner权限
- *
- * @param aGroupId 群组ID
- * @param aCompletionBlock 完成的回调
- *
- *
- * \~english
- * Get group's blacklist, owner’s authority is required
- *
- * @param aGroupId Group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)getGroupBlackListFromServerByID:(NSString *)aGroupId
- completion:(void (^)(NSArray *aList, EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[IEMGroupManager getGroupBlacklistFromServerWithId:pageNumber:pageSize:completion:]");
- /*!
- * \~chinese
- * 解散群组, 需要owner权限
- *
- * 同步方法,会阻塞当前线程
- *
- * @param aGroupId 群组ID
- * @param pError 错误信息
- *
- * @result 销毁的群组实例, 失败返回nil
- *
- * \~english
- * Destroy a group, owner‘s authority is required
- *
- * Synchronization method will block the current thread
- *
- * @param aGroupId Group id
- * @param pError Error
- *
- * @result Destroyed group, return nil if failed
- */
- - (EMGroup *)destroyGroup:(NSString *)aGroupId
- error:(EMError **)pError EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[IEMGroupManager destroyGroup:]");
- /*!
- * \~chinese
- * 解散群组, 需要owner权限
- *
- * @param aGroupId 群组ID
- * @param aCompletionBlock 完成的回调
- *
- * \~english
- * Destroy a group, owner‘s authority is required
- *
- * @param aGroupId Group id
- * @param aCompletionBlock The callback block of completion
- *
- */
- - (void)destroyGroup:(NSString *)aGroupId
- completion:(void (^)(EMGroup* aGroup, EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[IEMGroupManager destroyGroup:finishCompletion:]");
- #pragma mark - EM_DEPRECATED_IOS 3.2.3
- /*!
- * \~chinese
- * 添加回调代理
- *
- * @param aDelegate 要添加的代理
- *
- * \~english
- * Add delegate
- *
- * @param aDelegate Delegate
- */
- - (void)addDelegate:(id<EMGroupManagerDelegate>)aDelegate EM_DEPRECATED_IOS(3_1_0, 3_2_2, "Use -[IEMGroupManager addDelegate:delegateQueue:]");
- #pragma mark - EM_DEPRECATED_IOS < 3.2.3
- /*!
- * \~chinese
- * 获取所有群组,如果内存中不存在,则先从DB加载
- *
- * @result 群组列表<EMGroup>
- *
- * \~english
- * Get all groups, will load from DB if not exist in memory
- *
- * @result Group list<EMGroup>
- */
- - (NSArray *)getAllGroups __deprecated_msg("Use -getJoinedGroups");
- /*!
- * \~chinese
- * 从数据库加载所有群组,加载后更新内存中的群组列表
- *
- * @result 群组列表<EMGroup>
- *
- * \~english
- * Load all groups from DB, will update group list in memory after loading
- *
- * @result Group list<EMGroup>
- */
- - (NSArray *)loadAllMyGroupsFromDB __deprecated_msg("Use -getJoinedGroups");
- /*!
- * \~chinese
- * 从内存中获取屏蔽了推送的群组ID列表
- *
- * @result 群组ID列表<NSString>
- *
- * \~english
- * Get ID list of groups which block push from memory
- *
- * @result Group id list<NSString>
- */
- - (NSArray *)getAllIgnoredGroupIds __deprecated_msg("Use -getGroupsWithoutPushNotification");
- /**
- * \~chinese
- * 从服务器获取用户所有的群组,成功后更新DB和内存中的群组列表
- *
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- *
- * \~english
- * Get all of user's groups from server, will update group list in memory and DB after success
- *
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncGetMyGroupsFromServer:(void (^)(NSArray *aList))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -getJoinedGroupsFromServerWithCompletion:");
- /*!
- * \~chinese
- * 从服务器获取指定范围内的公开群
- *
- * @param aCursor 获取公开群的cursor,首次调用传空
- * @param aPageSize 期望返回结果的数量, 如果 < 0 则一次返回所有结果
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- *
- * \~english
- * Get public groups in the specified range from the server
- *
- * @param aCursor Cursor, input nil the first time
- * @param aPageSize Expect result count, will return all results if < 0
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncGetPublicGroupsFromServerWithCursor:(NSString *)aCursor
- pageSize:(NSInteger)aPageSize
- success:(void (^)(EMCursorResult *aCursor))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -getPublicGroupsFromServerWithCursor:pageSize:completion:");
- /*!
- * \~chinese
- * 根据群ID搜索公开群
- *
- * @param aGroundId 群组id
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- *
- * \~english
- * Search public group with the id
- *
- * @param aGroundId Group id
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncSearchPublicGroupWithId:(NSString *)aGroundId
- success:(void (^)(EMGroup *aGroup))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -searchPublicGroupWithId:completion:");
- /*!
- * \~chinese
- * 创建群组
- *
- * @param aSubject 群组名称
- * @param aDescription 群组描述
- * @param aInvitees 群组成员(不包括创建者自己)
- * @param aMessage 邀请消息
- * @param aSetting 群组属性
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- *
- * \~english
- * Create a group
- *
- * @param aSubject Group subject
- * @param aDescription Group description
- * @param aInvitees Group members, without creater
- * @param aMessage Invitation message
- * @param aSetting Group options
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncCreateGroupWithSubject:(NSString *)aSubject
- description:(NSString *)aDescription
- invitees:(NSArray *)aInvitees
- message:(NSString *)aMessage
- setting:(EMGroupOptions *)aSetting
- success:(void (^)(EMGroup *aGroup))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -createGroupWithSubject:description:invitees:message:setting:completion");
- /*!
- * \~chinese
- * 获取群组详情
- *
- * @param aGroupId 群组ID
- * @param aIncludeMembersList 是否获取成员列表
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- *
- * \~english
- * Fetch group info
- *
- * @param aGroupId Group id
- * @param aIncludeMembersList Whether get member list
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncFetchGroupInfo:(NSString *)aGroupId
- includeMembersList:(BOOL)aIncludeMembersList
- success:(void (^)(EMGroup *aGroup))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -getGroupSpecificationFromServerByID:includeMembersList:completion:");
- /*!
- * \~chinese
- * 获取群组黑名单列表, 需要owner权限
- *
- * @param aGroupId 群组ID
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- *
- * \~english
- * Get group‘s blacklist, need owner’s authority
- *
- * @param aGroupId Group id
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncFetchGroupBansList:(NSString *)aGroupId
- success:(void (^)(NSArray *aList))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -getGroupBlackListFromServerByID:completion:");
- /*!
- * \~chinese
- * 邀请用户加入群组
- *
- * @param aOccupants 被邀请的用户名列表
- * @param aGroupId 群组ID
- * @param aWelcomeMessage 欢迎信息
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- *
- * \~english
- * Invite User to join a group
- *
- * @param aOccupants Invited users
- * @param aGroupId Group id
- * @param aWelcomeMessage Welcome message
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncAddOccupants:(NSArray *)aOccupants
- toGroup:(NSString *)aGroupId
- welcomeMessage:(NSString *)aWelcomeMessage
- success:(void (^)(EMGroup *aGroup))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -addMembers:toGroup:message:completion:");
- /*!
- * \~chinese
- * 将群成员移出群组, 需要owner权限
- *
- * @param aOccupants 要移出群组的用户列表
- * @param aGroupId 群组ID
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- *
- * \~english
- * Remove members from group, need owner‘s authority
- *
- * @param aOccupants Users to be removed
- * @param aGroupId Group id
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncRemoveOccupants:(NSArray *)aOccupants
- fromGroup:(NSString *)aGroupId
- success:(void (^)(EMGroup *aGroup))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -removeMembers:fromGroup:completion:");
- /*!
- * \~chinese
- * 加人到群组黑名单, 需要owner权限
- *
- * @param aOccupants 要加入黑名单的用户
- * @param aGroupId 群组ID
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- *
- * \~english
- * Add users to group’s blacklist, need owner‘s authority
- *
- * @param aOccupants Users to be added
- * @param aGroupId Group id
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncBlockOccupants:(NSArray *)aOccupants
- fromGroup:(NSString *)aGroupId
- success:(void (^)(EMGroup *aGroup))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -blockMembers:fromGroup:completion:");
- /*!
- * \~chinese
- * 从群组黑名单中减人, 需要owner权限
- *
- * @param aOccupants 要从黑名单中移除的用户名列表
- * @param aGroupId 群组ID
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- *
- * \~english
- * Remove users from group‘s blacklist, need owner‘s authority
- *
- * @param aOccupants Users to be removed
- * @param aGroupId Group id
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncUnblockOccupants:(NSArray *)aOccupants
- forGroup:(NSString *)aGroupId
- success:(void (^)(EMGroup *aGroup))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -unblockMembers:fromGroup:completion:");
- /*!
- * \~chinese
- * 更改群组主题, 需要owner权限
- *
- * @param aSubject 新主题
- * @param aGroupId 群组ID
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- *
- * \~english
- * Change group’s subject, need owner‘s authority
- *
- * @param aSubject New group‘s subject
- * @param aGroupId Group id
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncChangeGroupSubject:(NSString *)aSubject
- forGroup:(NSString *)aGroupId
- success:(void (^)(EMGroup *aGroup))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -updateGroupSubject:forGroup:completion");
- /*!
- * \~chinese
- * 更改群组说明信息, 需要owner权限
- *
- * @param aDescription 说明信息
- * @param aGroupId 群组ID
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- *
- * \~english
- * Change group’s description, need owner‘s authority
- *
- * @param aDescription New group‘s description
- * @param aGroupId Group id
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncChangeDescription:(NSString *)aDescription
- forGroup:(NSString *)aGroupId
- success:(void (^)(EMGroup *aGroup))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -updateDescription:forGroup:completion");
- /*!
- * \~chinese
- * 退出群组,owner不能退出群,只能销毁群
- *
- * @param aGroupId 群组ID
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- *
- * \~english
- * Leave a group, owner can't leave the group, can only destroy the group
- *
- * @param aGroupId Group id
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncLeaveGroup:(NSString *)aGroupId
- success:(void (^)(EMGroup *aGroup))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -leaveGroup:completion");
- /*!
- * \~chinese
- * 解散群组, 需要owner权限
- *
- * @param aGroupId 群组ID
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- * \~english
- * Destroy a group, need owner‘s authority
- *
- * @param aGroupId Group id
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncDestroyGroup:(NSString *)aGroupId
- success:(void (^)(EMGroup *aGroup))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -destroyGroup:completion");
- /*!
- * \~chinese
- * 屏蔽群消息,服务器不再发送此群的消息给用户,owner不能屏蔽群消息
- *
- * @param aGroupId 要屏蔽的群ID
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- * \~english
- * Block group’s message, server will blocks the messages of the group to user, owner can't block the group's message
- *
- * @param aGroupId Group id
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncBlockGroup:(NSString *)aGroupId
- success:(void (^)(EMGroup *aGroup))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -blockGroup:completion:");
- /*!
- * \~chinese
- * 取消屏蔽群消息
- *
- * @param aGroupId 要取消屏蔽的群ID
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- * \~english
- * Unblock group message
- *
- * @param aGroupId Group id
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncUnblockGroup:(NSString *)aGroupId
- success:(void (^)(EMGroup *aGroup))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -unblockGroup:completion");
- /*!
- * \~chinese
- * 加入一个公开群组,群类型应该是EMGroupStylePublicOpenJoin
- *
- * @param aGroupId 公开群组的ID
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- * \~english
- * Join a public group, group style should be EMGroupStylePublicOpenJoin
- *
- * @param aGroupId Public group id
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncJoinPublicGroup:(NSString *)aGroupId
- success:(void (^)(EMGroup *aGroup))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -joinPublicGroup:completion");
- /*!
- * \~chinese
- * 申请加入一个需批准的公开群组,群类型应该是EMGroupStylePublicJoinNeedApproval
- *
- * @param aGroupId 公开群组的ID
- * @param aMessage 请求加入的信息
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- *
- * \~english
- * Apply to join a public group, group style should be EMGroupStylePublicJoinNeedApproval
- *
- * @param aGroupId Public group id
- * @param aMessage Apply info
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncApplyJoinPublicGroup:(NSString *)aGroupId
- message:(NSString *)aMessage
- success:(void (^)(EMGroup *aGroup))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -requestToJoinPublicGroup:message:completion:");
- /*!
- * \~chinese
- * 批准入群申请, 需要Owner权限
- *
- * @param aGroupId 所申请的群组ID
- * @param aUsername 申请人
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- *
- * \~english
- * Accept user's application, need owner‘s authority
- *
- * @param aGroupId Group id
- * @param aUsername The applicant
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncAcceptJoinApplication:(NSString *)aGroupId
- applicant:(NSString *)aUsername
- success:(void (^)())aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -approveJoinGroupRequest:sender:completion:");
- /*!
- * \~chinese
- * 拒绝入群申请, 需要Owner权限
- *
- * @param aGroupId 被拒绝的群组ID
- * @param aUsername 申请人
- * @param aReason 拒绝理由
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- *
- * \~english
- * Decline user's application, need owner‘s authority
- *
- * @param aGroupId Group id
- * @param aUsername The applicant
- * @param aReason Decline reason
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncDeclineJoinApplication:(NSString *)aGroupId
- applicant:(NSString *)aUsername
- reason:(NSString *)aReason
- success:(void (^)())aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -declineJoinGroupRequest:sender:reason:completion:");
- /*!
- * \~chinese
- * 接受入群邀请
- *
- * @param groupId 接受的群组ID
- * @param aUsername 邀请者
- * @param pError 错误信息
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- *
- * \~english
- * Accept group's invitation
- *
- * @param groupId Group id
- * @param aUsername Inviter
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncAcceptInvitationFromGroup:(NSString *)aGroupId
- inviter:(NSString *)aUsername
- success:(void (^)(EMGroup *aGroup))aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -acceptInvitationFromGroup:inviter:completion");
- /*!
- * \~chinese
- * 拒绝入群邀请
- *
- * @param aGroupId 被拒绝的群组ID
- * @param aUsername 邀请人
- * @param aReason 拒绝理由
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- *
- * \~english
- * Decline a group invitation
- *
- * @param aGroupId Group id
- * @param aUsername Inviter
- * @param aReason Decline reason
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncDeclineInvitationFromGroup:(NSString *)aGroupId
- inviter:(NSString *)aUsername
- reason:(NSString *)aReason
- success:(void (^)())aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -declineGroupInvitation:inviter:reason:completion:");
- /*!
- * \~chinese
- * 屏蔽/取消屏蔽群组消息的推送
- *
- * @param aGroupId 群组ID
- * @param aIgnore 是否屏蔽
- * @param aSuccessBlock 成功的回调
- * @param aFailureBlock 失败的回调
- *
- *
- * \~english
- * Block / unblock group message‘s push notification
- *
- * @param aGroupId Group id
- * @param aIgnore Whether block
- * @param aSuccessBlock The callback block of success
- * @param aFailureBlock The callback block of failure
- *
- */
- - (void)asyncIgnoreGroupPush:(NSString *)aGroupId
- ignore:(BOOL)aIsIgnore
- success:(void (^)())aSuccessBlock
- failure:(void (^)(EMError *aError))aFailureBlock __deprecated_msg("Use -updatePushServiceForGroup:isPushEnabled:completion:");
- @end
|