Chat SDK for Unity and Windows v1.2.0
Namespaces | Classes | Enumerations | Functions
AgoraChat Namespace Reference

Namespaces

namespace  MessageBody
 

Classes

class  CallBack
 
class  ChatManager
 
class  ChatThread
 
class  ChatThreadEvent
 
class  ChatThreadManager
 
class  ContactManager
 
class  Conversation
 
class  CursorResult
 
class  DeviceInfo
 
class  Error
 
class  FetchServerMessagesOption
 
class  Group
 
class  GroupInfo
 
class  GroupManager
 
class  GroupOptions
 
class  GroupReadAck
 
class  GroupSharedFile
 
interface  IChatManagerDelegate
 
interface  IChatThreadManagerDelegate
 
interface  IConnectionDelegate
 
interface  IContactManagerDelegate
 
interface  IGroupManagerDelegate
 
class  IMessageBody
 
interface  IMultiDeviceDelegate
 
interface  IPresenceManagerDelegate
 
interface  IRoomManagerDelegate
 
class  Message
 
class  MessageReaction
 
class  MessageReactionChange
 
class  MessageReactionOperation
 
class  Options
 
class  PageResult
 
class  Presence
 
class  PresenceDeviceStatus
 
class  PresenceManager
 
class  Room
 
class  RoomManager
 
class  SDKClient
 
class  SupportLanguage
 
class  UserInfo
 
class  UserInfoManager
 
class  ValueCallBack
 

Enumerations

enum  AreaCode {
  CN = 1 , NA = 2 , EU = 4 , AS = 8 ,
  JP = 16 , IN = 32 , GLOB = -1
}
 
enum  DisconnectReason {
  Reason_Disconnected , Reason_AuthenticationFailed , Reason_LoginFromOtherDevice , Reason_RemoveFromServer ,
  Reason_LoginTooManyDevice , Reason_ChangePassword , Reason_KickedByOtherDevice , Reason_ForbidByServer
}
 
enum  ChatThreadOperation {
  UnKnown = 0 , Create , Update , Delete ,
  Update_Msg
}
 
enum  GroupPermissionType {
  Member , Admin , Owner , Unknown = -1 ,
  Default = Unknown , None = Unknown
}
 
enum  GroupStyle { PrivateOnlyOwnerInvite , PrivateMemberCanInvite , PublicJoinNeedApproval , PublicOpenJoin }
 
enum  RoomPermissionType {
  Member , Admin , Owner , Unknown = -1 ,
  Default = Unknown , None = Unknown
}
 
enum  ConversationType { Chat , Group , Room }
 
enum  MessageBodyType {
  TXT , IMAGE , VIDEO , LOCATION ,
  VOICE , FILE , CMD , CUSTOM ,
  COMBINE
}
 
enum  RoomMessagePriority { High = 0 , Normal , Low }
 
enum  MessageSearchDirection { UP , DOWN }
 
enum  MessageStatus { CREATE , PROGRESS , SUCCESS , FAIL }
 
enum  MessageType { Chat = 0 , Group , Room }
 
enum  MessageDirection { SEND , RECEIVE }
 
enum  AttributeValueType : byte {
  BOOL = 0 , INT32 , UINT32 , INT64 ,
  FLOAT , DOUBLE , STRING , JSONSTRING ,
  NULLOBJ
}
 
enum  MultiDevicesOperation {
  UNKNOWN = -1 , CONTACT_REMOVE = 2 , CONTACT_ACCEPT = 3 , CONTACT_DECLINE = 4 ,
  CONTACT_BAN = 5 , CONTACT_ALLOW = 6 , GROUP_CREATE = 10 , GROUP_DESTROY = 11 ,
  GROUP_JOIN = 12 , GROUP_LEAVE = 13 , GROUP_APPLY = 14 , GROUP_APPLY_ACCEPT = 15 ,
  GROUP_APPLY_DECLINE = 16 , GROUP_INVITE = 17 , GROUP_INVITE_ACCEPT = 18 , GROUP_INVITE_DECLINE = 19 ,
  GROUP_KICK = 20 , GROUP_BAN = 21 , GROUP_ALLOW = 22 , GROUP_BLOCK = 23 ,
  GROUP_UNBLOCK = 24 , GROUP_ASSIGN_OWNER = 25 , GROUP_ADD_ADMIN = 26 , GROUP_REMOVE_ADMIN = 27 ,
  GROUP_ADD_MUTE = 28 , GROUP_REMOVE_MUTE = 29 , GROUP_ADD_USER_WHITE_LIST = 30 , GROUP_REMOVE_USER_WHITE_LIST = 31 ,
  GROUP_ALL_BAN = 32 , GROUP_REMOVE_ALL_BAN = 33 , THREAD_CREATE = 40 , THREAD_DESTROY = 41 ,
  THREAD_JOIN = 42 , THREAD_LEAVE = 43 , THREAD_UPDATE = 44 , THREAD_KICK = 45 ,
  SET_METADATA = 50 , DELETE_METADATA = 51 , GROUP_MEMBER_METADATA_CHANGED = 52 , CONVERSATION_PINNED = 60 ,
  CONVERSATION_UNPINNED = 61 , CONVERSATION_DELETED = 62
}
 
enum  MessageReactionOperate { MessageReactionOperateRemove = 0 , MessageReactionOperateAdd = 1 }
 

Functions

delegate void OnError (int code, string desc)
 
delegate void OnProgress (int progress)
 

Enumeration Type Documentation

◆ AreaCode

Area Code.

◆ DisconnectReason

The reason of disconnection.

Enumerator
Reason_Disconnected 

The SDK is disconnected from the server with no reason.

Reason_AuthenticationFailed 

The user ID or password is wrong.

Reason_LoginFromOtherDevice 

The user has logged in to another device.

Reason_RemoveFromServer 

The user is removed from the server.

Reason_LoginTooManyDevice 

The user has logged in to too many devices.

Reason_ChangePassword 

The user has changed the password.

Reason_KickedByOtherDevice 

The user is kicked by another device or on the console.

Reason_ForbidByServer 

The service is disabled.

◆ ChatThreadOperation

Enumerator
UnKnown 

Unknown operation, default value.

Create 

Create a thread.

Update 

Update a thread.

Delete 

Delete a thread.

Update_Msg 

Update a thread message.

◆ GroupPermissionType

The group member roles.

Enumerator
Member 

The regular group member.

Admin 

The group admin.

Owner 

The group owner.

Unknown 

Unknown.

◆ GroupStyle

The group styles.

Enumerator
PrivateOnlyOwnerInvite 

Private groups where only the group owner can invite users to join.

PrivateMemberCanInvite 

Private groups where each group member can invite users to join.

PublicJoinNeedApproval 

Public groups where only the owner can invite users to join.

A user can join a group only after getting approval from the group owner or admins.

PublicOpenJoin 

Public groups where a user can join a group without the approval from the group owner or admins.

◆ RoomPermissionType

The chat room member roles.

Enumerator
Member 

The regular chat room member.

Admin 

The chat room admin.

Owner 

The chat room owner.

Unknown 

Unknown.

◆ ConversationType

The chat types.

Enumerator
Chat 

The one-to-one chat.

Group 

The group chat.

Room 

The chat room.

◆ MessageBodyType

The message types.

Enumerator
TXT 

The text message.

IMAGE 

The image message.

VIDEO 

The video message.

LOCATION 

The location message.

VOICE 

The voice message.

FILE 

The file message.

CMD 

The command message.

CUSTOM 

The custom message.

COMBINE 

The combined message.

◆ RoomMessagePriority

The chat room message priorities.

Enumerator
High 

High priority.

Normal 

Normal priority.

Low 

Low priority.

◆ MessageSearchDirection

The message query directions.

Enumerator
UP 

Messages are retrieved in the reverse chronological order of their Unix timestamp (SortMessageByServerTime).

DOWN 

Messages are retrieved in the chronological order of their Unix timestamp (SortMessageByServerTime).

◆ MessageStatus

The message status.

Enumerator
CREATE 

The message is created.

PROGRESS 

The message is being delivered.

SUCCESS 

The message is successfully delivered.

FAIL 

The message fails to be delivered.

◆ MessageType

The chat types.

Enumerator
Chat 

The one-to-one chat.

Group 

The group chat.

Room 

The chat room.

◆ MessageDirection

The message directions.

Enumerator
SEND 

This message is sent from the current user.

RECEIVE 

The message is received by the current user.

◆ AttributeValueType

The extension attribute types of messages.

Enumerator
BOOL 

Boolean.

INT32 

Signed 32-bit int.

UINT32 

Unsigned 32-bit int.

INT64 

Signed 64-bit int.

FLOAT 

Float.

DOUBLE 

Double.

STRING 

String.

JSONSTRING 

JSON string.

◆ MultiDevicesOperation

Enumerator
CONTACT_REMOVE 

The current user removed a contact on another device.

CONTACT_ACCEPT 

The current user accepted a friend request on another device.

CONTACT_DECLINE 

The current user declined a friend request on another device.

CONTACT_BAN 

The current user added a contact to the block list on another device.

CONTACT_ALLOW 

The current user removed a contact from the block list on another device.

GROUP_CREATE 

The current user created a group on another device.

GROUP_DESTROY 

The current user destroyed a group on another device.

GROUP_JOIN 

The current user joined a group on another device.

GROUP_LEAVE 

The current user left a group on another device.

GROUP_APPLY 

The current user requested to join a group on another device.

GROUP_APPLY_ACCEPT 

The current user accepted a group request on another device.

GROUP_APPLY_DECLINE 

The current user declined a group request on another device.

GROUP_INVITE 

The current user invited a user to join the group on another device.

GROUP_INVITE_ACCEPT 

The current user accepted a group invitation on another device.

GROUP_INVITE_DECLINE 

The current user declined a group invitation on another device.

GROUP_KICK 

The current user kicked a member out of a group on another device.

GROUP_BAN 

The current user added a member to a group block list on another device.

GROUP_ALLOW 

The current user removed a member from a group block list on another device.

GROUP_BLOCK 

The current user blocked a group on another device.

GROUP_UNBLOCK 

The current user unblocked a group on another device.

GROUP_ASSIGN_OWNER 

The current user transferred the group ownership on another device.

GROUP_ADD_ADMIN 

The current user added an admin on another device.

GROUP_REMOVE_ADMIN 

The current user removed an admin on another device.

GROUP_ADD_MUTE 

The current user muted a member on another device.

GROUP_REMOVE_MUTE 

The current user unmuted a member on another device.

GROUP_ADD_USER_WHITE_LIST 

The current user added a group member to the allow list on another device.

GROUP_REMOVE_USER_WHITE_LIST 

The current user removed a group member from the allow list on another device.

GROUP_ALL_BAN 

The current user added all other group members to the group mute list on another device.

GROUP_REMOVE_ALL_BAN 

The current user removed all other group members from the group mute list on another device.

THREAD_CREATE 

A thread was created on another device.

THREAD_DESTROY 

A thread was destroyed on another device.

THREAD_JOIN 

The user joined a thread on another device.

THREAD_LEAVE 

The user left a thread on another device.

THREAD_UPDATE 

The thread was updated on another device.

THREAD_KICK 

The user was kicked from a thread on another device.

SET_METADATA 

The custom attribute(s) of a group member(s) is/are set on other devices.

DELETE_METADATA 

The custom attribute(s) of a group member(s) is/are deleted on other devices.

GROUP_MEMBER_METADATA_CHANGED 

The custom attribute(s) of a group member(s) is/are changed.

CONVERSATION_PINNED 

A conversation is pinned.

CONVERSATION_UNPINNED 

A conversation is unpinned.

CONVERSATION_DELETED 

A conversation is deleted.

◆ MessageReactionOperate

Enumerator
MessageReactionOperateRemove 

A Reaction is deleted.

MessageReactionOperateAdd 

A Reaction is added.

Function Documentation

◆ OnError()

delegate void AgoraChat.OnError ( int  code,
string  desc 
)

The callback for a method execution failure.

Parameters
codeThe error code.
descThe error description.

◆ OnProgress()

delegate void AgoraChat.OnProgress ( int  progress)

The callback for the method execution progress.

Parameters
progressThe execution progress value that ranges from 0 to 100 in percentage.