#import <IAgoraChatContactManager.h>
◆ acceptInvitationForUsername:
- (AgoraChatError *_Nullable) acceptInvitationForUsername: |
|
(NSString *_Nonnull) |
aUsername |
|
|
required |
Accepts a friend request.
This is a synchronous method and blocks the current thread.
- Parameters
-
aUsername | The user who initiated the friend request. |
- Returns
- The error information if the method fails: Error.
◆ addContact:message:
- (AgoraChatError *_Nullable) addContact: |
|
(NSString *_Nonnull) |
aUsername |
message: |
|
(NSString *_Nullable) |
aMessage |
|
|
| |
|
required |
Adds a contact with invitation message.
This is a synchronous method and blocks the current thread.
- Parameters
-
aUsername | The user to add contact. |
aMessage | (optional) The invitation message. Sets the parameter as nil if you want to ignore the information. |
- Returns
- The error information if the method fails: Error.
◆ addContact:message:completion:
- (void) addContact: |
|
(NSString *_Nonnull) |
aUsername |
message: |
|
(NSString *_Nullable) |
aMessage |
completion: |
|
(void(^)(NSString *_Nullable aUsername, AgoraChatError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Adds a contact.
This is an asynchronous method.
- Parameters
-
aUsername | The user to be added as a contact. |
aMessage | The invitation message. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ addDelegate:delegateQueue:
Adds delegate.
- Parameters
-
aDelegate | The delegate to be added. |
aQueue | (optional) The queue of calling delegate methods. You need to set this parameter as nil to run on main thread. |
◆ addUserToBlackList:
- (AgoraChatError *_Nullable) addUserToBlackList: |
|
(NSString *_Nonnull) |
aUsername |
|
|
required |
Adds a user to the blocklist.
This is a synchronous method and blocks the current thread.
- Parameters
-
aUsername | The user to be added into the blocklist. |
- Returns
- The error information if the method fails: Error.
◆ addUserToBlackList:completion:
Adds a user to the blocklist.
This is an asynchronous method.
- Parameters
-
aUsername | The user to be added into the blocklist. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ approveFriendRequestFromUser:completion:
- (void) approveFriendRequestFromUser: |
|
(NSString *_Nonnull) |
aUsername |
completion: |
|
(void(^)(NSString *_Nullable aUsername, AgoraChatError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Approves a friend request.
This is an asynchronous method.
- Parameters
-
aUsername | The user who initiated the friend request. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ declineFriendRequestFromUser:completion:
- (void) declineFriendRequestFromUser: |
|
(NSString *_Nonnull) |
aUsername |
completion: |
|
(void(^)(NSString *aUsername, AgoraChatError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Declines a friend request.
This is an asynchronous method.
- Parameters
-
aUsername | The user who initiated the friend request. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ declineInvitationForUsername:
- (AgoraChatError *_Nullable) declineInvitationForUsername: |
|
(NSString *_Nonnull) |
aUsername |
|
|
required |
Declines a friend request.
This is a synchronous method and blocks the current thread.
- Parameters
-
aUsername | The user who initiates the friend request. |
- Returns
- The error information if the method fails: Error.
Please use this new method.
- (void)declineFriendRequestFromUser:(NSString *)aUsername completion:(void (^)(NSString *aUsername, AgoraChatError *aError))aCompletionBlock;
◆ deleteContact:isDeleteConversation:
- (AgoraChatError *_Nullable) deleteContact: |
|
(NSString *_Nonnull) |
aUsername |
isDeleteConversation: |
|
(BOOL) |
aIsDeleteConversation |
|
|
| |
|
required |
Deletes a contact.
This is a synchronous method and blocks the current thread.
- Parameters
-
aUsername | The contact to be deleted. |
aIsDeleteConversation | Whether to keep the associated conversation and messages. Yes means delete the contact and synchronisely delete the conversations between the contact and the user. No means don't delete the conversations when deleting the contact. |
- Returns
- The error information if the method fails: Error.
◆ deleteContact:isDeleteConversation:completion:
- (void) deleteContact: |
|
(NSString *_Nonnull) |
aUsername |
isDeleteConversation: |
|
(BOOL) |
aIsDeleteConversation |
completion: |
|
(void(^)(NSString *_Nullable aUsername, AgoraChatError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Deletes a contact.
This is an asynchronous method.
- Parameters
-
aUsername | The contact to be deleted. |
aIsDeleteConversation | Whether to delete the related conversation. Yes means delete the contact and synchronisely delete the conversations between the contact and the user. No means don't delete the conversations when deleting the contact. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ getAllContacts
Gets all contacts from the local database␈.
This is a synchronous method and blocks the current thread.
- Returns
- The contact NSArray.
◆ getAllContactsFromServerWithCompletion:
- (void) getAllContactsFromServerWithCompletion: |
|
(void(^)(NSArray< AgoraChatContact * > *_Nullable aList, AgoraChatError *_Nullable aError)) |
aCompletionBlock |
|
|
required |
Gets all contacts from the server.
This is an asynchronous method.
- Parameters
-
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ getBlackList
- (NSArray< NSString * > *_Nullable) getBlackList |
|
|
|
|
required |
Gets the list of blocked users from local database. This is a synchronous method and blocks the current thread.
- Returns
- The blocklist usernames NSArray. See <NSString>.
◆ getBlackListFromServerWithCompletion:
- (void) getBlackListFromServerWithCompletion: |
|
(void(^)(NSArray< NSString * > *_Nullable aList, AgoraChatError *_Nullable aError)) |
aCompletionBlock |
|
|
required |
Gets the blocklist from the server.
This is an asynchronous method.
- Parameters
-
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ getBlackListFromServerWithError:
- (NSArray< NSString * > *_Nullable) getBlackListFromServerWithError: |
|
(AgoraChatError **_Nullable) |
pError |
|
|
required |
Gets the blocklist from the server.
This is a synchronous method and blocks the current thread.
- Parameters
-
pError | The error information if the method fails: Error. |
- Returns
- The blocklist NSArray.
◆ getContact:
Gets contact by userId.
This is a synchronous method.
- Parameters
-
userId | The contact userId. |
- Returns
- The contact info of userId.
◆ getContacts
- (NSArray< NSString * > *_Nullable) getContacts |
|
|
|
|
required |
Gets all contacts from the local database␈.
This is a synchronous method and blocks the current thread.
- Returns
- The contact NSArray.
◆ getContactsFromServerWithCompletion:
- (void) getContactsFromServerWithCompletion: |
|
(void(^)(NSArray< NSString * > *_Nullable aList, AgoraChatError *aError_Nullable)) |
aCompletionBlock |
|
|
required |
Gets all contacts from the server.
This is an asynchronous method.
- Parameters
-
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ getContactsFromServerWithCursor:pageSize:completion:
Gets all contacts from the server by page.
This is an asynchronous method.
- Parameters
-
cursor | cursor |
pageSize | page size |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ getContactsFromServerWithError:
- (NSArray< NSString * > *_Nullable) getContactsFromServerWithError: |
|
(AgoraChatError **_Nullable) |
pError |
|
|
required |
Gets all the contacts from the server.
This is a synchronous method and blocks the current thread.
- Parameters
-
pError | The error information if the method fails: Error. |
- Returns
- The contact NSArray.
◆ getSelfIdsOnOtherPlatformWithCompletion:
- (void) getSelfIdsOnOtherPlatformWithCompletion: |
|
(void(^)(NSArray< NSString * > *_Nullable aList, AgoraChatError *_Nullable aError)) |
aCompletionBlock |
|
|
required |
Gets the ID list of the current account on another platform (Windows or Web) The ID usage is similar to friend username.
This is an asynchronous method.
- Parameters
-
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ getSelfIdsOnOtherPlatformWithError:
- (NSArray< NSString * > *_Nullable) getSelfIdsOnOtherPlatformWithError: |
|
(AgoraChatError **_Nullable) |
pError |
|
|
required |
Gets the ID list of the current account on another platform (Windows or Web) The ID usage is similar to friend username.
This is a synchronous method and blocks the current thread.
- Parameters
-
pError | The error information if the method fails: Error. |
- Returns
- The ID NSArray. See <NSString>.
◆ removeDelegate:
- (void) removeDelegate: |
|
(id _Nonnull) |
aDelegate |
|
|
required |
Removes delegate.
- Parameters
-
aDelegate | The delegate to be removed. |
◆ removeUserFromBlackList:
- (AgoraChatError *_Nullable) removeUserFromBlackList: |
|
(NSString *_Nonnull) |
aUsername |
|
|
required |
Removes the user out of the blocklist.
This is a synchronous method and blocks the current thread.
- Parameters
-
aUsername | The user to be removed from the blocklist. |
- Returns
- The error information if the method fails: Error.
◆ removeUserFromBlackList:completion:
Removes the user from the blocklist.
This is an asynchronous method.
- Parameters
-
aUsername | The user to be removed from the blocklist. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
◆ setContactRemark:remark:completion:
- (void) setContactRemark: |
|
(NSString *_Nonnull) |
userId |
remark: |
|
(NSString *_Nullable) |
remark |
completion: |
|
(void(^)(AgoraChatContact *_Nullable contact, AgoraChatError *_Nullable aError)) |
aCompletionBlock |
|
|
| |
|
required |
Set remark for contact.
This is an asynchronous method.
- Parameters
-
userId | The contact userId. |
remark | The remark information. |
aCompletionBlock | The completion block, which contains the error message if the method fails. |
The documentation for this protocol was generated from the following file: