9#import <Foundation/Foundation.h>
11#import "AgoraChatCommonDefs.h"
12#import "AgoraChatroomManagerDelegate.h"
13#import "AgoraChatroomOptions.h"
14#import "AgoraChatroom.h"
15#import "AgoraChatPageResult.h"
17#import "AgoraChatCursorResult.h"
29#pragma mark - Delegate
39 delegateQueue:(dispatch_queue_t _Nullable)aQueue;
49#pragma mark - Fetch Chatrooms
64 pageSize:(NSInteger)aPageSize
79- (void)getChatroomsFromServerWithPage:(NSInteger)aPageNum
80 pageSize:(NSInteger)aPageSize
100- (
AgoraChatroom *_Nullable)createChatroomWithSubject:(NSString *_Nullable)aSubject
101 description:(NSString *_Nullable)aDescription
102 invitees:(NSArray<NSString *> *_Nullable)aInvitees
103 message:(NSString *_Nullable)aMessage
104 maxMembersCount:(NSInteger)aMaxMembersCount
121- (void)createChatroomWithSubject:(NSString *_Nullable)aSubject
122 description:(NSString *_Nullable)aDescription
123 invitees:(NSArray<NSString *> *_Nullable)aInvitees
124 message:(NSString *_Nullable)aMessage
125 maxMembersCount:(NSInteger)aMaxMembersCount
128#pragma mark - Edit Chatroom
141- (
AgoraChatroom *)joinChatroom:(NSString * _Nonnull)aChatroomId
154- (void)joinChatroom:(NSString *_Nonnull)aChatroomId
171- (void)joinChatroom:(NSString *_Nonnull)aChatroomId
172 ext:(NSString* _Nullable)ext
173 leaveOtherRooms:(BOOL)leaveOtherRooms
186- (void)leaveChatroom:(NSString *_Nonnull)aChatroomId
199- (void)leaveChatroom:(NSString *_Nonnull)aChatroomId
200 completion:(
void (^_Nullable)(
AgoraChatError *_Nullable aError))aCompletionBlock;
215- (
AgoraChatError *_Nullable)destroyChatroom:(NSString *_Nonnull)aChatroomId;
229- (void)destroyChatroom:(NSString *_Nonnull)aChatroomId
230 completion:(
void (^_Nullable)(
AgoraChatError * _Nullable aError))aCompletionBlock;
245- (
AgoraChatroom *_Nullable)getChatroomSpecificationFromServerWithId:(NSString *_Nonnull)aChatroomId
258- (void)getChatroomSpecificationFromServerWithId:(NSString *_Nonnull)aChatroomId
272- (void)getChatroomSpecificationFromServerWithId:(NSString *_Nonnull)aChatroomId
273 fetchMembers:(
bool)aFetchMembers
290- (
AgoraChatCursorResult<NSString*> *_Nullable)getChatroomMemberListFromServerWithId:(NSString *_Nonnull)aChatroomId
291 cursor:(NSString *_Nullable)aCursor
292 pageSize:(NSInteger)aPageSize
307- (void)getChatroomMemberListFromServerWithId:(NSString *_Nonnull)aChatroomId
308 cursor:(NSString *_Nullable)aCursor
309 pageSize:(NSInteger)aPageSize
326- (NSArray<NSString *> *_Nullable)getChatroomBlacklistFromServerWithId:(NSString *_Nonnull)aChatroomId
327 pageNumber:(NSInteger)aPageNum
328 pageSize:(NSInteger)aPageSize
345- (void)getChatroomBlacklistFromServerWithId:(NSString *_Nonnull)aChatroomId
346 pageNumber:(NSInteger)aPageNum
347 pageSize:(NSInteger)aPageSize
348 completion:(
void (^_Nullable)(NSArray<NSString *> *_Nullable aList,
AgoraChatError *_Nullable aError))aCompletionBlock;
364- (NSArray<NSString *> *_Nullable)getChatroomMuteListFromServerWithId:(NSString *_Nonnull)aChatroomId
365 pageNumber:(NSInteger)aPageNum
366 pageSize:(NSInteger)aPageSize
383- (void)getChatroomMuteListFromServerWithId:(NSString *_Nonnull)aChatroomId
384 pageNumber:(NSInteger)aPageNum
385 pageSize:(NSInteger)aPageSize
386 completion:(
void (^_Nullable)(NSArray<NSString *> *_Nullable aList,
AgoraChatError *_Nullable aError))aCompletionBlock;
401- (NSArray<NSString *> *_Nullable)getChatroomWhiteListFromServerWithId:(NSString *_Nonnull)aChatroomId
417- (void)getChatroomWhiteListFromServerWithId:(NSString *_Nonnull)aChatroomId
418 completion:(
void (^_Nullable)(NSArray<NSString *> *_Nullable aList,
AgoraChatError *_Nullable aError))aCompletionBlock;
430- (BOOL)isMemberInWhiteListFromServerWithChatroomId:(NSString *_Nonnull)aChatroomId
443- (void)isMemberInWhiteListFromServerWithChatroomId:(NSString *_Nonnull)aChatroomId
444 completion:(
void (^_Nullable)(BOOL inWhiteList,
AgoraChatError *_Nullable aError))aCompletionBlock;
456- (void)isMemberInMuteListFromServerWithChatroomId:(NSString *_Nonnull)aChatroomId
457 completion:(
void (^_Nullable)(BOOL inMuteList,
AgoraChatError *_Nullable aError))aCompletionBlock;
469- (NSString *_Nullable)getChatroomAnnouncementWithId:(NSString *_Nonnull)aChatroomId
482- (void)getChatroomAnnouncementWithId:(NSString *_Nonnull)aChatroomId
483 completion:(
void (^_Nullable)(NSString *_Nullable aAnnouncement,
AgoraChatError *_Nullable aError))aCompletionBlock;
501- (
AgoraChatroom *)updateSubject:(NSString *_Nullable )aSubject
502 forChatroom:(NSString *_Nonnull)aChatroomId
518- (void)updateSubject:(NSString *_Nullable )aSubject
519 forChatroom:(NSString *_Nonnull)aChatroomId
536- (
AgoraChatroom *_Nullable )updateDescription:(NSString *_Nullable )aDescription
537 forChatroom:(NSString *_Nonnull)aChatroomId
553- (void)updateDescription:(NSString *_Nullable )aDescription
554 forChatroom:(NSString *_Nonnull)aChatroomId
571- (
AgoraChatroom *_Nullable )removeMembers:(NSArray<NSString *> *_Nonnull)aMembers
572 fromChatroom:(NSString *_Nonnull)aChatroomId
588- (void)removeMembers:(NSArray<NSString *> *_Nonnull)aMembers
589 fromChatroom:(NSString *_Nonnull)aChatroomId
606- (
AgoraChatroom *_Nullable )blockMembers:(NSArray<NSString *> *_Nonnull)aMembers
607 fromChatroom:(NSString *_Nonnull)aChatroomId
623- (void)blockMembers:(NSArray<NSString *> *_Nonnull)aMembers
624 fromChatroom:(NSString *_Nonnull)aChatroomId
642- (
AgoraChatroom *_Nullable )unblockMembers:(NSArray<NSString *> *_Nonnull)aMembers
643 fromChatroom:(NSString *_Nonnull)aChatroomId
659- (void)unblockMembers:(NSArray<NSString *> *_Nonnull)aMembers
660 fromChatroom:(NSString *_Nonnull)aChatroomId
677- (
AgoraChatroom *_Nullable )updateChatroomOwner:(NSString *_Nonnull)aChatroomId
678 newOwner:(NSString *_Nonnull)aNewOwner
694- (void)updateChatroomOwner:(NSString *_Nonnull)aChatroomId
695 newOwner:(NSString *_Nonnull)aNewOwner
712- (
AgoraChatroom *_Nullable )addAdmin:(NSString *_Nonnull)aAdmin
713 toChatroom:(NSString *_Nonnull)aChatroomId
729- (void)addAdmin:(NSString *_Nonnull)aAdmin
730 toChatroom:(NSString *_Nonnull)aChatroomId
747- (
AgoraChatroom *_Nullable )removeAdmin:(NSString *_Nonnull)aAdmin
748 fromChatroom:(NSString *_Nonnull)aChatroomId
764- (void)removeAdmin:(NSString *_Nonnull)aAdmin
765 fromChatroom:(NSString *_Nonnull)aChatroomId
784- (
AgoraChatroom *_Nullable )muteMembers:(NSArray<NSString *> *_Nonnull)aMuteMembers
785 muteMilliseconds:(NSInteger)aMuteMilliseconds
786 fromChatroom:(NSString *_Nonnull)aChatroomId
803- (void)muteMembers:(NSArray<NSString *> *_Nonnull)aMuteMembers
804 muteMilliseconds:(NSInteger)aMuteMilliseconds
805 fromChatroom:(NSString *_Nonnull)aChatroomId
822- (
AgoraChatroom *_Nullable )unmuteMembers:(NSArray<NSString *> *_Nonnull)aMembers
823 fromChatroom:(NSString *_Nonnull)aChatroomId
839- (void)unmuteMembers:(NSArray<NSString *> *_Nonnull)aMembers
840 fromChatroom:(NSString *_Nonnull)aChatroomId
858- (
AgoraChatroom *_Nullable )muteAllMembersFromChatroom:(NSString *_Nonnull)aChatroomId
873- (void)muteAllMembersFromChatroom:(NSString *_Nonnull)aChatroomId
890- (
AgoraChatroom *_Nullable )unmuteAllMembersFromChatroom:(NSString *_Nonnull)aChatroomId
906- (void)unmuteAllMembersFromChatroom:(NSString *_Nonnull)aChatroomId
924- (
AgoraChatroom *_Nullable )addWhiteListMembers:(NSArray<NSString *> *_Nonnull)aMembers
925 fromChatroom:(NSString *_Nonnull)aChatroomId
941- (void)addWhiteListMembers:(NSArray<NSString *> *_Nonnull)aMembers
942 fromChatroom:(NSString *_Nonnull)aChatroomId
959- (
AgoraChatroom *_Nullable )removeWhiteListMembers:(NSArray<NSString *> *_Nonnull)aMembers
960 fromChatroom:(NSString *_Nonnull)aChatroomId
976- (void)removeWhiteListMembers:(NSArray<NSString *> *_Nonnull)aMembers
977 fromChatroom:(NSString *_Nonnull)aChatroomId
994- (
AgoraChatroom *_Nullable )updateChatroomAnnouncementWithId:(NSString *_Nonnull)aChatroomId
995 announcement:(NSString *_Nullable )aAnnouncement
1011- (void)updateChatroomAnnouncementWithId:(NSString *_Nonnull)aChatroomId
1012 announcement:(NSString *_Nullable)aAnnouncement
1031- (void)setChatroomAttributes:(NSString *_Nonnull)roomId attributes:(NSDictionary<NSString*,NSString*> *_Nonnull)keyValues autoDelete:(BOOL)autoDelete completionBlock:(
void (^_Nullable)(
AgoraChatError *_Nullable aError,NSDictionary<NSString*,
AgoraChatError*> *_Nullable failureKeys))completionBlock ;
1055- (void)setChatroomAttribute:(NSString *_Nonnull)roomId key:(NSString *_Nonnull)key value:(NSString *_Nonnull)value autoDelete:(BOOL)autoDelete completionBlock:(
void (^_Nullable)(
AgoraChatError *_Nullable aError))completionBlock;
1070- (void)setChatroomAttributesForced:(NSString *_Nonnull)roomId attributes:(NSDictionary<NSString*,NSString*> *_Nonnull)keyValues autoDelete:(BOOL)autoDelete completionBlock:(
void (^_Nullable)(
AgoraChatError *_Nullable aError,NSDictionary<NSString*,
AgoraChatError*> *_Nullable failureKeys))completionBlock;
1095- (void)setChatroomAttributeForced:(NSString *_Nonnull)roomId key:(NSString *_Nonnull)key value:(NSString *_Nonnull)value autoDelete:(BOOL)autoDelete completionBlock:(
void (^_Nullable)(
AgoraChatError *_Nullable aError))completionBlock;
1111- (void)removeChatroomAttributes:(NSString *_Nonnull)roomId attributes:(NSArray <__kindof NSString*> * _Nonnull)keyValues completionBlock:(
void (^_Nullable)(
AgoraChatError *_Nullable aError,NSDictionary<NSString*,
AgoraChatError*> *_Nullable failureKeys))completionBlock;
1126- (void)removeChatroomAttribute:(NSString *_Nonnull)roomId key:(NSString * _Nonnull)key completionBlock:(
void (^_Nullable)(
AgoraChatError *_Nullable aError))completionBlock;
1141- (void)removeChatroomAttributesForced:(NSString *_Nonnull)roomId attributes:(NSArray <__kindof NSString*> * _Nonnull)keyValues completionBlock:(
void (^_Nullable)(
AgoraChatError *_Nullable aError,NSDictionary<NSString*,
AgoraChatError*> *_Nullable failureKeys))completionBlock;
1157- (void)removeChatroomAttributeForced:(NSString *_Nonnull)roomId key:(NSString * _Nonnull)key completionBlock:(
void (^_Nullable)(
AgoraChatError *_Nullable aError))completionBlock;
1168- (void)fetchChatroomAttributes:(NSString *_Nonnull)roomId keys:(NSArray <__kindof NSString *> * _Nullable)keys completion:(
void (^_Nullable)(
AgoraChatError *_Nullable aError,NSDictionary<NSString*,NSString*> *_Nullable properties ))completionBlock;
1178- (void)fetchChatroomAllAttributes:(NSString * _Nonnull)roomId completion:(
void (^ _Nullable)(
AgoraChatError * _Nullable error,NSDictionary<NSString*,NSString*> * _Nullable properties))completionBlock;
1180#pragma mark - EM_DEPRECATED_IOS 3.3.0
1197 includeMembersList:(BOOL)aIncludeMembersList
1211- (void)getChatroomSpecificationFromServerByID:(NSString *)aChatroomId
1212 includeMembersList:(BOOL)aIncludeMembersList
1215#pragma mark - EM_DEPRECATED_IOS 3.2.3
1227#pragma mark - EM_DEPRECATED_IOS < 3.2.3
1241- (NSArray *)getAllChatroomsFromServerWithError:(
AgoraChatError **)pError __deprecated_msg("Use -getChatroomsFromServerWithPage instead");
1252- (void)getAllChatroomsFromServerWithCompletion:(
void (^)(NSArray *aList,
AgoraChatError *aError))aCompletionBlock __deprecated_msg("Use -getChatroomsFromServerWithPage instead");
1264- (void)asyncGetAllChatroomsFromServer:(
void (^)(NSArray *aList))aSuccessBlock
1265 failure:(
void (^)(
AgoraChatError *aError))aFailureBlock __deprecated_msg("Use -getAllChatroomsFromServerWithCompletion: instead");
1278- (void)asyncJoinChatroom:(NSString *)aChatroomId
1280 failure:(
void (^)(
AgoraChatError *aError))aFailureBlock __deprecated_msg("Use -joinChatroom:completion: instead");
1294- (void)asyncLeaveChatroom:(NSString *)aChatroomId
1296 failure:(
void (^)(
AgoraChatError *aError))aFailureBlock __deprecated_msg("Use -leaveChatroom:completion: instead");
1310- (void)asyncFetchChatroomInfo:(NSString *)aChatroomId
1311 includeMembersList:(BOOL)aIncludeMembersList
1313 failure:(
void (^)(
AgoraChatError *aError))aFailureBlock __deprecated_msg("Use -getChatroomSpecificationFromServerByID:includeMembersList:completion: instead");
Definition: AgoraChatCursorResult.h:16
Definition: AgoraChatError.h:18
Definition: AgoraChatPageResult.h:15
Definition: AgoraChatroom.h:30
Definition: AgoraChatroomManagerDelegate.h:29
Definition: IAgoraChatroomManager.h:25