#import <IEMContactManager.h>
◆ __deprecated_msg [1/2]
Get all the friends from the DB
- Returns
- Contact NSArray<NSString>
◆ __deprecated_msg [2/2]
Get the blacklist from the DB
- Returns
- NSArray<NSString>
◆ acceptInvitationForUsername:
- (EMError *) acceptInvitationForUsername: |
|
(NSString *) |
aUsername |
|
|
required |
Accept a friend request
Synchronization method will block the current thread
- Parameters
-
aUsername | User who initiated the friend request |
- Returns
- Error
◆ addContact:message:
- (EMError *) addContact: |
|
(NSString *) |
aUsername |
message: |
|
(NSString *) |
aMessage |
|
|
| |
|
required |
Add a contact with invitation message
Synchronization method will block the current thread
- Parameters
-
aUsername | The user to add |
aMessage | (optional) Invitation message. Pass in nil to ignore. |
- Returns
- Error
◆ addContact:message:completion:
- (void) addContact: |
|
(NSString *) |
aUsername |
message: |
|
(NSString *) |
aMessage |
completion: |
|
(void(^)(NSString *aUsername, EMError *aError)) |
aCompletionBlock |
|
|
| |
|
required |
Add a contact
- Parameters
-
aUsername | The user to be added |
aMessage | Friend request message |
aCompletionBlock | The callback block of completion |
◆ addDelegate:
- (void) addDelegate: |
|
(3_1_0) |
|
|
|
(3_2_2) |
|
|
|
("Use - instead") |
EM_DEPRECATED_IOS[IEMContactManager addDelegate:delegateQueue:] |
|
|
| |
|
required |
◆ addDelegate:delegateQueue:
Add delegate
- Parameters
-
aDelegate | Delegate to be add |
aQueue | (optional) The queue of calling delegate methods. Pass in nil to run on main thread. |
◆ addUserToBlackList:
- (EMError *) addUserToBlackList: |
|
(NSString *) |
aUsername |
|
|
required |
Add a user to blacklist
Synchronization method will block the current thread
- Parameters
-
- Returns
- Error
◆ addUserToBlackList:completion:
Add a user to blacklist
- Parameters
-
aUsername | Block user |
aCompletionBlock | The callback block of completion |
◆ addUserToBlackList:relationshipBoth:
- (EMError *) addUserToBlackList: |
|
(NSString *) |
aUsername |
relationshipBoth: |
|
(3_2_3) |
|
|
|
(3_6_2) |
|
|
|
("Use - instead") |
EM_DEPRECATED_IOS[IEMContactManager addUserToBlackList:] |
|
|
| |
|
required |
Add a user to blacklist
Synchronization method will block the current thread
- Parameters
-
aUsername | Block user |
aBoth | if aBoth is YES, then hide user and block messages from blocked user; if NO, then hide user from blocked user |
- Returns
- Error
◆ approveFriendRequestFromUser:completion:
- (void) approveFriendRequestFromUser: |
|
(NSString *) |
aUsername |
completion: |
|
(void(^)(NSString *aUsername, EMError *aError)) |
aCompletionBlock |
|
|
| |
|
required |
Apporove a friend request
- Parameters
-
aUsername | User who initiated the friend request |
aCompletionBlock | The callback block of completion |
◆ asyncAcceptInvitationForUsername:success:failure:
Agree invitation
- Parameters
-
aUsername | Applicant |
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of failure |
◆ asyncAddContact:message:success:failure:
- (void) asyncAddContact: |
|
(NSString *) |
aUsername |
message: |
|
(NSString *) |
aMessage |
success: |
|
(void(^)()) |
aSuccessBlock |
failure: |
|
("Use -addContact:message:completion: instead") |
__deprecated_msg |
|
|
| |
|
required |
Add a contact
- Parameters
-
aUsername | The user to add |
aMessage | Friend invitation message |
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of failure |
◆ asyncAddUserToBlackList:relationshipBoth:success:failure:
- (void) asyncAddUserToBlackList: |
|
(NSString *) |
aUsername |
relationshipBoth: |
|
(BOOL) |
aBoth |
success: |
|
(void(^)()) |
aSuccessBlock |
failure: |
|
("Use -addUserToBlackList:completion: instead") |
__deprecated_msg |
|
|
| |
|
required |
Add user to blacklist
- Parameters
-
aUsername | The user to add |
aBoth | Whether block messages from me to the user which is added to the black list |
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of failure |
◆ asyncDeclineInvitationForUsername:success:failure:
Decline invitation
- Parameters
-
aUsername | Applicant |
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of failure |
◆ asyncDeleteContact:success:failure:
- (void) asyncDeleteContact: |
|
(NSString *) |
aUsername |
success: |
|
(void(^)()) |
aSuccessBlock |
failure: |
|
("Use -deleteContact:completion: instead") |
__deprecated_msg |
|
|
| |
|
required |
Delete friend
- Parameters
-
aUsername | The user to be delete |
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of failure |
◆ asyncGetBlackListFromServer:failure:
Get the blacklist from the server
- Parameters
-
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of failure |
◆ asyncGetContactsFromServer:failure:
Get all the friends from the server
- Parameters
-
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of failure |
◆ asyncRemoveUserFromBlackList:success:failure:
- (void) asyncRemoveUserFromBlackList: |
|
(NSString *) |
aUsername |
success: |
|
(void(^)()) |
aSuccessBlock |
failure: |
|
("Use -removeUserFromBlackList:completion: instead") |
__deprecated_msg |
|
|
| |
|
required |
Remove user from blacklist
- Parameters
-
aUsername | The user to remove from blacklist |
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of failure |
◆ declineFriendRequestFromUser:completion:
- (void) declineFriendRequestFromUser: |
|
(NSString *) |
aUsername |
completion: |
|
(void(^)(NSString *aUsername, EMError *aError)) |
aCompletionBlock |
|
|
| |
|
required |
Decline a friend request
- Parameters
-
aUsername | User who initiated the friend request |
aCompletionBlock | The callback block of completion |
◆ declineInvitationForUsername:
- (EMError *) declineInvitationForUsername: |
|
(NSString *) |
aUsername |
|
|
required |
Decline a friend request
Synchronization method will block the current thread
- Parameters
-
aUsername | User who initiated the friend request |
- Returns
- Error
Please use the new method
- (void)declineFriendRequestFromUser:(NSString *)aUsername completion:(void (^)(NSString *aUsername, EMError *aError))aCompletionBlock;
◆ deleteContact:
- (EMError *) deleteContact: |
|
("Use -deleteContact:username:isDeleteConversation: instead") |
__deprecated_msg |
|
|
required |
Delete a contact
Synchronization method will block the current thread
- Parameters
-
aUsername | The user to delete |
- Returns
- Error
◆ deleteContact:completion:
- (void) deleteContact: |
|
(NSString *) |
aUsername |
completion: |
|
("Use -deleteContact:username:isDeleteConversation: instead") |
__deprecated_msg |
|
|
| |
|
required |
Delete a contact
- Parameters
-
aUsername | The user to be deleted |
aCompletionBlock | The callback block of completion |
◆ deleteContact:isDeleteConversation:
Delete a contact
Synchronization method will block the current thread
- Parameters
-
aUsername | The user to delete |
aIsDeleteConversation | whether to keep the assoicated conversation and messages |
- Returns
- Error
◆ deleteContact:isDeleteConversation:completion:
- (void) deleteContact: |
|
(NSString *) |
aUsername |
isDeleteConversation: |
|
(BOOL) |
aIsDeleteConversation |
completion: |
|
(void(^)(NSString *aUsername, EMError *aError)) |
aCompletionBlock |
|
|
| |
|
required |
Delete a contact
- Parameters
-
aUsername | The user to be deleted |
aIsDeleteConversation | Delete the conversation or not |
aCompletionBlock | The callback block of completion |
◆ getBlackList
- (NSArray *) getBlackList |
|
|
|
|
required |
Get the blacklist of blocked users from local database
- Returns
- NSArray<NSString> blacklist usernames
◆ getBlackListFromServerWithCompletion:
- (void) getBlackListFromServerWithCompletion: |
|
(void(^)(NSArray *aList, EMError *aError)) |
aCompletionBlock |
|
|
required |
Get the blacklist from the server
- Parameters
-
aCompletionBlock | The callback block of completion |
- Returns
- aList<NSString> blacklist usernames
◆ getBlackListFromServerWithError:
- (NSArray *) getBlackListFromServerWithError: |
|
(EMError **) |
pError |
|
|
required |
Get the blacklist from the server
Synchronization method will block the current thread
- Parameters
-
- Returns
- NSArray<NSString>
◆ getContacts
- (NSArray *) getContacts |
|
|
|
|
required |
Get all contacts from local database
- Returns
- Contact NSArray<NSString>
◆ getContactsFromServerWithCompletion:
- (void) getContactsFromServerWithCompletion: |
|
(void(^)(NSArray *aList, EMError *aError)) |
aCompletionBlock |
|
|
required |
Get all contacts from the server
- Parameters
-
aCompletionBlock | The callback block of completion |
◆ getContactsFromServerWithError:
- (NSArray *) getContactsFromServerWithError: |
|
(EMError **) |
pError |
|
|
required |
Get all the contacts from the server
Synchronization method will block the current thread
- Parameters
-
- Returns
- Contact NSArray<NSString>
◆ getSelfIdsOnOtherPlatformWithCompletion:
- (void) getSelfIdsOnOtherPlatformWithCompletion: |
|
(void(^)(NSArray *aList, EMError *aError)) |
aCompletionBlock |
|
|
required |
Get the id list of the current account on another platform (Windows or Web) Id usage is similar to friend username
- Parameters
-
aCompletionBlock | The callback block of completion |
◆ getSelfIdsOnOtherPlatformWithError:
- (NSArray *) getSelfIdsOnOtherPlatformWithError: |
|
(EMError **) |
pError |
|
|
required |
Get the id list of the current account on another platform (Windows or Web) Id usage is similar to friend username
- Parameters
-
- Returns
- NSArray<NSString>
◆ removeDelegate:
- (void) removeDelegate: |
|
(id) |
aDelegate |
|
|
required |
Remove delegate
- Parameters
-
◆ removeUserFromBlackList:
- (EMError *) removeUserFromBlackList: |
|
(NSString *) |
aUsername |
|
|
required |
Remove user out of blacklist
Synchronization method will block the current thread
- Parameters
-
- Returns
- Error
◆ removeUserFromBlackList:completion:
Remove a user from blacklist
- Parameters
-
aUsername | Unblock user |
aCompletionBlock | The callback block of completion |
The documentation for this protocol was generated from the following file: