#import <IAgoraContactManager.h>
Get all the friends from the DB
- Returns
- Contact NSArray<NSString>
Get the blacklist from the DB
- Returns
- NSArray<NSString>
- (AgoraError *) 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
- (AgoraError *) 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
- (void) addContact: |
|
(NSString *) |
aUsername |
message: |
|
(NSString *) |
aMessage |
completion: |
|
(void(^)(NSString *aUsername, AgoraError *aError)) |
aCompletionBlock |
|
|
| |
|
required |
Add a contact
- Parameters
-
aUsername | The user to be added |
aMessage | Friend request message |
aCompletionBlock | The callback block of completion |
- (void) addDelegate: |
|
(3_1_0) |
|
|
|
(3_2_2) |
|
|
|
("Use - instead") |
EM_DEPRECATED_IOS[IAgoraContactManager addDelegate:delegateQueue:] |
|
|
| |
|
required |
Add delegate
- Parameters
-
aDelegate | Delegate to be add |
aQueue | (optional) The queue of calling delegate methods. Pass in nil to run on main thread. |
- (AgoraError *) addUserToBlackList: |
|
(NSString *) |
aUsername |
|
|
required |
Add a user to blacklist
Synchronization method will block the current thread
- Parameters
-
- Returns
- Error
Add a user to blacklist
- Parameters
-
aUsername | Block user |
aCompletionBlock | The callback block of completion |
- (AgoraError *) addUserToBlackList: |
|
(NSString *) |
aUsername |
relationshipBoth: |
|
(3_2_3) |
|
|
|
(3_6_2) |
|
|
|
("Use - instead") |
EM_DEPRECATED_IOS[IAgoraContactManager 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
- (void) approveFriendRequestFromUser: |
|
(NSString *) |
aUsername |
completion: |
|
(void(^)(NSString *aUsername, AgoraError *aError)) |
aCompletionBlock |
|
|
| |
|
required |
Apporove a friend request
- Parameters
-
aUsername | User who initiated the friend request |
aCompletionBlock | The callback block of completion |
Agree invitation
- Parameters
-
aUsername | Applicant |
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of 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 |
- (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 |
Decline invitation
- Parameters
-
aUsername | Applicant |
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of 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 |
Get the blacklist from the server
- Parameters
-
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of failure |
Get all the friends from the server
- Parameters
-
aSuccessBlock | The callback block of success |
aFailureBlock | The callback block of 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 |
- (void) declineFriendRequestFromUser: |
|
(NSString *) |
aUsername |
completion: |
|
(void(^)(NSString *aUsername, AgoraError *aError)) |
aCompletionBlock |
|
|
| |
|
required |
Decline a friend request
- Parameters
-
aUsername | User who initiated the friend request |
aCompletionBlock | The callback block of completion |
- (AgoraError *) 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, AgoraError *aError))aCompletionBlock;
- (AgoraError *) 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
- (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 |
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
- (void) deleteContact: |
|
(NSString *) |
aUsername |
isDeleteConversation: |
|
(BOOL) |
aIsDeleteConversation |
completion: |
|
(void(^)(NSString *aUsername, AgoraError *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 |
- (NSArray *) getBlackList |
|
|
|
|
required |
Get the blacklist of blocked users from local database
- Returns
- NSArray<NSString> blacklist usernames
- (void) getBlackListFromServerWithCompletion: |
|
(void(^)(NSArray *aList, AgoraError *aError)) |
aCompletionBlock |
|
|
required |
Get the blacklist from the server
- Parameters
-
aCompletionBlock | The callback block of completion |
- Returns
- aList<NSString> blacklist usernames
- (NSArray *) getBlackListFromServerWithError: |
|
(AgoraError **) |
pError |
|
|
required |
Get the blacklist from the server
Synchronization method will block the current thread
- Parameters
-
- Returns
- NSArray<NSString>
- (NSArray *) getContacts |
|
|
|
|
required |
Get all contacts from local database
- Returns
- Contact NSArray<NSString>
- (void) getContactsFromServerWithCompletion: |
|
(void(^)(NSArray *aList, AgoraError *aError)) |
aCompletionBlock |
|
|
required |
Get all contacts from the server
- Parameters
-
aCompletionBlock | The callback block of completion |
- (NSArray *) getContactsFromServerWithError: |
|
(AgoraError **) |
pError |
|
|
required |
Get all the contacts from the server
Synchronization method will block the current thread
- Parameters
-
- Returns
- Contact NSArray<NSString>
- (void) getSelfIdsOnOtherPlatformWithCompletion: |
|
(void(^)(NSArray *aList, AgoraError *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 |
- (NSArray *) getSelfIdsOnOtherPlatformWithError: |
|
(AgoraError **) |
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>
- (void) removeDelegate: |
|
(id) |
aDelegate |
|
|
required |
Remove delegate
- Parameters
-
- (AgoraError *) removeUserFromBlackList: |
|
(NSString *) |
aUsername |
|
|
required |
Remove user out of blacklist
Synchronization method will block the current thread
- Parameters
-
- Returns
- Error
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: