#import <IEMGroupManager.h>
IEMGroupManager.h This protocol defined the group operations
- Author
- Hyphenate
- Version
- 3.00
Group operations
| - (EMGroup *) acceptInvitationFromGroup: |
|
(NSString *) |
aGroupId |
| inviter: |
|
(NSString *) |
aUsername |
| error: |
|
(EMError **) |
pError |
|
|
| |
|
required |
Accept group's invitation
Synchronization method will block the current thread
- Parameters
-
| groupId | Group id |
| aUsername | Inviter |
| pError | Error |
- Returns
- Joined group instance
| - (EMError *) acceptJoinApplication: |
|
(NSString *) |
aGroupId |
| applicant: |
|
(NSString *) |
aUsername |
|
|
| |
|
required |
Accept user's application, need owner‘s authority
Synchronization method will block the current thread
- Parameters
-
| aGroupId | Group id |
| aUsername | The applicant |
- Returns
- Error
Add delegate
- Parameters
-
| aDelegate | Delegate |
| aQueue | The queue of call delegate method |
| - (EMGroup *) addOccupants: |
|
(NSArray *) |
aOccupants |
| toGroup: |
|
(NSString *) |
aGroupId |
| welcomeMessage: |
|
(NSString *) |
aWelcomeMessage |
| error: |
|
(EMError **) |
pError |
|
|
| |
|
required |
Invite User to join a group
Synchronization method will block the current thread
- Parameters
-
| aOccupants | Invited users |
| aGroupId | Group id |
| aWelcomeMessage | Welcome message |
| pError | Error |
- Returns
- Group instance, return nil if fail
| - (EMGroup *) applyJoinPublicGroup: |
|
(NSString *) |
aGroupId |
| message: |
|
(NSString *) |
aMessage |
| error: |
|
(EMError **) |
pError |
|
|
| |
|
required |
Apply to join a public group, group style should be EMGroupStylePublicJoinNeedApproval
Synchronization method will block the current thread
- Parameters
-
| aGroupId | Public group id |
| aMessage | Apply info |
| pError | Error |
- Returns
- Group instance
| - (void) asyncAcceptInvitationFromGroup: |
|
(NSString *) |
aGroupId |
| inviter: |
|
(NSString *) |
aUsername |
| success: |
|
(void(^)(EMGroup *aGroup)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Accept group's invitation
- Parameters
-
| groupId | Group id |
| aUsername | Inviter |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncAcceptJoinApplication: |
|
(NSString *) |
aGroupId |
| applicant: |
|
(NSString *) |
aUsername |
| success: |
|
(void(^)()) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Accept user's application, need owner‘s authority
- Parameters
-
| aGroupId | Group id |
| aUsername | The applicant |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncAddOccupants: |
|
(NSArray *) |
aOccupants |
| toGroup: |
|
(NSString *) |
aGroupId |
| welcomeMessage: |
|
(NSString *) |
aWelcomeMessage |
| success: |
|
(void(^)(EMGroup *aGroup)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Invite User to join a group
- Parameters
-
| aOccupants | Invited users |
| aGroupId | Group id |
| aWelcomeMessage | Welcome message |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncApplyJoinPublicGroup: |
|
(NSString *) |
aGroupId |
| message: |
|
(NSString *) |
aMessage |
| success: |
|
(void(^)(EMGroup *aGroup)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Apply to join a public group, group style should be EMGroupStylePublicJoinNeedApproval
- Parameters
-
| aGroupId | Public group id |
| aMessage | Apply info |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncBlockGroup: |
|
(NSString *) |
aGroupId |
| success: |
|
(void(^)(EMGroup *aGroup)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Block group’s message, server will blocks the messages of the group to user, owner can't block the group's message
- Parameters
-
| aGroupId | Group id |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncBlockOccupants: |
|
(NSArray *) |
aOccupants |
| fromGroup: |
|
(NSString *) |
aGroupId |
| success: |
|
(void(^)(EMGroup *aGroup)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Add users to group’s blacklist, need owner‘s authority
- Parameters
-
| aOccupants | Users to be added |
| aGroupId | Group id |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncChangeDescription: |
|
(NSString *) |
aDescription |
| forGroup: |
|
(NSString *) |
aGroupId |
| success: |
|
(void(^)(EMGroup *aGroup)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Change group’s description, need owner‘s authority
- Parameters
-
| aDescription | New group‘s description |
| aGroupId | Group id |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncChangeGroupSubject: |
|
(NSString *) |
aSubject |
| forGroup: |
|
(NSString *) |
aGroupId |
| success: |
|
(void(^)(EMGroup *aGroup)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Change group’s subject, need owner‘s authority
- Parameters
-
| aSubject | New group‘s subject |
| aGroupId | Group id |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncCreateGroupWithSubject: |
|
(NSString *) |
aSubject |
| description: |
|
(NSString *) |
aDescription |
| invitees: |
|
(NSArray *) |
aInvitees |
| message: |
|
(NSString *) |
aMessage |
| setting: |
|
(EMGroupOptions *) |
aSetting |
| success: |
|
(void(^)(EMGroup *aGroup)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Create a group
- Parameters
-
| aSubject | Group subject |
| aDescription | Group description |
| aInvitees | Group members, without creater |
| aMessage | Invitation message |
| aSetting | Group options |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncDeclineInvitationFromGroup: |
|
(NSString *) |
aGroupId |
| inviter: |
|
(NSString *) |
aUsername |
| reason: |
|
(NSString *) |
aReason |
| success: |
|
(void(^)()) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Decline a group invitation
- Parameters
-
| aGroupId | Group id |
| aUsername | Inviter |
| aReason | Decline reason |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncDeclineJoinApplication: |
|
(NSString *) |
aGroupId |
| applicant: |
|
(NSString *) |
aUsername |
| reason: |
|
(NSString *) |
aReason |
| success: |
|
(void(^)()) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Decline user's application, need owner‘s authority
- Parameters
-
| aGroupId | Group id |
| aUsername | The applicant |
| aReason | Decline reason |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncDestroyGroup: |
|
(NSString *) |
aGroupId |
| success: |
|
(void(^)(EMGroup *aGroup)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Destroy a group, need owner‘s authority
- Parameters
-
| aGroupId | Group id |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncFetchGroupBansList: |
|
(NSString *) |
aGroupId |
| success: |
|
(void(^)(NSArray *aList)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Get group‘s blacklist, need owner’s authority
- Parameters
-
| aGroupId | Group id |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncFetchGroupInfo: |
|
(NSString *) |
aGroupId |
| includeMembersList: |
|
(BOOL) |
aIncludeMembersList |
| success: |
|
(void(^)(EMGroup *aGroup)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Fetch group info
- Parameters
-
| aGroupId | Group id |
| aIncludeMembersList | Whether get member list |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncGetMyGroupsFromServer: |
|
(void(^)(NSArray *aList)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Get all of user's groups from server, will update group list in memory and DB after success
- Parameters
-
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncGetPublicGroupsFromServerWithCursor: |
|
(NSString *) |
aCursor |
| pageSize: |
|
(NSInteger) |
aPageSize |
| success: |
|
(void(^)(EMCursorResult *aCursor)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Get public groups in the specified range from the server
- Parameters
-
| aCursor | Cursor, input nil the first time |
| aPageSize | Expect result count, will return all results if < 0 |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncIgnoreGroupPush: |
|
(NSString *) |
aGroupId |
| ignore: |
|
(BOOL) |
aIsIgnore |
| success: |
|
(void(^)()) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Block / unblock group message‘s push notification
- Parameters
-
| aGroupId | Group id |
| aIgnore | Whether block |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncJoinPublicGroup: |
|
(NSString *) |
aGroupId |
| success: |
|
(void(^)(EMGroup *aGroup)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Join a public group, group style should be EMGroupStylePublicOpenJoin
- Parameters
-
| aGroupId | Public group id |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncLeaveGroup: |
|
(NSString *) |
aGroupId |
| success: |
|
(void(^)(EMGroup *aGroup)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Leave a group, owner can't leave the group, can only destroy the group
- Parameters
-
| aGroupId | Group id |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncRemoveOccupants: |
|
(NSArray *) |
aOccupants |
| fromGroup: |
|
(NSString *) |
aGroupId |
| success: |
|
(void(^)(EMGroup *aGroup)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Remove members from group, need owner‘s authority
- Parameters
-
| aOccupants | Users to be removed |
| aGroupId | Group id |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncSearchPublicGroupWithId: |
|
(NSString *) |
aGroundId |
| success: |
|
(void(^)(EMGroup *aGroup)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Search public group with the id
- Parameters
-
| aGroundId | Group id |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncUnblockGroup: |
|
(NSString *) |
aGroupId |
| success: |
|
(void(^)(EMGroup *aGroup)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Unblock group message
- Parameters
-
| aGroupId | Group id |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (void) asyncUnblockOccupants: |
|
(NSArray *) |
aOccupants |
| forGroup: |
|
(NSString *) |
aGroupId |
| success: |
|
(void(^)(EMGroup *aGroup)) |
aSuccessBlock |
| failure: |
|
(void(^)(EMError *aError)) |
aFailureBlock |
|
|
| |
|
required |
Remove users from group‘s blacklist, need owner‘s authority
- Parameters
-
| aOccupants | Users to be removed |
| aGroupId | Group id |
| aSuccessBlock | The callback block of success |
| aFailureBlock | The callback block of failure |
| - (EMGroup *) blockGroup: |
|
(NSString *) |
aGroupId |
| error: |
|
(EMError **) |
pError |
|
|
| |
|
required |
Block group’s message, server will blocks the messages of the group to user, owner can't block the group's message
Synchronization method will block the current thread
- Parameters
-
| aGroupId | Group id |
| pError | Error |
- Returns
- Group instance
| - (EMGroup *) blockOccupants: |
|
(NSArray *) |
aOccupants |
| fromGroup: |
|
(NSString *) |
aGroupId |
| error: |
|
(EMError **) |
pError |
|
|
| |
|
required |
Add users to group’s blacklist, need owner‘s authority
Synchronization method will block the current thread
- Parameters
-
| aOccupants | Users to be added |
| aGroupId | Group id |
| pError | Error |
- Returns
- Group instance
| - (EMGroup *) changeDescription: |
|
(NSString *) |
aDescription |
| forGroup: |
|
(NSString *) |
aGroupId |
| error: |
|
(EMError **) |
pError |
|
|
| |
|
required |
Change group’s description, need owner‘s authority
Synchronization method will block the current thread
- Parameters
-
| aDescription | New group‘s description |
| aGroupId | Group id |
| pError | Error |
- Returns
- Group
| - (EMGroup *) changeGroupSubject: |
|
(NSString *) |
aSubject |
| forGroup: |
|
(NSString *) |
aGroupId |
| error: |
|
(EMError **) |
pError |
|
|
| |
|
required |
Change group’s subject, need owner‘s authority
Synchronization method will block the current thread
- Parameters
-
| aSubject | New group‘s subject |
| aGroupId | Group id |
| pError | Error |
- Returns
- Group instance
| - (EMGroup *) createGroupWithSubject: |
|
(NSString *) |
aSubject |
| description: |
|
(NSString *) |
aDescription |
| invitees: |
|
(NSArray *) |
aInvitees |
| message: |
|
(NSString *) |
aMessage |
| setting: |
|
(EMGroupOptions *) |
aSetting |
| error: |
|
(EMError **) |
pError |
|
|
| |
|
required |
Create a group
Synchronization method will block the current thread
- Parameters
-
| aSubject | Group subject |
| aDescription | Group description |
| aInvitees | Group members, without creater |
| aMessage | Invitation message |
| aSetting | Group options |
| pError | Error |
- Returns
- Created group
| - (EMError *) declineInvitationFromGroup: |
|
(NSString *) |
aGroupId |
| inviter: |
|
(NSString *) |
aUsername |
| reason: |
|
(NSString *) |
aReason |
|
|
| |
|
required |
Decline a group invitation
Synchronization method will block the current thread
- Parameters
-
| aGroupId | Group id |
| aUsername | Inviter |
| aReason | Decline reason |
- Returns
- Error
| - (EMError *) declineJoinApplication: |
|
(NSString *) |
aGroupId |
| applicant: |
|
(NSString *) |
aUsername |
| reason: |
|
(NSString *) |
aReason |
|
|
| |
|
required |
Decline user's application, need owner‘s authority
Synchronization method will block the current thread
- Parameters
-
| aGroupId | Group id |
| aUsername | The applicant |
| aReason | Decline reason |
- Returns
- Error
| - (EMGroup *) destroyGroup: |
|
(NSString *) |
aGroupId |
| error: |
|
(EMError **) |
pError |
|
|
| |
|
required |
Destroy a group, need owner‘s authority
Synchronization method will block the current thread
- Parameters
-
| aGroupId | Group id |
| pError | Error |
- Returns
- Destroyed group, return nil if fail
| - (NSArray *) fetchGroupBansList: |
|
(NSString *) |
aGroupId |
| error: |
|
(EMError **) |
pError |
|
|
| |
|
required |
Get group‘s blacklist, need owner’s authority
Synchronization method will block the current thread
- Parameters
-
| aGroupId | Group id |
| pError | Error |
- Returns
- Group blacklist<NSString>
| - (EMGroup *) fetchGroupInfo: |
|
(NSString *) |
aGroupId |
| includeMembersList: |
|
(BOOL) |
aIncludeMembersList |
| error: |
|
(EMError **) |
pError |
|
|
| |
|
required |
Fetch group info
Synchronization method will block the current thread
- Parameters
-
| aGroupId | Group id |
| aIncludeMembersList | Whether get member list |
| pError | Error |
- Returns
- Group instance
| - (NSArray *) getAllGroups |
|
|
|
|
required |
Get all groups, will load from DB if not exist in memory
- Returns
- Group list<EMGroup>
| - (NSArray *) getAllIgnoredGroupIds |
|
|
|
|
required |
Get ID list of groups which block push from memory
- Returns
- Group id list<NSString>
| - (NSArray *) getMyGroupsFromServerWithError: |
|
(EMError **) |
pError |
|
|
required |
Get all of user's groups from server, will update group list in memory and DB after success
Synchronization method will block the current thread
- Parameters
-
- Returns
- Group list<EMGroup>
| - (EMCursorResult *) getPublicGroupsFromServerWithCursor: |
|
(NSString *) |
aCursor |
| pageSize: |
|
(NSInteger) |
aPageSize |
| error: |
|
(EMError **) |
pError |
|
|
| |
|
required |
Get public groups in the specified range from the server
Synchronization method will block the current thread
- Parameters
-
| aCursor | Cursor, input nil the first time |
| aPageSize | Expect result count, will return all results if < 0 |
| pError | Error |
- Returns
- The result
| - (EMError *) ignoreGroupPush: |
|
(NSString *) |
aGroupId |
| ignore: |
|
(BOOL) |
aIsIgnore |
|
|
| |
|
required |
Block / unblock group message‘s push notification
Synchronization method will block the current thread
- Parameters
-
| aGroupId | Group id |
| aIgnore | Whether block |
- Returns
- Error
| - (EMGroup *) joinPublicGroup: |
|
(NSString *) |
aGroupId |
| error: |
|
(EMError **) |
pError |
|
|
| |
|
required |
Join a public group, group style should be EMGroupStylePublicOpenJoin
Synchronization method will block the current thread
- Parameters
-
| aGroupId | Public group id |
| pError | Error |
- Returns
- Joined public group
| - (EMGroup *) leaveGroup: |
|
(NSString *) |
aGroupId |
| error: |
|
(EMError **) |
pError |
|
|
| |
|
required |
Leave a group, owner can't leave the group, can only destroy the group
Synchronization method will block the current thread
- Parameters
-
| aGroupId | Group id |
| pError | Error |
- Returns
- Leaved group, return nil if fail
| - (NSArray *) loadAllMyGroupsFromDB |
|
|
|
|
required |
Load all groups from DB, will update group list in memory after loading
- Returns
- Group list<EMGroup>
| - (void) removeDelegate: |
|
(id) |
aDelegate |
|
|
required |
Remove delegate
- Parameters
-
| - (EMGroup *) removeOccupants: |
|
(NSArray *) |
aOccupants |
| fromGroup: |
|
(NSString *) |
aGroupId |
| error: |
|
(EMError **) |
pError |
|
|
| |
|
required |
Remove members from group, need owner‘s authority
Synchronization method will block the current thread
- Parameters
-
| aOccupants | Users to be removed |
| aGroupId | Group id |
| pError | Error |
- Returns
- Group instance
| - (EMGroup *) searchPublicGroupWithId: |
|
(NSString *) |
aGroundId |
| error: |
|
(EMError **) |
pError |
|
|
| |
|
required |
Search public group with the id
Synchronization method will block the current thread
- Parameters
-
| aGroundId | Group id |
| pError | Error |
- Returns
- The group with the id
| - (EMGroup *) unblockGroup: |
|
(NSString *) |
aGroupId |
| error: |
|
(EMError **) |
pError |
|
|
| |
|
required |
Unblock group message
Synchronization method will block the current thread
- Parameters
-
| aGroupId | Group id |
| pError | Error |
- Returns
- Group instance
| - (EMGroup *) unblockOccupants: |
|
(NSArray *) |
aOccupants |
| forGroup: |
|
(NSString *) |
aGroupId |
| error: |
|
(EMError **) |
pError |
|
|
| |
|
required |
Remove users from group‘s blacklist, need owner‘s authority
Synchronization method will block the current thread
- Parameters
-
| aOccupants | Users to be removed |
| aGroupId | Group id |
| pError | Error |
- Returns
- Group instance
The documentation for this protocol was generated from the following file: