Signaling (previously RTM) v1.4.8 API Reference for Unity
Classes | Enumerations
agora_rtm Namespace Reference

Classes

class  LocalInvitation
 
class  FileMessage
 
class  ImageMessage
 
class  IMessage
 
class  TextMessage
 
class  IRtmApiNative
 
class  RemoteInvitation
 
struct  PeerOnlineStatus
 
struct  MediaOperationProgress
 
struct  ChannelAttributeOptions
 
struct  RtmAttribute
 
struct  ChannelMemberCount
 
struct  SendMessageOptions
 
class  RtmCallEventHandler
 
class  RtmCallManager
 
class  RtmChannel
 
class  RtmChannelAttribute
 
class  RtmChannelEventHandler
 
class  RtmChannelMember
 
class  RtmClient
 
class  RtmClientEventHandler
 

Enumerations

enum class  COMMON_ERR_CODE { ERROR_NULL_PTR = -7 }
 
enum class  LOGIN_ERR_CODE {
  LOGIN_ERR_OK = 0 , LOGIN_ERR_UNKNOWN = 1 , LOGIN_ERR_REJECTED = 2 , LOGIN_ERR_INVALID_ARGUMENT = 3 ,
  LOGIN_ERR_INVALID_APP_ID = 4 , LOGIN_ERR_INVALID_TOKEN = 5 , LOGIN_ERR_TOKEN_EXPIRED = 6 , LOGIN_ERR_NOT_AUTHORIZED = 7 ,
  LOGIN_ERR_ALREADY_LOGGED_IN = 8 , LOGIN_ERR_TIMEOUT = 9 , LOGIN_ERR_TOO_OFTEN = 10
}
 
enum class  LOGOUT_ERR_CODE { LOGOUT_ERR_OK = 0 , LOGOUT_ERR_REJECTED = 1 , LOGOUT_ERR_USER_NOT_LOGGED_IN = 102 }
 
enum class  RENEW_TOKEN_ERR_CODE {
  RENEW_TOKEN_ERR_OK = 0 , RENEW_TOKEN_ERR_FAILURE = 1 , RENEW_TOKEN_ERR_INVALID_ARGUMENT = 2 , RENEW_TOKEN_ERR_REJECTED = 3 ,
  RENEW_TOKEN_ERR_TOO_OFTEN = 4 , RENEW_TOKEN_ERR_TOKEN_EXPIRED = 5 , RENEW_TOKEN_ERR_INVALID_TOKEN = 6 , RENEW_TOKEN_ERR_USER_NOT_LOGGED_IN = 102
}
 
enum class  CONNECTION_STATE {
  CONNECTION_STATE_DISCONNECTED = 1 , CONNECTION_STATE_CONNECTING = 2 , CONNECTION_STATE_CONNECTED = 3 , CONNECTION_STATE_RECONNECTING = 4 ,
  CONNECTION_STATE_ABORTED = 5
}
 
enum class  CONNECTION_CHANGE_REASON {
  CONNECTION_CHANGE_REASON_LOGIN = 1 , CONNECTION_CHANGE_REASON_LOGIN_SUCCESS = 2 , CONNECTION_CHANGE_REASON_LOGIN_FAILURE = 3 , CONNECTION_CHANGE_REASON_LOGIN_TIMEOUT = 4 ,
  CONNECTION_CHANGE_REASON_INTERRUPTED = 5 , CONNECTION_CHANGE_REASON_LOGOUT = 6 , CONNECTION_CHANGE_REASON_BANNED_BY_SERVER = 7 , CONNECTION_CHANGE_REASON_REMOTE_LOGIN = 8
}
 
enum class  PEER_MESSAGE_ERR_CODE {
  PEER_MESSAGE_ERR_OK = 0 , PEER_MESSAGE_ERR_FAILURE = 1 , PEER_MESSAGE_ERR_SENT_TIMEOUT = 2 , PEER_MESSAGE_ERR_PEER_UNREACHABLE = 3 ,
  PEER_MESSAGE_ERR_CACHED_BY_SERVER = 4 , PEER_MESSAGE_ERR_TOO_OFTEN = 5 , PEER_MESSAGE_ERR_INVALID_USERID = 6 , PEER_MESSAGE_ERR_INVALID_MESSAGE = 7 ,
  PEER_MESSAGE_ERR_IMCOMPATIBLE_MESSAGE = 8 , PEER_MESSAGE_ERR_USER_NOT_LOGGED_IN = 102
}
 
enum class  JOIN_CHANNEL_ERR {
  JOIN_CHANNEL_ERR_OK = 0 , JOIN_CHANNEL_ERR_FAILURE = 1 , JOIN_CHANNEL_ERR_REJECTED = 2 , JOIN_CHANNEL_ERR_INVALID_ARGUMENT = 3 ,
  JOIN_CHANNEL_TIMEOUT = 4 , JOIN_CHANNEL_ERR_EXCEED_LIMIT = 5 , JOIN_CHANNEL_ERR_ALREADY_JOINED = 6 , JOIN_CHANNEL_ERR_TOO_OFTEN = 7 ,
  JOIN_CHANNEL_ERR_JOIN_SAME_CHANNEL_TOO_OFTEN = 8 , JOIN_CHANNEL_ERR_USER_NOT_LOGGED_IN = 102
}
 
enum class  LEAVE_CHANNEL_ERR {
  LEAVE_CHANNEL_ERR_OK = 0 , LEAVE_CHANNEL_ERR_FAILURE = 1 , LEAVE_CHANNEL_ERR_REJECTED = 2 , LEAVE_CHANNEL_ERR_NOT_IN_CHANNEL = 3 ,
  LEAVE_CHANNEL_ERR_USER_NOT_LOGGED_IN = 102
}
 
enum class  LEAVE_CHANNEL_REASON { LEAVE_CHANNEL_REASON_QUIT = 1 , LEAVE_CHANNEL_REASON_KICKED = 2 }
 
enum class  CHANNEL_MESSAGE_ERR_CODE {
  CHANNEL_MESSAGE_ERR_OK = 0 , CHANNEL_MESSAGE_ERR_FAILURE = 1 , CHANNEL_MESSAGE_ERR_SENT_TIMEOUT = 2 , CHANNEL_MESSAGE_ERR_TOO_OFTEN = 3 ,
  CHANNEL_MESSAGE_ERR_INVALID_MESSAGE = 4 , CHANNEL_MESSAGE_ERR_USER_NOT_LOGGED_IN = 102
}
 
enum class  GET_MEMBERS_ERR {
  GET_MEMBERS_ERR_OK = 0 , GET_MEMBERS_ERR_FAILURE = 1 , GET_MEMBERS_ERR_REJECTED = 2 , GET_MEMBERS_ERR_TIMEOUT = 3 ,
  GET_MEMBERS_ERR_TOO_OFTEN = 4 , GET_MEMBERS_ERR_NOT_IN_CHANNEL = 5 , GET_MEMBERS_ERR_USER_NOT_LOGGED_IN = 102
}
 
enum class  QUERY_PEERS_ONLINE_STATUS_ERR {
  QUERY_PEERS_ONLINE_STATUS_ERR_OK = 0 , QUERY_PEERS_ONLINE_STATUS_ERR_FAILURE = 1 , QUERY_PEERS_ONLINE_STATUS_ERR_INVALID_ARGUMENT = 2 , QUERY_PEERS_ONLINE_STATUS_ERR_REJECTED = 3 ,
  QUERY_PEERS_ONLINE_STATUS_ERR_TIMEOUT = 4 , QUERY_PEERS_ONLINE_STATUS_ERR_TOO_OFTEN = 5 , QUERY_PEERS_ONLINE_STATUS_ERR_USER_NOT_LOGGED_IN = 102
}
 
enum class  PEER_ONLINE_STATE { PEER_ONLINE_STATE_ONLINE = 0 , PEER_ONLINE_STATE_UNREACHABLE = 1 , PEER_ONLINE_STATE_OFFLINE = 2 }
 
enum class  PEER_SUBSCRIPTION_OPTION { PEER_SUBSCRIPTION_OPTION_ONLINE_STATUS = 0 }
 
enum class  PEER_SUBSCRIPTION_STATUS_ERR {
  PEER_SUBSCRIPTION_STATUS_ERR_OK = 0 , PEER_SUBSCRIPTION_STATUS_ERR_FAILURE = 1 , PEER_SUBSCRIPTION_STATUS_ERR_INVALID_ARGUMENT = 2 , PEER_SUBSCRIPTION_STATUS_ERR_REJECTED = 3 ,
  PEER_SUBSCRIPTION_STATUS_ERR_TIMEOUT = 4 , PEER_SUBSCRIPTION_STATUS_ERR_TOO_OFTEN = 5 , PEER_SUBSCRIPTION_STATUS_ERR_OVERFLOW = 6 , PEER_SUBSCRIPTION_STATUS_ERR_USER_NOT_LOGGED_IN = 102
}
 
enum class  QUERY_PEERS_BY_SUBSCRIPTION_OPTION_ERR {
  QUERY_PEERS_BY_SUBSCRIPTION_OPTION_ERR_OK = 0 , QUERY_PEERS_BY_SUBSCRIPTION_OPTION_ERR_FAILURE = 1 , QUERY_PEERS_BY_SUBSCRIPTION_OPTION_ERR_TIMEOUT = 2 , QUERY_PEERS_BY_SUBSCRIPTION_OPTION_ERR_TOO_OFTEN = 3 ,
  QUERY_PEERS_BY_SUBSCRIPTION_OPTION_ERR_USER_NOT_LOGGED_IN = 102
}
 
enum class  ATTRIBUTE_OPERATION_ERR {
  ATTRIBUTE_OPERATION_ERR_OK = 0 , ATTRIBUTE_OPERATION_ERR_NOT_READY = 1 , ATTRIBUTE_OPERATION_ERR_FAILURE = 2 , ATTRIBUTE_OPERATION_ERR_INVALID_ARGUMENT = 3 ,
  ATTRIBUTE_OPERATION_ERR_SIZE_OVERFLOW = 4 , ATTRIBUTE_OPERATION_ERR_TOO_OFTEN = 5 , ATTRIBUTE_OPERATION_ERR_USER_NOT_FOUND = 6 , ATTRIBUTE_OPERATION_ERR_TIMEOUT = 7 ,
  ATTRIBUTE_OPERATION_ERR_USER_NOT_LOGGED_IN = 102
}
 
enum class  GET_CHANNEL_MEMBER_COUNT_ERR_CODE {
  GET_CHANNEL_MEMBER_COUNT_ERR_OK = 0 , GET_CHANNEL_MEMBER_COUNT_ERR_FAILURE = 1 , GET_CHANNEL_MEMBER_COUNT_ERR_INVALID_ARGUMENT = 2 , GET_CHANNEL_MEMBER_COUNT_ERR_TOO_OFTEN = 3 ,
  GET_CHANNEL_MEMBER_COUNT_ERR_TIMEOUT = 4 , GET_CHANNEL_MEMBER_COUNT_ERR_EXCEED_LIMIT = 5 , GET_CHANNEL_MEMBER_COUNT_ERR_USER_NOT_LOGGED_IN = 102
}
 
enum class  DOWNLOAD_MEDIA_ERR_CODE {
  DOWNLOAD_MEDIA_ERR_OK = 0 , DOWNLOAD_MEDIA_ERR_FAILURE = 1 , DOWNLOAD_MEDIA_ERR_INVALID_ARGUMENT = 2 , DOWNLOAD_MEDIA_ERR_TIMEOUT = 3 ,
  DOWNLOAD_MEDIA_ERR_NOT_EXIST = 4 , DOWNLOAD_MEDIA_ERR_CONCURRENCY_LIMIT_EXCEEDED = 5 , DOWNLOAD_MEDIA_ERR_INTERRUPTED = 6 , DOWNLOAD_MEDIA_ERR_NOT_LOGGED_IN = 102
}
 
enum class  UPLOAD_MEDIA_ERR_CODE {
  UPLOAD_MEDIA_ERR_OK = 0 , UPLOAD_MEDIA_ERR_FAILURE = 1 , UPLOAD_MEDIA_ERR_INVALID_ARGUMENT = 2 , UPLOAD_MEDIA_ERR_TIMEOUT = 3 ,
  UPLOAD_MEDIA_ERR_SIZE_OVERFLOW = 4 , UPLOAD_MEDIA_ERR_CONCURRENCY_LIMIT_EXCEEDED = 5 , UPLOAD_MEDIA_ERR_INTERRUPTED = 6 , UPLOAD_MEDIA_ERR_NOT_LOGGED_IN = 102
}
 
enum class  CANCEL_MEDIA_ERR_CODE { CANCEL_MEDIA_ERR_OK = 0 , CANCEL_MEDIA_ERR_FAILURE = 1 , CANCEL_MEDIA_ERR_NOT_EXIST = 2 , CANCEL_MEDIA_ERR_NOT_LOGGED_IN = 102 }
 
enum class  MESSAGE_TYPE {
  MESSAGE_TYPE_UNDEFINED = 0 , MESSAGE_TYPE_TEXT = 1 , MESSAGE_TYPE_RAW = 2 , MESSAGE_TYPE_FILE = 3 ,
  MESSAGE_TYPE_IMAGE = 4
}
 
enum class  LOCAL_INVITATION_STATE {
  LOCAL_INVITATION_STATE_IDLE = 0 , LOCAL_INVITATION_STATE_SENT_TO_REMOTE = 1 , LOCAL_INVITATION_STATE_RECEIVED_BY_REMOTE = 2 , LOCAL_INVITATION_STATE_ACCEPTED_BY_REMOTE = 3 ,
  LOCAL_INVITATION_STATE_REFUSED_BY_REMOTE = 4 , LOCAL_INVITATION_STATE_CANCELED = 5 , LOCAL_INVITATION_STATE_FAILURE = 6
}
 
enum class  REMOTE_INVITATION_STATE {
  REMOTE_INVITATION_STATE_IDLE = 0 , REMOTE_INVITATION_STATE_INVITATION_RECEIVED = 1 , REMOTE_INVITATION_STATE_ACCEPT_SENT_TO_LOCAL = 2 , REMOTE_INVITATION_STATE_REFUSED = 3 ,
  REMOTE_INVITATION_STATE_ACCEPTED = 4 , REMOTE_INVITATION_STATE_CANCELED = 5 , REMOTE_INVITATION_STATE_FAILURE = 6
}
 
enum class  LOCAL_INVITATION_ERR_CODE {
  LOCAL_INVITATION_ERR_OK = 0 , LOCAL_INVITATION_ERR_PEER_OFFLINE = 1 , LOCAL_INVITATION_ERR_PEER_NO_RESPONSE = 2 , LOCAL_INVITATION_ERR_INVITATION_EXPIRE = 3 ,
  LOCAL_INVITATION_ERR_NOT_LOGGEDIN = 4
}
 
enum class  REMOTE_INVITATION_ERR_CODE { REMOTE_INVITATION_ERR_OK = 0 , REMOTE_INVITATION_ERR_PEER_OFFLINE = 1 , REMOTE_INVITATION_ERR_ACCEPT_FAILURE = 2 , REMOTE_INVITATION_ERR_INVITATION_EXPIRE = 3 }
 
enum class  INVITATION_API_CALL_ERR_CODE {
  INVITATION_API_CALL_ERR_OK = 0 , INVITATION_API_CALL_ERR_INVALID_ARGUMENT = 1 , INVITATION_API_CALL_ERR_NOT_STARTED = 2 , INVITATION_API_CALL_ERR_ALREADY_END = 3 ,
  INVITATION_API_CALL_ERR_ALREADY_ACCEPT = 4 , INVITATION_API_CALL_ERR_ALREADY_SENT = 5
}
 
enum class  MESSAGE_FLAG { RECEIVE = 0 , SEND = 1 }
 

Enumeration Type Documentation

◆ ATTRIBUTE_OPERATION_ERR

Error codes related to attrubute operations.

Enumerator
ATTRIBUTE_OPERATION_ERR_OK 

0: The method call succeeds, or the attribute operation succeeds.

ATTRIBUTE_OPERATION_ERR_NOT_READY 

1:

Deprecated:
ATTRIBUTE_OPERATION_ERR_FAILURE 

2: Common failure. The attribute operation fails.

ATTRIBUTE_OPERATION_ERR_INVALID_ARGUMENT 

3: The argument you put for this attribute operation is invalid. For example, you cannot set a user or channel attribute as "".

ATTRIBUTE_OPERATION_ERR_SIZE_OVERFLOW 

4: The attribute size exceeds the limit.

  • For user attribute operations: The user's overall attribute size would exceed the limit of 16 KB, one of the user's attributes would exceeds 8 KB in size, or the number of this user's attributes would exceed 32 after this attribute operation.
  • For channel attribute operations: The channel's overall attribute size would exceed the limit of 32 KB, one of the channel attributes would exceed 8 KB in size, or the number of this channel's attributes would exceed 32 after this attribute operation.
ATTRIBUTE_OPERATION_ERR_TOO_OFTEN 

5: The method call frequency exceeds the limit.

ATTRIBUTE_OPERATION_ERR_USER_NOT_FOUND 

6: The specified user is not found, either because the user is offline or because the user does not exist.

ATTRIBUTE_OPERATION_ERR_TIMEOUT 

7: A timeout occurs during the attribute operation. The current timeout is set as five seconds. Possible reasons: The user is in the CONNECTION_STATE_ABORTED or CONNECTION_STATE_RECONNECTING state.

ATTRIBUTE_OPERATION_ERR_USER_NOT_LOGGED_IN 

102: The user does not call the Login method, or the method call of Login does not succeed before the attribute operation.

◆ CANCEL_MEDIA_ERR_CODE

Error codes related to cancelling a download task or cancelling an upload task.

Enumerator
CANCEL_MEDIA_ERR_OK 

0: The method call succeeds, or the operation succeeds.

CANCEL_MEDIA_ERR_FAILURE 

1: Unknown common failure.

CANCEL_MEDIA_ERR_NOT_EXIST 

2: The task to cancel does not exist. You can only cancel an ongoing download or upload task. If the download or upload task completes, the corresponding requestId is no longer valid.

CANCEL_MEDIA_ERR_NOT_LOGGED_IN 

102: The user does not call the Login method, or the method call of Login does not succeed before this operation.

◆ CHANNEL_MESSAGE_ERR_CODE

Error codes related to sending a channel message.

Enumerator
CHANNEL_MESSAGE_ERR_OK 

0: The method call succeeds, or the server receives the channel message.

CHANNEL_MESSAGE_ERR_FAILURE 

1: Common failure. The user fails to send the channel message.

CHANNEL_MESSAGE_ERR_SENT_TIMEOUT 

2: The SDK does not receive a response from the server in 10 seconds. The current timeout is set as 10 seconds. Possible reasons: The user is in the CONNECTION_STATE_ABORTED or CONNECTION_STATE_RECONNECTING state.

CHANNEL_MESSAGE_ERR_TOO_OFTEN 

3: The method call frequency exceeds the limit of (RTM SDK for Windows C++) 180 calls every three seconds, with channel and peer messages taken together.

CHANNEL_MESSAGE_ERR_INVALID_MESSAGE 

4: The message is null or exceeds 32 KB in length.

CHANNEL_MESSAGE_ERR_USER_NOT_LOGGED_IN 

102: The user does not call the Login method, or the method call of Login does not succeed before sending out a channel message.

◆ COMMON_ERR_CODE

Enumerator
ERROR_NULL_PTR 

◆ CONNECTION_CHANGE_REASON

Reasons for a connection state change.

Enumerator
CONNECTION_CHANGE_REASON_LOGIN 

1: The SDK is logging in the Agora RTM system.

CONNECTION_CHANGE_REASON_LOGIN_SUCCESS 

2: The SDK has logged in the Agora RTM system.

CONNECTION_CHANGE_REASON_LOGIN_FAILURE 

3: The SDK fails to log in the Agora RTM system.

CONNECTION_CHANGE_REASON_LOGIN_TIMEOUT 

4: The SDK fails to log in the Agora RTM system within six seconds and gives up.

CONNECTION_CHANGE_REASON_INTERRUPTED 

5: The connection between the SDK and the Agora RTM system is interrupted. The system defines an interruption when the SDK loses connection with the Agora RTM system for network reasons and cannot recover in four seconds.

CONNECTION_CHANGE_REASON_LOGOUT 

6: The user has called the Logout method to log out of the Agora RTM system.

CONNECTION_CHANGE_REASON_BANNED_BY_SERVER 

7: The SDK login to the Agora RTM system is banned by Agora.

CONNECTION_CHANGE_REASON_REMOTE_LOGIN 

8: Another user is logging in the Agora RTM system with the same User ID.

◆ CONNECTION_STATE

Connection states between the SDK and the Agora RTM system.

Enumerator
CONNECTION_STATE_DISCONNECTED 

1: The initial state. The SDK is disconnected from the Agora RTM system.

When the user calls the Login method, the SDK starts to log in the Agora RTM system, triggers the OnConnectionStateChangedHandler callback, and switches to the CONNECTION_STATE_CONNECTING state.

CONNECTION_STATE_CONNECTING 

2: The SDK is logging in the Agora RTM system.

CONNECTION_STATE_CONNECTED 

3: The SDK has logged in the Agora RTM system.

CONNECTION_STATE_RECONNECTING 

4: The connection state between the SDK and the Agora RTM system is interrupted due to network issues, and the SDK keeps re-logging in the Agora RTM system.

  • If the SDK successfully re-logs in the Agora RTM system, the SDK triggers the OnConnectionStateChangedHandler callback and switches to the CONNECTION_STATE_CONNECTED state. The SDK automatically adds the user back to the channels he or she was in when the connection was interrupted, and synchronizes the local user's attributes with the server.
  • If the SDK cannot re-log in the Agora RTM system, it stays in the CONNECTION_STATE_RECONNECTING state and keeps re-logging in the system.
CONNECTION_STATE_ABORTED 

5: The SDK gives up logging in the Agora RTM system, mainly because another instance has logged in the Agora RTM system with the same user ID.

You must call the Logout method to leave this state before calling the Login method again.

◆ DOWNLOAD_MEDIA_ERR_CODE

Error codes related to downloading a file or image.

Enumerator
DOWNLOAD_MEDIA_ERR_OK 

0: The method call succeeds, or the operation succeeds.

DOWNLOAD_MEDIA_ERR_FAILURE 

1: Unknown common failure. Check whether you have write access.

DOWNLOAD_MEDIA_ERR_INVALID_ARGUMENT 

2: An argument you put is invalid. For example, mediaId is in the wrong format or filePath is set as null.

DOWNLOAD_MEDIA_ERR_TIMEOUT 

3: A timeout occurs. The current timeout is set as 120 seconds. The SDK assumes that a timeout occurs if it has not detected any file transmission between the SDK and the file server for 120 seconds.

DOWNLOAD_MEDIA_ERR_NOT_EXIST 

4: The file or image to download does not exist, either because the media ID you input is incorrect or because the validity of the media ID has expired.

DOWNLOAD_MEDIA_ERR_CONCURRENCY_LIMIT_EXCEEDED 

5: You have exceeded the upper limit for file download. You can initiate a maximum of nine file download or upload tasks at the same time (download and upload tasks count together).

DOWNLOAD_MEDIA_ERR_INTERRUPTED 

6: The file or image download task is aborted for either of the following reasons:

DOWNLOAD_MEDIA_ERR_NOT_LOGGED_IN 

102: The user does not call the Login method, or the method call of Login does not succeed before this operation.

◆ GET_CHANNEL_MEMBER_COUNT_ERR_CODE

Error codes related to retrieving the channel member count of specified channels.

Enumerator
GET_CHANNEL_MEMBER_COUNT_ERR_OK 

0: The method call succeeds, or the operation succeeds.

GET_CHANNEL_MEMBER_COUNT_ERR_FAILURE 

1: Unknown common failure.

GET_CHANNEL_MEMBER_COUNT_ERR_INVALID_ARGUMENT 

2: One or several of your channel IDs is invalid, or channelCount < 0.

GET_CHANNEL_MEMBER_COUNT_ERR_TOO_OFTEN 

3: The method call frequency exceeds the limit of one query per second.

GET_CHANNEL_MEMBER_COUNT_ERR_TIMEOUT 

4: A timeout occurs during this operation. The current timeout is set as five seconds.

GET_CHANNEL_MEMBER_COUNT_ERR_EXCEED_LIMIT 

5:channelCount is greater than 32.

GET_CHANNEL_MEMBER_COUNT_ERR_USER_NOT_LOGGED_IN 

102: The user does not call the Login method, or the method call of Login does not succeed before this operation.

◆ GET_MEMBERS_ERR

Error codes related to retrieving a channel member list.

Enumerator
GET_MEMBERS_ERR_OK 

0: The method call succeeds, or the operation succeeds.

GET_MEMBERS_ERR_FAILURE 

1: Common failure. The user fails to retrieve a member list of the channel.

GET_MEMBERS_ERR_REJECTED 

2: RESERVED FOR FUTURE USE

GET_MEMBERS_ERR_TIMEOUT 

3: A timeout occurs when retrieving a member list of the channel. The current timeout is set as five seconds. Possible reasons: The user is in the CONNECTION_STATE_ABORTED or CONNECTION_STATE_RECONNECTING state.

GET_MEMBERS_ERR_TOO_OFTEN 

4: The method call frequency exceeds the limit of five queries every two seconds.

GET_MEMBERS_ERR_NOT_IN_CHANNEL 

5: The user is not in channel.

GET_MEMBERS_ERR_USER_NOT_LOGGED_IN 

102: The user does not call the Login method, or the method call of Login does not succeed before retrieving a member list.

◆ INVITATION_API_CALL_ERR_CODE

Error codes of the call invitation methods.

Enumerator
INVITATION_API_CALL_ERR_OK 

0: The method call succeeds.

INVITATION_API_CALL_ERR_INVALID_ARGUMENT 

1: The method call fails. The argument is invalid, for example, the value of the content parameter exceeds 8K bytes.

INVITATION_API_CALL_ERR_NOT_STARTED 

2: The method call fails. The call invitation has not started.

INVITATION_API_CALL_ERR_ALREADY_END 

3: The method call fails. The call invitation has ended.

INVITATION_API_CALL_ERR_ALREADY_ACCEPT 

4: The method call fails. The call invitation is already accepted.

INVITATION_API_CALL_ERR_ALREADY_SENT 

5: The method call fails. The call invitation is already sent.

◆ JOIN_CHANNEL_ERR

Error codes related to joining a channel.

Enumerator
JOIN_CHANNEL_ERR_OK 

0: The method call succeeds, or the user joins the channel successfully.

JOIN_CHANNEL_ERR_FAILURE 

1: Common failure. The user fails to join the channel.

JOIN_CHANNEL_ERR_REJECTED 

2: For v1.0.0 and earlier, the SDK returns this error when you try to join a channel that you have already joined. The SDK does not return this error code after v1.0.0.

JOIN_CHANNEL_ERR_INVALID_ARGUMENT 

3: The user fails to join the channel because the argument is invalid.

JOIN_CHANNEL_TIMEOUT 

4: A timeout occurs when joining the channel. The current timeout is set as five seconds. Possible reasons: The user is in the CONNECTION_STATE_ABORTED or CONNECTION_STATE_RECONNECTING state.

JOIN_CHANNEL_ERR_EXCEED_LIMIT 

5: The number of the RTM channels you are in exceeds the limit of 20.

JOIN_CHANNEL_ERR_ALREADY_JOINED 

6: The user is joining or has joined the channel.

JOIN_CHANNEL_ERR_TOO_OFTEN 

7: The method call frequency exceeds 50 queries every three seconds.

JOIN_CHANNEL_ERR_JOIN_SAME_CHANNEL_TOO_OFTEN 

8: The frequency of joining the same channel exceeds two times every five seconds.

JOIN_CHANNEL_ERR_USER_NOT_LOGGED_IN 

102: The user does not call the Login method, or the method call of Login does not succeed before joining the channel.

◆ LEAVE_CHANNEL_ERR

Error codes related to leaving a channel.

Enumerator
LEAVE_CHANNEL_ERR_OK 

0: The method call succeeds, or the user leaves the channel successfully.

LEAVE_CHANNEL_ERR_FAILURE 

1: Common failure. The user fails to leave the channel.

LEAVE_CHANNEL_ERR_REJECTED 

2: RESERVED FOR FUTURE USE

LEAVE_CHANNEL_ERR_NOT_IN_CHANNEL 

3: The user is not in the channel.

LEAVE_CHANNEL_ERR_USER_NOT_LOGGED_IN 

102: The user does not call the Login method, or the method call of Login does not succeed before calling the Leave method.

◆ LEAVE_CHANNEL_REASON

Reasons why a user leaves the channel.

Enumerator
LEAVE_CHANNEL_REASON_QUIT 

1: The user has quit the call.

LEAVE_CHANNEL_REASON_KICKED 

2: The user is banned by the server.

◆ LOCAL_INVITATION_ERR_CODE

RETURNED TO THE CALLER. Error codes of an outgoing call invitation.

Enumerator
LOCAL_INVITATION_ERR_OK 

0: RETURNED TO THE CALLER. The outgoing invitation succeeds.

LOCAL_INVITATION_ERR_PEER_OFFLINE 

1: RETURNED TO THE CALLER. The callee is offline.

The SDK performs the following:

  • Keeps resending the call invitation to the callee, if the callee is offline.
  • Returns this error code, if the callee is still offline 30 seconds since the call invitation is sent.
LOCAL_INVITATION_ERR_PEER_NO_RESPONSE 

2: RETURNED TO THE CALLER. The callee is online but has not ACKed to the call invitation 30 seconds since it is sent.

LOCAL_INVITATION_ERR_INVITATION_EXPIRE 

3: RETURNED TO THE CALLER. SAVED FOR FUTURE USE. The call invitation expires 60 seconds since it is sent, if the callee ACKs to the call invitation but neither the caller or callee takes any further action (cancel, accpet, or decline it).

LOCAL_INVITATION_ERR_NOT_LOGGEDIN 

4: RETURNED TO THE CALLER. The caller is not logged in.

◆ LOCAL_INVITATION_STATE

RETURNED TO THE CALLER. States of an outgoing call invitation.

Enumerator
LOCAL_INVITATION_STATE_IDLE 

0: RETURNED TO THE CALLER. The initial state of a call invitation (idle).

LOCAL_INVITATION_STATE_SENT_TO_REMOTE 

1: RETURNED TO THE CALLER. The call invitation is sent to the callee.

LOCAL_INVITATION_STATE_RECEIVED_BY_REMOTE 

2: RETURNED TO THE CALLER. The call invitation is received by the callee.

LOCAL_INVITATION_STATE_ACCEPTED_BY_REMOTE 

3: RETURNED TO THE CALLER. The call invitation is accepted by the callee.

LOCAL_INVITATION_STATE_REFUSED_BY_REMOTE 

4: RETURNED TO THE CALLER. The call invitation is declined by the callee.

LOCAL_INVITATION_STATE_CANCELED 

5: RETURNED TO THE CALLER. You have canceled the call invitation.

LOCAL_INVITATION_STATE_FAILURE 

6: RETURNED TO THE CALLER. The call invitation fails.

◆ LOGIN_ERR_CODE

Error codes related to login.

Enumerator
LOGIN_ERR_OK 

0: The method call succeeds, or login succeeds.

LOGIN_ERR_UNKNOWN 

1: Login fails. The reason is unknown.

LOGIN_ERR_REJECTED 

2: Login is rejected by the server.

LOGIN_ERR_INVALID_ARGUMENT 

3: Invalid login argument.

LOGIN_ERR_INVALID_APP_ID 

4: The App ID is invalid.

LOGIN_ERR_INVALID_TOKEN 

5: The token is invalid.

LOGIN_ERR_TOKEN_EXPIRED 

6: The token has expired, and hence login is rejected.

LOGIN_ERR_NOT_AUTHORIZED 

7: Unauthorized login.

LOGIN_ERR_ALREADY_LOGGED_IN 

8: The user has already logged in or is logging in the Agora RTM system, or the user has not called the CONNECTION_STATE_ABORTED state.

LOGIN_ERR_TIMEOUT 

9: The login times out. The current timeout is set as six seconds. You need to log in again.

LOGIN_ERR_TOO_OFTEN 

10: The call frequency of the Login method exceeds the limit of two queries per second.

◆ LOGOUT_ERR_CODE

Error codes related to logout.

Enumerator
LOGOUT_ERR_OK 

0: The method call succeeds, or logout succeeds.

LOGOUT_ERR_REJECTED 

1: RESERVED FOR FUTURE USE

LOGOUT_ERR_USER_NOT_LOGGED_IN 

102: The user does not call the Login method, or the method call of Login does not succeed before the user logs out of the Agora RTM system.

◆ MESSAGE_FLAG

Enumerator
RECEIVE 
SEND 

◆ MESSAGE_TYPE

Enumerator
MESSAGE_TYPE_UNDEFINED 

0: The message type is undefined.

MESSAGE_TYPE_TEXT 

1: A text message.

MESSAGE_TYPE_RAW 

2: A raw message. A raw message is a binary message whose size does not exceed 32 KB.

MESSAGE_TYPE_FILE 

3: A file message. The size of a file message must be less than 32 KB.

MESSAGE_TYPE_IMAGE 

4: An image message. The size of an image message must be less than 32 KB.

◆ PEER_MESSAGE_ERR_CODE

Error codes related to sending a peer-to-peer message.

Enumerator
PEER_MESSAGE_ERR_OK 

0: The method call succeeds, or the specified user receives the peer-to-peer message.

PEER_MESSAGE_ERR_FAILURE 

1: The sender fails to send the peer-to-peer message.

PEER_MESSAGE_ERR_SENT_TIMEOUT 

2: A timeout occurs when sending the peer-to-peer message. The current timeout is set as 10 seconds. Possible reasons: The user is in the CONNECTION_STATE_ABORTED or CONNECTION_STATE_RECONNECTING state.

PEER_MESSAGE_ERR_PEER_UNREACHABLE 

3: The specified user is offline and does not receive this peer-to-peer message.

PEER_MESSAGE_ERR_CACHED_BY_SERVER 

4: The receiver is offline and does not receive this offline peer-to-peer message, but the server has cached it and will re-send it once he/she is back online.

PEER_MESSAGE_ERR_TOO_OFTEN 

5: The method call frequency exceeds the limit of 180 calls every three seconds, with channel and peer messages taken together.

PEER_MESSAGE_ERR_INVALID_USERID 

6: The user ID is invalid.

PEER_MESSAGE_ERR_INVALID_MESSAGE 

7: The message is null or exceeds 32 KB in length.

PEER_MESSAGE_ERR_IMCOMPATIBLE_MESSAGE 

8: The message receiver‘s SDK is of an earlier version and hence cannot recognize this message.

PEER_MESSAGE_ERR_USER_NOT_LOGGED_IN 

102: The sender does not call the Login method, or the method call of Login does not succeed before sending the peer-to-peer message.

◆ PEER_ONLINE_STATE

The online states of a peer.

Enumerator
PEER_ONLINE_STATE_ONLINE 

0: The peer is online (the SDK has logged in the Agora RTM system).

PEER_ONLINE_STATE_UNREACHABLE 

1: The peer is temporarily unreachable (the server has not received a packet from the SDK for more than six seconds).

PEER_ONLINE_STATE_OFFLINE 

2: The peer is offline (the SDK has not logged in the Agora RTM system, or it has logged out of the system, or the server has not received a packet from the SDK for more than 30 seconds).

◆ PEER_SUBSCRIPTION_OPTION

Subscription types.

Enumerator
PEER_SUBSCRIPTION_OPTION_ONLINE_STATUS 

0: Takes out a subscription to the online status of specified users.

◆ PEER_SUBSCRIPTION_STATUS_ERR

Error codes related to subscribing to or unsubscribing from the status of specified peers.

Enumerator
PEER_SUBSCRIPTION_STATUS_ERR_OK 

0: The method call succeeds, or the operation succeeds.

PEER_SUBSCRIPTION_STATUS_ERR_FAILURE 

1: Common failure. The user fails to subscribe to or unsubscribe from the status of the specified peers.

PEER_SUBSCRIPTION_STATUS_ERR_INVALID_ARGUMENT 

2: The method call fails. The argument is invalid.

PEER_SUBSCRIPTION_STATUS_ERR_REJECTED 

3: RESERVED FOR FUTURE USE

PEER_SUBSCRIPTION_STATUS_ERR_TIMEOUT 

4: The SDK fails to receive a response from the server within 10 seconds. The current timeout is set as 10 seconds. Possible reasons: The user is in the CONNECTION_STATE_ABORTED or CONNECTION_STATE_RECONNECTING state.

PEER_SUBSCRIPTION_STATUS_ERR_TOO_OFTEN 

5: The method call frequency exceeds the limit of 10 queries every five seconds.

PEER_SUBSCRIPTION_STATUS_ERR_OVERFLOW 

6: The number of peers, to whom you subscribe, exceeds the limit of 512.

PEER_SUBSCRIPTION_STATUS_ERR_USER_NOT_LOGGED_IN 

102: The user does not call the Login method, or the method call of Login does not succeed before this operation.

◆ QUERY_PEERS_BY_SUBSCRIPTION_OPTION_ERR

Error codes related to getting a list of the peers by subscription option type.

Enumerator
QUERY_PEERS_BY_SUBSCRIPTION_OPTION_ERR_OK 

0: The method call succeeds, or the operation succeeds.

QUERY_PEERS_BY_SUBSCRIPTION_OPTION_ERR_FAILURE 

1: Common failure. The user fails to query peers by subscription option type.

QUERY_PEERS_BY_SUBSCRIPTION_OPTION_ERR_TIMEOUT 

2: The SDK fails to receive a response from the server within 5 seconds. The current timeout is set as 5 seconds. Possible reasons: The user is in the CONNECTION_STATE_ABORTED or CONNECTION_STATE_RECONNECTING state.

QUERY_PEERS_BY_SUBSCRIPTION_OPTION_ERR_TOO_OFTEN 

3: The method call frequency exceeds the limit of 10 queries every five seconds.

QUERY_PEERS_BY_SUBSCRIPTION_OPTION_ERR_USER_NOT_LOGGED_IN 

102: The user does not call the Login method, or the method call of Login does not succeed before the query.

◆ QUERY_PEERS_ONLINE_STATUS_ERR

Error codes related to querying the online status of the specified peers.

Enumerator
QUERY_PEERS_ONLINE_STATUS_ERR_OK 

0: The method call succeeds, or the operation succeeds.

QUERY_PEERS_ONLINE_STATUS_ERR_FAILURE 

1: Common failure. The user fails to query the online status of the specified peers.

QUERY_PEERS_ONLINE_STATUS_ERR_INVALID_ARGUMENT 

2: The method call fails. The argument is invalid.

QUERY_PEERS_ONLINE_STATUS_ERR_REJECTED 

3: RESERVED FOR FUTURE USE

QUERY_PEERS_ONLINE_STATUS_ERR_TIMEOUT 

4: The SDK fails to receive a response from the server in 10 seconds. The current timeout is set as 10 seconds. Possible reasons: The user is in the CONNECTION_STATE_ABORTED or CONNECTION_STATE_RECONNECTING state.

QUERY_PEERS_ONLINE_STATUS_ERR_TOO_OFTEN 

5: The method call frequency exceeds the limit of (RTM SDK for Windows C++) 10 calls every five seconds.

QUERY_PEERS_ONLINE_STATUS_ERR_USER_NOT_LOGGED_IN 

102: The user does not call the Login method, or the method call of Login does not succeed before querying the online status.

◆ REMOTE_INVITATION_ERR_CODE

RETURNED TO THE CALLEE. Error codes of an incoming call invitation.

Enumerator
REMOTE_INVITATION_ERR_OK 

0: RETURNED TO THE CALLEE. The incoming calll invitation succeeds.

REMOTE_INVITATION_ERR_PEER_OFFLINE 

1: RETURNED TO THE CALLEE. The call invitation received by the callee fails: the callee is not online.

REMOTE_INVITATION_ERR_ACCEPT_FAILURE 

2: RETURNED TO THE CALLEE. The call invitation received by callee fails: The callee does not ACK within a set time after the callee accepts the call invitation. This is usually a result of a network interruption.

REMOTE_INVITATION_ERR_INVITATION_EXPIRE 

3: RETURNED TO THE CALLEE. The call invitation expires 60 seconds since it is sent, if the callee ACKs to the call invitation but neither the caller or callee takes any further action (cancel, accpet, or decline it).

◆ REMOTE_INVITATION_STATE

RETURNED TO THE CALLEE. States of an incoming call invitation.

Enumerator
REMOTE_INVITATION_STATE_IDLE 

0: RETURNED TO THE CALLEE. The initial state of a call invitation (idle).

REMOTE_INVITATION_STATE_INVITATION_RECEIVED 

1: RETURNED TO THE CALLEE. A call invitation from a remote caller is received.

REMOTE_INVITATION_STATE_ACCEPT_SENT_TO_LOCAL 

2: RETURNED TO THE CALLEE. The message is sent to the caller that the call invitation is accepted.

REMOTE_INVITATION_STATE_REFUSED 

3: RETURNED TO THE CALLEE. You have declined the call invitation.

REMOTE_INVITATION_STATE_ACCEPTED 

4: RETURNED TO THE CALLEE. You have accepted the call invitation.

REMOTE_INVITATION_STATE_CANCELED 

5: RETURNED TO THE CALLEE. The call invitation is canceled by the remote caller.

REMOTE_INVITATION_STATE_FAILURE 

6: RETURNED TO THE CALLEE. The call invitation fails.

◆ RENEW_TOKEN_ERR_CODE

Error codes related to renewing the RTM Token.

Enumerator
RENEW_TOKEN_ERR_OK 

0: The method call succeeds, or the renewing operation succeeds.

RENEW_TOKEN_ERR_FAILURE 

1: Common failure. The user fails to renew the token.

RENEW_TOKEN_ERR_INVALID_ARGUMENT 

2: The method call fails. The argument is invalid.

RENEW_TOKEN_ERR_REJECTED 

3: RESERVED FOR FUTURE USE

RENEW_TOKEN_ERR_TOO_OFTEN 

4: The method call frequency exceeds the limit of two queries per second.

RENEW_TOKEN_ERR_TOKEN_EXPIRED 

5: The token has expired.

RENEW_TOKEN_ERR_INVALID_TOKEN 

6: The token is invalid.

RENEW_TOKEN_ERR_USER_NOT_LOGGED_IN 

102: The user does not call the Login method, or the method call of Login does not succeed before renewing the token.

◆ UPLOAD_MEDIA_ERR_CODE

Error codes related to uploading a file or image.

Enumerator
UPLOAD_MEDIA_ERR_OK 

0: The method call succeeds, or the operation succeeds.

UPLOAD_MEDIA_ERR_FAILURE 

1: Unknown common failure. Please check whether the file exists and whether you can access the file.

UPLOAD_MEDIA_ERR_INVALID_ARGUMENT 

2: The argument you put is invalid. For example, mediaId is in the wrong format.

UPLOAD_MEDIA_ERR_TIMEOUT 

3: A timeout occurs. The current timeout is set as 120 seconds. The SDK assumes that a timeout occurs if it has not detected any file transmission between the SDK and the file server for 120 seconds.

UPLOAD_MEDIA_ERR_SIZE_OVERFLOW 

4: The size of the file or image to upload exceeds 30 MB.

UPLOAD_MEDIA_ERR_CONCURRENCY_LIMIT_EXCEEDED 

5: You have exceeded the upper limit for file upload. You can initiate a maximum of nine file upload or download tasks at the same time (upload and download tasks count together).

UPLOAD_MEDIA_ERR_INTERRUPTED 

6: The file or image upload task is aborted for either of the following reasons:

UPLOAD_MEDIA_ERR_NOT_LOGGED_IN 

102: The user does not call the Login method, or the method call of Login does not succeed before this operation.