Chat SDK for Unity and Windows v1.3.0
|
Public Member Functions | |
void | applyJoinToGroup (string groupId, string reason="", CallBack callback=null) |
void | AcceptGroupInvitation (string groupId, ValueCallBack< Group > callback=null) |
void | AcceptGroupJoinApplication (string groupId, string userId, CallBack callback=null) |
void | AddGroupAdmin (string groupId, string memberId, CallBack callback=null) |
void | AddGroupMembers (string groupId, List< string > newmembers, CallBack callback=null) |
void | AddGroupAllowList (string groupId, List< string > members, CallBack callback=null) |
void | BlockGroup (string groupId, CallBack callback=null) |
void | BlockGroupMembers (string groupId, List< string > members, CallBack callback=null) |
void | ChangeGroupDescription (string groupId, string desc, CallBack callback=null) |
void | ChangeGroupName (string groupId, string name, CallBack callback=null) |
void | ChangeGroupOwner (string groupId, string newOwner, CallBack callback=null) |
void | CheckIfInGroupAllowList (string groupId, ValueCallBack< bool > callback=null) |
void | CreateGroup (string groupName, GroupOptions options, string desc=null, List< string > inviteMembers=null, string inviteReason=null, ValueCallBack< Group > callback=null) |
void | DeclineGroupInvitation (string groupId, string reason=null, CallBack callback=null) |
void | DeclineGroupJoinApplication (string groupId, string userId, string reason=null, CallBack callback=null) |
void | DestroyGroup (string groupId, CallBack callback=null) |
void | DownloadGroupSharedFile (string groupId, string fileId, string savePath, CallBack callback=null) |
void | GetGroupAnnouncementFromServer (string groupId, ValueCallBack< string > callback=null) |
void | GetGroupBlockListFromServer (string groupId, int pageNum=1, int pageSize=200, ValueCallBack< List< string > > callback=null) |
void | GetGroupFileListFromServer (string groupId, int pageNum=1, int pageSize=200, ValueCallBack< List< GroupSharedFile > > callback=null) |
void | GetGroupMemberListFromServer (string groupId, int pageSize=200, string cursor="", ValueCallBack< CursorResult< string > > callback=null) |
void | GetGroupMuteListFromServer (string groupId, int pageNum=1, int pageSize=200, ValueCallBack< Dictionary< string, long > > callback=null) |
void | GetGroupSpecificationFromServer (string groupId, ValueCallBack< Group > callback=null) |
void | GetGroupAllowListFromServer (string groupId, ValueCallBack< List< string > > callback=null) |
Group | GetGroupWithId (string groupId) |
List< Group > | GetJoinedGroups () |
void | FetchJoinedGroupsFromServer (int pageNum=0, int pageSize=20, bool needAffiliations=false, bool needRole=false, ValueCallBack< List< Group > > callback=null) |
void | FetchJoinedGroupsFromServer (int pageNum=0, int pageSize=20, ValueCallBack< List< Group > > callback=null) |
void | FetchPublicGroupsFromServer (int pageSize=200, string cursor="", ValueCallBack< CursorResult< GroupInfo > > callback=null) |
void | JoinPublicGroup (string groupId, CallBack callback=null) |
void | LeaveGroup (string groupId, CallBack callback=null) |
void | MuteGroupAllMembers (string groupId, CallBack callback=null) |
void | MuteGroupMembers (string groupId, List< string > members, long muteMilliseconds=-1, CallBack callback=null) |
void | RemoveGroupAdmin (string groupId, string memberId, CallBack callback=null) |
void | DeleteGroupSharedFile (string groupId, string fileId, CallBack callback=null) |
void | DeleteGroupMembers (string groupId, List< string > members, CallBack callback=null) |
void | RemoveGroupAllowList (string groupId, List< string > members, CallBack callback=null) |
void | UnBlockGroup (string groupId, CallBack callback=null) |
void | UnBlockGroupMembers (string groupId, List< string > members, CallBack callback=null) |
void | UnMuteGroupAllMembers (string groupId, CallBack callback=null) |
void | UnMuteGroupMembers (string groupId, List< string > members, CallBack callback=null) |
void | UpdateGroupAnnouncement (string groupId, string announcement, CallBack callback=null) |
void | UpdateGroupExt (string groupId, string ext, CallBack callback=null) |
void | UploadGroupSharedFile (string groupId, string filePath, CallBack callback=null) |
void | SetMemberAttributes (string groupId, string userId, Dictionary< string, string > attrs, CallBack callback=null) |
void | FetchMemberAttributes (string groupId, List< string > userIds, List< string > attrs, ValueCallBack< Dictionary< string, Dictionary< string, string > > > callback=null) |
void | FetchMyGroupsCount (ValueCallBack< int > callback=null) |
void | AddGroupManagerDelegate (IGroupManagerDelegate groupManagerDelegate) |
void | RemoveGroupManagerDelegate (IGroupManagerDelegate groupManagerDelegate) |
The abstract class for the group manager.
void AgoraChat.GroupManager.applyJoinToGroup | ( | string | groupId, |
string | reason = "" , |
||
CallBack | callback = null |
||
) |
Requests to join a group.
This is an asynchronous method.
groupId | The group ID. |
reason | The reason for requesting to join the group. |
callback | The callback of application. See CallBack . |
void AgoraChat.GroupManager.AcceptGroupInvitation | ( | string | groupId, |
ValueCallBack< Group > | callback = null |
||
) |
Accepts a group invitation.
This is an asynchronous method.
groupId | The group ID. |
callback | The callback of acceptance. Returns the group instance which the user has accepted the invitation to join. See ValueCallBack . |
void AgoraChat.GroupManager.AcceptGroupJoinApplication | ( | string | groupId, |
string | userId, | ||
CallBack | callback = null |
||
) |
Approves a group request.
Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The group ID. |
userId | The ID of the user who sends the request to join the group. |
callback | The callback of approval. See CallBack . |
void AgoraChat.GroupManager.AddGroupAdmin | ( | string | groupId, |
string | memberId, | ||
CallBack | callback = null |
||
) |
Adds a group admin. Only the group owner, not the group admin, can call this method.
This is an asynchronous method.
groupId | The group ID. |
memberId | The new admin ID. |
callback | The callback of addition. See CallBack . |
void AgoraChat.GroupManager.AddGroupMembers | ( | string | groupId, |
List< string > | newmembers, | ||
CallBack | callback = null |
||
) |
Adds users to the group.
Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The group ID. |
newmembers | The list of new members to add. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.AddGroupAllowList | ( | string | groupId, |
List< string > | members, | ||
CallBack | callback = null |
||
) |
Adds members to the allow list.
Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The group ID. |
members | The members to be added to the allow list. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.BlockGroup | ( | string | groupId, |
CallBack | callback = null |
||
) |
Blocks group messages.
The user that blocks group messages is still a group member. They just cannot receive group messages.
This is an asynchronous method.
groupId | The group ID. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.BlockGroupMembers | ( | string | groupId, |
List< string > | members, | ||
CallBack | callback = null |
||
) |
Adds the user to the group block list.
After this method call succeeds, the user is first removed from the chat group, and then added to the group block list. Users on the chat group block list cannot send or receive group messages, nor can they re-join the chat group.
Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The group ID. |
members | The users to be added to the block list. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.ChangeGroupDescription | ( | string | groupId, |
string | desc, | ||
CallBack | callback = null |
||
) |
Changes the group description.
Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The group ID. |
desc | The new group description. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.ChangeGroupName | ( | string | groupId, |
string | name, | ||
CallBack | callback = null |
||
) |
Changes the group name.
Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The ID of group whose name is to be changed. |
name | The new group name. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.ChangeGroupOwner | ( | string | groupId, |
string | newOwner, | ||
CallBack | callback = null |
||
) |
Transfers the group ownership.
Only the group owner can call this method.
This is an asynchronous method.
groupId | The group ID. |
newOwner | The user ID of the new owner. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.CheckIfInGroupAllowList | ( | string | groupId, |
ValueCallBack< bool > | callback = null |
||
) |
Gets whether the current user is on the allow list of the group.
This is an asynchronous method.
groupId | The group ID. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.CreateGroup | ( | string | groupName, |
GroupOptions | options, | ||
string | desc = null , |
||
List< string > | inviteMembers = null , |
||
string | inviteReason = null , |
||
ValueCallBack< Group > | callback = null |
||
) |
Creates a group instance.
After the group is created, the data in the memory and database will be updated and multiple devices will receive the notification event and update the group to the memory and database.
You can set IMultiDeviceDelegate
to listen for the event.
If an event occurs, the callback function onGroupMultiDevicesEvent((MultiDevicesOperation, string, List<string>)
will be triggered.
This is an asynchronous method.
groupName | The group name. It is optional. Pass null if you do not want to set this parameter. |
options | The options for creating a group. They are optional and cannot be null . See GroupOptions . The options are as follows:
|
desc | The group description. It is optional. Pass null if you do not want to set this parameter. |
inviteMembers | The group member array. The group owner ID is optional. This parameter cannot be null . |
inviteReason | The group joining invitation. It is optional. Pass null if you do not want to set this parameter. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.DeclineGroupInvitation | ( | string | groupId, |
string | reason = null , |
||
CallBack | callback = null |
||
) |
Declines a group invitation.
This is an asynchronous method.
groupId | The group ID. |
reason | The reason for declining the group invitation. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.DeclineGroupJoinApplication | ( | string | groupId, |
string | userId, | ||
string | reason = null , |
||
CallBack | callback = null |
||
) |
Declines a group request.
Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The group ID. |
userId | The ID of the user who sends the request to join the group. |
reason | The reason for declining the group request. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.DestroyGroup | ( | string | groupId, |
CallBack | callback = null |
||
) |
Destroys the group instance.
Only the group owner can call this method.
This is an asynchronous method.
groupId | The group ID. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.DownloadGroupSharedFile | ( | string | groupId, |
string | fileId, | ||
string | savePath, | ||
CallBack | callback = null |
||
) |
Downloads the shared file of the group.
This is an asynchronous method.
groupId | The group ID. |
fileId | The ID of the shared file. |
savePath | The path to save the downloaded file. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.GetGroupAnnouncementFromServer | ( | string | groupId, |
ValueCallBack< string > | callback = null |
||
) |
Gets the group announcement from the server.
Group members can call this method.
This is an asynchronous method.
groupId | The group ID. |
callback | The operation callback. See ValueCallBack . |
void AgoraChat.GroupManager.GetGroupBlockListFromServer | ( | string | groupId, |
int | pageNum = 1 , |
||
int | pageSize = 200 , |
||
ValueCallBack< List< string > > | callback = null |
||
) |
Gets the group block list from the server with pagination.
Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The group ID. |
pageNum | The page number, starting from 1. |
pageSize | The number of members on the block list that you expect to get on each page. |
callback | The operation callback. If success, the obtained block list will be returned; otherwise, an error will be returned. See ValueCallBack . |
void AgoraChat.GroupManager.GetGroupFileListFromServer | ( | string | groupId, |
int | pageNum = 1 , |
||
int | pageSize = 200 , |
||
ValueCallBack< List< GroupSharedFile > > | callback = null |
||
) |
Gets the shared files of the group from the server.
For a large but unknown quantity of data, the server will return data with pagination as specified by pageSize
and pageNum
.
This is an asynchronous method.
groupId | The group ID. |
pageNum | The page number, starting from 1. For the last page, the actual number of returned shared files is less than the value of pageSize . |
pageSize | The number of shared files that you expect to get on each page. |
callback | The operation callback. If success, the SDK returns the list of shared files; otherwise, an error will be returned. See ValueCallBack . |
void AgoraChat.GroupManager.GetGroupMemberListFromServer | ( | string | groupId, |
int | pageSize = 200 , |
||
string | cursor = "" , |
||
ValueCallBack< CursorResult< string > > | callback = null |
||
) |
Gets the group member list from the server.
This is an asynchronous method.
groupId | The group ID. |
pageSize | The number of members that you expect to get on each page. |
cursor | The position from which to start getting data. At the first method call, if you set cursor as null , the SDK gets the data in the reverse chronological order of when users joined the group. |
callback | The operation callback. If success, the SDK returns the obtained group member list and the cursor for the next query; otherwise, an error will be returned. See ValueCallBack . |
void AgoraChat.GroupManager.GetGroupMuteListFromServer | ( | string | groupId, |
int | pageNum = 1 , |
||
int | pageSize = 200 , |
||
ValueCallBack< Dictionary< string, long > > | callback = null |
||
) |
Gets the mute list of the group from the server.
Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The group ID. |
pageNum | The page number, starting from 1. |
pageSize | The number of muted members that you expect to get on each page. |
callback | The operation callback. If success, the SDK returns the obtained mute list; otherwise, an error will be returned. See ValueCallBack . |
void AgoraChat.GroupManager.GetGroupSpecificationFromServer | ( | string | groupId, |
ValueCallBack< Group > | callback = null |
||
) |
Gets group details.
This is an asynchronous method.
groupId | The group ID. |
callback | The operation callback. If success, the SDK returns the group instance; otherwise, an error will be returned. See ValueCallBack . |
void AgoraChat.GroupManager.GetGroupAllowListFromServer | ( | string | groupId, |
ValueCallBack< List< string > > | callback = null |
||
) |
Gets the allow list of the group from the server.
Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The group ID. |
callback | The operation callback. If success, the SDK returns the obtained allow list; otherwise, an error will be returned. See ValueCallBack . |
Group AgoraChat.GroupManager.GetGroupWithId | ( | string | groupId | ) |
Gets the group instance from the memory by group ID.
groupId | The group ID. |
null
if the group does not exist. List< Group > AgoraChat.GroupManager.GetJoinedGroups | ( | ) |
Gets the list of groups that the user has joined.
This method gets the groups from the local memory and database.
void AgoraChat.GroupManager.FetchJoinedGroupsFromServer | ( | int | pageNum = 0 , |
int | pageSize = 20 , |
||
bool | needAffiliations = false , |
||
bool | needRole = false , |
||
ValueCallBack< List< Group > > | callback = null |
||
) |
Gets the list of groups with pagination.
This method gets a group list from the server, which does not contain member information.
This is an asynchronous method and blocks the current thread.
pageNum | The page number, starting from 0. |
pageSize | The number of groups that you expect to get on each page. The value range is [1,20]. |
needAffiliations | Get member count or not. |
needRole | Get role or current user in joined groups. |
callback | The operation callback. If success, the SDK returns the obtained group list; otherwise, an error will be returned. See ValueCallBack . |
void AgoraChat.GroupManager.FetchJoinedGroupsFromServer | ( | int | pageNum = 0 , |
int | pageSize = 20 , |
||
ValueCallBack< List< Group > > | callback = null |
||
) |
Gets the list of groups with pagination.
This method gets a group list from the server, which does not contain member information.
This is an asynchronous method and blocks the current thread.
pageNum | The page number, starting from 0. |
pageSize | The number of groups that you expect to get on each page. Default num is 20. |
callback | The operation callback. If success, the SDK returns the obtained group list; otherwise, an error will be returned. See ValueCallBack . |
void AgoraChat.GroupManager.FetchPublicGroupsFromServer | ( | int | pageSize = 200 , |
string | cursor = "" , |
||
ValueCallBack< CursorResult< GroupInfo > > | callback = null |
||
) |
Gets public groups from the server with pagination.
This is an asynchronous method.
pageSize | The number of public groups that you expect to get on each page. |
cursor | The position from which to start getting data. During the first call to this method, if null is passed to cursor , the SDK will get data in the reverse chronological order. |
callback | The operation callback. If success, the SDK returns the obtained public group list and the cursor used for the next query; otherwise, an error will be returned. See ValueCallBack . |
void AgoraChat.GroupManager.JoinPublicGroup | ( | string | groupId, |
CallBack | callback = null |
||
) |
Joins a public group.
This is an asynchronous method.
groupId | The ID of the public group. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.LeaveGroup | ( | string | groupId, |
CallBack | callback = null |
||
) |
Leaves a group.
This is an asynchronous method.
groupId | The group ID. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.MuteGroupAllMembers | ( | string | groupId, |
CallBack | callback = null |
||
) |
Mutes all members in the group.
Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The group ID. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.MuteGroupMembers | ( | string | groupId, |
List< string > | members, | ||
long | muteMilliseconds = -1 , |
||
CallBack | callback = null |
||
) |
Mutes the specified group members. Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The group ID. |
members | The list of members to be muted. |
muteMilliseconds | Muted time duration in millisecond, -1 stand for eternity. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.RemoveGroupAdmin | ( | string | groupId, |
string | memberId, | ||
CallBack | callback = null |
||
) |
Removes a group admin. Only the group owner can call this method.
This is an asynchronous method.
groupId | The group ID. |
memberId | The ID of the admin to remove. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.DeleteGroupSharedFile | ( | string | groupId, |
string | fileId, | ||
CallBack | callback = null |
||
) |
Removes the shared file of the group.
Group members can only delete the shared files uploaded by themselves. The group owner and admins can delete all the shared files.
This is an asynchronous method.
groupId | The group ID. |
fileId | The ID of the shared file. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.DeleteGroupMembers | ( | string | groupId, |
List< string > | members, | ||
CallBack | callback = null |
||
) |
Removes members from the group.
Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The group ID. |
members | The members to remove. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.RemoveGroupAllowList | ( | string | groupId, |
List< string > | members, | ||
CallBack | callback = null |
||
) |
Removes members from the group allow list.
Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The group ID. |
members | The list of members to be removed from the group allow list. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.UnBlockGroup | ( | string | groupId, |
CallBack | callback = null |
||
) |
Unblocks group messages.
This is an asynchronous method.
groupId | The group ID |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.UnBlockGroupMembers | ( | string | groupId, |
List< string > | members, | ||
CallBack | callback = null |
||
) |
Removes users from the group block list.
Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The group ID. |
members | The list of users to be removed from the block list. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.UnMuteGroupAllMembers | ( | string | groupId, |
CallBack | callback = null |
||
) |
Unmutes all members in the group.
Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The group ID. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.UnMuteGroupMembers | ( | string | groupId, |
List< string > | members, | ||
CallBack | callback = null |
||
) |
Unmutes the specified group members.
Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The group ID. |
members | The list of members to be unmuted. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.UpdateGroupAnnouncement | ( | string | groupId, |
string | announcement, | ||
CallBack | callback = null |
||
) |
Updates the group announcement.
Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The group ID. |
announcement | The group announcement. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.UpdateGroupExt | ( | string | groupId, |
string | ext, | ||
CallBack | callback = null |
||
) |
Updates the group extension field.
Only the group owner or admin can call this method.
This is an asynchronous method.
groupId | The group ID. |
ext | The group extension field. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.UploadGroupSharedFile | ( | string | groupId, |
string | filePath, | ||
CallBack | callback = null |
||
) |
Uploads the shared file to the group.
This is an asynchronous method.
groupId | The group ID. |
filePath | The local path of the shared file. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.SetMemberAttributes | ( | string | groupId, |
string | userId, | ||
Dictionary< string, string > | attrs, | ||
CallBack | callback = null |
||
) |
Sets custom attributes of a group member.
This is an asynchronous method.
groupId | The group ID. |
userId | The user ID of the group member for whom the custom attributes are set. |
callback | The operation callback. See CallBack . |
void AgoraChat.GroupManager.FetchMemberAttributes | ( | string | groupId, |
List< string > | userIds, | ||
List< string > | attrs, | ||
ValueCallBack< Dictionary< string, Dictionary< string, string > > > | callback = null |
||
) |
Gets custom attributes of multiple group members by attribute key.
This is an asynchronous method.
groupId | The group ID. |
userIds | The array of user IDs of group members whose custom attributes are retrieved. You can pass in a maximum of 10 user IDs. |
attrs | The array of keys of custom attributes to be retrieved. If this parameter is an empty array or not passed in, the SDK returns all custom attributes of these group members. |
callback | The operation callback. See ValueCallBack . |
void AgoraChat.GroupManager.FetchMyGroupsCount | ( | ValueCallBack< int > | callback = null | ) |
Gets the number of groups joined by the current user.
This is an asynchronous method.
callback | The operation callback. See ValueCallBack . |
void AgoraChat.GroupManager.AddGroupManagerDelegate | ( | IGroupManagerDelegate | groupManagerDelegate | ) |
Adds a group manager listener.
groupManagerDelegate | The group manager listener to add. It is inherited from IGroupManagerDelegate . |
void AgoraChat.GroupManager.RemoveGroupManagerDelegate | ( | IGroupManagerDelegate | groupManagerDelegate | ) |
Removes a group manager listener.
groupManagerDelegate | The group manager listener to remove. It is inherited from IGroupManagerDelegate . |