15#import <Foundation/Foundation.h>
17#import "EMCommonDefs.h"
18#import "EMGroupManagerDelegate.h"
20#import "EMGroupOptions.h"
21#import "EMCursorResult.h"
22#import "EMGroupSharedFile.h"
35#pragma mark - Delegate
51 delegateQueue:(dispatch_queue_t _Nullable )aQueue;
64- (void)removeDelegate:(
id _Nonnull)aDelegate;
67#pragma mark - Get Group
98- (NSArray *)getGroupsWithoutPushNotification:(
EMError **)pError EM_DEPRECATED_IOS(3_3_2, 3_8_3, "Use -
IEMPushManager::noPushGroups");
101#pragma mark - Get group from server
131- (NSArray<
EMGroup *> *_Nullable )getJoinedGroupsFromServerWithPage:(NSInteger)aPageNum
132 pageSize:(NSInteger)aPageSize
133 error:(
EMError **_Nullable )pError;
158- (
EMCursorResult<
EMGroup*> *_Nullable)getPublicGroupsFromServerWithCursor:(NSString *_Nullable)aCursor
159 pageSize:(NSInteger)aPageSize
160 error:(
EMError **_Nullable)pError;
183- (void)getPublicGroupsFromServerWithCursor:(NSString *_Nullable)aCursor
184 pageSize:(NSInteger)aPageSize
208- (
EMGroup * _Nullable)searchPublicGroupWithId:(NSString *_Nonnull)aGroundId
209 error:(
EMError **_Nullable)pError;
226- (void)searchPublicGroupWithId:(NSString *_Nonnull)aGroundId
227 completion:(
void (^_Nullable)(
EMGroup *aGroup,
EMError *_Nullable aError))aCompletionBlock;
260- (
EMGroup * _Nullable)createGroupWithSubject:(NSString *_Nullable)aSubject
261 description:(NSString *_Nullable)aDescription
262 invitees:(NSArray<NSString *> * _Nullable)aInvitees
263 message:(NSString *_Nullable)aMessage
265 error:(
EMError **_Nullable)pError;
294- (void)createGroupWithSubject:(NSString *_Nullable)aSubject
295 description:(NSString *_Nullable)aDescription
296 invitees:(NSArray<NSString *> * _Nullable)aInvitees
297 message:(NSString *_Nullable)aMessage
299 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
301#pragma mark - Fetch Info
324- (
EMGroup * _Nullable)getGroupSpecificationFromServerWithId:(NSString *_Nonnull)aGroupId
325 error:(
EMError **_Nullable)pError;
350- (
EMGroup * _Nullable)getGroupSpecificationFromServerWithId:(NSString *_Nonnull)aGroupId
351 fetchMembers:(BOOL)fetchMembers
352 error:(
EMError **_Nullable)pError;
373- (void)getGroupSpecificationFromServerWithId:(NSString *_Nonnull)aGroupId
374 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
395- (void)getGroupSpecificationFromServerWithId:(NSString *_Nonnull)aGroupId
396 fetchMembers:(BOOL)fetchMembers
397 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
430- (
EMCursorResult<NSString*> *)getGroupMemberListFromServerWithId:(NSString *_Nonnull)aGroupId
431 cursor:(NSString *_Nullable)aCursor
432 pageSize:(NSInteger)aPageSize
433 error:(
EMError **_Nullable)pError;
458- (void)getGroupMemberListFromServerWithId:(NSString *_Nonnull)aGroupId
459 cursor:(NSString *_Nullable)aCursor
460 pageSize:(NSInteger)aPageSize
461 completion:(
void (^_Nullable)(
EMCursorResult<NSString*> *aResult,
EMError *_Nullable aError))aCompletionBlock;
492- (NSArray<NSString *> * _Nullable)getGroupBlacklistFromServerWithId:(NSString *_Nonnull)aGroupId
493 pageNumber:(NSInteger)aPageNum
494 pageSize:(NSInteger)aPageSize
495 error:(
EMError **_Nullable)pError;
520- (void)getGroupBlacklistFromServerWithId:(NSString *_Nonnull)aGroupId
521 pageNumber:(NSInteger)aPageNum
522 pageSize:(NSInteger)aPageSize
523 completion:(
void (^_Nullable)(NSArray<NSString *> * _Nullable aList,
EMError *_Nullable aError))aCompletionBlock;
551- (NSArray<NSString *> * _Nullable)getGroupMuteListFromServerWithId:(NSString *_Nonnull)aGroupId
552 pageNumber:(NSInteger)aPageNum
553 pageSize:(NSInteger)aPageSize
554 error:(
EMError **_Nullable)pError;
579- (void)getGroupMuteListFromServerWithId:(NSString *_Nonnull)aGroupId
580 pageNumber:(NSInteger)aPageNum
581 pageSize:(NSInteger)aPageSize
582 completion:(
void (^_Nullable)(NSArray<NSString *> * _Nullable aList,
EMError *_Nullable aError))aCompletionBlock;
607- (void)fetchGroupMuteListFromServerWithId:(NSString *_Nonnull)aGroupId
608 pageNumber:(NSInteger)aPageNum
609 pageSize:(NSInteger)aPageSize
610 completion:(
void (^_Nullable)(NSDictionary<NSString *, NSNumber *> *_Nullable aDict,
EMError *_Nullable aError))aCompletionBlock;
633- (NSArray<
EMGroupSharedFile *> *_Nullable)getGroupFileListWithId:(NSString *_Nonnull)aGroupId
634 pageNumber:(NSInteger)aPageNum
635 pageSize:(NSInteger)aPageSize
636 error:(
EMError **_Nullable)pError;
659- (void)getGroupFileListWithId:(NSString *_Nonnull)aGroupId
660 pageNumber:(NSInteger)aPageNum
661 pageSize:(NSInteger)aPageSize
662 completion:(
void (^_Nullable)(NSArray<
EMGroupSharedFile *> *_Nullable aList,
EMError *_Nullable aError))aCompletionBlock;
684- (NSArray *)getGroupWhiteListFromServerWithId:(NSString *_Nonnull)aGroupId
685 error:(
EMError **_Nullable)pError;
703- (void)getGroupWhiteListFromServerWithId:(NSString *_Nonnull)aGroupId
704 completion:(
void (^_Nullable)(NSArray<NSString *> * _Nullable aList,
EMError *_Nullable aError))aCompletionBlock;
725- (BOOL)isMemberInWhiteListFromServerWithGroupId:(NSString *_Nonnull)aGroupId
726 error:(
EMError **_Nullable)pError;
743- (void)isMemberInWhiteListFromServerWithGroupId:(NSString *_Nonnull)aGroupId
744 completion:(
void (^_Nullable)(BOOL inWhiteList,
EMError *_Nullable aError))aCompletionBlock;
762- (NSString *_Nullable)getGroupAnnouncementWithId:(NSString *_Nonnull)aGroupId
763 error:(
EMError **_Nullable)pError;
780- (void)getGroupAnnouncementWithId:(NSString *_Nonnull)aGroupId
781 completion:(
void (^_Nullable)(NSString *aAnnouncement,
EMError *_Nullable aError))aCompletionBlock;
783#pragma mark - Edit Group
810- (
EMGroup * _Nullable)addOccupants:(NSArray<NSString *> * _Nonnull)aOccupants
811 toGroup:(NSString *_Nonnull)aGroupId
812 welcomeMessage:(NSString *_Nullable)aWelcomeMessage
813 error:(
EMError **_Nullable)pError;
834- (void)addMembers:(NSArray<NSString *> * _Nonnull)aUsers
835 toGroup:(NSString *_Nonnull)aGroupId
836 message:(NSString *_Nullable)aMessage
837 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
866- (
EMGroup * _Nullable)removeOccupants:(NSArray<NSString *> * _Nonnull)aOccupants
867 fromGroup:(NSString *_Nonnull)aGroupId
868 error:(
EMError **_Nullable)pError;
891- (void)removeMembers:(NSArray<NSString *> * _Nonnull)aUsers
892 fromGroup:(NSString *_Nonnull)aGroupId
893 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
922- (
EMGroup * _Nullable)blockOccupants:(NSArray<NSString *> * _Nonnull)aOccupants
923 fromGroup:(NSString *_Nonnull)aGroupId
924 error:(
EMError **_Nullable)pError;
947- (void)blockMembers:(NSArray<NSString *> * _Nonnull)aMembers
948 fromGroup:(NSString *_Nonnull)aGroupId
949 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
979- (
EMGroup * _Nullable)unblockOccupants:(NSArray<NSString *> * _Nonnull)aOccupants
980 forGroup:(NSString *_Nonnull)aGroupId
981 error:(
EMError **_Nullable)pError;
1004- (void)unblockMembers:(NSArray<NSString *> * _Nonnull)aMembers
1005 fromGroup:(NSString *_Nonnull)aGroupId
1006 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
1035- (
EMGroup * _Nullable)changeGroupSubject:(NSString *_Nullable)aSubject
1036 forGroup:(NSString *_Nonnull)aGroupId
1037 error:(
EMError **_Nullable)pError;
1060- (void)updateGroupSubject:(NSString *_Nullable)aSubject
1061 forGroup:(NSString *_Nonnull)aGroupId
1062 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
1091- (
EMGroup * _Nullable)changeDescription:(NSString *_Nullable)aDescription
1092 forGroup:(NSString *_Nonnull)aGroupId
1093 error:(
EMError **_Nullable)pError;
1116- (void)updateDescription:(NSString *_Nullable)aDescription
1117 forGroup:(NSString *_Nonnull)aGroupId
1118 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
1139- (void)leaveGroup:(NSString *_Nonnull)aGroupId
1140 error:(
EMError **_Nullable)pError;
1157- (void)leaveGroup:(NSString *_Nonnull)aGroupId
1158 completion:(
void (^_Nullable)(
EMError *_Nullable aError))aCompletionBlock;
1183- (
EMError *)destroyGroup:(NSString *_Nonnull)aGroupId;
1203- (void)destroyGroup:(NSString *_Nonnull)aGroupId
1204 finishCompletion:(
void (^_Nullable)(
EMError *_Nullable aError))aCompletionBlock;
1230- (
EMGroup * _Nullable)blockGroup:(NSString *_Nonnull)aGroupId
1231 error:(
EMError **_Nullable)pError;
1249- (void)blockGroup:(NSString *_Nonnull)aGroupId
1250 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
1273- (
EMGroup * _Nullable)unblockGroup:(NSString *_Nonnull)aGroupId
1274 error:(
EMError **_Nullable)pError;
1290- (void)unblockGroup:(NSString *_Nonnull)aGroupId
1291 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
1321- (
EMGroup * _Nullable)updateGroupOwner:(NSString *_Nonnull)aGroupId
1322 newOwner:(NSString *_Nonnull)aNewOwner
1323 error:(
EMError **_Nullable)pError;
1346- (void)updateGroupOwner:(NSString *_Nonnull)aGroupId
1347 newOwner:(NSString *_Nonnull)aNewOwner
1348 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
1375- (
EMGroup * _Nullable)addAdmin:(NSString *_Nonnull)aAdmin
1376 toGroup:(NSString *_Nonnull)aGroupId
1377 error:(
EMError **_Nullable)pError;
1404- (void)addAdmin:(NSString *_Nonnull)aAdmin
1405 toGroup:(NSString *_Nonnull)aGroupId
1406 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
1435- (
EMGroup * _Nullable)removeAdmin:(NSString *_Nonnull)aAdmin
1436 fromGroup:(NSString *_Nonnull)aGroupId
1437 error:(
EMError **_Nullable)pError;
1464- (void)removeAdmin:(NSString *_Nonnull)aAdmin
1465 fromGroup:(NSString *_Nonnull)aGroupId
1466 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
1498- (
EMGroup * _Nullable)muteMembers:(NSArray<NSString *> * _Nonnull)aMuteMembers
1499 muteMilliseconds:(NSInteger)aMuteMilliseconds
1500 fromGroup:(NSString *_Nonnull)aGroupId
1501 error:(
EMError **_Nullable)pError;
1529- (void)muteMembers:(NSArray<NSString *> * _Nonnull)aMuteMembers
1530 muteMilliseconds:(NSInteger)aMuteMilliseconds
1531 fromGroup:(NSString *_Nonnull)aGroupId
1532 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
1561- (
EMGroup * _Nullable)unmuteMembers:(NSArray<NSString *> * _Nonnull)aMembers
1562 fromGroup:(NSString *_Nonnull)aGroupId
1563 error:(
EMError **_Nullable)pError;
1589- (void)unmuteMembers:(NSArray<NSString *> * _Nonnull)aMembers
1590 fromGroup:(NSString *_Nonnull)aGroupId
1591 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
1618- (
EMGroup * _Nullable)muteAllMembersFromGroup:(NSString *_Nonnull)aGroupId
1619 error:(
EMError **_Nullable)pError;
1643- (void)muteAllMembersFromGroup:(NSString *_Nonnull)aGroupId
1644 completion:(
void(^)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
1672- (
EMGroup * _Nullable)unmuteAllMembersFromGroup:(NSString *_Nonnull)aGroupId
1673 error:(
EMError **_Nullable)pError;
1698- (void)unmuteAllMembersFromGroup:(NSString *_Nonnull)aGroupId
1699 completion:(
void(^)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
1729- (
EMGroup * _Nullable)addWhiteListMembers:(NSArray<NSString *> * _Nonnull)aMembers
1730 fromGroup:(NSString *_Nonnull)aGroupId
1731 error:(
EMError **_Nullable)pError;
1755- (void)addWhiteListMembers:(NSArray<NSString *> * _Nonnull)aMembers
1756 fromGroup:(NSString *_Nonnull)aGroupId
1757 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
1787- (
EMGroup * _Nullable)removeWhiteListMembers:(NSArray<NSString *> * _Nonnull)aMembers
1788 fromGroup:(NSString *_Nonnull)aGroupId
1789 error:(
EMError **_Nullable)pError;
1815- (void)removeWhiteListMembers:(NSArray<NSString *> * _Nonnull)aMembers
1816 fromGroup:(NSString *_Nonnull)aGroupId
1817 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
1838- (void)uploadGroupSharedFileWithId:(NSString *_Nonnull)aGroupId
1839 filePath:(NSString* _Nonnull)aFilePath
1840 progress:(
void (^_Nullable)(
int progress))aProgressBlock
1841 completion:(
void (^_Nullable)(
EMGroupSharedFile *_Nullable aSharedFile,
EMError *_Nullable aError))aCompletionBlock;
1862- (void)downloadGroupSharedFileWithId:(NSString *_Nonnull)aGroupId
1863 filePath:(NSString *_Nonnull)aFilePath
1864 sharedFileId:(NSString *_Nonnull)aSharedFileId
1865 progress:(
void (^_Nullable)(
int progress))aProgressBlock
1866 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
1889- (
EMGroup * _Nullable)removeGroupSharedFileWithId:(NSString *_Nonnull)aGroupId
1890 sharedFileId:(NSString *_Nonnull)aSharedFileId
1891 error:(
EMError **_Nullable)pError;
1908- (void)removeGroupSharedFileWithId:(NSString *_Nonnull)aGroupId
1909 sharedFileId:(NSString *_Nonnull)aSharedFileId
1910 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
1937- (
EMGroup * _Nullable)updateGroupAnnouncementWithId:(NSString *_Nonnull)aGroupId
1938 announcement:(NSString *_Nullable)aAnnouncement
1939 error:(
EMError **_Nullable)pError;
1965- (void)updateGroupAnnouncementWithId:(NSString *_Nonnull)aGroupId
1966 announcement:(NSString *_Nullable)aAnnouncement
1967 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
1994- (
EMGroup * _Nullable)updateGroupExtWithId:(NSString *_Nonnull)aGroupId
1995 ext:(NSString *_Nullable)aExt
1996 error:(
EMError **_Nullable)pError;
2018- (void)updateGroupExtWithId:(NSString *_Nonnull)aGroupId
2019 ext:(NSString *_Nullable)aExt
2020 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
2022#pragma mark - Edit Public Group
2045- (
EMGroup * _Nullable)joinPublicGroup:(NSString *_Nonnull)aGroupId
2046 error:(
EMError **_Nullable)pError;
2062- (void)joinPublicGroup:(NSString *_Nonnull)aGroupId
2063 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
2088- (
EMGroup * _Nullable)applyJoinPublicGroup:(NSString *_Nonnull)aGroupId
2089 message:(NSString *_Nullable)aMessage
2090 error:(
EMError **_Nullable)pError;
2109- (void)requestToJoinPublicGroup:(NSString *_Nonnull)aGroupId
2110 message:(NSString *_Nullable)aMessage
2111 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
2113#pragma mark - Application
2140- (
EMError *)acceptJoinApplication:(NSString *_Nonnull)aGroupId
2141 applicant:(NSString *_Nonnull)aUsername;
2168- (void)approveJoinGroupRequest:(NSString *_Nonnull)aGroupId
2169 sender:(NSString *_Nonnull)aUsername
2170 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
2199- (
EMError *)declineJoinApplication:(NSString *_Nonnull)aGroupId
2200 applicant:(NSString *_Nonnull)aUsername
2201 reason:(NSString *_Nullable)aReason;
2230- (void)declineJoinGroupRequest:(NSString *_Nonnull)aGroupId
2231 sender:(NSString *_Nonnull)aUsername
2232 reason:(NSString *_Nullable)aReason
2233 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
2258- (
EMGroup * _Nullable)acceptInvitationFromGroup:(NSString *_Nonnull)aGroupId
2259 inviter:(NSString *_Nonnull)aUsername
2260 error:(
EMError **_Nullable)pError;
2284- (void)acceptInvitationFromGroup:(NSString *_Nonnull)aGroupId
2285 inviter:(NSString *_Nonnull)aUsername
2286 completion:(
void (^_Nullable)(
EMGroup *_Nullable aGroup,
EMError *_Nullable aError))aCompletionBlock;
2311- (
EMError *)declineInvitationFromGroup:(NSString *_Nonnull)aGroupId
2312 inviter:(NSString *_Nonnull)aUsername
2313 reason:(NSString *_Nullable)aReason;
2338- (void)declineGroupInvitation:(NSString *_Nonnull)aGroupId
2339 inviter:(NSString *_Nonnull)aInviter
2340 reason:(NSString *_Nullable)aReason
2341 completion:(
void (^_Nullable)(
EMError *_Nullable aError))aCompletionBlock;
2381- (void)getJoinedGroupsFromServerWithPage:(NSInteger)aPageNum
2382 pageSize:(NSInteger)aPageSize
2383 needMemberCount:(BOOL)aNeedMemberCount
2384 needRole:(BOOL)aNeedRole
2385 completion:(
void (^_Nullable)(NSArray<
EMGroup *> *_Nullable aList,
EMError *_Nullable aError))aCompletionBlock;
2414- (
EMError *)ignoreGroupPush:(NSString *)aGroupId
2415 ignore:(BOOL)aIsIgnore EM_DEPRECATED_IOS(3_3_2, 3_8_3, "Use -
IEMPushManager::updatePushServiceForGroups:disablePush:");
2439- (void)updatePushServiceForGroup:(NSString *)aGroupId
2440 isPushEnabled:(BOOL)aIsEnable
2441 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_3_2, 3_8_3, "Use -
IEMPushManager::updatePushServiceForGroups:disablePush:completion:");
2469- (
EMError *)ignoreGroupsPush:(NSArray *)aGroupIDs
2470 ignore:(BOOL)aIsIgnore EM_DEPRECATED_IOS(3_3_2, 3_8_3, "Use -
IEMPushManager::updatePushServiceForGroups:disablePush:");
2493- (void)updatePushServiceForGroups:(NSArray *)aGroupIDs
2494 isPushEnabled:(BOOL)aIsEnable
2495 completion:(
void (^)(NSArray *groups,
EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_3_2, 3_8_3, "Use -
IEMPushManager::updatePushServiceForGroups:disablePush:completion:");
2497#pragma mark - EM_DEPRECATED_IOS 3.8.8
2525- (void)getJoinedGroupsFromServerWithPage:(NSInteger)aPageNum
2526 pageSize:(NSInteger)aPageSize
2527 completion:(
void (^_Nullable)(NSArray<
EMGroup *> *aList,
EMError *_Nullable aError))aCompletionBlock
2528 __deprecated_msg("Use -getJoinedGroupsFromServerWithPage:pageSize:needMemberCount:needRole:error:completion: instead");
Definition: EMCursorResult.h:27
Definition: EMGroupOptions.h:42
Definition: EMGroupSharedFile.h:24
Definition: EMGroupManagerDelegate.h:40
Definition: IEMGroupManager.h:31
NSArray< EMGroup * > *_Nullable getJoinedGroups()
Definition: IEMPushManager.h:31