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
76#pragma mark - Get group from server
90- (NSArray<
AgoraChatGroup *> *_Nullable )getJoinedGroupsFromServerWithPage:(NSInteger)aPageNum
91 pageSize:(NSInteger)aPageSize
92 error:(
AgoraChatError **_Nullable )pError __deprecated_msg("Use -getJoinedGroupsFromServerWithPage:pageSize:needMemberCount:needRole:error:completion: instead");;
107 pageSize:(NSInteger)aPageSize
121- (void)getPublicGroupsFromServerWithCursor:(NSString *_Nullable)aCursor
122 pageSize:(NSInteger)aPageSize
136- (
AgoraChatGroup * _Nullable)searchPublicGroupWithId:(NSString *_Nonnull)aGroundId
147- (void)searchPublicGroupWithId:(NSString *_Nonnull)aGroundId
159- (void)getJoinedGroupsCountFromServerWithCompletion:(
void (^_Nullable)(NSInteger groupCount,
AgoraChatError *_Nullable aError))aCompletionBlock;
178- (
AgoraChatGroup * _Nullable)createGroupWithSubject:(NSString *_Nullable)aSubject
179 description:(NSString *_Nullable)aDescription
180 invitees:(NSArray<NSString *> * _Nullable)aInvitees
181 message:(NSString *_Nullable)aMessage
199- (void)createGroupWithSubject:(NSString *_Nullable)aSubject
200 description:(NSString *_Nullable)aDescription
201 invitees:(NSArray<NSString *> * _Nullable)aInvitees
202 message:(NSString *_Nullable)aMessage
206#pragma mark - Fetch Info
219- (
AgoraChatGroup * _Nullable)getGroupSpecificationFromServerWithId:(NSString *_Nonnull)aGroupId
234- (
AgoraChatGroup * _Nullable)getGroupSpecificationFromServerWithId:(NSString *_Nonnull)aGroupId
235 fetchMembers:(BOOL)fetchMembers
248- (void)getGroupSpecificationFromServerWithId:(NSString *_Nonnull)aGroupId
260- (void)getGroupSpecificationFromServerWithId:(NSString *_Nonnull)aGroupId
261 fetchMembers:(BOOL)fetchMembers
279 cursor:(NSString *_Nullable)aCursor
280 pageSize:(NSInteger)aPageSize
293- (void)getGroupMemberListFromServerWithId:(NSString *_Nonnull)aGroupId
294 cursor:(NSString *_Nullable)aCursor
295 pageSize:(NSInteger)aPageSize
311- (NSArray<NSString *> * _Nullable)getGroupBlacklistFromServerWithId:(NSString *_Nonnull)aGroupId
312 pageNumber:(NSInteger)aPageNum
313 pageSize:(NSInteger)aPageSize
328- (void)getGroupBlacklistFromServerWithId:(NSString *_Nonnull)aGroupId
329 pageNumber:(NSInteger)aPageNum
330 pageSize:(NSInteger)aPageSize
331 completion:(
void (^_Nullable)(NSArray<NSString *> * _Nullable aList,
AgoraChatError *_Nullable aError))aCompletionBlock;
346- (NSArray<NSString *> * _Nullable)getGroupMuteListFromServerWithId:(NSString *_Nonnull)aGroupId
347 pageNumber:(NSInteger)aPageNum
348 pageSize:(NSInteger)aPageSize
363- (void)getGroupMuteListFromServerWithId:(NSString *_Nonnull)aGroupId
364 pageNumber:(NSInteger)aPageNum
365 pageSize:(NSInteger)aPageSize
366 completion:(
void (^_Nullable)(NSArray<NSString *> * _Nullable aList,
AgoraChatError *_Nullable aError))aCompletionBlock;
380- (void)fetchGroupMuteListFromServerWithId:(NSString *_Nonnull)aGroupId
381 pageNumber:(NSInteger)aPageNum
382 pageSize:(NSInteger)aPageSize
383 completion:(
void (^_Nullable)(NSDictionary<NSString *, NSNumber *> *_Nullable aDict,
AgoraChatError *_Nullable aError))aCompletionBlock;
397 pageNumber:(NSInteger)aPageNum
398 pageSize:(NSInteger)aPageSize
412- (void)getGroupFileListWithId:(NSString *_Nonnull)aGroupId
413 pageNumber:(NSInteger)aPageNum
414 pageSize:(NSInteger)aPageSize
428- (NSArray *)getGroupWhiteListFromServerWithId:(NSString *_Nonnull)aGroupId
440- (void)getGroupWhiteListFromServerWithId:(NSString *_Nonnull)aGroupId
441 completion:(
void (^_Nullable)(NSArray<NSString *> * _Nullable aList,
AgoraChatError *_Nullable aError))aCompletionBlock;
453- (BOOL)isMemberInWhiteListFromServerWithGroupId:(NSString *_Nonnull)aGroupId
464- (void)isMemberInWhiteListFromServerWithGroupId:(NSString *_Nonnull)aGroupId
465 completion:(
void (^_Nullable)(BOOL inWhiteList,
AgoraChatError *_Nullable aError))aCompletionBlock;
476- (NSString *_Nullable)getGroupAnnouncementWithId:(NSString *_Nonnull)aGroupId
487- (void)isMemberInMuteListFromServerWithGroupId:(NSString * _Nonnull)aGroupId
488 completion:(
void (^ _Nonnull)(BOOL inMuteList,
AgoraChatError * _Nullable aError))aCompletionBlock;
498- (void)getGroupAnnouncementWithId:(NSString *_Nonnull)aGroupId
499 completion:(
void (^_Nullable)(NSString *aAnnouncement,
AgoraChatError *_Nullable aError))aCompletionBlock;
501#pragma mark - Edit Group
516- (
AgoraChatGroup * _Nullable)addOccupants:(NSArray<NSString *> * _Nonnull)aOccupants
517 toGroup:(NSString *_Nonnull)aGroupId
518 welcomeMessage:(NSString *_Nullable)aWelcomeMessage
531- (void)addMembers:(NSArray<NSString *> * _Nonnull)aUsers
532 toGroup:(NSString *_Nonnull)aGroupId
533 message:(NSString *_Nullable)aMessage
550- (
AgoraChatGroup * _Nullable)removeOccupants:(NSArray<NSString *> * _Nonnull)aOccupants
551 fromGroup:(NSString *_Nonnull)aGroupId
565- (void)removeMembers:(NSArray<NSString *> * _Nonnull)aUsers
566 fromGroup:(NSString *_Nonnull)aGroupId
583- (
AgoraChatGroup * _Nullable)blockOccupants:(NSArray<NSString *> * _Nonnull)aOccupants
584 fromGroup:(NSString *_Nonnull)aGroupId
598- (void)blockMembers:(NSArray<NSString *> * _Nonnull)aMembers
599 fromGroup:(NSString *_Nonnull)aGroupId
617- (
AgoraChatGroup * _Nullable)unblockOccupants:(NSArray<NSString *> * _Nonnull)aOccupants
618 forGroup:(NSString *_Nonnull)aGroupId
632- (void)unblockMembers:(NSArray<NSString *> * _Nonnull)aMembers
633 fromGroup:(NSString *_Nonnull)aGroupId
650- (
AgoraChatGroup * _Nullable)changeGroupSubject:(NSString *_Nullable)aSubject
651 forGroup:(NSString *_Nonnull)aGroupId
665- (void)updateGroupSubject:(NSString *_Nullable)aSubject
666 forGroup:(NSString *_Nonnull)aGroupId
683- (
AgoraChatGroup * _Nullable)changeDescription:(NSString *_Nullable)aDescription
684 forGroup:(NSString *_Nonnull)aGroupId
698- (void)updateDescription:(NSString *_Nullable)aDescription
699 forGroup:(NSString *_Nonnull)aGroupId
712- (void)leaveGroup:(NSString *_Nonnull)aGroupId
723- (void)leaveGroup:(NSString *_Nonnull)aGroupId
724 completion:(
void (^_Nullable)(
AgoraChatError *_Nullable aError))aCompletionBlock;
750- (void)destroyGroup:(NSString *_Nonnull)aGroupId
751 finishCompletion:(
void (^_Nullable)(
AgoraChatError *_Nullable aError))aCompletionBlock;
767- (
AgoraChatGroup * _Nullable)blockGroup:(NSString *_Nonnull)aGroupId
780- (void)blockGroup:(NSString *_Nonnull)aGroupId
794- (
AgoraChatGroup * _Nullable)unblockGroup:(NSString *_Nonnull)aGroupId
805- (void)unblockGroup:(NSString *_Nonnull)aGroupId
823- (
AgoraChatGroup * _Nullable)updateGroupOwner:(NSString *_Nonnull)aGroupId
824 newOwner:(NSString *_Nonnull)aNewOwner
838- (void)updateGroupOwner:(NSString *_Nonnull)aGroupId
839 newOwner:(NSString *_Nonnull)aNewOwner
856 toGroup:(NSString *_Nonnull)aGroupId
872- (void)addAdmin:(NSString *_Nonnull)aAdmin
873 toGroup:(NSString *_Nonnull)aGroupId
890- (
AgoraChatGroup * _Nullable)removeAdmin:(NSString *_Nonnull)aAdmin
891 fromGroup:(NSString *_Nonnull)aGroupId
907- (void)removeAdmin:(NSString *_Nonnull)aAdmin
908 fromGroup:(NSString *_Nonnull)aGroupId
927- (
AgoraChatGroup * _Nullable)muteMembers:(NSArray<NSString *> * _Nonnull)aMuteMembers
928 muteMilliseconds:(NSInteger)aMuteMilliseconds
929 fromGroup:(NSString *_Nonnull)aGroupId
946- (void)muteMembers:(NSArray<NSString *> * _Nonnull)aMuteMembers
947 muteMilliseconds:(NSInteger)aMuteMilliseconds
948 fromGroup:(NSString *_Nonnull)aGroupId
965- (
AgoraChatGroup * _Nullable)unmuteMembers:(NSArray<NSString *> * _Nonnull)aMembers
966 fromGroup:(NSString *_Nonnull)aGroupId
982- (void)unmuteMembers:(NSArray<NSString *> * _Nonnull)aMembers
983 fromGroup:(NSString *_Nonnull)aGroupId
999- (
AgoraChatGroup * _Nullable)muteAllMembersFromGroup:(NSString *_Nonnull)aGroupId
1014- (void)muteAllMembersFromGroup:(NSString *_Nonnull)aGroupId
1031- (
AgoraChatGroup * _Nullable)unmuteAllMembersFromGroup:(NSString *_Nonnull)aGroupId
1047- (void)unmuteAllMembersFromGroup:(NSString *_Nonnull)aGroupId
1065- (
AgoraChatGroup * _Nullable)addWhiteListMembers:(NSArray<NSString *> * _Nonnull)aMembers
1066 fromGroup:(NSString *_Nonnull)aGroupId
1080- (void)addWhiteListMembers:(NSArray<NSString *> * _Nonnull)aMembers
1081 fromGroup:(NSString *_Nonnull)aGroupId
1099- (
AgoraChatGroup * _Nullable)removeWhiteListMembers:(NSArray<NSString *> * _Nonnull)aMembers
1100 fromGroup:(NSString *_Nonnull)aGroupId
1116- (void)removeWhiteListMembers:(NSArray<NSString *> * _Nonnull)aMembers
1117 fromGroup:(NSString *_Nonnull)aGroupId
1130- (void)uploadGroupSharedFileWithId:(NSString *_Nonnull)aGroupId
1131 filePath:(NSString* _Nonnull)aFilePath
1132 progress:(
void (^_Nullable)(
int progress))aProgressBlock
1145- (void)downloadGroupSharedFileWithId:(NSString *_Nonnull)aGroupId
1146 filePath:(NSString *_Nonnull)aFilePath
1147 sharedFileId:(NSString *_Nonnull)aSharedFileId
1148 progress:(
void (^_Nullable)(
int progress))aProgressBlock
1163- (
AgoraChatGroup * _Nullable)removeGroupSharedFileWithId:(NSString *_Nonnull)aGroupId
1164 sharedFileId:(NSString *_Nonnull)aSharedFileId
1175- (void)removeGroupSharedFileWithId:(NSString *_Nonnull)aGroupId
1176 sharedFileId:(NSString *_Nonnull)aSharedFileId
1193- (
AgoraChatGroup * _Nullable)updateGroupAnnouncementWithId:(NSString *_Nonnull)aGroupId
1194 announcement:(NSString *_Nullable)aAnnouncement
1210- (void)updateGroupAnnouncementWithId:(NSString *_Nonnull)aGroupId
1211 announcement:(NSString *_Nullable)aAnnouncement
1228- (
AgoraChatGroup * _Nullable)updateGroupExtWithId:(NSString *_Nonnull)aGroupId
1229 ext:(NSString *_Nullable)aExt
1243- (void)updateGroupExtWithId:(NSString *_Nonnull)aGroupId
1244 ext:(NSString *_Nullable)aExt
1247#pragma mark - Edit Public Group
1260- (
AgoraChatGroup * _Nullable)joinPublicGroup:(NSString *_Nonnull)aGroupId
1271- (void)joinPublicGroup:(NSString *_Nonnull)aGroupId
1286- (
AgoraChatGroup * _Nullable)applyJoinPublicGroup:(NSString *_Nonnull)aGroupId
1287 message:(NSString *_Nullable)aMessage
1299- (void)requestToJoinPublicGroup:(NSString *_Nonnull)aGroupId
1300 message:(NSString *_Nullable)aMessage
1303#pragma mark - Application
1318- (
AgoraChatError *)acceptJoinApplication:(NSString *_Nonnull)aGroupId
1319 applicant:(NSString *_Nonnull)aUsername;
1334- (void)approveJoinGroupRequest:(NSString *_Nonnull)aGroupId
1335 sender:(NSString *_Nonnull)aUsername
1352- (
AgoraChatError *)declineJoinApplication:(NSString *_Nonnull)aGroupId
1353 applicant:(NSString *_Nonnull)aUsername
1354 reason:(NSString *_Nullable)aReason;
1370- (void)declineJoinGroupRequest:(NSString *_Nonnull)aGroupId
1371 sender:(NSString *_Nonnull)aUsername
1372 reason:(NSString *_Nullable)aReason
1387- (
AgoraChatGroup * _Nullable)acceptInvitationFromGroup:(NSString *_Nonnull)aGroupId
1388 inviter:(NSString *_Nonnull)aUsername
1402- (void)acceptInvitationFromGroup:(NSString *_Nonnull)aGroupId
1403 inviter:(NSString *_Nonnull)aUsername
1418- (
AgoraChatError *)declineInvitationFromGroup:(NSString *_Nonnull)aGroupId
1419 inviter:(NSString *_Nonnull)aUsername
1420 reason:(NSString *_Nullable)aReason;
1434- (void)declineGroupInvitation:(NSString *_Nonnull)aGroupId
1435 inviter:(NSString *_Nonnull)aInviter
1436 reason:(NSString *_Nullable)aReason
1437 completion:(
void (^_Nullable)(
AgoraChatError *_Nullable aError))aCompletionBlock;
1461- (void)getJoinedGroupsFromServerWithPage:(NSInteger)aPageNum
1462 pageSize:(NSInteger)aPageSize
1463 needMemberCount:(BOOL)aNeedMemberCount
1464 needRole:(BOOL)aNeedRole
1483 ignore:(BOOL)aIsIgnore EM_DEPRECATED_IOS(3_3_2, 3_8_3, "Use -
IAgoraChatPushManager::updatePushServiceForGroups:disablePush:");
1497- (void)updatePushServiceForGroup:(NSString *)aGroupId
1498 isPushEnabled:(BOOL)aIsEnable
1516 ignore:(BOOL)aIsIgnore EM_DEPRECATED_IOS(3_3_2, 3_8_3, "Use -
IAgoraChatPushManager::updatePushServiceForGroups:disablePush:");
1529- (void)updatePushServiceForGroups:(NSArray *)aGroupIDs
1530 isPushEnabled:(BOOL)aIsEnable
1531 completion:(
void (^)(NSArray *groups,
AgoraChatError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_3_2, 3_8_3, "Use -
IAgoraChatPushManager::updatePushServiceForGroups:disablePush:completion:");
1533#pragma mark - Group member attributes
1543- (void)setMemberAttribute:(NSString *_Nonnull)groupId userId:(NSString *_Nonnull)userId attributes:(NSDictionary<NSString*,NSString*> *_Nonnull)attributes completion:(
void (^_Nullable)(
AgoraChatError *_Nullable error))completionBlock;
1556- (void)fetchMemberAttribute:(NSString *_Nonnull)groupId userId:(NSString *_Nonnull)userId completion:(
void (^ _Nullable)(NSDictionary<NSString *,NSString *> * _Nullable,
AgoraChatError * _Nullable))completionBlock;
1569- (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;
1571#pragma mark - EM_DEPRECATED_IOS 3.8.8
1587- (void)getJoinedGroupsFromServerWithPage:(NSInteger)aPageNum
1588 pageSize:(NSInteger)aPageSize
1590 __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
void cleanAllGroupsFromDB()
NSArray< AgoraChatGroup * > *_Nullable getJoinedGroups()
Definition: IAgoraChatPushManager.h:25