15 #import <Foundation/Foundation.h>
17 #import "EMCommonDefs.h"
18 #import "EMChatroomManagerDelegate.h"
19 #import "EMChatroomOptions.h"
20 #import "EMChatroom.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
123 #pragma mark - Create
154 - (
EMChatroom *_Nullable)createChatroomWithSubject:(NSString *_Nullable)aSubject
155 description:(NSString *_Nullable)aDescription
156 invitees:(NSArray<NSString *> *_Nullable)aInvitees
157 message:(NSString *_Nullable)aMessage
158 maxMembersCount:(NSInteger)aMaxMembersCount
159 error:(
EMError **_Nullable)pError;
188 - (void)createChatroomWithSubject:(NSString *_Nullable)aSubject
189 description:(NSString *_Nullable)aDescription
190 invitees:(NSArray<NSString *> *_Nullable)aInvitees
191 message:(NSString *_Nullable)aMessage
192 maxMembersCount:(NSInteger)aMaxMembersCount
193 completion:(
void (^_Nullable)(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
195 #pragma mark - Edit Chatroom
218 - (
EMChatroom *)joinChatroom:(NSString * _Nonnull)aChatroomId
219 error:(
EMError ** _Nullable)pError;
240 - (void)joinChatroom:(NSString *_Nonnull)aChatroomId
241 completion:(
void (^_Nullable)(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
262 - (void)leaveChatroom:(NSString *_Nonnull)aChatroomId
263 error:(
EMError **_Nullable)pError;
284 - (void)leaveChatroom:(NSString *_Nonnull)aChatroomId
285 completion:(
void (^_Nullable)(
EMError *_Nullable aError))aCompletionBlock;
312 - (
EMError *_Nullable)destroyChatroom:(NSString *_Nonnull)aChatroomId;
336 - (void)destroyChatroom:(NSString *_Nonnull)aChatroomId
337 completion:(
void (^_Nullable)(
EMError * _Nullable aError))aCompletionBlock;
362 - (
EMChatroom *_Nullable)getChatroomSpecificationFromServerWithId:(NSString *_Nonnull)aChatroomId
363 error:(
EMError *_Nullable*)pError;
383 - (void)getChatroomSpecificationFromServerWithId:(NSString *_Nonnull)aChatroomId
384 completion:(
void (^_Nullable)(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
406 - (void)getChatroomSpecificationFromServerWithId:(NSString *_Nonnull)aChatroomId
407 fetchMembers:(
bool)aFetchMembers
408 completion:(
void (^_Nullable)(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
436 - (
EMCursorResult<NSString*> *_Nullable)getChatroomMemberListFromServerWithId:(NSString *_Nonnull)aChatroomId
437 cursor:(NSString *_Nullable)aCursor
438 pageSize:(NSInteger)aPageSize
439 error:(
EMError **_Nullable)pError;
464 - (void)getChatroomMemberListFromServerWithId:(NSString *_Nonnull)aChatroomId
465 cursor:(NSString *_Nullable)aCursor
466 pageSize:(NSInteger)aPageSize
467 completion:(
void (^_Nullable)(
EMCursorResult<NSString*> *_Nullable aResult,
EMError *_Nullable aError))aCompletionBlock;
496 - (NSArray<NSString *> *_Nullable)getChatroomBlacklistFromServerWithId:(NSString *_Nonnull)aChatroomId
497 pageNumber:(NSInteger)aPageNum
498 pageSize:(NSInteger)aPageSize
499 error:(
EMError **_Nullable)pError;
528 - (void)getChatroomBlacklistFromServerWithId:(NSString *_Nonnull)aChatroomId
529 pageNumber:(NSInteger)aPageNum
530 pageSize:(NSInteger)aPageSize
531 completion:(
void (^_Nullable)(NSArray<NSString *> *_Nullable aList,
EMError *_Nullable aError))aCompletionBlock;
560 - (NSArray<NSString *> *_Nullable)getChatroomMuteListFromServerWithId:(NSString *_Nonnull)aChatroomId
561 pageNumber:(NSInteger)aPageNum
562 pageSize:(NSInteger)aPageSize
563 error:(
EMError **_Nullable)pError;
592 - (void)getChatroomMuteListFromServerWithId:(NSString *_Nonnull)aChatroomId
593 pageNumber:(NSInteger)aPageNum
594 pageSize:(NSInteger)aPageSize
595 completion:(
void (^_Nullable)(NSArray<NSString *> *_Nullable aList,
EMError *_Nullable aError))aCompletionBlock;
621 - (NSArray<NSString *> *_Nullable)getChatroomWhiteListFromServerWithId:(NSString *_Nonnull)aChatroomId
622 error:(
EMError **_Nullable)pError;
648 - (void)getChatroomWhiteListFromServerWithId:(NSString *_Nonnull)aChatroomId
649 completion:(
void (^_Nullable)(NSArray<NSString *> *_Nullable aList,
EMError *_Nullable aError))aCompletionBlock;
670 - (BOOL)isMemberInWhiteListFromServerWithChatroomId:(NSString *_Nonnull)aChatroomId
671 error:(
EMError **_Nullable )pError;
692 - (void)isMemberInWhiteListFromServerWithChatroomId:(NSString *_Nonnull)aChatroomId
693 completion:(
void (^_Nullable)(BOOL inWhiteList,
EMError *_Nullable aError))aCompletionBlock;
714 - (void)isMemberInMuteListFromServerWithChatroomId:(NSString *_Nonnull)aChatroomId
715 completion:(
void (^_Nullable)(BOOL inMuteList,
EMError *_Nullable aError))aCompletionBlock;
737 - (NSString *_Nullable)getChatroomAnnouncementWithId:(NSString *_Nonnull)aChatroomId
738 error:(
EMError **_Nullable )pError;
758 - (void)getChatroomAnnouncementWithId:(NSString *_Nonnull)aChatroomId
759 completion:(
void (^_Nullable)(NSString *_Nullable aAnnouncement,
EMError *_Nullable aError))aCompletionBlock;
790 - (
EMChatroom *)updateSubject:(NSString *_Nullable )aSubject
791 forChatroom:(NSString *_Nonnull)aChatroomId
792 error:(
EMError **_Nullable )pError;
819 - (void)updateSubject:(NSString *_Nullable )aSubject
820 forChatroom:(NSString *_Nonnull)aChatroomId
821 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
850 - (
EMChatroom *_Nullable )updateDescription:(NSString *_Nullable )aDescription
851 forChatroom:(NSString *_Nonnull)aChatroomId
852 error:(
EMError **_Nullable )pError;
879 - (void)updateDescription:(NSString *_Nullable )aDescription
880 forChatroom:(NSString *_Nonnull)aChatroomId
881 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
910 - (
EMChatroom *_Nullable )removeMembers:(NSArray<NSString *> *_Nonnull)aMembers
911 fromChatroom:(NSString *_Nonnull)aChatroomId
912 error:(
EMError **_Nullable )pError;
939 - (void)removeMembers:(NSArray<NSString *> *_Nonnull)aMembers
940 fromChatroom:(NSString *_Nonnull)aChatroomId
941 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
970 - (
EMChatroom *_Nullable )blockMembers:(NSArray<NSString *> *_Nonnull)aMembers
971 fromChatroom:(NSString *_Nonnull)aChatroomId
972 error:(
EMError **_Nullable )pError;
999 - (void)blockMembers:(NSArray<NSString *> *_Nonnull)aMembers
1000 fromChatroom:(NSString *_Nonnull)aChatroomId
1001 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1031 - (
EMChatroom *_Nullable )unblockMembers:(NSArray<NSString *> *_Nonnull)aMembers
1032 fromChatroom:(NSString *_Nonnull)aChatroomId
1033 error:(
EMError **_Nullable )pError;
1060 - (void)unblockMembers:(NSArray<NSString *> *_Nonnull)aMembers
1061 fromChatroom:(NSString *_Nonnull)aChatroomId
1062 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1091 - (
EMChatroom *_Nullable )updateChatroomOwner:(NSString *_Nonnull)aChatroomId
1092 newOwner:(NSString *_Nonnull)aNewOwner
1093 error:(
EMError **_Nullable )pError;
1120 - (void)updateChatroomOwner:(NSString *_Nonnull)aChatroomId
1121 newOwner:(NSString *_Nonnull)aNewOwner
1122 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1151 - (
EMChatroom *_Nullable )addAdmin:(NSString *_Nonnull)aAdmin
1152 toChatroom:(NSString *_Nonnull)aChatroomId
1153 error:(
EMError **_Nullable )pError;
1180 - (void)addAdmin:(NSString *_Nonnull)aAdmin
1181 toChatroom:(NSString *_Nonnull)aChatroomId
1182 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroomp,
EMError *_Nullable aError))aCompletionBlock;
1211 - (
EMChatroom *_Nullable )removeAdmin:(NSString *_Nonnull)aAdmin
1212 fromChatroom:(NSString *_Nonnull)aChatroomId
1213 error:(
EMError **_Nullable )pError;
1240 - (void)removeAdmin:(NSString *_Nonnull)aAdmin
1241 fromChatroom:(NSString *_Nonnull)aChatroomId
1242 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1274 - (
EMChatroom *_Nullable )muteMembers:(NSArray<NSString *> *_Nonnull)aMuteMembers
1275 muteMilliseconds:(NSInteger)aMuteMilliseconds
1276 fromChatroom:(NSString *_Nonnull)aChatroomId
1277 error:(
EMError **_Nullable )pError;
1305 - (void)muteMembers:(NSArray<NSString *> *_Nonnull)aMuteMembers
1306 muteMilliseconds:(NSInteger)aMuteMilliseconds
1307 fromChatroom:(NSString *_Nonnull)aChatroomId
1308 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1337 - (
EMChatroom *_Nullable )unmuteMembers:(NSArray<NSString *> *_Nonnull)aMembers
1338 fromChatroom:(NSString *_Nonnull)aChatroomId
1339 error:(
EMError **_Nullable )pError;
1365 - (void)unmuteMembers:(NSArray<NSString *> *_Nonnull)aMembers
1366 fromChatroom:(NSString *_Nonnull)aChatroomId
1367 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1396 - (
EMChatroom *_Nullable )muteAllMembersFromChatroom:(NSString *_Nonnull)aChatroomId
1397 error:(
EMError **_Nullable )pError;
1421 - (void)muteAllMembersFromChatroom:(NSString *_Nonnull)aChatroomId
1422 completion:(
void(^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1450 - (
EMChatroom *_Nullable )unmuteAllMembersFromChatroom:(NSString *_Nonnull)aChatroomId
1451 error:(
EMError **_Nullable )pError;
1476 - (void)unmuteAllMembersFromChatroom:(NSString *_Nonnull)aChatroomId
1477 completion:(
void(^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1507 - (
EMChatroom *_Nullable )addWhiteListMembers:(NSArray<NSString *> *_Nonnull)aMembers
1508 fromChatroom:(NSString *_Nonnull)aChatroomId
1509 error:(
EMError **_Nullable )pError;
1535 - (void)addWhiteListMembers:(NSArray<NSString *> *_Nonnull)aMembers
1536 fromChatroom:(NSString *_Nonnull)aChatroomId
1537 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1566 - (
EMChatroom *_Nullable )removeWhiteListMembers:(NSArray<NSString *> *_Nonnull)aMembers
1567 fromChatroom:(NSString *_Nonnull)aChatroomId
1568 error:(
EMError **_Nullable )pError;
1594 - (void)removeWhiteListMembers:(NSArray<NSString *> *_Nonnull)aMembers
1595 fromChatroom:(NSString *_Nonnull)aChatroomId
1596 completion:(
void (^_Nullable )(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1625 - (
EMChatroom *_Nullable )updateChatroomAnnouncementWithId:(NSString *_Nonnull)aChatroomId
1626 announcement:(NSString *_Nullable )aAnnouncement
1627 error:(
EMError **_Nullable )pError;
1653 - (void)updateChatroomAnnouncementWithId:(NSString *_Nonnull)aChatroomId
1654 announcement:(NSString *_Nullable)aAnnouncement
1655 completion:(
void (^_Nullable)(
EMChatroom *_Nullable aChatroom,
EMError *_Nullable aError))aCompletionBlock;
1688 - (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 ;
1732 - (void)setChatroomAttribute:(NSString *_Nonnull)roomId key:(NSString *_Nonnull)key value:(NSString *_Nonnull)value autoDelete:(BOOL)autoDelete completionBlock:(
void (^_Nullable)(
EMError *_Nullable aError))completionBlock;
1758 - (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;
1803 - (void)setChatroomAttributeForced:(NSString *_Nonnull)roomId key:(NSString *_Nonnull)key value:(NSString *_Nonnull)value autoDelete:(BOOL)autoDelete completionBlock:(
void (^_Nullable)(
EMError *_Nullable aError))completionBlock;
1831 - (void)removeChatroomAttributes:(NSString *_Nonnull)roomId attributes:(NSArray <__kindof NSString*> * _Nonnull)keyValues completionBlock:(
void (^_Nullable)(
EMError *_Nullable aError,NSDictionary<NSString*,
EMError*> *_Nullable failureKeys))completionBlock;
1858 - (void)removeChatroomAttribute:(NSString *_Nonnull)roomId key:(NSString * _Nonnull)key completionBlock:(
void (^_Nullable)(
EMError *_Nullable aError))completionBlock;
1885 - (void)removeChatroomAttributesForced:(NSString *_Nonnull)roomId attributes:(NSArray <__kindof NSString*> * _Nonnull)keyValues completionBlock:(
void (^_Nullable)(
EMError *_Nullable aError,NSDictionary<NSString*,
EMError*> *_Nullable failureKeys))completionBlock;
1913 - (void)removeChatroomAttributeForced:(NSString *_Nonnull)roomId key:(NSString * _Nonnull)key completionBlock:(
void (^_Nullable)(
EMError *_Nullable aError))completionBlock;
1932 - (void)fetchChatroomAttributes:(NSString *_Nonnull)roomId keys:(NSArray <__kindof NSString *> * _Nullable)keys completion:(
void (^_Nullable)(
EMError *_Nullable aError,NSDictionary<NSString*,NSString*> *_Nullable properties ))completionBlock;
1949 - (void)fetchChatroomAllAttributes:(NSString * _Nonnull)roomId completion:(
void (^ _Nullable)(
EMError * _Nullable error,NSDictionary<NSString*,NSString*> * _Nullable properties))completionBlock;
1951 #pragma mark - EM_DEPRECATED_IOS 3.3.0
1980 - (
EMChatroom *)fetchChatroomInfo:(NSString *)aChatroomId
1981 includeMembersList:(BOOL)aIncludeMembersList
1982 error:(
EMError **)pError EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -
IEMChatroomManager getChatroomSpecificationFromServerWithId:error: instead");
2004 - (void)getChatroomSpecificationFromServerByID:(NSString *)aChatroomId
2005 includeMembersList:(BOOL)aIncludeMembersList
2006 completion:(
void (^)(
EMChatroom *aChatroom,
EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -
IEMChatroomManager getChatroomSpecificationFromServerWithId:completion: instead");
2008 #pragma mark - EM_DEPRECATED_IOS 3.2.3
2027 #pragma mark - EM_DEPRECATED_IOS < 3.2.3
2052 - (NSArray *)getAllChatroomsFromServerWithError:(
EMError **)pError __deprecated_msg("Use -getChatroomsFromServerWithPage instead");
2070 - (void)getAllChatroomsFromServerWithCompletion:(
void (^)(NSArray *aList,
EMError *aError))aCompletionBlock __deprecated_msg("Use -getChatroomsFromServerWithPage instead");
2090 - (void)asyncGetAllChatroomsFromServer:(
void (^)(NSArray *aList))aSuccessBlock
2091 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -getAllChatroomsFromServerWithCompletion: instead");
2114 - (void)asyncJoinChatroom:(NSString *)aChatroomId
2115 success:(
void (^)(
EMChatroom *aRoom))aSuccessBlock
2116 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -joinChatroom:completion: instead");
2141 - (void)asyncLeaveChatroom:(NSString *)aChatroomId
2142 success:(
void (^)(
EMChatroom *aRoom))aSuccessBlock
2143 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -leaveChatroom:completion: instead");
2167 - (void)asyncFetchChatroomInfo:(NSString *)aChatroomId
2168 includeMembersList:(BOOL)aIncludeMembersList
2169 success:(
void (^)(
EMChatroom *aChatroom))aSuccessBlock
2170 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -getChatroomSpecificationFromServerByID:includeMembersList:completion: instead");
Definition: EMChatroomManagerDelegate.h:41
Definition: EMPageResult.h:24
Definition: EMChatroom.h:41
Definition: EMCursorResult.h:27
Definition: IEMChatroomManager.h:34