15#import <Foundation/Foundation.h>
17#import "EMCommonDefs.h"
18#import "EMChatroomManagerDelegate.h"
19#import "EMChatroomOptions.h"
21#import "EMPageResult.h"
23#import "EMCursorResult.h"
38#pragma mark - Delegate
54 delegateQueue:(dispatch_queue_t _Nullable)aQueue;
69#pragma mark - Fetch Chatrooms
95 pageSize:(NSInteger)aPageSize
96 error:(
EMError **_Nullable)pError;
119- (void)getChatroomsFromServerWithPage:(NSInteger)aPageNum
120 pageSize:(NSInteger)aPageSize
124#pragma mark - Edit Chatroom
147- (
EMChatroom *)joinChatroom:(NSString * _Nonnull)aChatroomId
148 error:(
EMError ** _Nullable)pError;
169- (void)joinChatroom:(NSString *_Nonnull)aChatroomId
170 completion:(
void (^_Nullable)(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
198- (void)joinChatroom:(NSString *_Nonnull)aChatroomId
199 ext:(NSString* _Nullable)ext
200 leaveOtherRooms:(BOOL)leaveOtherRooms
201 completion:(
void (^_Nullable)(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
222- (void)leaveChatroom:(NSString *_Nonnull)aChatroomId
223 error:(
EMError **_Nullable)pError;
244- (void)leaveChatroom:(NSString *_Nonnull)aChatroomId
245 completion:(
void (^_Nullable)(
EMError *_Nullable aError))aCompletionBlock;
270- (
EMChatroom *_Nullable)getChatroomSpecificationFromServerWithId:(NSString *_Nonnull)aChatroomId
271 error:(
EMError *_Nullable*)pError;
291- (void)getChatroomSpecificationFromServerWithId:(NSString *_Nonnull)aChatroomId
292 completion:(
void (^_Nullable)(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
314- (void)getChatroomSpecificationFromServerWithId:(NSString *_Nonnull)aChatroomId
315 fetchMembers:(
bool)aFetchMembers
316 completion:(
void (^_Nullable)(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
344- (
EMCursorResult<NSString*> *_Nullable)getChatroomMemberListFromServerWithId:(NSString *_Nonnull)aChatroomId
345 cursor:(NSString *_Nullable)aCursor
346 pageSize:(NSInteger)aPageSize
347 error:(
EMError **_Nullable)pError;
372- (void)getChatroomMemberListFromServerWithId:(NSString *_Nonnull)aChatroomId
373 cursor:(NSString *_Nullable)aCursor
374 pageSize:(NSInteger)aPageSize
375 completion:(
void (^_Nullable)(
EMCursorResult<NSString*> *_Nullable aResult,
EMError *_Nullable aError))aCompletionBlock;
404- (NSArray<NSString *> *_Nullable)getChatroomBlacklistFromServerWithId:(NSString *_Nonnull)aChatroomId
405 pageNumber:(NSInteger)aPageNum
406 pageSize:(NSInteger)aPageSize
407 error:(
EMError **_Nullable)pError;
436- (void)getChatroomBlacklistFromServerWithId:(NSString *_Nonnull)aChatroomId
437 pageNumber:(NSInteger)aPageNum
438 pageSize:(NSInteger)aPageSize
439 completion:(
void (^_Nullable)(NSArray<NSString *> *_Nullable aList,
EMError *_Nullable aError))aCompletionBlock;
468- (NSArray<NSString *> *_Nullable)getChatroomMuteListFromServerWithId:(NSString *_Nonnull)aChatroomId
469 pageNumber:(NSInteger)aPageNum
470 pageSize:(NSInteger)aPageSize
471 error:(
EMError **_Nullable)pError;
500- (void)getChatroomMuteListFromServerWithId:(NSString *_Nonnull)aChatroomId
501 pageNumber:(NSInteger)aPageNum
502 pageSize:(NSInteger)aPageSize
503 completion:(
void (^_Nullable)(NSArray<NSString *> *_Nullable aList,
EMError *_Nullable aError))aCompletionBlock;
529- (NSArray<NSString *> *_Nullable)getChatroomWhiteListFromServerWithId:(NSString *_Nonnull)aChatroomId
530 error:(
EMError **_Nullable)pError;
556- (void)getChatroomWhiteListFromServerWithId:(NSString *_Nonnull)aChatroomId
557 completion:(
void (^_Nullable)(NSArray<NSString *> *_Nullable aList,
EMError *_Nullable aError))aCompletionBlock;
578- (BOOL)isMemberInWhiteListFromServerWithChatroomId:(NSString *_Nonnull)aChatroomId
579 error:(
EMError **_Nullable )pError;
600- (void)isMemberInWhiteListFromServerWithChatroomId:(NSString *_Nonnull)aChatroomId
601 completion:(
void (^_Nullable)(BOOL inWhiteList,
EMError *_Nullable aError))aCompletionBlock;
622- (void)isMemberInMuteListFromServerWithChatroomId:(NSString *_Nonnull)aChatroomId
623 completion:(
void (^_Nullable)(BOOL inMuteList,
EMError *_Nullable aError))aCompletionBlock;
645- (NSString *_Nullable)getChatroomAnnouncementWithId:(NSString *_Nonnull)aChatroomId
646 error:(
EMError **_Nullable )pError;
666- (void)getChatroomAnnouncementWithId:(NSString *_Nonnull)aChatroomId
667 completion:(
void (^_Nullable)(NSString *_Nullable aAnnouncement,
EMError *_Nullable aError))aCompletionBlock;
698- (
EMChatroom *)updateSubject:(NSString *_Nullable )aSubject
699 forChatroom:(NSString *_Nonnull)aChatroomId
700 error:(
EMError **_Nullable )pError;
727- (void)updateSubject:(NSString *_Nullable )aSubject
728 forChatroom:(NSString *_Nonnull)aChatroomId
729 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
758- (
EMChatroom *_Nullable )updateDescription:(NSString *_Nullable )aDescription
759 forChatroom:(NSString *_Nonnull)aChatroomId
760 error:(
EMError **_Nullable )pError;
787- (void)updateDescription:(NSString *_Nullable )aDescription
788 forChatroom:(NSString *_Nonnull)aChatroomId
789 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
818- (
EMChatroom *_Nullable )removeMembers:(NSArray<NSString *> *_Nonnull)aMembers
819 fromChatroom:(NSString *_Nonnull)aChatroomId
820 error:(
EMError **_Nullable )pError;
847- (void)removeMembers:(NSArray<NSString *> *_Nonnull)aMembers
848 fromChatroom:(NSString *_Nonnull)aChatroomId
849 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
878- (
EMChatroom *_Nullable )blockMembers:(NSArray<NSString *> *_Nonnull)aMembers
879 fromChatroom:(NSString *_Nonnull)aChatroomId
880 error:(
EMError **_Nullable )pError;
907- (void)blockMembers:(NSArray<NSString *> *_Nonnull)aMembers
908 fromChatroom:(NSString *_Nonnull)aChatroomId
909 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
939- (
EMChatroom *_Nullable )unblockMembers:(NSArray<NSString *> *_Nonnull)aMembers
940 fromChatroom:(NSString *_Nonnull)aChatroomId
941 error:(
EMError **_Nullable )pError;
968- (void)unblockMembers:(NSArray<NSString *> *_Nonnull)aMembers
969 fromChatroom:(NSString *_Nonnull)aChatroomId
970 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
999- (
EMChatroom *_Nullable )updateChatroomOwner:(NSString *_Nonnull)aChatroomId
1000 newOwner:(NSString *_Nonnull)aNewOwner
1001 error:(
EMError **_Nullable )pError;
1028- (void)updateChatroomOwner:(NSString *_Nonnull)aChatroomId
1029 newOwner:(NSString *_Nonnull)aNewOwner
1030 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1059- (
EMChatroom *_Nullable )addAdmin:(NSString *_Nonnull)aAdmin
1060 toChatroom:(NSString *_Nonnull)aChatroomId
1061 error:(
EMError **_Nullable )pError;
1088- (void)addAdmin:(NSString *_Nonnull)aAdmin
1089 toChatroom:(NSString *_Nonnull)aChatroomId
1090 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroomp,
EMError *_Nullable aError))aCompletionBlock;
1119- (
EMChatroom *_Nullable )removeAdmin:(NSString *_Nonnull)aAdmin
1120 fromChatroom:(NSString *_Nonnull)aChatroomId
1121 error:(
EMError **_Nullable )pError;
1148- (void)removeAdmin:(NSString *_Nonnull)aAdmin
1149 fromChatroom:(NSString *_Nonnull)aChatroomId
1150 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1182- (
EMChatroom *_Nullable )muteMembers:(NSArray<NSString *> *_Nonnull)aMuteMembers
1183 muteMilliseconds:(NSInteger)aMuteMilliseconds
1184 fromChatroom:(NSString *_Nonnull)aChatroomId
1185 error:(
EMError **_Nullable )pError;
1213- (void)muteMembers:(NSArray<NSString *> *_Nonnull)aMuteMembers
1214 muteMilliseconds:(NSInteger)aMuteMilliseconds
1215 fromChatroom:(NSString *_Nonnull)aChatroomId
1216 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1245- (
EMChatroom *_Nullable )unmuteMembers:(NSArray<NSString *> *_Nonnull)aMembers
1246 fromChatroom:(NSString *_Nonnull)aChatroomId
1247 error:(
EMError **_Nullable )pError;
1273- (void)unmuteMembers:(NSArray<NSString *> *_Nonnull)aMembers
1274 fromChatroom:(NSString *_Nonnull)aChatroomId
1275 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1304- (
EMChatroom *_Nullable )muteAllMembersFromChatroom:(NSString *_Nonnull)aChatroomId
1305 error:(
EMError **_Nullable )pError;
1329- (void)muteAllMembersFromChatroom:(NSString *_Nonnull)aChatroomId
1330 completion:(
void(^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1358- (
EMChatroom *_Nullable )unmuteAllMembersFromChatroom:(NSString *_Nonnull)aChatroomId
1359 error:(
EMError **_Nullable )pError;
1384- (void)unmuteAllMembersFromChatroom:(NSString *_Nonnull)aChatroomId
1385 completion:(
void(^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1415- (
EMChatroom *_Nullable )addWhiteListMembers:(NSArray<NSString *> *_Nonnull)aMembers
1416 fromChatroom:(NSString *_Nonnull)aChatroomId
1417 error:(
EMError **_Nullable )pError;
1443- (void)addWhiteListMembers:(NSArray<NSString *> *_Nonnull)aMembers
1444 fromChatroom:(NSString *_Nonnull)aChatroomId
1445 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1474- (
EMChatroom *_Nullable )removeWhiteListMembers:(NSArray<NSString *> *_Nonnull)aMembers
1475 fromChatroom:(NSString *_Nonnull)aChatroomId
1476 error:(
EMError **_Nullable )pError;
1502- (void)removeWhiteListMembers:(NSArray<NSString *> *_Nonnull)aMembers
1503 fromChatroom:(NSString *_Nonnull)aChatroomId
1504 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1533- (
EMChatroom *_Nullable )updateChatroomAnnouncementWithId:(NSString *_Nonnull)aChatroomId
1534 announcement:(NSString *_Nullable )aAnnouncement
1535 error:(
EMError **_Nullable )pError;
1561- (void)updateChatroomAnnouncementWithId:(NSString *_Nonnull)aChatroomId
1562 announcement:(NSString *_Nullable)aAnnouncement
1563 completion:(
void (^_Nullable)(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1596- (void)setChatroomAttributes:(NSString *_Nonnull)roomId attributes:(NSDictionary<NSString*,NSString*> *_Nonnull)keyValues autoDelete:(BOOL)autoDelete completionBlock:(
void (^_Nullable)(
EMError *_Nullable aError,NSDictionary<NSString*,
EMError*> *_Nullable failureKeys))completionBlock ;
1640- (void)setChatroomAttribute:(NSString *_Nonnull)roomId key:(NSString *_Nonnull)key value:(NSString *_Nonnull)value autoDelete:(BOOL)autoDelete completionBlock:(
void (^_Nullable)(
EMError *_Nullable aError))completionBlock;
1666- (void)setChatroomAttributesForced:(NSString *_Nonnull)roomId attributes:(NSDictionary<NSString*,NSString*> *_Nonnull)keyValues autoDelete:(BOOL)autoDelete completionBlock:(
void (^_Nullable)(
EMError *_Nullable aError,NSDictionary<NSString*,
EMError*> *_Nullable failureKeys))completionBlock;
1711- (void)setChatroomAttributeForced:(NSString *_Nonnull)roomId key:(NSString *_Nonnull)key value:(NSString *_Nonnull)value autoDelete:(BOOL)autoDelete completionBlock:(
void (^_Nullable)(
EMError *_Nullable aError))completionBlock;
1739- (void)removeChatroomAttributes:(NSString *_Nonnull)roomId attributes:(NSArray <__kindof NSString*> * _Nonnull)keyValues completionBlock:(
void (^_Nullable)(
EMError *_Nullable aError,NSDictionary<NSString*,
EMError*> *_Nullable failureKeys))completionBlock;
1766- (void)removeChatroomAttribute:(NSString *_Nonnull)roomId key:(NSString * _Nonnull)key completionBlock:(
void (^_Nullable)(
EMError *_Nullable aError))completionBlock;
1793- (void)removeChatroomAttributesForced:(NSString *_Nonnull)roomId attributes:(NSArray <__kindof NSString*> * _Nonnull)keyValues completionBlock:(
void (^_Nullable)(
EMError *_Nullable aError,NSDictionary<NSString*,
EMError*> *_Nullable failureKeys))completionBlock;
1821- (void)removeChatroomAttributeForced:(NSString *_Nonnull)roomId key:(NSString * _Nonnull)key completionBlock:(
void (^_Nullable)(
EMError *_Nullable aError))completionBlock;
1840- (void)fetchChatroomAttributes:(NSString *_Nonnull)roomId keys:(NSArray <__kindof NSString *> * _Nullable)keys completion:(
void (^_Nullable)(
EMError *_Nullable aError,NSDictionary<NSString*,NSString*> *_Nullable properties ))completionBlock;
1857- (void)fetchChatroomAllAttributes:(NSString * _Nonnull)roomId completion:(
void (^ _Nullable)(
EMError * _Nullable error,NSDictionary<NSString*,NSString*> * _Nullable properties))completionBlock;
Definition: EMChatroom.h:42
Definition: EMCursorResult.h:27
Definition: EMPageResult.h:24
Definition: EMChatroomManagerDelegate.h:41
Definition: IEMChatroomManager.h:34