9#import <Foundation/Foundation.h>
11#import "AgoraChatCommonDefs.h"
12#import "AgoraChatGroupManagerDelegate.h"
13#import "AgoraChatGroup.h"
14#import "AgoraChatGroupOptions.h"
15#import "AgoraChatCursorResult.h"
16#import "AgoraChatGroupSharedFile.h"
26#pragma mark - Delegate
36 delegateQueue:(dispatch_queue_t _Nullable )aQueue;
44- (void)removeDelegate:(
id _Nonnull)aDelegate;
47#pragma mark - Get Group
69#pragma mark - Get group from server
83- (NSArray<
AgoraChatGroup *> *_Nullable )getJoinedGroupsFromServerWithPage:(NSInteger)aPageNum
84 pageSize:(NSInteger)aPageSize
100 pageSize:(NSInteger)aPageSize
114- (void)getPublicGroupsFromServerWithCursor:(NSString *_Nullable)aCursor
115 pageSize:(NSInteger)aPageSize
129- (
AgoraChatGroup * _Nullable)searchPublicGroupWithId:(NSString *_Nonnull)aGroundId
140- (void)searchPublicGroupWithId:(NSString *_Nonnull)aGroundId
160- (
AgoraChatGroup * _Nullable)createGroupWithSubject:(NSString *_Nullable)aSubject
161 description:(NSString *_Nullable)aDescription
162 invitees:(NSArray<NSString *> * _Nullable)aInvitees
163 message:(NSString *_Nullable)aMessage
181- (void)createGroupWithSubject:(NSString *_Nullable)aSubject
182 description:(NSString *_Nullable)aDescription
183 invitees:(NSArray<NSString *> * _Nullable)aInvitees
184 message:(NSString *_Nullable)aMessage
188#pragma mark - Fetch Info
201- (
AgoraChatGroup * _Nullable)getGroupSpecificationFromServerWithId:(NSString *_Nonnull)aGroupId
216- (
AgoraChatGroup * _Nullable)getGroupSpecificationFromServerWithId:(NSString *_Nonnull)aGroupId
217 fetchMembers:(BOOL)fetchMembers
230- (void)getGroupSpecificationFromServerWithId:(NSString *_Nonnull)aGroupId
242- (void)getGroupSpecificationFromServerWithId:(NSString *_Nonnull)aGroupId
243 fetchMembers:(BOOL)fetchMembers
261 cursor:(NSString *_Nullable)aCursor
262 pageSize:(NSInteger)aPageSize
275- (void)getGroupMemberListFromServerWithId:(NSString *_Nonnull)aGroupId
276 cursor:(NSString *_Nullable)aCursor
277 pageSize:(NSInteger)aPageSize
293- (NSArray<NSString *> * _Nullable)getGroupBlacklistFromServerWithId:(NSString *_Nonnull)aGroupId
294 pageNumber:(NSInteger)aPageNum
295 pageSize:(NSInteger)aPageSize
310- (void)getGroupBlacklistFromServerWithId:(NSString *_Nonnull)aGroupId
311 pageNumber:(NSInteger)aPageNum
312 pageSize:(NSInteger)aPageSize
313 completion:(
void (^_Nullable)(NSArray<NSString *> * _Nullable aList,
AgoraChatError *_Nullable aError))aCompletionBlock;
328- (NSArray<NSString *> * _Nullable)getGroupMuteListFromServerWithId:(NSString *_Nonnull)aGroupId
329 pageNumber:(NSInteger)aPageNum
330 pageSize:(NSInteger)aPageSize
345- (void)getGroupMuteListFromServerWithId:(NSString *_Nonnull)aGroupId
346 pageNumber:(NSInteger)aPageNum
347 pageSize:(NSInteger)aPageSize
348 completion:(
void (^_Nullable)(NSArray<NSString *> * _Nullable aList,
AgoraChatError *_Nullable aError))aCompletionBlock;
362- (void)fetchGroupMuteListFromServerWithId:(NSString *_Nonnull)aGroupId
363 pageNumber:(NSInteger)aPageNum
364 pageSize:(NSInteger)aPageSize
365 completion:(
void (^_Nullable)(NSDictionary<NSString *, NSNumber *> *_Nullable aDict,
AgoraChatError *_Nullable aError))aCompletionBlock;
379 pageNumber:(NSInteger)aPageNum
380 pageSize:(NSInteger)aPageSize
394- (void)getGroupFileListWithId:(NSString *_Nonnull)aGroupId
395 pageNumber:(NSInteger)aPageNum
396 pageSize:(NSInteger)aPageSize
410- (NSArray *)getGroupWhiteListFromServerWithId:(NSString *_Nonnull)aGroupId
422- (void)getGroupWhiteListFromServerWithId:(NSString *_Nonnull)aGroupId
423 completion:(
void (^_Nullable)(NSArray<NSString *> * _Nullable aList,
AgoraChatError *_Nullable aError))aCompletionBlock;
435- (BOOL)isMemberInWhiteListFromServerWithGroupId:(NSString *_Nonnull)aGroupId
446- (void)isMemberInWhiteListFromServerWithGroupId:(NSString *_Nonnull)aGroupId
447 completion:(
void (^_Nullable)(BOOL inWhiteList,
AgoraChatError *_Nullable aError))aCompletionBlock;
458- (NSString *_Nullable)getGroupAnnouncementWithId:(NSString *_Nonnull)aGroupId
469- (void)getGroupAnnouncementWithId:(NSString *_Nonnull)aGroupId
470 completion:(
void (^_Nullable)(NSString *aAnnouncement,
AgoraChatError *_Nullable aError))aCompletionBlock;
472#pragma mark - Edit Group
487- (
AgoraChatGroup * _Nullable)addOccupants:(NSArray<NSString *> * _Nonnull)aOccupants
488 toGroup:(NSString *_Nonnull)aGroupId
489 welcomeMessage:(NSString *_Nullable)aWelcomeMessage
502- (void)addMembers:(NSArray<NSString *> * _Nonnull)aUsers
503 toGroup:(NSString *_Nonnull)aGroupId
504 message:(NSString *_Nullable)aMessage
521- (
AgoraChatGroup * _Nullable)removeOccupants:(NSArray<NSString *> * _Nonnull)aOccupants
522 fromGroup:(NSString *_Nonnull)aGroupId
536- (void)removeMembers:(NSArray<NSString *> * _Nonnull)aUsers
537 fromGroup:(NSString *_Nonnull)aGroupId
554- (
AgoraChatGroup * _Nullable)blockOccupants:(NSArray<NSString *> * _Nonnull)aOccupants
555 fromGroup:(NSString *_Nonnull)aGroupId
569- (void)blockMembers:(NSArray<NSString *> * _Nonnull)aMembers
570 fromGroup:(NSString *_Nonnull)aGroupId
588- (
AgoraChatGroup * _Nullable)unblockOccupants:(NSArray<NSString *> * _Nonnull)aOccupants
589 forGroup:(NSString *_Nonnull)aGroupId
603- (void)unblockMembers:(NSArray<NSString *> * _Nonnull)aMembers
604 fromGroup:(NSString *_Nonnull)aGroupId
621- (
AgoraChatGroup * _Nullable)changeGroupSubject:(NSString *_Nullable)aSubject
622 forGroup:(NSString *_Nonnull)aGroupId
636- (void)updateGroupSubject:(NSString *_Nullable)aSubject
637 forGroup:(NSString *_Nonnull)aGroupId
654- (
AgoraChatGroup * _Nullable)changeDescription:(NSString *_Nullable)aDescription
655 forGroup:(NSString *_Nonnull)aGroupId
669- (void)updateDescription:(NSString *_Nullable)aDescription
670 forGroup:(NSString *_Nonnull)aGroupId
683- (void)leaveGroup:(NSString *_Nonnull)aGroupId
694- (void)leaveGroup:(NSString *_Nonnull)aGroupId
695 completion:(
void (^_Nullable)(
AgoraChatError *_Nullable aError))aCompletionBlock;
721- (void)destroyGroup:(NSString *_Nonnull)aGroupId
722 finishCompletion:(
void (^_Nullable)(
AgoraChatError *_Nullable aError))aCompletionBlock;
738- (
AgoraChatGroup * _Nullable)blockGroup:(NSString *_Nonnull)aGroupId
751- (void)blockGroup:(NSString *_Nonnull)aGroupId
765- (
AgoraChatGroup * _Nullable)unblockGroup:(NSString *_Nonnull)aGroupId
776- (void)unblockGroup:(NSString *_Nonnull)aGroupId
794- (
AgoraChatGroup * _Nullable)updateGroupOwner:(NSString *_Nonnull)aGroupId
795 newOwner:(NSString *_Nonnull)aNewOwner
809- (void)updateGroupOwner:(NSString *_Nonnull)aGroupId
810 newOwner:(NSString *_Nonnull)aNewOwner
827 toGroup:(NSString *_Nonnull)aGroupId
843- (void)addAdmin:(NSString *_Nonnull)aAdmin
844 toGroup:(NSString *_Nonnull)aGroupId
861- (
AgoraChatGroup * _Nullable)removeAdmin:(NSString *_Nonnull)aAdmin
862 fromGroup:(NSString *_Nonnull)aGroupId
878- (void)removeAdmin:(NSString *_Nonnull)aAdmin
879 fromGroup:(NSString *_Nonnull)aGroupId
898- (
AgoraChatGroup * _Nullable)muteMembers:(NSArray<NSString *> * _Nonnull)aMuteMembers
899 muteMilliseconds:(NSInteger)aMuteMilliseconds
900 fromGroup:(NSString *_Nonnull)aGroupId
917- (void)muteMembers:(NSArray<NSString *> * _Nonnull)aMuteMembers
918 muteMilliseconds:(NSInteger)aMuteMilliseconds
919 fromGroup:(NSString *_Nonnull)aGroupId
936- (
AgoraChatGroup * _Nullable)unmuteMembers:(NSArray<NSString *> * _Nonnull)aMembers
937 fromGroup:(NSString *_Nonnull)aGroupId
953- (void)unmuteMembers:(NSArray<NSString *> * _Nonnull)aMembers
954 fromGroup:(NSString *_Nonnull)aGroupId
970- (
AgoraChatGroup * _Nullable)muteAllMembersFromGroup:(NSString *_Nonnull)aGroupId
985- (void)muteAllMembersFromGroup:(NSString *_Nonnull)aGroupId
1002- (
AgoraChatGroup * _Nullable)unmuteAllMembersFromGroup:(NSString *_Nonnull)aGroupId
1018- (void)unmuteAllMembersFromGroup:(NSString *_Nonnull)aGroupId
1036- (
AgoraChatGroup * _Nullable)addWhiteListMembers:(NSArray<NSString *> * _Nonnull)aMembers
1037 fromGroup:(NSString *_Nonnull)aGroupId
1051- (void)addWhiteListMembers:(NSArray<NSString *> * _Nonnull)aMembers
1052 fromGroup:(NSString *_Nonnull)aGroupId
1070- (
AgoraChatGroup * _Nullable)removeWhiteListMembers:(NSArray<NSString *> * _Nonnull)aMembers
1071 fromGroup:(NSString *_Nonnull)aGroupId
1087- (void)removeWhiteListMembers:(NSArray<NSString *> * _Nonnull)aMembers
1088 fromGroup:(NSString *_Nonnull)aGroupId
1101- (void)uploadGroupSharedFileWithId:(NSString *_Nonnull)aGroupId
1102 filePath:(NSString* _Nonnull)aFilePath
1103 progress:(
void (^_Nullable)(
int progress))aProgressBlock
1116- (void)downloadGroupSharedFileWithId:(NSString *_Nonnull)aGroupId
1117 filePath:(NSString *_Nonnull)aFilePath
1118 sharedFileId:(NSString *_Nonnull)aSharedFileId
1119 progress:(
void (^_Nullable)(
int progress))aProgressBlock
1134- (
AgoraChatGroup * _Nullable)removeGroupSharedFileWithId:(NSString *_Nonnull)aGroupId
1135 sharedFileId:(NSString *_Nonnull)aSharedFileId
1146- (void)removeGroupSharedFileWithId:(NSString *_Nonnull)aGroupId
1147 sharedFileId:(NSString *_Nonnull)aSharedFileId
1164- (
AgoraChatGroup * _Nullable)updateGroupAnnouncementWithId:(NSString *_Nonnull)aGroupId
1165 announcement:(NSString *_Nullable)aAnnouncement
1181- (void)updateGroupAnnouncementWithId:(NSString *_Nonnull)aGroupId
1182 announcement:(NSString *_Nullable)aAnnouncement
1199- (
AgoraChatGroup * _Nullable)updateGroupExtWithId:(NSString *_Nonnull)aGroupId
1200 ext:(NSString *_Nullable)aExt
1214- (void)updateGroupExtWithId:(NSString *_Nonnull)aGroupId
1215 ext:(NSString *_Nullable)aExt
1218#pragma mark - Edit Public Group
1231- (
AgoraChatGroup * _Nullable)joinPublicGroup:(NSString *_Nonnull)aGroupId
1242- (void)joinPublicGroup:(NSString *_Nonnull)aGroupId
1257- (
AgoraChatGroup * _Nullable)applyJoinPublicGroup:(NSString *_Nonnull)aGroupId
1258 message:(NSString *_Nullable)aMessage
1270- (void)requestToJoinPublicGroup:(NSString *_Nonnull)aGroupId
1271 message:(NSString *_Nullable)aMessage
1274#pragma mark - Application
1289- (
AgoraChatError *)acceptJoinApplication:(NSString *_Nonnull)aGroupId
1290 applicant:(NSString *_Nonnull)aUsername;
1305- (void)approveJoinGroupRequest:(NSString *_Nonnull)aGroupId
1306 sender:(NSString *_Nonnull)aUsername
1323- (
AgoraChatError *)declineJoinApplication:(NSString *_Nonnull)aGroupId
1324 applicant:(NSString *_Nonnull)aUsername
1325 reason:(NSString *_Nullable)aReason;
1341- (void)declineJoinGroupRequest:(NSString *_Nonnull)aGroupId
1342 sender:(NSString *_Nonnull)aUsername
1343 reason:(NSString *_Nullable)aReason
1358- (
AgoraChatGroup * _Nullable)acceptInvitationFromGroup:(NSString *_Nonnull)aGroupId
1359 inviter:(NSString *_Nonnull)aUsername
1373- (void)acceptInvitationFromGroup:(NSString *_Nonnull)aGroupId
1374 inviter:(NSString *_Nonnull)aUsername
1389- (
AgoraChatError *)declineInvitationFromGroup:(NSString *_Nonnull)aGroupId
1390 inviter:(NSString *_Nonnull)aUsername
1391 reason:(NSString *_Nullable)aReason;
1405- (void)declineGroupInvitation:(NSString *_Nonnull)aGroupId
1406 inviter:(NSString *_Nonnull)aInviter
1407 reason:(NSString *_Nullable)aReason
1408 completion:(
void (^_Nullable)(
AgoraChatError *_Nullable aError))aCompletionBlock;
1432- (void)getJoinedGroupsFromServerWithPage:(NSInteger)aPageNum
1433 pageSize:(NSInteger)aPageSize
1434 needMemberCount:(BOOL)aNeedMemberCount
1435 needRole:(BOOL)aNeedRole
1454 ignore:(BOOL)aIsIgnore EM_DEPRECATED_IOS(3_3_2, 3_8_3, "Use -
IAgoraChatPushManager::updatePushServiceForGroups:disablePush:");
1468- (void)updatePushServiceForGroup:(NSString *)aGroupId
1469 isPushEnabled:(BOOL)aIsEnable
1487 ignore:(BOOL)aIsIgnore EM_DEPRECATED_IOS(3_3_2, 3_8_3, "Use -
IAgoraChatPushManager::updatePushServiceForGroups:disablePush:");
1500- (void)updatePushServiceForGroups:(NSArray *)aGroupIDs
1501 isPushEnabled:(BOOL)aIsEnable
1502 completion:(
void (^)(NSArray *groups,
AgoraChatError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_3_2, 3_8_3, "Use -
IAgoraChatPushManager::updatePushServiceForGroups:disablePush:completion:");
1504#pragma mark - Group member attributes
1514- (void)setMemberAttribute:(NSString *_Nonnull)groupId userId:(NSString *_Nonnull)userId attributes:(NSDictionary<NSString*,NSString*> *_Nonnull)attributes completion:(
void (^_Nullable)(
AgoraChatError *_Nullable error))completionBlock;
1527- (void)fetchMemberAttribute:(NSString *_Nonnull)groupId userId:(NSString *_Nonnull)userId completion:(
void (^ _Nullable)(NSDictionary<NSString *,NSString *> * _Nullable,
AgoraChatError * _Nullable))completionBlock;
1540- (void)fetchMembersAttributes:(NSString *_Nonnull)groupId userIds:(NSArray<__kindof NSString *> *_Nonnull)userIds keys:(NSArray<__kindof NSString *> *_Nonnull)keys completion:(
void (^_Nullable)(NSDictionary<NSString*,NSDictionary<NSString*,NSString*>*> *_Nullable attributes,
AgoraChatError *_Nullable error))completionBlock;
1542#pragma mark - EM_DEPRECATED_IOS 3.8.8
1558- (void)getJoinedGroupsFromServerWithPage:(NSInteger)aPageNum
1559 pageSize:(NSInteger)aPageSize
1561 __deprecated_msg("Use -getJoinedGroupsFromServerWithPage:pageSize:needMemberCount:needRole:error:completion: instead");
Definition: AgoraChatCursorResult.h:16
Definition: AgoraChatError.h:18
Definition: AgoraChatGroup.h:31
Definition: AgoraChatGroupOptions.h:30
Definition: AgoraChatGroupSharedFile.h:15
Definition: AgoraChatGroupManagerDelegate.h:28
Definition: IAgoraChatGroupManager.h:22
NSArray< AgoraChatGroup * > *_Nullable getJoinedGroups()
Definition: IAgoraChatPushManager.h:25