Agora C++ API Reference for All Platforms
|
9 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
424 char **value)
const = 0;
583 virtual const char *
getId()
const = 0;
679 virtual int login(
const char *token,
const char *userId) = 0;
virtual void setEventHandler(IChannelEventHandler *eventHandler)=0
MESSAGE_TYPE
Definition: IAgoraRtmService.h:276
@ CONNECTION_STATE_ABORTED
Definition: IAgoraRtmService.h:97
static IMessage * createMessage()
virtual int getMessageType() const =0
@ CHANNEL_MESSAGE_RECEIVED_BY_SERVER
Definition: IAgoraRtmService.h:107
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:156
@ LEAVE_CHANNEL_ERR_OK
Definition: IAgoraRtmService.h:181
@ JOIN_CHANNEL_ERR_JOIN_SAME_CHANNEL_TOO_OFTEN
Definition: IAgoraRtmService.h:161
@ LEAVE_CHANNEL_ERR_REJECTED
Definition: IAgoraRtmService.h:191
virtual void onSendMessageState(int64_t messageId, PEER_MESSAGE_STATE state)
Definition: IAgoraRtmService.h:627
@ CHANNEL_MESSAGE_ERR_FAILURE
Definition: IAgoraRtmService.h:235
virtual void onDeleteAttributesResponse(int64_t requestId, RESPONSE_CODE resCode)
Definition: IAgoraRtmService.h:513
LOGOUT_ERR_CODE
Definition: IAgoraRtmService.h:69
virtual const char * getText() const =0
@ MESSAGE_TYPE_UNDEFINED
Definition: IAgoraRtmService.h:280
@ JOIN_CHANNEL_ERR_EXCEED_LIMIT
Definition: IAgoraRtmService.h:146
virtual void onSendMessageResult(long long messageId, CHANNEL_MESSAGE_ERR_CODE state)
Definition: IAgoraRtmService.h:475
virtual ~IMessage()
Definition: IAgoraRtmService.h:309
virtual const char * getChannelId() const =0
virtual int release(bool sync=false)=0
@ LOGOUT_ERR_OK
Definition: IAgoraRtmService.h:73
@ RESPONSE_CODE_SUCCESS
Definition: IAgoraRtmService.h:270
virtual IChannel * createChannel(const char *channelId, IChannelEventHandler *eventHandler)=0
@ LOGIN_ERR_INVALID_APP_ID
Definition: IAgoraRtmService.h:48
@ MESSAGE_TYPE_BINARY
Definition: IAgoraRtmService.h:288
virtual void onJoinFailure(JOIN_CHANNEL_ERR errorCode)
Definition: IAgoraRtmService.h:452
virtual ~IRtmService()
Definition: IAgoraRtmService.h:640
RESPONSE_CODE
Definition: IAgoraRtmService.h:266
Definition: IAgoraRtmService.h:638
@ LOGIN_ERR_INVALID_ARGUMENT
Definition: IAgoraRtmService.h:44
CHANNEL_MESSAGE_ERR_CODE
Error codes related to sending a channel message.
Definition: IAgoraRtmService.h:225
@ CONNECTION_STATE_DISCONNECTED
Definition: IAgoraRtmService.h:90
@ JOIN_CHANNEL_ERR_NOT_INITIALIZED
Definition: IAgoraRtmService.h:166
@ LOGIN_ERR_OK
Definition: IAgoraRtmService.h:31
@ PEER_MESSAGE_PEER_UNREACHABLE
Definition: IAgoraRtmService.h:20
CHANNEL_MESSAGE_STATE
Definition: IAgoraRtmService.h:103
@ LOGIN_ERR_NOT_AUTHORIZED
Definition: IAgoraRtmService.h:60
@ LEAVE_CHANNEL_ERR_USER_NOT_LOGGED_IN
Definition: IAgoraRtmService.h:206
Definition: IAgoraRtmService.h:297
@ LOGIN_ERR_REJECTED
Definition: IAgoraRtmService.h:40
@ PEER_MESSAGE_INIT
Definition: IAgoraRtmService.h:18
virtual void getAttributes(int size, char **key, char **value) const =0
virtual int sendMessage(const IMessage *message)=0
@ CONNECTION_STATE_CONNECTED
Definition: IAgoraRtmService.h:86
virtual void setMessageType(int32_t type)=0
virtual void onMessageReceivedFromPeer(const char *peerId, const IMessage *message)
Definition: IAgoraRtmService.h:633
Definition: AgoraAtomicOps.h:21
@ JOIN_CHANNEL_ERR_FAILURE
Definition: IAgoraRtmService.h:126
virtual int updateAttributes(IChannelAttributes *attributes, int64_t &requestId)=0
@ JOIN_CHANNEL_TIMEOUT
Definition: IAgoraRtmService.h:141
virtual int getAttributesSize() const =0
virtual void onMemberLeft(IChannelMember *member)
Definition: IAgoraRtmService.h:485
Definition: IAgoraRtmService.h:384
virtual ~IChannelEventHandler()
Definition: IAgoraRtmService.h:443
@ CHANNEL_MESSAGE_ERR_TOO_OFTEN
Definition: IAgoraRtmService.h:245
@ LEAVE_CHANNEL_ERR_FAILURE
Definition: IAgoraRtmService.h:186
@ JOIN_CHANNEL_ERR_INVALID_ARGUMENT
Definition: IAgoraRtmService.h:136
@ JOIN_CHANNEL_ERR_ALREADY_JOINED
Definition: IAgoraRtmService.h:151
virtual void onLoginSuccess()
Definition: IAgoraRtmService.h:607
@ CHANNEL_MESSAGE_ERR_USER_NOT_LOGGED_IN
Definition: IAgoraRtmService.h:260
virtual void onLoginFailure(LOGIN_ERR_CODE errorCode)
Definition: IAgoraRtmService.h:612
@ CHANNEL_MESSAGE_ERR_NOT_INITIALIZED
Definition: IAgoraRtmService.h:255
Definition: IAgoraRtmService.h:518
virtual ~IChannelMember()
Definition: IAgoraRtmService.h:365
@ JOIN_CHANNEL_ERR_OK
Definition: IAgoraRtmService.h:121
virtual const char * getId() const =0
@ RESPONSE_CODE_FAILURE
Definition: IAgoraRtmService.h:271
PEER_MESSAGE_STATE
Definition: IAgoraRtmService.h:17
@ CHANNEL_MESSAGE_ERR_INVALID_MESSAGE
Definition: IAgoraRtmService.h:250
@ PEER_MESSAGE_FAILURE
Definition: IAgoraRtmService.h:19
virtual void unregisterObserver(IRtmServiceEventHandler *eventHandler)=0
Definition: IAgoraRtmService.h:363
virtual void setText(const char *str)=0
@ MESSAGE_TYPE_TEXT
Definition: IAgoraRtmService.h:284
virtual void onLeave(LEAVE_CHANNEL_ERR errorCode)
Definition: IAgoraRtmService.h:457
virtual int initialize(const char *appId, IRtmServiceEventHandler *eventHandler)=0
virtual void onMemberJoined(IChannelMember *member)
Definition: IAgoraRtmService.h:480
virtual int getRawMessageLength() const =0
virtual int64_t getMessageId() const =0
virtual void onMessageReceived(const char *userId, const IMessage *message)
Definition: IAgoraRtmService.h:462
@ CHANNEL_MESSAGE_ERR_SENT_TIMEOUT
Definition: IAgoraRtmService.h:240
@ LEAVE_CHANNEL_REASON_KICKED
Definition: IAgoraRtmService.h:220
LOGIN_ERR_CODE
Definition: IAgoraRtmService.h:27
@ LOGOUT_ERR_REJECTED
Definition: IAgoraRtmService.h:77
LEAVE_CHANNEL_REASON
Definition: IAgoraRtmService.h:212
virtual void onAttributesUpdated(const IChannelAttributes *attributes)
Definition: IAgoraRtmService.h:496
virtual void onJoinSuccess()
Definition: IAgoraRtmService.h:447
virtual const char * getMemberId() const =0
virtual int addAttribute(const char *key, const char *value)=0
@ CHANNEL_MESSAGE_ERR_OK
Definition: IAgoraRtmService.h:230
@ LOGIN_ERR_UNKNOWN
Definition: IAgoraRtmService.h:35
virtual const char * getAttributeValue(const char *key) const =0
@ PEER_MESSAGE_SENT_TIMEOUT
Definition: IAgoraRtmService.h:22
@ MESSAGE_TYPE_CONVERGE
Definition: IAgoraRtmService.h:292
@ JOIN_CHANNEL_ERR_USER_NOT_LOGGED_IN
Definition: IAgoraRtmService.h:171
@ LEAVE_CHANNEL_REASON_QUIT
Definition: IAgoraRtmService.h:216
CONNECTION_STATE
Definition: IAgoraRtmService.h:82
virtual ~IRtmServiceEventHandler()
Definition: IAgoraRtmService.h:602
virtual int deleteAttributes(IChannelAttributes *attributes, int64_t &requestId)=0
@ LOGIN_ERR_TIMEOUT
Definition: IAgoraRtmService.h:64
Definition: IAgoraRtmService.h:441
virtual void onConnectionStateChanged(CONNECTION_STATE state)
Definition: IAgoraRtmService.h:621
JOIN_CHANNEL_ERR
Definition: IAgoraRtmService.h:117
@ JOIN_CHANNEL_ERR_REJECTED
Definition: IAgoraRtmService.h:131
@ LOGIN_ERR_TOKEN_EXPIRED
Definition: IAgoraRtmService.h:56
virtual int sendMessageToPeer(const char *peerId, const IMessage *message)=0
@ PEER_MESSAGE_RECEIVED_BY_PEER
Definition: IAgoraRtmService.h:21
@ LOGIN_ERR_INVALID_TOKEN
Definition: IAgoraRtmService.h:52
virtual const unsigned char * getRawMessageData() const =0
LEAVE_CHANNEL_ERR
Error codes related to leaving a channel.
Definition: IAgoraRtmService.h:176
virtual void onMembersGotten(IChannelMember **members, int userCount)
Definition: IAgoraRtmService.h:491
static IChannelAttributes * createChannelAttributes()
virtual void onAttributesDeleted(const IChannelAttributes *attributes)
Definition: IAgoraRtmService.h:507
virtual void onLogout()
Definition: IAgoraRtmService.h:616
@ LEAVE_CHANNEL_ERR_NOT_IN_CHANNEL
Definition: IAgoraRtmService.h:196
@ LEAVE_CHANNEL_ERR_NOT_INITIALIZED
Definition: IAgoraRtmService.h:201
@ CHANNEL_MESSAGE_SENT_TIMEOUT
Definition: IAgoraRtmService.h:112
Definition: IAgoraRtmService.h:600
virtual void onSendMessageState(int64_t messageId, CHANNEL_MESSAGE_STATE state)
Definition: IAgoraRtmService.h:468
virtual void onUpdateAttributesResponse(int64_t requestId, RESPONSE_CODE resCode)
Definition: IAgoraRtmService.h:502