Agora C++ API Reference for All Platforms
|
422 char **value)
const = 0;
581 virtual const char *
getId()
const = 0;
677 virtual int login(
const char *token,
const char *userId) = 0;
virtual void setEventHandler(IChannelEventHandler *eventHandler)=0
MESSAGE_TYPE
Definition: IAgoraRtmService.h:274
@ CONNECTION_STATE_ABORTED
Definition: IAgoraRtmService.h:95
static IMessage * createMessage()
virtual int getMessageType() const =0
@ CHANNEL_MESSAGE_RECEIVED_BY_SERVER
Definition: IAgoraRtmService.h:105
virtual int login(const char *token, const char *userId)=0
virtual void setRawMessage(const uint8_t *data, int length)=0
virtual int removeAttribute(const char *key)=0
@ JOIN_CHANNEL_ERR_TOO_OFTEN
Definition: IAgoraRtmService.h:154
@ LEAVE_CHANNEL_ERR_OK
Definition: IAgoraRtmService.h:179
@ JOIN_CHANNEL_ERR_JOIN_SAME_CHANNEL_TOO_OFTEN
Definition: IAgoraRtmService.h:159
@ LEAVE_CHANNEL_ERR_REJECTED
Definition: IAgoraRtmService.h:189
virtual void onSendMessageState(int64_t messageId, PEER_MESSAGE_STATE state)
Definition: IAgoraRtmService.h:625
@ CHANNEL_MESSAGE_ERR_FAILURE
Definition: IAgoraRtmService.h:233
virtual void onDeleteAttributesResponse(int64_t requestId, RESPONSE_CODE resCode)
Definition: IAgoraRtmService.h:511
LOGOUT_ERR_CODE
Definition: IAgoraRtmService.h:67
virtual const char * getText() const =0
@ MESSAGE_TYPE_UNDEFINED
Definition: IAgoraRtmService.h:278
@ JOIN_CHANNEL_ERR_EXCEED_LIMIT
Definition: IAgoraRtmService.h:144
virtual void onSendMessageResult(long long messageId, CHANNEL_MESSAGE_ERR_CODE state)
Definition: IAgoraRtmService.h:473
virtual ~IMessage()
Definition: IAgoraRtmService.h:307
virtual const char * getChannelId() const =0
virtual int release(bool sync=false)=0
@ LOGOUT_ERR_OK
Definition: IAgoraRtmService.h:71
@ RESPONSE_CODE_SUCCESS
Definition: IAgoraRtmService.h:268
virtual IChannel * createChannel(const char *channelId, IChannelEventHandler *eventHandler)=0
@ LOGIN_ERR_INVALID_APP_ID
Definition: IAgoraRtmService.h:46
@ MESSAGE_TYPE_BINARY
Definition: IAgoraRtmService.h:286
virtual void onJoinFailure(JOIN_CHANNEL_ERR errorCode)
Definition: IAgoraRtmService.h:450
virtual ~IRtmService()
Definition: IAgoraRtmService.h:638
RESPONSE_CODE
Definition: IAgoraRtmService.h:264
Definition: IAgoraRtmService.h:636
@ LOGIN_ERR_INVALID_ARGUMENT
Definition: IAgoraRtmService.h:42
CHANNEL_MESSAGE_ERR_CODE
Error codes related to sending a channel message.
Definition: IAgoraRtmService.h:223
@ CONNECTION_STATE_DISCONNECTED
Definition: IAgoraRtmService.h:88
@ JOIN_CHANNEL_ERR_NOT_INITIALIZED
Definition: IAgoraRtmService.h:164
@ LOGIN_ERR_OK
Definition: IAgoraRtmService.h:29
@ PEER_MESSAGE_PEER_UNREACHABLE
Definition: IAgoraRtmService.h:18
CHANNEL_MESSAGE_STATE
Definition: IAgoraRtmService.h:101
@ LOGIN_ERR_NOT_AUTHORIZED
Definition: IAgoraRtmService.h:58
@ LEAVE_CHANNEL_ERR_USER_NOT_LOGGED_IN
Definition: IAgoraRtmService.h:204
Definition: IAgoraRtmService.h:295
@ LOGIN_ERR_REJECTED
Definition: IAgoraRtmService.h:38
@ PEER_MESSAGE_INIT
Definition: IAgoraRtmService.h:16
virtual void getAttributes(int size, char **key, char **value) const =0
virtual int sendMessage(const IMessage *message)=0
@ CONNECTION_STATE_CONNECTED
Definition: IAgoraRtmService.h:84
virtual void setMessageType(int32_t type)=0
virtual void onMessageReceivedFromPeer(const char *peerId, const IMessage *message)
Definition: IAgoraRtmService.h:631
Definition: AgoraAtomicOps.h:21
@ JOIN_CHANNEL_ERR_FAILURE
Definition: IAgoraRtmService.h:124
virtual int updateAttributes(IChannelAttributes *attributes, int64_t &requestId)=0
@ JOIN_CHANNEL_TIMEOUT
Definition: IAgoraRtmService.h:139
virtual int getAttributesSize() const =0
virtual void onMemberLeft(IChannelMember *member)
Definition: IAgoraRtmService.h:483
Definition: IAgoraRtmService.h:382
virtual ~IChannelEventHandler()
Definition: IAgoraRtmService.h:441
@ CHANNEL_MESSAGE_ERR_TOO_OFTEN
Definition: IAgoraRtmService.h:243
@ LEAVE_CHANNEL_ERR_FAILURE
Definition: IAgoraRtmService.h:184
@ JOIN_CHANNEL_ERR_INVALID_ARGUMENT
Definition: IAgoraRtmService.h:134
@ JOIN_CHANNEL_ERR_ALREADY_JOINED
Definition: IAgoraRtmService.h:149
virtual void onLoginSuccess()
Definition: IAgoraRtmService.h:605
@ CHANNEL_MESSAGE_ERR_USER_NOT_LOGGED_IN
Definition: IAgoraRtmService.h:258
virtual void onLoginFailure(LOGIN_ERR_CODE errorCode)
Definition: IAgoraRtmService.h:610
@ CHANNEL_MESSAGE_ERR_NOT_INITIALIZED
Definition: IAgoraRtmService.h:253
Definition: IAgoraRtmService.h:516
virtual ~IChannelMember()
Definition: IAgoraRtmService.h:363
@ JOIN_CHANNEL_ERR_OK
Definition: IAgoraRtmService.h:119
virtual const char * getId() const =0
@ RESPONSE_CODE_FAILURE
Definition: IAgoraRtmService.h:269
PEER_MESSAGE_STATE
Definition: IAgoraRtmService.h:15
@ CHANNEL_MESSAGE_ERR_INVALID_MESSAGE
Definition: IAgoraRtmService.h:248
@ PEER_MESSAGE_FAILURE
Definition: IAgoraRtmService.h:17
virtual void unregisterObserver(IRtmServiceEventHandler *eventHandler)=0
Definition: IAgoraRtmService.h:361
virtual void setText(const char *str)=0
@ MESSAGE_TYPE_TEXT
Definition: IAgoraRtmService.h:282
virtual void onLeave(LEAVE_CHANNEL_ERR errorCode)
Definition: IAgoraRtmService.h:455
virtual int initialize(const char *appId, IRtmServiceEventHandler *eventHandler)=0
virtual void onMemberJoined(IChannelMember *member)
Definition: IAgoraRtmService.h:478
virtual int getRawMessageLength() const =0
virtual int64_t getMessageId() const =0
virtual void onMessageReceived(const char *userId, const IMessage *message)
Definition: IAgoraRtmService.h:460
@ CHANNEL_MESSAGE_ERR_SENT_TIMEOUT
Definition: IAgoraRtmService.h:238
@ LEAVE_CHANNEL_REASON_KICKED
Definition: IAgoraRtmService.h:218
LOGIN_ERR_CODE
Definition: IAgoraRtmService.h:25
@ LOGOUT_ERR_REJECTED
Definition: IAgoraRtmService.h:75
LEAVE_CHANNEL_REASON
Definition: IAgoraRtmService.h:210
virtual void onAttributesUpdated(const IChannelAttributes *attributes)
Definition: IAgoraRtmService.h:494
virtual void onJoinSuccess()
Definition: IAgoraRtmService.h:445
virtual const char * getMemberId() const =0
virtual int addAttribute(const char *key, const char *value)=0
@ CHANNEL_MESSAGE_ERR_OK
Definition: IAgoraRtmService.h:228
@ LOGIN_ERR_UNKNOWN
Definition: IAgoraRtmService.h:33
virtual const char * getAttributeValue(const char *key) const =0
@ PEER_MESSAGE_SENT_TIMEOUT
Definition: IAgoraRtmService.h:20
@ MESSAGE_TYPE_CONVERGE
Definition: IAgoraRtmService.h:290
@ JOIN_CHANNEL_ERR_USER_NOT_LOGGED_IN
Definition: IAgoraRtmService.h:169
@ LEAVE_CHANNEL_REASON_QUIT
Definition: IAgoraRtmService.h:214
CONNECTION_STATE
Definition: IAgoraRtmService.h:80
virtual ~IRtmServiceEventHandler()
Definition: IAgoraRtmService.h:600
virtual int deleteAttributes(IChannelAttributes *attributes, int64_t &requestId)=0
@ LOGIN_ERR_TIMEOUT
Definition: IAgoraRtmService.h:62
Definition: IAgoraRtmService.h:439
virtual void onConnectionStateChanged(CONNECTION_STATE state)
Definition: IAgoraRtmService.h:619
JOIN_CHANNEL_ERR
Definition: IAgoraRtmService.h:115
@ JOIN_CHANNEL_ERR_REJECTED
Definition: IAgoraRtmService.h:129
@ LOGIN_ERR_TOKEN_EXPIRED
Definition: IAgoraRtmService.h:54
virtual int sendMessageToPeer(const char *peerId, const IMessage *message)=0
@ PEER_MESSAGE_RECEIVED_BY_PEER
Definition: IAgoraRtmService.h:19
@ LOGIN_ERR_INVALID_TOKEN
Definition: IAgoraRtmService.h:50
virtual const unsigned char * getRawMessageData() const =0
LEAVE_CHANNEL_ERR
Error codes related to leaving a channel.
Definition: IAgoraRtmService.h:174
virtual void onMembersGotten(IChannelMember **members, int userCount)
Definition: IAgoraRtmService.h:489
static IChannelAttributes * createChannelAttributes()
virtual void onAttributesDeleted(const IChannelAttributes *attributes)
Definition: IAgoraRtmService.h:505
virtual void onLogout()
Definition: IAgoraRtmService.h:614
@ LEAVE_CHANNEL_ERR_NOT_IN_CHANNEL
Definition: IAgoraRtmService.h:194
@ LEAVE_CHANNEL_ERR_NOT_INITIALIZED
Definition: IAgoraRtmService.h:199
@ CHANNEL_MESSAGE_SENT_TIMEOUT
Definition: IAgoraRtmService.h:110
Definition: IAgoraRtmService.h:598
virtual void onSendMessageState(int64_t messageId, CHANNEL_MESSAGE_STATE state)
Definition: IAgoraRtmService.h:466
virtual void onUpdateAttributesResponse(int64_t requestId, RESPONSE_CODE resCode)
Definition: IAgoraRtmService.h:500