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
167- (void)leaveChatroom:(NSString *_Nonnull)aChatroomId
180- (void)leaveChatroom:(NSString *_Nonnull)aChatroomId
181 completion:(
void (^_Nullable)(
AgoraChatError *_Nullable aError))aCompletionBlock;
196- (
AgoraChatError *_Nullable)destroyChatroom:(NSString *_Nonnull)aChatroomId;
210- (void)destroyChatroom:(NSString *_Nonnull)aChatroomId
211 completion:(
void (^_Nullable)(
AgoraChatError * _Nullable aError))aCompletionBlock;
226- (
AgoraChatroom *_Nullable)getChatroomSpecificationFromServerWithId:(NSString *_Nonnull)aChatroomId
239- (void)getChatroomSpecificationFromServerWithId:(NSString *_Nonnull)aChatroomId
253- (void)getChatroomSpecificationFromServerWithId:(NSString *_Nonnull)aChatroomId
254 fetchMembers:(
bool)aFetchMembers
271- (
AgoraChatCursorResult<NSString*> *_Nullable)getChatroomMemberListFromServerWithId:(NSString *_Nonnull)aChatroomId
272 cursor:(NSString *_Nullable)aCursor
273 pageSize:(NSInteger)aPageSize
288- (void)getChatroomMemberListFromServerWithId:(NSString *_Nonnull)aChatroomId
289 cursor:(NSString *_Nullable)aCursor
290 pageSize:(NSInteger)aPageSize
307- (NSArray<NSString *> *_Nullable)getChatroomBlacklistFromServerWithId:(NSString *_Nonnull)aChatroomId
308 pageNumber:(NSInteger)aPageNum
309 pageSize:(NSInteger)aPageSize
326- (void)getChatroomBlacklistFromServerWithId:(NSString *_Nonnull)aChatroomId
327 pageNumber:(NSInteger)aPageNum
328 pageSize:(NSInteger)aPageSize
329 completion:(
void (^_Nullable)(NSArray<NSString *> *_Nullable aList,
AgoraChatError *_Nullable aError))aCompletionBlock;
345- (NSArray<NSString *> *_Nullable)getChatroomMuteListFromServerWithId:(NSString *_Nonnull)aChatroomId
346 pageNumber:(NSInteger)aPageNum
347 pageSize:(NSInteger)aPageSize
364- (void)getChatroomMuteListFromServerWithId:(NSString *_Nonnull)aChatroomId
365 pageNumber:(NSInteger)aPageNum
366 pageSize:(NSInteger)aPageSize
367 completion:(
void (^_Nullable)(NSArray<NSString *> *_Nullable aList,
AgoraChatError *_Nullable aError))aCompletionBlock;
382- (NSArray<NSString *> *_Nullable)getChatroomWhiteListFromServerWithId:(NSString *_Nonnull)aChatroomId
398- (void)getChatroomWhiteListFromServerWithId:(NSString *_Nonnull)aChatroomId
399 completion:(
void (^_Nullable)(NSArray<NSString *> *_Nullable aList,
AgoraChatError *_Nullable aError))aCompletionBlock;
411- (BOOL)isMemberInWhiteListFromServerWithChatroomId:(NSString *_Nonnull)aChatroomId
424- (void)isMemberInWhiteListFromServerWithChatroomId:(NSString *_Nonnull)aChatroomId
425 completion:(
void (^_Nullable)(BOOL inWhiteList,
AgoraChatError *_Nullable aError))aCompletionBlock;
437- (void)isMemberInMuteListFromServerWithChatroomId:(NSString *_Nonnull)aChatroomId
438 completion:(
void (^_Nullable)(BOOL inMuteList,
AgoraChatError *_Nullable aError))aCompletionBlock;
450- (NSString *_Nullable)getChatroomAnnouncementWithId:(NSString *_Nonnull)aChatroomId
463- (void)getChatroomAnnouncementWithId:(NSString *_Nonnull)aChatroomId
464 completion:(
void (^_Nullable)(NSString *_Nullable aAnnouncement,
AgoraChatError *_Nullable aError))aCompletionBlock;
482- (
AgoraChatroom *)updateSubject:(NSString *_Nullable )aSubject
483 forChatroom:(NSString *_Nonnull)aChatroomId
499- (void)updateSubject:(NSString *_Nullable )aSubject
500 forChatroom:(NSString *_Nonnull)aChatroomId
517- (
AgoraChatroom *_Nullable )updateDescription:(NSString *_Nullable )aDescription
518 forChatroom:(NSString *_Nonnull)aChatroomId
534- (void)updateDescription:(NSString *_Nullable )aDescription
535 forChatroom:(NSString *_Nonnull)aChatroomId
552- (
AgoraChatroom *_Nullable )removeMembers:(NSArray<NSString *> *_Nonnull)aMembers
553 fromChatroom:(NSString *_Nonnull)aChatroomId
569- (void)removeMembers:(NSArray<NSString *> *_Nonnull)aMembers
570 fromChatroom:(NSString *_Nonnull)aChatroomId
587- (
AgoraChatroom *_Nullable )blockMembers:(NSArray<NSString *> *_Nonnull)aMembers
588 fromChatroom:(NSString *_Nonnull)aChatroomId
604- (void)blockMembers:(NSArray<NSString *> *_Nonnull)aMembers
605 fromChatroom:(NSString *_Nonnull)aChatroomId
623- (
AgoraChatroom *_Nullable )unblockMembers:(NSArray<NSString *> *_Nonnull)aMembers
624 fromChatroom:(NSString *_Nonnull)aChatroomId
640- (void)unblockMembers:(NSArray<NSString *> *_Nonnull)aMembers
641 fromChatroom:(NSString *_Nonnull)aChatroomId
658- (
AgoraChatroom *_Nullable )updateChatroomOwner:(NSString *_Nonnull)aChatroomId
659 newOwner:(NSString *_Nonnull)aNewOwner
675- (void)updateChatroomOwner:(NSString *_Nonnull)aChatroomId
676 newOwner:(NSString *_Nonnull)aNewOwner
693- (
AgoraChatroom *_Nullable )addAdmin:(NSString *_Nonnull)aAdmin
694 toChatroom:(NSString *_Nonnull)aChatroomId
710- (void)addAdmin:(NSString *_Nonnull)aAdmin
711 toChatroom:(NSString *_Nonnull)aChatroomId
728- (
AgoraChatroom *_Nullable )removeAdmin:(NSString *_Nonnull)aAdmin
729 fromChatroom:(NSString *_Nonnull)aChatroomId
745- (void)removeAdmin:(NSString *_Nonnull)aAdmin
746 fromChatroom:(NSString *_Nonnull)aChatroomId
765- (
AgoraChatroom *_Nullable )muteMembers:(NSArray<NSString *> *_Nonnull)aMuteMembers
766 muteMilliseconds:(NSInteger)aMuteMilliseconds
767 fromChatroom:(NSString *_Nonnull)aChatroomId
784- (void)muteMembers:(NSArray<NSString *> *_Nonnull)aMuteMembers
785 muteMilliseconds:(NSInteger)aMuteMilliseconds
786 fromChatroom:(NSString *_Nonnull)aChatroomId
803- (
AgoraChatroom *_Nullable )unmuteMembers:(NSArray<NSString *> *_Nonnull)aMembers
804 fromChatroom:(NSString *_Nonnull)aChatroomId
820- (void)unmuteMembers:(NSArray<NSString *> *_Nonnull)aMembers
821 fromChatroom:(NSString *_Nonnull)aChatroomId
839- (
AgoraChatroom *_Nullable )muteAllMembersFromChatroom:(NSString *_Nonnull)aChatroomId
854- (void)muteAllMembersFromChatroom:(NSString *_Nonnull)aChatroomId
871- (
AgoraChatroom *_Nullable )unmuteAllMembersFromChatroom:(NSString *_Nonnull)aChatroomId
887- (void)unmuteAllMembersFromChatroom:(NSString *_Nonnull)aChatroomId
905- (
AgoraChatroom *_Nullable )addWhiteListMembers:(NSArray<NSString *> *_Nonnull)aMembers
906 fromChatroom:(NSString *_Nonnull)aChatroomId
922- (void)addWhiteListMembers:(NSArray<NSString *> *_Nonnull)aMembers
923 fromChatroom:(NSString *_Nonnull)aChatroomId
940- (
AgoraChatroom *_Nullable )removeWhiteListMembers:(NSArray<NSString *> *_Nonnull)aMembers
941 fromChatroom:(NSString *_Nonnull)aChatroomId
957- (void)removeWhiteListMembers:(NSArray<NSString *> *_Nonnull)aMembers
958 fromChatroom:(NSString *_Nonnull)aChatroomId
975- (
AgoraChatroom *_Nullable )updateChatroomAnnouncementWithId:(NSString *_Nonnull)aChatroomId
976 announcement:(NSString *_Nullable )aAnnouncement
992- (void)updateChatroomAnnouncementWithId:(NSString *_Nonnull)aChatroomId
993 announcement:(NSString *_Nullable)aAnnouncement
1012- (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 ;
1036- (void)setChatroomAttribute:(NSString *_Nonnull)roomId key:(NSString *_Nonnull)key value:(NSString *_Nonnull)value autoDelete:(BOOL)autoDelete completionBlock:(
void (^_Nullable)(
AgoraChatError *_Nullable aError))completionBlock;
1051- (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;
1076- (void)setChatroomAttributeForced:(NSString *_Nonnull)roomId key:(NSString *_Nonnull)key value:(NSString *_Nonnull)value autoDelete:(BOOL)autoDelete completionBlock:(
void (^_Nullable)(
AgoraChatError *_Nullable aError))completionBlock;
1092- (void)removeChatroomAttributes:(NSString *_Nonnull)roomId attributes:(NSArray <__kindof NSString*> * _Nonnull)keyValues completionBlock:(
void (^_Nullable)(
AgoraChatError *_Nullable aError,NSDictionary<NSString*,
AgoraChatError*> *_Nullable failureKeys))completionBlock;
1107- (void)removeChatroomAttribute:(NSString *_Nonnull)roomId key:(NSString * _Nonnull)key completionBlock:(
void (^_Nullable)(
AgoraChatError *_Nullable aError))completionBlock;
1122- (void)removeChatroomAttributesForced:(NSString *_Nonnull)roomId attributes:(NSArray <__kindof NSString*> * _Nonnull)keyValues completionBlock:(
void (^_Nullable)(
AgoraChatError *_Nullable aError,NSDictionary<NSString*,
AgoraChatError*> *_Nullable failureKeys))completionBlock;
1138- (void)removeChatroomAttributeForced:(NSString *_Nonnull)roomId key:(NSString * _Nonnull)key completionBlock:(
void (^_Nullable)(
AgoraChatError *_Nullable aError))completionBlock;
1149- (void)fetchChatroomAttributes:(NSString *_Nonnull)roomId keys:(NSArray <__kindof NSString *> * _Nullable)keys completion:(
void (^_Nullable)(
AgoraChatError *_Nullable aError,NSDictionary<NSString*,NSString*> *_Nullable properties ))completionBlock;
1159- (void)fetchChatroomAllAttributes:(NSString * _Nonnull)roomId completion:(
void (^ _Nullable)(
AgoraChatError * _Nullable error,NSDictionary<NSString*,NSString*> * _Nullable properties))completionBlock;
1161#pragma mark - EM_DEPRECATED_IOS 3.3.0
1178 includeMembersList:(BOOL)aIncludeMembersList
1192- (void)getChatroomSpecificationFromServerByID:(NSString *)aChatroomId
1193 includeMembersList:(BOOL)aIncludeMembersList
1196#pragma mark - EM_DEPRECATED_IOS 3.2.3
1208#pragma mark - EM_DEPRECATED_IOS < 3.2.3
1222- (NSArray *)getAllChatroomsFromServerWithError:(
AgoraChatError **)pError __deprecated_msg("Use -getChatroomsFromServerWithPage instead");
1233- (void)getAllChatroomsFromServerWithCompletion:(
void (^)(NSArray *aList,
AgoraChatError *aError))aCompletionBlock __deprecated_msg("Use -getChatroomsFromServerWithPage instead");
1245- (void)asyncGetAllChatroomsFromServer:(
void (^)(NSArray *aList))aSuccessBlock
1246 failure:(
void (^)(
AgoraChatError *aError))aFailureBlock __deprecated_msg("Use -getAllChatroomsFromServerWithCompletion: instead");
1259- (void)asyncJoinChatroom:(NSString *)aChatroomId
1261 failure:(
void (^)(
AgoraChatError *aError))aFailureBlock __deprecated_msg("Use -joinChatroom:completion: instead");
1275- (void)asyncLeaveChatroom:(NSString *)aChatroomId
1277 failure:(
void (^)(
AgoraChatError *aError))aFailureBlock __deprecated_msg("Use -leaveChatroom:completion: instead");
1291- (void)asyncFetchChatroomInfo:(NSString *)aChatroomId
1292 includeMembersList:(BOOL)aIncludeMembersList
1294 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