Chat SDK for Unity and Windows v1.2.0
|
Public Member Functions | |
void | AddContact (string userId, string reason=null, CallBack callback=null) |
void | DeleteContact (string userId, bool keepConversation=false, CallBack callback=null) |
void | GetAllContactsFromServer (ValueCallBack< List< string > > callback=null) |
List< string > | GetAllContactsFromDB () |
void | AddUserToBlockList (string userId, CallBack callback=null) |
void | RemoveUserFromBlockList (string userId, CallBack callback=null) |
void | GetBlockListFromServer (ValueCallBack< List< string > > callback=null) |
List< string > | GetBlockListFromDB () |
void | AcceptInvitation (string userId, CallBack callback=null) |
void | DeclineInvitation (string userId, CallBack callback=null) |
void | GetSelfIdsOnOtherPlatform (ValueCallBack< List< string > > callback=null) |
void | AddContactManagerDelegate (IContactManagerDelegate contactManagerDelegate) |
void | RemoveContactManagerDelegate (IContactManagerDelegate contactManagerDelegate) |
The contact manager class, which manages chat contacts such as adding, retrieving, and deleting contacts.
void AgoraChat.ContactManager.AddContact | ( | string | userId, |
string | reason = null , |
||
CallBack | callback = null |
||
) |
Adds a new contact.
This is an asynchronous method.
userId | The user ID of the contact to add. |
reason | The invitation message. This parameter is optional and can be set to null or "". |
callback | The result callback. See CallBack . |
void AgoraChat.ContactManager.DeleteContact | ( | string | userId, |
bool | keepConversation = false , |
||
CallBack | callback = null |
||
) |
Deletes a contact and all the related conversations.
This is an asynchronous method.
userId | The user ID of the contact to delete. |
keepConversation | Whether to retain conversations of the contact to delete.
|
callback | The result callback. See CallBack . |
void AgoraChat.ContactManager.GetAllContactsFromServer | ( | ValueCallBack< List< string > > | callback = null | ) |
Gets the contact list from the server.
This is an asynchronous method.
callback | The result callback. If success, the SDK returns the list of contacts; if a failure occurs, the SDK returns the error information. See ValueCallBack . |
List< string > AgoraChat.ContactManager.GetAllContactsFromDB | ( | ) |
Gets the contact list from the local database.
void AgoraChat.ContactManager.AddUserToBlockList | ( | string | userId, |
CallBack | callback = null |
||
) |
Adds a contact to the block list. You can send messages to the users on the block list, but cannot receive messages from them.
This is an asynchronous method.
userId | The user ID of the contact to be added to the block list. |
callback | The result callback. See CallBack . |
void AgoraChat.ContactManager.RemoveUserFromBlockList | ( | string | userId, |
CallBack | callback = null |
||
) |
Removes the contact from the block list.
This is an asynchronous method.
userId | The user ID of the contact to be removed from the block list. |
callback | The result callback. See CallBack . |
void AgoraChat.ContactManager.GetBlockListFromServer | ( | ValueCallBack< List< string > > | callback = null | ) |
Gets the block list from the server.
This is an asynchronous method.
callback | The result callback. If success, the SDK returns the block list; if a failure occurs, the SDK returns the error information. See ValueCallBack . |
List< string > AgoraChat.ContactManager.GetBlockListFromDB | ( | ) |
Gets the local blocklist.
void AgoraChat.ContactManager.AcceptInvitation | ( | string | userId, |
CallBack | callback = null |
||
) |
Accepts a friend invitation.
This an asynchronous method.
userId | The user who initiates the friend invitation. |
callback | The result callback. See CallBack . |
void AgoraChat.ContactManager.DeclineInvitation | ( | string | userId, |
CallBack | callback = null |
||
) |
Declines a friend invitation.
This an asynchronous method.
userId | The user who initiates the friend invitation. |
callback | The result callback. See CallBack . |
void AgoraChat.ContactManager.GetSelfIdsOnOtherPlatform | ( | ValueCallBack< List< string > > | callback = null | ) |
Gets the unique IDs of the current user on the other devices.
The ID is in the format of user ID + "/" + resource.
This is an asynchronous method.
callback | The result callback. If success, the SDK returns the unique IDs of the current user on the other devices; if a failure occurs, the SDK returns the error information. See ValueCallBack . |
void AgoraChat.ContactManager.AddContactManagerDelegate | ( | IContactManagerDelegate | contactManagerDelegate | ) |
Adds a contact listener.
contactManagerDelegate | The contact listener to add. It is inherited from IContactManagerDelegate . |
void AgoraChat.ContactManager.RemoveContactManagerDelegate | ( | IContactManagerDelegate | contactManagerDelegate | ) |
Removes a contact listener.
contactManagerDelegate | The contact listener to remove. It is inherited from IContactManagerDelegate . |