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)aQueue;
64 - (void)removeDelegate:(
id)aDelegate;
67 #pragma mark - Get Group 94 - (NSArray *)getGroupsWithoutPushNotification:(
EMError **)pError;
97 #pragma mark - Get group from server 122 - (NSArray *)getJoinedGroupsFromServerWithPage:(NSInteger)aPageNum
123 pageSize:(NSInteger)aPageSize
143 - (void)getJoinedGroupsFromServerWithPage:(NSInteger)aPageNum
144 pageSize:(NSInteger)aPageSize
145 completion:(
void (^)(NSArray *aList,
EMError *aError))aCompletionBlock;
170 - (
EMCursorResult *)getPublicGroupsFromServerWithCursor:(NSString *)aCursor
171 pageSize:(NSInteger)aPageSize
191 - (void)getPublicGroupsFromServerWithCursor:(NSString *)aCursor
192 pageSize:(NSInteger)aPageSize
216 - (
EMGroup *)searchPublicGroupWithId:(NSString *)aGroundId
234 - (void)searchPublicGroupWithId:(NSString *)aGroundId
235 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
237 #pragma mark - Create 268 - (
EMGroup *)createGroupWithSubject:(NSString *)aSubject
269 description:(NSString *)aDescription
270 invitees:(NSArray *)aInvitees
271 message:(NSString *)aMessage
298 - (void)createGroupWithSubject:(NSString *)aSubject
299 description:(NSString *)aDescription
300 invitees:(NSArray *)aInvitees
301 message:(NSString *)aMessage
303 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
305 #pragma mark - Fetch Info 328 - (
EMGroup *)getGroupSpecificationFromServerWithId:(NSString *)aGroupId
346 - (void)getGroupSpecificationFromServerWithId:(NSString *)aGroupId
347 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
371 - (
EMCursorResult *)getGroupMemberListFromServerWithId:(NSString *)aGroupId
372 cursor:(NSString *)aCursor
373 pageSize:(NSInteger)aPageSize
395 - (void)getGroupMemberListFromServerWithId:(NSString *)aGroupId
396 cursor:(NSString *)aCursor
397 pageSize:(NSInteger)aPageSize
419 - (NSArray *)getGroupBlacklistFromServerWithId:(NSString *)aGroupId
420 pageNumber:(NSInteger)aPageNum
421 pageSize:(NSInteger)aPageSize
443 - (void)getGroupBlacklistFromServerWithId:(NSString *)aGroupId
444 pageNumber:(NSInteger)aPageNum
445 pageSize:(NSInteger)aPageSize
446 completion:(
void (^)(NSArray *aList,
EMError *aError))aCompletionBlock;
467 - (NSArray *)getGroupMuteListFromServerWithId:(NSString *)aGroupId
468 pageNumber:(NSInteger)aPageNum
469 pageSize:(NSInteger)aPageSize
491 - (void)getGroupMuteListFromServerWithId:(NSString *)aGroupId
492 pageNumber:(NSInteger)aPageNum
493 pageSize:(NSInteger)aPageSize
494 completion:(
void (^)(NSArray *aList,
EMError *aError))aCompletionBlock;
517 - (NSArray *)getGroupFileListWithId:(NSString *)aGroupId
518 pageNumber:(NSInteger)aPageNum
519 pageSize:(NSInteger)aPageSize
539 - (void)getGroupFileListWithId:(NSString *)aGroupId
540 pageNumber:(NSInteger)aPageNum
541 pageSize:(NSInteger)aPageSize
542 completion:(
void (^)(NSArray *aList,
EMError *aError))aCompletionBlock;
561 - (NSString *)getGroupAnnouncementWithId:(NSString *)aGroupId
579 - (void)getGroupAnnouncementWithId:(NSString *)aGroupId
580 completion:(
void (^)(NSString *aAnnouncement,
EMError *aError))aCompletionBlock;
582 #pragma mark - Edit Group 609 - (
EMGroup *)addOccupants:(NSArray *)aOccupants
610 toGroup:(NSString *)aGroupId
611 welcomeMessage:(NSString *)aWelcomeMessage
633 - (void)addMembers:(NSArray *)aUsers
634 toGroup:(NSString *)aGroupId
635 message:(NSString *)aMessage
636 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
661 - (
EMGroup *)removeOccupants:(NSArray *)aOccupants
662 fromGroup:(NSString *)aGroupId
682 - (void)removeMembers:(NSArray *)aUsers
683 fromGroup:(NSString *)aGroupId
684 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
709 - (
EMGroup *)blockOccupants:(NSArray *)aOccupants
710 fromGroup:(NSString *)aGroupId
730 - (void)blockMembers:(NSArray *)aMembers
731 fromGroup:(NSString *)aGroupId
732 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
758 - (
EMGroup *)unblockOccupants:(NSArray *)aOccupants
759 forGroup:(NSString *)aGroupId
779 - (void)unblockMembers:(NSArray *)aMembers
780 fromGroup:(NSString *)aGroupId
781 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
806 - (
EMGroup *)changeGroupSubject:(NSString *)aSubject
807 forGroup:(NSString *)aGroupId
827 - (void)updateGroupSubject:(NSString *)aSubject
828 forGroup:(NSString *)aGroupId
829 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
854 - (
EMGroup *)changeDescription:(NSString *)aDescription
855 forGroup:(NSString *)aGroupId
875 - (void)updateDescription:(NSString *)aDescription
876 forGroup:(NSString *)aGroupId
877 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
898 - (void)leaveGroup:(NSString *)aGroupId
916 - (void)leaveGroup:(NSString *)aGroupId
917 completion:(
void (^)(
EMError *aError))aCompletionBlock;
938 - (
EMError *)destroyGroup:(NSString *)aGroupId;
954 - (void)destroyGroup:(NSString *)aGroupId
955 finishCompletion:(
void (^)(
EMError *aError))aCompletionBlock;
979 - (
EMGroup *)blockGroup:(NSString *)aGroupId
996 - (void)blockGroup:(NSString *)aGroupId
997 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
1020 - (
EMGroup *)unblockGroup:(NSString *)aGroupId
1037 - (void)unblockGroup:(NSString *)aGroupId
1038 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
1064 - (
EMGroup *)updateGroupOwner:(NSString *)aGroupId
1065 newOwner:(NSString *)aNewOwner
1085 - (void)updateGroupOwner:(NSString *)aGroupId
1086 newOwner:(NSString *)aNewOwner
1087 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
1110 - (
EMGroup *)addAdmin:(NSString *)aAdmin
1111 toGroup:(NSString *)aGroupId
1131 - (void)addAdmin:(NSString *)aAdmin
1132 toGroup:(NSString *)aGroupId
1133 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
1158 - (
EMGroup *)removeAdmin:(NSString *)aAdmin
1159 fromGroup:(NSString *)aGroupId
1179 - (void)removeAdmin:(NSString *)aAdmin
1180 fromGroup:(NSString *)aGroupId
1181 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
1209 - (
EMGroup *)muteMembers:(NSArray *)aMuteMembers
1210 muteMilliseconds:(NSInteger)aMuteMilliseconds
1211 fromGroup:(NSString *)aGroupId
1234 - (void)muteMembers:(NSArray *)aMuteMembers
1235 muteMilliseconds:(NSInteger)aMuteMilliseconds
1236 fromGroup:(NSString *)aGroupId
1237 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
1262 - (
EMGroup *)unmuteMembers:(NSArray *)aMembers
1263 fromGroup:(NSString *)aGroupId
1284 - (void)unmuteMembers:(NSArray *)aMembers
1285 fromGroup:(NSString *)aGroupId
1286 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
1307 - (void)uploadGroupSharedFileWithId:(NSString *)aGroupId
1308 filePath:(NSString*)aFilePath
1309 progress:(
void (^)(
int progress))aProgressBlock
1331 - (void)downloadGroupSharedFileWithId:(NSString *)aGroupId
1332 filePath:(NSString *)aFilePath
1333 sharedFileId:(NSString *)aSharedFileId
1334 progress:(
void (^)(
int progress))aProgressBlock
1335 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
1358 - (
EMGroup *)removeGroupSharedFileWithId:(NSString *)aGroupId
1359 sharedFileId:(NSString *)aSharedFileId
1377 - (void)removeGroupSharedFileWithId:(NSString *)aGroupId
1378 sharedFileId:(NSString *)aSharedFileId
1379 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
1402 - (
EMGroup *)updateGroupAnnouncementWithId:(NSString *)aGroupId
1403 announcement:(NSString *)aAnnouncement
1422 - (void)updateGroupAnnouncementWithId:(NSString *)aGroupId
1423 announcement:(NSString *)aAnnouncement
1424 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
1447 - (
EMGroup *)updateGroupExtWithId:(NSString *)aGroupId
1448 ext:(NSString *)aExt
1467 - (void)updateGroupExtWithId:(NSString *)aGroupId
1468 ext:(NSString *)aExt
1469 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
1471 #pragma mark - Edit Public Group 1494 - (
EMGroup *)joinPublicGroup:(NSString *)aGroupId
1511 - (void)joinPublicGroup:(NSString *)aGroupId
1512 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
1537 - (
EMGroup *)applyJoinPublicGroup:(NSString *)aGroupId
1538 message:(NSString *)aMessage
1558 - (void)requestToJoinPublicGroup:(NSString *)aGroupId
1559 message:(NSString *)aMessage
1560 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
1562 #pragma mark - Application 1585 - (
EMError *)acceptJoinApplication:(NSString *)aGroupId
1586 applicant:(NSString *)aUsername;
1605 - (void)approveJoinGroupRequest:(NSString *)aGroupId
1606 sender:(NSString *)aUsername
1607 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
1632 - (
EMError *)declineJoinApplication:(NSString *)aGroupId
1633 applicant:(NSString *)aUsername
1634 reason:(NSString *)aReason;
1655 - (void)declineJoinGroupRequest:(NSString *)aGroupId
1656 sender:(NSString *)aUsername
1657 reason:(NSString *)aReason
1658 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
1683 - (
EMGroup *)acceptInvitationFromGroup:(NSString *)aGroupId
1684 inviter:(NSString *)aUsername
1705 - (void)acceptInvitationFromGroup:(NSString *)aGroupId
1706 inviter:(NSString *)aUsername
1707 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
1732 - (
EMError *)declineInvitationFromGroup:(NSString *)aGroupId
1733 inviter:(NSString *)aUsername
1734 reason:(NSString *)aReason;
1755 - (void)declineGroupInvitation:(NSString *)aGroupId
1756 inviter:(NSString *)aInviter
1757 reason:(NSString *)aReason
1758 completion:(
void (^)(
EMError *aError))aCompletionBlock;
1783 - (
EMError *)ignoreGroupPush:(NSString *)aGroupId
1784 ignore:(BOOL)aIsIgnore;
1808 - (
EMError *)ignoreGroupsPush:(NSArray *)aGroupIDs
1809 ignore:(BOOL)aIsIgnore;
1828 - (void)updatePushServiceForGroup:(NSString *)aGroupId
1829 isPushEnabled:(BOOL)aIsEnable
1830 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock;
1849 - (void)updatePushServiceForGroups:(NSArray *)aGroupIDs
1850 isPushEnabled:(BOOL)aIsEnable
1851 completion:(
void (^)(NSArray *groups,
EMError *aError))aCompletionBlock;
1853 #pragma mark - EM_DEPRECATED_IOS 3.3.0 1874 - (NSArray *)getMyGroupsFromServerWithError:(
EMError **)pError EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[
IEMGroupManager getJoinedGroupsFromServerWithPage:pageSize:error:]");
1889 - (void)getJoinedGroupsFromServerWithCompletion:(
void (^)(NSArray *aList,
EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[
IEMGroupManager getJoinedGroupsFromServerWithPage:pageSize:completion:]");
1914 - (
EMGroup *)fetchGroupInfo:(NSString *)aGroupId
1915 includeMembersList:(BOOL)aIncludeMembersList
1916 error:(
EMError **)pError EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[
IEMGroupManager getGroupSpecificationFromServerWithId:error:]");
1935 - (void)getGroupSpecificationFromServerByID:(NSString *)aGroupID
1936 includeMembersList:(BOOL)aIncludeMembersList
1937 completion:(
void (^)(
EMGroup *aGroup,
EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[
IEMGroupManager getGroupSpecificationFromServerWithId:completion:]");
1960 - (NSArray *)fetchGroupBansList:(NSString *)aGroupId
1961 error:(
EMError **)pError EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[
IEMGroupManager getGroupBlacklistFromServerWithId:pageNumber:pageSize:error:]");
1978 - (void)getGroupBlackListFromServerByID:(NSString *)aGroupId
1979 completion:(
void (^)(NSArray *aList,
EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[
IEMGroupManager getGroupBlacklistFromServerWithId:pageNumber:pageSize:completion:]");
2002 - (
EMGroup *)destroyGroup:(NSString *)aGroupId
2019 - (void)destroyGroup:(NSString *)aGroupId
2020 completion:(
void (^)(
EMGroup* aGroup,
EMError *aError))aCompletionBlock EM_DEPRECATED_IOS(3_1_0, 3_3_0, "Use -[
IEMGroupManager destroyGroup:finishCompletion:]");
2022 #pragma mark - EM_DEPRECATED_IOS 3.2.3 2037 #pragma mark - EM_DEPRECATED_IOS < 3.2.3 2076 - (NSArray *)getAllIgnoredGroupIds
__deprecated_msg("Use -getGroupsWithoutPushNotification");
2093 - (void)asyncGetMyGroupsFromServer:(
void (^)(NSArray *aList))aSuccessBlock
2094 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -getJoinedGroupsFromServerWithCompletion:");
2115 - (void)asyncGetPublicGroupsFromServerWithCursor:(NSString *)aCursor
2116 pageSize:(NSInteger)aPageSize
2118 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -getPublicGroupsFromServerWithCursor:pageSize:completion:");
2137 - (void)asyncSearchPublicGroupWithId:(NSString *)aGroundId
2138 success:(
void (^)(
EMGroup *aGroup))aSuccessBlock
2139 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -searchPublicGroupWithId:completion:");
2166 - (void)asyncCreateGroupWithSubject:(NSString *)aSubject
2167 description:(NSString *)aDescription
2168 invitees:(NSArray *)aInvitees
2169 message:(NSString *)aMessage
2171 success:(
void (^)(
EMGroup *aGroup))aSuccessBlock
2172 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -createGroupWithSubject:description:invitees:message:setting:completion");
2193 - (void)asyncFetchGroupInfo:(NSString *)aGroupId
2194 includeMembersList:(BOOL)aIncludeMembersList
2195 success:(
void (^)(
EMGroup *aGroup))aSuccessBlock
2196 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -getGroupSpecificationFromServerByID:includeMembersList:completion:");
2215 - (void)asyncFetchGroupBansList:(NSString *)aGroupId
2216 success:(
void (^)(NSArray *aList))aSuccessBlock
2217 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -getGroupBlackListFromServerByID:completion:");
2240 - (void)asyncAddOccupants:(NSArray *)aOccupants
2241 toGroup:(NSString *)aGroupId
2242 welcomeMessage:(NSString *)aWelcomeMessage
2243 success:(
void (^)(
EMGroup *aGroup))aSuccessBlock
2244 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -addMembers:toGroup:message:completion:");
2265 - (void)asyncRemoveOccupants:(NSArray *)aOccupants
2266 fromGroup:(NSString *)aGroupId
2267 success:(
void (^)(
EMGroup *aGroup))aSuccessBlock
2268 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -removeMembers:fromGroup:completion:");
2289 - (void)asyncBlockOccupants:(NSArray *)aOccupants
2290 fromGroup:(NSString *)aGroupId
2291 success:(
void (^)(
EMGroup *aGroup))aSuccessBlock
2292 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -blockMembers:fromGroup:completion:");
2313 - (void)asyncUnblockOccupants:(NSArray *)aOccupants
2314 forGroup:(NSString *)aGroupId
2315 success:(
void (^)(
EMGroup *aGroup))aSuccessBlock
2316 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -unblockMembers:fromGroup:completion:");
2337 - (void)asyncChangeGroupSubject:(NSString *)aSubject
2338 forGroup:(NSString *)aGroupId
2339 success:(
void (^)(
EMGroup *aGroup))aSuccessBlock
2340 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -updateGroupSubject:forGroup:completion");
2361 - (void)asyncChangeDescription:(NSString *)aDescription
2362 forGroup:(NSString *)aGroupId
2363 success:(
void (^)(
EMGroup *aGroup))aSuccessBlock
2364 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -updateDescription:forGroup:completion");
2383 - (void)asyncLeaveGroup:(NSString *)aGroupId
2384 success:(
void (^)(
EMGroup *aGroup))aSuccessBlock
2385 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -leaveGroup:completion");
2403 - (void)asyncDestroyGroup:(NSString *)aGroupId
2404 success:(
void (^)(
EMGroup *aGroup))aSuccessBlock
2405 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -destroyGroup:completion");
2423 - (void)asyncBlockGroup:(NSString *)aGroupId
2424 success:(
void (^)(
EMGroup *aGroup))aSuccessBlock
2425 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -blockGroup:completion:");
2443 - (void)asyncUnblockGroup:(NSString *)aGroupId
2444 success:(
void (^)(
EMGroup *aGroup))aSuccessBlock
2445 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -unblockGroup:completion");
2463 - (void)asyncJoinPublicGroup:(NSString *)aGroupId
2464 success:(
void (^)(
EMGroup *aGroup))aSuccessBlock
2465 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -joinPublicGroup:completion");
2486 - (void)asyncApplyJoinPublicGroup:(NSString *)aGroupId
2487 message:(NSString *)aMessage
2488 success:(
void (^)(
EMGroup *aGroup))aSuccessBlock
2489 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -requestToJoinPublicGroup:message:completion:");
2510 - (void)asyncAcceptJoinApplication:(NSString *)aGroupId
2511 applicant:(NSString *)aUsername
2512 success:(
void (^)())aSuccessBlock
2513 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -approveJoinGroupRequest:sender:completion:");
2536 - (void)asyncDeclineJoinApplication:(NSString *)aGroupId
2537 applicant:(NSString *)aUsername
2538 reason:(NSString *)aReason
2539 success:(
void (^)())aSuccessBlock
2540 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -declineJoinGroupRequest:sender:reason:completion:");
2562 - (void)asyncAcceptInvitationFromGroup:(NSString *)aGroupId
2563 inviter:(NSString *)aUsername
2564 success:(
void (^)(
EMGroup *aGroup))aSuccessBlock
2565 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -acceptInvitationFromGroup:inviter:completion");
2588 - (void)asyncDeclineInvitationFromGroup:(NSString *)aGroupId
2589 inviter:(NSString *)aUsername
2590 reason:(NSString *)aReason
2591 success:(
void (^)())aSuccessBlock
2592 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -declineGroupInvitation:inviter:reason:completion:");
2613 - (void)asyncIgnoreGroupPush:(NSString *)aGroupId
2614 ignore:(BOOL)aIsIgnore
2615 success:(
void (^)())aSuccessBlock
2616 failure:(
void (^)(
EMError *aError))aFailureBlock __deprecated_msg("Use -updatePushServiceForGroup:isPushEnabled:completion:");
Definition: EMGroupOptions.h:41
Definition: EMCursorResult.h:24
"Use -getJoinedGroups" __deprecated_msg()
NSArray * getJoinedGroups()
Definition: IEMGroupManager.h:31
Definition: EMGroupSharedFile.h:16
Definition: EMGroupManagerDelegate.h:40