Agora C++ API Reference for All Platforms
|
10 #include <api/cpp/aosl_ares_class.h>
423 char **value)
const = 0;
533 virtual int join(aosl_ref_t ares = AOSL_REF_INVALID) = 0;
542 virtual int leave(aosl_ref_t ares = AOSL_REF_INVALID) = 0;
582 virtual const char *
getId()
const = 0;
678 virtual int login(
const char *token,
const char *userId, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
685 virtual int logout(aosl_ref_t ares = AOSL_REF_INVALID) = 0;
virtual int setEventHandler(IChannelEventHandler *eventHandler, aosl_ref_t ares=AOSL_REF_INVALID)=0
MESSAGE_TYPE
Definition: IAgoraRtmService.h:275
@ CONNECTION_STATE_ABORTED
Definition: IAgoraRtmService.h:96
static IMessage * createMessage()
virtual int getMessageType() const =0
@ CHANNEL_MESSAGE_RECEIVED_BY_SERVER
Definition: IAgoraRtmService.h:106
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:155
@ LEAVE_CHANNEL_ERR_OK
Definition: IAgoraRtmService.h:180
@ JOIN_CHANNEL_ERR_JOIN_SAME_CHANNEL_TOO_OFTEN
Definition: IAgoraRtmService.h:160
@ LEAVE_CHANNEL_ERR_REJECTED
Definition: IAgoraRtmService.h:190
virtual void onSendMessageState(int64_t messageId, PEER_MESSAGE_STATE state)
Definition: IAgoraRtmService.h:626
@ CHANNEL_MESSAGE_ERR_FAILURE
Definition: IAgoraRtmService.h:234
virtual void onDeleteAttributesResponse(int64_t requestId, RESPONSE_CODE resCode)
Definition: IAgoraRtmService.h:512
LOGOUT_ERR_CODE
Definition: IAgoraRtmService.h:68
virtual const char * getText() const =0
virtual int sendMessageToPeer(const char *peerId, const IMessage *message, aosl_ref_t ares=AOSL_REF_INVALID)=0
@ MESSAGE_TYPE_UNDEFINED
Definition: IAgoraRtmService.h:279
@ JOIN_CHANNEL_ERR_EXCEED_LIMIT
Definition: IAgoraRtmService.h:145
virtual void onSendMessageResult(long long messageId, CHANNEL_MESSAGE_ERR_CODE state)
Definition: IAgoraRtmService.h:474
virtual ~IMessage()
Definition: IAgoraRtmService.h:308
virtual const char * getChannelId() const =0
virtual int release(bool sync=false)=0
@ LOGOUT_ERR_OK
Definition: IAgoraRtmService.h:72
@ RESPONSE_CODE_SUCCESS
Definition: IAgoraRtmService.h:269
virtual IChannel * createChannel(const char *channelId, IChannelEventHandler *eventHandler)=0
@ LOGIN_ERR_INVALID_APP_ID
Definition: IAgoraRtmService.h:47
@ MESSAGE_TYPE_BINARY
Definition: IAgoraRtmService.h:287
virtual void onJoinFailure(JOIN_CHANNEL_ERR errorCode)
Definition: IAgoraRtmService.h:451
virtual ~IRtmService()
Definition: IAgoraRtmService.h:639
RESPONSE_CODE
Definition: IAgoraRtmService.h:265
Definition: IAgoraRtmService.h:637
virtual int leave(aosl_ref_t ares=AOSL_REF_INVALID)=0
@ LOGIN_ERR_INVALID_ARGUMENT
Definition: IAgoraRtmService.h:43
virtual int join(aosl_ref_t ares=AOSL_REF_INVALID)=0
CHANNEL_MESSAGE_ERR_CODE
Error codes related to sending a channel message.
Definition: IAgoraRtmService.h:224
@ CONNECTION_STATE_DISCONNECTED
Definition: IAgoraRtmService.h:89
@ JOIN_CHANNEL_ERR_NOT_INITIALIZED
Definition: IAgoraRtmService.h:165
@ LOGIN_ERR_OK
Definition: IAgoraRtmService.h:30
@ PEER_MESSAGE_PEER_UNREACHABLE
Definition: IAgoraRtmService.h:19
CHANNEL_MESSAGE_STATE
Definition: IAgoraRtmService.h:102
@ LOGIN_ERR_NOT_AUTHORIZED
Definition: IAgoraRtmService.h:59
@ LEAVE_CHANNEL_ERR_USER_NOT_LOGGED_IN
Definition: IAgoraRtmService.h:205
Definition: IAgoraRtmService.h:296
@ LOGIN_ERR_REJECTED
Definition: IAgoraRtmService.h:39
@ PEER_MESSAGE_INIT
Definition: IAgoraRtmService.h:17
virtual void getAttributes(int size, char **key, char **value) const =0
@ CONNECTION_STATE_CONNECTED
Definition: IAgoraRtmService.h:85
virtual void setMessageType(int32_t type)=0
virtual void onMessageReceivedFromPeer(const char *peerId, const IMessage *message)
Definition: IAgoraRtmService.h:632
Definition: AgoraAtomicOps.h:21
@ JOIN_CHANNEL_ERR_FAILURE
Definition: IAgoraRtmService.h:125
@ JOIN_CHANNEL_TIMEOUT
Definition: IAgoraRtmService.h:140
virtual int getAttributesSize() const =0
virtual void onMemberLeft(IChannelMember *member)
Definition: IAgoraRtmService.h:484
Definition: IAgoraRtmService.h:383
virtual ~IChannelEventHandler()
Definition: IAgoraRtmService.h:442
@ CHANNEL_MESSAGE_ERR_TOO_OFTEN
Definition: IAgoraRtmService.h:244
@ LEAVE_CHANNEL_ERR_FAILURE
Definition: IAgoraRtmService.h:185
virtual int deleteAttributes(IChannelAttributes *attributes, int64_t &requestId, aosl_ref_t ares=AOSL_REF_INVALID)=0
@ JOIN_CHANNEL_ERR_INVALID_ARGUMENT
Definition: IAgoraRtmService.h:135
@ JOIN_CHANNEL_ERR_ALREADY_JOINED
Definition: IAgoraRtmService.h:150
virtual void onLoginSuccess()
Definition: IAgoraRtmService.h:606
@ CHANNEL_MESSAGE_ERR_USER_NOT_LOGGED_IN
Definition: IAgoraRtmService.h:259
virtual void onLoginFailure(LOGIN_ERR_CODE errorCode)
Definition: IAgoraRtmService.h:611
@ CHANNEL_MESSAGE_ERR_NOT_INITIALIZED
Definition: IAgoraRtmService.h:254
Definition: IAgoraRtmService.h:517
virtual ~IChannelMember()
Definition: IAgoraRtmService.h:364
@ JOIN_CHANNEL_ERR_OK
Definition: IAgoraRtmService.h:120
virtual const char * getId() const =0
@ RESPONSE_CODE_FAILURE
Definition: IAgoraRtmService.h:270
PEER_MESSAGE_STATE
Definition: IAgoraRtmService.h:16
@ CHANNEL_MESSAGE_ERR_INVALID_MESSAGE
Definition: IAgoraRtmService.h:249
@ PEER_MESSAGE_FAILURE
Definition: IAgoraRtmService.h:18
virtual void unregisterObserver(IRtmServiceEventHandler *eventHandler)=0
Definition: IAgoraRtmService.h:362
virtual void setText(const char *str)=0
@ MESSAGE_TYPE_TEXT
Definition: IAgoraRtmService.h:283
virtual void onLeave(LEAVE_CHANNEL_ERR errorCode)
Definition: IAgoraRtmService.h:456
virtual int initialize(const char *appId, IRtmServiceEventHandler *eventHandler)=0
virtual void onMemberJoined(IChannelMember *member)
Definition: IAgoraRtmService.h:479
virtual int getRawMessageLength() const =0
virtual int64_t getMessageId() const =0
virtual void onMessageReceived(const char *userId, const IMessage *message)
Definition: IAgoraRtmService.h:461
@ CHANNEL_MESSAGE_ERR_SENT_TIMEOUT
Definition: IAgoraRtmService.h:239
@ LEAVE_CHANNEL_REASON_KICKED
Definition: IAgoraRtmService.h:219
LOGIN_ERR_CODE
Definition: IAgoraRtmService.h:26
@ LOGOUT_ERR_REJECTED
Definition: IAgoraRtmService.h:76
LEAVE_CHANNEL_REASON
Definition: IAgoraRtmService.h:211
virtual void onAttributesUpdated(const IChannelAttributes *attributes)
Definition: IAgoraRtmService.h:495
virtual void onJoinSuccess()
Definition: IAgoraRtmService.h:446
virtual const char * getMemberId() const =0
virtual int addAttribute(const char *key, const char *value)=0
@ CHANNEL_MESSAGE_ERR_OK
Definition: IAgoraRtmService.h:229
@ LOGIN_ERR_UNKNOWN
Definition: IAgoraRtmService.h:34
virtual const char * getAttributeValue(const char *key) const =0
@ PEER_MESSAGE_SENT_TIMEOUT
Definition: IAgoraRtmService.h:21
virtual int logout(aosl_ref_t ares=AOSL_REF_INVALID)=0
@ MESSAGE_TYPE_CONVERGE
Definition: IAgoraRtmService.h:291
@ JOIN_CHANNEL_ERR_USER_NOT_LOGGED_IN
Definition: IAgoraRtmService.h:170
virtual int sendMessage(const IMessage *message, aosl_ref_t ares=AOSL_REF_INVALID)=0
@ LEAVE_CHANNEL_REASON_QUIT
Definition: IAgoraRtmService.h:215
virtual int login(const char *token, const char *userId, aosl_ref_t ares=AOSL_REF_INVALID)=0
CONNECTION_STATE
Definition: IAgoraRtmService.h:81
virtual ~IRtmServiceEventHandler()
Definition: IAgoraRtmService.h:601
@ LOGIN_ERR_TIMEOUT
Definition: IAgoraRtmService.h:63
Definition: IAgoraRtmService.h:440
virtual void onConnectionStateChanged(CONNECTION_STATE state)
Definition: IAgoraRtmService.h:620
JOIN_CHANNEL_ERR
Definition: IAgoraRtmService.h:116
@ JOIN_CHANNEL_ERR_REJECTED
Definition: IAgoraRtmService.h:130
@ LOGIN_ERR_TOKEN_EXPIRED
Definition: IAgoraRtmService.h:55
@ PEER_MESSAGE_RECEIVED_BY_PEER
Definition: IAgoraRtmService.h:20
@ LOGIN_ERR_INVALID_TOKEN
Definition: IAgoraRtmService.h:51
virtual const unsigned char * getRawMessageData() const =0
LEAVE_CHANNEL_ERR
Error codes related to leaving a channel.
Definition: IAgoraRtmService.h:175
virtual void onMembersGotten(IChannelMember **members, int userCount)
Definition: IAgoraRtmService.h:490
static IChannelAttributes * createChannelAttributes()
virtual void onAttributesDeleted(const IChannelAttributes *attributes)
Definition: IAgoraRtmService.h:506
virtual void onLogout()
Definition: IAgoraRtmService.h:615
virtual int updateAttributes(IChannelAttributes *attributes, int64_t &requestId, aosl_ref_t ares=AOSL_REF_INVALID)=0
@ LEAVE_CHANNEL_ERR_NOT_IN_CHANNEL
Definition: IAgoraRtmService.h:195
@ LEAVE_CHANNEL_ERR_NOT_INITIALIZED
Definition: IAgoraRtmService.h:200
@ CHANNEL_MESSAGE_SENT_TIMEOUT
Definition: IAgoraRtmService.h:111
Definition: IAgoraRtmService.h:599
virtual void onSendMessageState(int64_t messageId, CHANNEL_MESSAGE_STATE state)
Definition: IAgoraRtmService.h:467
virtual void onUpdateAttributesResponse(int64_t requestId, RESPONSE_CODE resCode)
Definition: IAgoraRtmService.h:501