Agora RTC Objective-C API Reference Refactor

IAgoraRtmService.h
Go to the documentation of this file.
1 //
2 // Agora Rtm SDK
3 //
4 // Created by junhao Wang in 2018-05.
5 // Copyright (c) 2018 Agora IO. All rights reserved.
6 //
7 #pragma once
8
9 #include <stdint.h>
10 #include <api/cpp/aosl_ares_class.h>
11
12 namespace agora {
13
14 namespace rtm {
15
16 enum PEER_MESSAGE_STATE {
17 PEER_MESSAGE_INIT = 0,
18 PEER_MESSAGE_FAILURE = 1,
19 PEER_MESSAGE_PEER_UNREACHABLE = 2,
20 PEER_MESSAGE_RECEIVED_BY_PEER = 3,
21 PEER_MESSAGE_SENT_TIMEOUT = 4,
22 };
26 enum LOGIN_ERR_CODE {
30 LOGIN_ERR_OK = 0,
34 LOGIN_ERR_UNKNOWN = 1,
39 LOGIN_ERR_REJECTED = 2, // ALREADY LOGIN OR NOT INITIALIZED, SERVER REJECT
43 LOGIN_ERR_INVALID_ARGUMENT = 3,
47 LOGIN_ERR_INVALID_APP_ID = 4,
51 LOGIN_ERR_INVALID_TOKEN = 5,
55 LOGIN_ERR_TOKEN_EXPIRED = 6,
59 LOGIN_ERR_NOT_AUTHORIZED = 7,
63 LOGIN_ERR_TIMEOUT = 8,
64 };
68 enum LOGOUT_ERR_CODE {
72 LOGOUT_ERR_OK = 0,
76 LOGOUT_ERR_REJECTED = 1,
77 };
81 enum CONNECTION_STATE {
85 CONNECTION_STATE_CONNECTED = 1,
89 CONNECTION_STATE_DISCONNECTED = 2,
96 CONNECTION_STATE_ABORTED = 3,
97 };
98
102 enum CHANNEL_MESSAGE_STATE {
106 CHANNEL_MESSAGE_RECEIVED_BY_SERVER = 1,
111 CHANNEL_MESSAGE_SENT_TIMEOUT = 3,
112 };
116 enum JOIN_CHANNEL_ERR {
120 JOIN_CHANNEL_ERR_OK = 0,
121
125 JOIN_CHANNEL_ERR_FAILURE = 1,
126
130 JOIN_CHANNEL_ERR_REJECTED = 2, // Usually occurs when the user is already in the channel
131
135 JOIN_CHANNEL_ERR_INVALID_ARGUMENT = 3,
136
140 JOIN_CHANNEL_TIMEOUT = 4,
141
145 JOIN_CHANNEL_ERR_EXCEED_LIMIT = 5,
146
150 JOIN_CHANNEL_ERR_ALREADY_JOINED = 6,
151
155 JOIN_CHANNEL_ERR_TOO_OFTEN = 7,
156
160 JOIN_CHANNEL_ERR_JOIN_SAME_CHANNEL_TOO_OFTEN = 8,
161
165 JOIN_CHANNEL_ERR_NOT_INITIALIZED = 101,
166
170 JOIN_CHANNEL_ERR_USER_NOT_LOGGED_IN = 102,
171 };
175 enum LEAVE_CHANNEL_ERR {
176
180 LEAVE_CHANNEL_ERR_OK = 0,
181
185 LEAVE_CHANNEL_ERR_FAILURE = 1,
186
190 LEAVE_CHANNEL_ERR_REJECTED = 2,
191
195 LEAVE_CHANNEL_ERR_NOT_IN_CHANNEL = 3,
196
200 LEAVE_CHANNEL_ERR_NOT_INITIALIZED = 101,
201
205 LEAVE_CHANNEL_ERR_USER_NOT_LOGGED_IN = 102,
206 };
207
211 enum LEAVE_CHANNEL_REASON {
215 LEAVE_CHANNEL_REASON_QUIT = 1,
219 LEAVE_CHANNEL_REASON_KICKED = 2,
220 };
224 enum CHANNEL_MESSAGE_ERR_CODE {
225
229 CHANNEL_MESSAGE_ERR_OK = 0,
230
234 CHANNEL_MESSAGE_ERR_FAILURE = 1,
235
239 CHANNEL_MESSAGE_ERR_SENT_TIMEOUT = 2,
240
244 CHANNEL_MESSAGE_ERR_TOO_OFTEN = 3,
245
249 CHANNEL_MESSAGE_ERR_INVALID_MESSAGE = 4,
250
254 CHANNEL_MESSAGE_ERR_NOT_INITIALIZED = 101,
255
259 CHANNEL_MESSAGE_ERR_USER_NOT_LOGGED_IN = 102,
260 };
261
265 enum RESPONSE_CODE {
269 RESPONSE_CODE_SUCCESS = 1,
270 RESPONSE_CODE_FAILURE = 2,
271 };
275 enum MESSAGE_TYPE {
279 MESSAGE_TYPE_UNDEFINED = 0,
283 MESSAGE_TYPE_TEXT = 1,
287 MESSAGE_TYPE_BINARY = 2,
291 MESSAGE_TYPE_CONVERGE = 4,
292 };
296 class IMessage {
297 public:
307 static IMessage *createMessage();
308 virtual ~IMessage() {}
313 virtual int64_t getMessageId() const = 0;
320 virtual int getMessageType() const = 0;
326 virtual void setText(const char *str) = 0;
332 virtual const char *getText() const = 0;
338 virtual const unsigned char *getRawMessageData() const = 0;
344 virtual int getRawMessageLength() const = 0;
348 virtual void setMessageType(int32_t type) = 0;
352 virtual void setRawMessage(const uint8_t* data, int length) = 0;
356 virtual void release() = 0;
357 };
358
362 class IChannelMember {
363 public:
364 virtual ~IChannelMember() {}
369 virtual const char *getMemberId() const = 0;
374 virtual const char *getChannelId() const = 0;
378 virtual void release() = 0;
379 };
383 class IChannelAttributes {
384 public:
390 static IChannelAttributes *createChannelAttributes();
400 virtual int addAttribute(const char *key, const char *value) = 0;
408 virtual int removeAttribute(const char *key) = 0;
415 virtual int getAttributesSize() const = 0;
422 virtual void getAttributes(int size, char **key,
423 char **value) const = 0; // todo: discussion, how to traveral
428 virtual const char *getAttributeValue(const char *key) const = 0;
435 virtual int release() = 0;
436 };
440 class IChannelEventHandler {
441 public:
442 virtual ~IChannelEventHandler() {}
446 virtual void onJoinSuccess() {}
451 virtual void onJoinFailure(JOIN_CHANNEL_ERR errorCode) {}
456 virtual void onLeave(LEAVE_CHANNEL_ERR errorCode) {}
461 virtual void onMessageReceived(const char *userId, const IMessage *message) {}
467 virtual void onSendMessageState(int64_t messageId, CHANNEL_MESSAGE_STATE state) {}
474 virtual void onSendMessageResult(long long messageId, CHANNEL_MESSAGE_ERR_CODE state) {}
479 virtual void onMemberJoined(IChannelMember *member) {}
484 virtual void onMemberLeft(IChannelMember *member) {}
490 virtual void onMembersGotten(IChannelMember **members, int userCount) {}
495 virtual void onAttributesUpdated(const IChannelAttributes *attributes) {}
501 virtual void onUpdateAttributesResponse(int64_t requestId, RESPONSE_CODE resCode) {}
506 virtual void onAttributesDeleted(const IChannelAttributes *attributes) {}
512 virtual void onDeleteAttributesResponse(int64_t requestId, RESPONSE_CODE resCode) {}
513 };
517 class IChannel {
518 public:
523 virtual int setEventHandler(IChannelEventHandler *eventHandler, aosl_ref_t ares = AOSL_REF_INVALID) = 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;
553 virtual int sendMessage(const IMessage *message, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
564 virtual int updateAttributes(IChannelAttributes *attributes, int64_t &requestId, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
575 virtual int deleteAttributes(IChannelAttributes *attributes, int64_t &requestId, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
582 virtual const char *getId() const = 0;
583
584 // sync_call
594 virtual int release() = 0;
595 };
599 class IRtmServiceEventHandler {
600 public:
601 virtual ~IRtmServiceEventHandler() {}
602
606 virtual void onLoginSuccess() {}
611 virtual void onLoginFailure(LOGIN_ERR_CODE errorCode) {}
615 virtual void onLogout() {}
620 virtual void onConnectionStateChanged(CONNECTION_STATE state) {}
626 virtual void onSendMessageState(int64_t messageId, PEER_MESSAGE_STATE state) {}
632 virtual void onMessageReceivedFromPeer(const char *peerId, const IMessage *message) {}
633 };
637 class IRtmService {
638 public:
639 virtual ~IRtmService() {}
649 virtual int initialize(const char *appId, IRtmServiceEventHandler *eventHandler) = 0;
654 virtual void unregisterObserver(IRtmServiceEventHandler *eventHandler) = 0;
665 virtual int release(bool sync = false) = 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;
695 virtual int sendMessageToPeer(const char *peerId, const IMessage *message, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
712 virtual IChannel *createChannel(const char *channelId, IChannelEventHandler *eventHandler) = 0;
713 };
714
715 } // namespace rtm
716 } // namespace agora
agora::rtm::IRtmService::logout
virtual int logout(aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtm::IChannelEventHandler::onSendMessageResult
virtual void onSendMessageResult(long long messageId, CHANNEL_MESSAGE_ERR_CODE state)
Definition: IAgoraRtmService.h:474
agora::rtm::JOIN_CHANNEL_ERR_TOO_OFTEN
@ JOIN_CHANNEL_ERR_TOO_OFTEN
Definition: IAgoraRtmService.h:155
agora::rtm::LEAVE_CHANNEL_ERR_NOT_INITIALIZED
@ LEAVE_CHANNEL_ERR_NOT_INITIALIZED
Definition: IAgoraRtmService.h:200
agora::rtm::RESPONSE_CODE_SUCCESS
@ RESPONSE_CODE_SUCCESS
Definition: IAgoraRtmService.h:269
agora::rtm::IChannelEventHandler::onMessageReceived
virtual void onMessageReceived(const char *userId, const IMessage *message)
Definition: IAgoraRtmService.h:461
agora::rtm::IMessage::release
virtual void release()=0
agora::rtm::LOGIN_ERR_UNKNOWN
@ LOGIN_ERR_UNKNOWN
Definition: IAgoraRtmService.h:34
agora::rtm::IChannel::sendMessage
virtual int sendMessage(const IMessage *message, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtm::IMessage::setMessageType
virtual void setMessageType(int32_t type)=0
agora::rtm::JOIN_CHANNEL_ERR_ALREADY_JOINED
@ JOIN_CHANNEL_ERR_ALREADY_JOINED
Definition: IAgoraRtmService.h:150
agora::rtm::LOGIN_ERR_INVALID_TOKEN
@ LOGIN_ERR_INVALID_TOKEN
Definition: IAgoraRtmService.h:51
agora::rtm::IRtmService::initialize
virtual int initialize(const char *appId, IRtmServiceEventHandler *eventHandler)=0
agora::rtm::IRtmServiceEventHandler::onConnectionStateChanged
virtual void onConnectionStateChanged(CONNECTION_STATE state)
Definition: IAgoraRtmService.h:620
agora::rtm::PEER_MESSAGE_RECEIVED_BY_PEER
@ PEER_MESSAGE_RECEIVED_BY_PEER
Definition: IAgoraRtmService.h:20
agora::rtm::IMessage::createMessage
static IMessage * createMessage()
agora::rtm::JOIN_CHANNEL_TIMEOUT
@ JOIN_CHANNEL_TIMEOUT
Definition: IAgoraRtmService.h:140
agora::rtm::IChannel::leave
virtual int leave(aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtm::LEAVE_CHANNEL_ERR_REJECTED
@ LEAVE_CHANNEL_ERR_REJECTED
Definition: IAgoraRtmService.h:190
agora::rtm::IRtmService::~IRtmService
virtual ~IRtmService()
Definition: IAgoraRtmService.h:639
agora::rtm::RESPONSE_CODE_FAILURE
@ RESPONSE_CODE_FAILURE
Definition: IAgoraRtmService.h:270
agora::rtm::CONNECTION_STATE_DISCONNECTED
@ CONNECTION_STATE_DISCONNECTED
Definition: IAgoraRtmService.h:89
agora::rtm::IRtmService
Definition: IAgoraRtmService.h:637
agora::rtm::IMessage::~IMessage
virtual ~IMessage()
Definition: IAgoraRtmService.h:308
agora::rtm::IChannelEventHandler::onJoinSuccess
virtual void onJoinSuccess()
Definition: IAgoraRtmService.h:446
agora::rtm::IChannelEventHandler::onAttributesUpdated
virtual void onAttributesUpdated(const IChannelAttributes *attributes)
Definition: IAgoraRtmService.h:495
agora::rtm::IRtmServiceEventHandler::onLoginFailure
virtual void onLoginFailure(LOGIN_ERR_CODE errorCode)
Definition: IAgoraRtmService.h:611
agora::rtm::LEAVE_CHANNEL_ERR
LEAVE_CHANNEL_ERR
Error codes related to leaving a channel.
Definition: IAgoraRtmService.h:175
agora::rtm::JOIN_CHANNEL_ERR
JOIN_CHANNEL_ERR
Definition: IAgoraRtmService.h:116
agora::rtm::IChannelMember::getChannelId
virtual const char * getChannelId() const =0
agora::rtm::CHANNEL_MESSAGE_ERR_OK
@ CHANNEL_MESSAGE_ERR_OK
Definition: IAgoraRtmService.h:229
agora::rtm::IChannelEventHandler::onDeleteAttributesResponse
virtual void onDeleteAttributesResponse(int64_t requestId, RESPONSE_CODE resCode)
Definition: IAgoraRtmService.h:512
agora::rtm::IRtmService::unregisterObserver
virtual void unregisterObserver(IRtmServiceEventHandler *eventHandler)=0
agora::rtm::MESSAGE_TYPE_TEXT
@ MESSAGE_TYPE_TEXT
Definition: IAgoraRtmService.h:283
agora::rtm::IMessage::getText
virtual const char * getText() const =0
agora::rtm::IMessage
Definition: IAgoraRtmService.h:296
agora::rtm::IRtmService::createChannel
virtual IChannel * createChannel(const char *channelId, IChannelEventHandler *eventHandler)=0
agora::rtm::LOGIN_ERR_INVALID_ARGUMENT
@ LOGIN_ERR_INVALID_ARGUMENT
Definition: IAgoraRtmService.h:43
agora::rtm::IMessage::setRawMessage
virtual void setRawMessage(const uint8_t *data, int length)=0
agora::rtm::IChannelMember::release
virtual void release()=0
agora::rtm::IChannelEventHandler::onMembersGotten
virtual void onMembersGotten(IChannelMember **members, int userCount)
Definition: IAgoraRtmService.h:490
agora
Definition: AgoraAtomicOps.h:21
agora::rtm::IRtmService::release
virtual int release(bool sync=false)=0
agora::rtm::JOIN_CHANNEL_ERR_FAILURE
@ JOIN_CHANNEL_ERR_FAILURE
Definition: IAgoraRtmService.h:125
agora::rtm::JOIN_CHANNEL_ERR_EXCEED_LIMIT
@ JOIN_CHANNEL_ERR_EXCEED_LIMIT
Definition: IAgoraRtmService.h:145
agora::rtm::IMessage::getMessageId
virtual int64_t getMessageId() const =0
agora::rtm::IChannelAttributes
Definition: IAgoraRtmService.h:383
agora::rtm::IRtmServiceEventHandler::onMessageReceivedFromPeer
virtual void onMessageReceivedFromPeer(const char *peerId, const IMessage *message)
Definition: IAgoraRtmService.h:632
agora::rtm::IMessage::setText
virtual void setText(const char *str)=0
agora::rtm::IChannelAttributes::getAttributeValue
virtual const char * getAttributeValue(const char *key) const =0
agora::rtm::LOGIN_ERR_NOT_AUTHORIZED
@ LOGIN_ERR_NOT_AUTHORIZED
Definition: IAgoraRtmService.h:59
agora::rtm::LEAVE_CHANNEL_REASON
LEAVE_CHANNEL_REASON
Definition: IAgoraRtmService.h:211
agora::rtm::LOGOUT_ERR_REJECTED
@ LOGOUT_ERR_REJECTED
Definition: IAgoraRtmService.h:76
agora::rtm::IChannelEventHandler::onUpdateAttributesResponse
virtual void onUpdateAttributesResponse(int64_t requestId, RESPONSE_CODE resCode)
Definition: IAgoraRtmService.h:501
agora::rtm::IChannelAttributes::release
virtual int release()=0
agora::rtm::JOIN_CHANNEL_ERR_INVALID_ARGUMENT
@ JOIN_CHANNEL_ERR_INVALID_ARGUMENT
Definition: IAgoraRtmService.h:135
agora::rtm::IChannelMember::~IChannelMember
virtual ~IChannelMember()
Definition: IAgoraRtmService.h:364
agora::rtm::IRtmServiceEventHandler::onLogout
virtual void onLogout()
Definition: IAgoraRtmService.h:615
agora::rtm::IChannel
Definition: IAgoraRtmService.h:517
agora::rtm::CONNECTION_STATE_CONNECTED
@ CONNECTION_STATE_CONNECTED
Definition: IAgoraRtmService.h:85
agora::rtm::CHANNEL_MESSAGE_RECEIVED_BY_SERVER
@ CHANNEL_MESSAGE_RECEIVED_BY_SERVER
Definition: IAgoraRtmService.h:106
agora::rtm::CONNECTION_STATE
CONNECTION_STATE
Definition: IAgoraRtmService.h:81
agora::rtm::IChannel::getId
virtual const char * getId() const =0
agora::rtm::IChannelAttributes::createChannelAttributes
static IChannelAttributes * createChannelAttributes()
agora::rtm::LEAVE_CHANNEL_ERR_USER_NOT_LOGGED_IN
@ LEAVE_CHANNEL_ERR_USER_NOT_LOGGED_IN
Definition: IAgoraRtmService.h:205
agora::rtm::LOGIN_ERR_TIMEOUT
@ LOGIN_ERR_TIMEOUT
Definition: IAgoraRtmService.h:63
agora::rtm::IChannelEventHandler::~IChannelEventHandler
virtual ~IChannelEventHandler()
Definition: IAgoraRtmService.h:442
agora::rtm::JOIN_CHANNEL_ERR_JOIN_SAME_CHANNEL_TOO_OFTEN
@ JOIN_CHANNEL_ERR_JOIN_SAME_CHANNEL_TOO_OFTEN
Definition: IAgoraRtmService.h:160
agora::rtm::IChannelMember::getMemberId
virtual const char * getMemberId() const =0
agora::rtm::CHANNEL_MESSAGE_ERR_USER_NOT_LOGGED_IN
@ CHANNEL_MESSAGE_ERR_USER_NOT_LOGGED_IN
Definition: IAgoraRtmService.h:259
agora::rtm::IChannelMember
Definition: IAgoraRtmService.h:362
agora::rtm::CHANNEL_MESSAGE_ERR_NOT_INITIALIZED
@ CHANNEL_MESSAGE_ERR_NOT_INITIALIZED
Definition: IAgoraRtmService.h:254
agora::rtm::IMessage::getMessageType
virtual int getMessageType() const =0
agora::rtm::CHANNEL_MESSAGE_ERR_INVALID_MESSAGE
@ CHANNEL_MESSAGE_ERR_INVALID_MESSAGE
Definition: IAgoraRtmService.h:249
agora::rtm::LOGIN_ERR_TOKEN_EXPIRED
@ LOGIN_ERR_TOKEN_EXPIRED
Definition: IAgoraRtmService.h:55
agora::rtm::IMessage::getRawMessageLength
virtual int getRawMessageLength() const =0
agora::rtm::LOGIN_ERR_INVALID_APP_ID
@ LOGIN_ERR_INVALID_APP_ID
Definition: IAgoraRtmService.h:47
agora::rtm::PEER_MESSAGE_FAILURE
@ PEER_MESSAGE_FAILURE
Definition: IAgoraRtmService.h:18
agora::rtm::CHANNEL_MESSAGE_ERR_TOO_OFTEN
@ CHANNEL_MESSAGE_ERR_TOO_OFTEN
Definition: IAgoraRtmService.h:244
agora::rtm::LEAVE_CHANNEL_REASON_QUIT
@ LEAVE_CHANNEL_REASON_QUIT
Definition: IAgoraRtmService.h:215
agora::rtm::LEAVE_CHANNEL_REASON_KICKED
@ LEAVE_CHANNEL_REASON_KICKED
Definition: IAgoraRtmService.h:219
agora::rtm::IChannelAttributes::addAttribute
virtual int addAttribute(const char *key, const char *value)=0
agora::rtm::IMessage::getRawMessageData
virtual const unsigned char * getRawMessageData() const =0
agora::rtm::IChannelEventHandler::onSendMessageState
virtual void onSendMessageState(int64_t messageId, CHANNEL_MESSAGE_STATE state)
Definition: IAgoraRtmService.h:467
agora::rtm::PEER_MESSAGE_INIT
@ PEER_MESSAGE_INIT
Definition: IAgoraRtmService.h:17
agora::rtm::LEAVE_CHANNEL_ERR_OK
@ LEAVE_CHANNEL_ERR_OK
Definition: IAgoraRtmService.h:180
agora::rtm::LOGIN_ERR_OK
@ LOGIN_ERR_OK
Definition: IAgoraRtmService.h:30
agora::rtm::JOIN_CHANNEL_ERR_OK
@ JOIN_CHANNEL_ERR_OK
Definition: IAgoraRtmService.h:120
agora::rtm::IChannel::release
virtual int release()=0
agora::rtm::LOGOUT_ERR_OK
@ LOGOUT_ERR_OK
Definition: IAgoraRtmService.h:72
agora::rtm::JOIN_CHANNEL_ERR_USER_NOT_LOGGED_IN
@ JOIN_CHANNEL_ERR_USER_NOT_LOGGED_IN
Definition: IAgoraRtmService.h:170
agora::rtm::CHANNEL_MESSAGE_STATE
CHANNEL_MESSAGE_STATE
Definition: IAgoraRtmService.h:102
agora::rtm::IChannel::join
virtual int join(aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtm::CHANNEL_MESSAGE_ERR_CODE
CHANNEL_MESSAGE_ERR_CODE
Error codes related to sending a channel message.
Definition: IAgoraRtmService.h:224
agora::rtm::CHANNEL_MESSAGE_SENT_TIMEOUT
@ CHANNEL_MESSAGE_SENT_TIMEOUT
Definition: IAgoraRtmService.h:111
agora::rtm::MESSAGE_TYPE_BINARY
@ MESSAGE_TYPE_BINARY
Definition: IAgoraRtmService.h:287
agora::rtm::IChannelEventHandler::onMemberJoined
virtual void onMemberJoined(IChannelMember *member)
Definition: IAgoraRtmService.h:479
agora::rtm::PEER_MESSAGE_STATE
PEER_MESSAGE_STATE
Definition: IAgoraRtmService.h:16
agora::rtm::MESSAGE_TYPE_CONVERGE
@ MESSAGE_TYPE_CONVERGE
Definition: IAgoraRtmService.h:291
agora::rtm::PEER_MESSAGE_PEER_UNREACHABLE
@ PEER_MESSAGE_PEER_UNREACHABLE
Definition: IAgoraRtmService.h:19
agora::rtm::IRtmServiceEventHandler::~IRtmServiceEventHandler
virtual ~IRtmServiceEventHandler()
Definition: IAgoraRtmService.h:601
agora::rtm::LOGIN_ERR_REJECTED
@ LOGIN_ERR_REJECTED
Definition: IAgoraRtmService.h:39
agora::rtm::IChannelEventHandler
Definition: IAgoraRtmService.h:440
agora::rtm::IChannelEventHandler::onMemberLeft
virtual void onMemberLeft(IChannelMember *member)
Definition: IAgoraRtmService.h:484
agora::rtm::IRtmServiceEventHandler::onLoginSuccess
virtual void onLoginSuccess()
Definition: IAgoraRtmService.h:606
agora::rtm::IChannel::setEventHandler
virtual int setEventHandler(IChannelEventHandler *eventHandler, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtm::CHANNEL_MESSAGE_ERR_FAILURE
@ CHANNEL_MESSAGE_ERR_FAILURE
Definition: IAgoraRtmService.h:234
agora::rtm::CHANNEL_MESSAGE_ERR_SENT_TIMEOUT
@ CHANNEL_MESSAGE_ERR_SENT_TIMEOUT
Definition: IAgoraRtmService.h:239
agora::rtm::IChannelAttributes::removeAttribute
virtual int removeAttribute(const char *key)=0
agora::rtm::PEER_MESSAGE_SENT_TIMEOUT
@ PEER_MESSAGE_SENT_TIMEOUT
Definition: IAgoraRtmService.h:21
agora::rtm::MESSAGE_TYPE
MESSAGE_TYPE
Definition: IAgoraRtmService.h:275
agora::rtm::LOGOUT_ERR_CODE
LOGOUT_ERR_CODE
Definition: IAgoraRtmService.h:68
agora::rtm::IRtmService::sendMessageToPeer
virtual int sendMessageToPeer(const char *peerId, const IMessage *message, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtm::IChannelEventHandler::onAttributesDeleted
virtual void onAttributesDeleted(const IChannelAttributes *attributes)
Definition: IAgoraRtmService.h:506
agora::rtm::IChannel::deleteAttributes
virtual int deleteAttributes(IChannelAttributes *attributes, int64_t &requestId, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtm::JOIN_CHANNEL_ERR_NOT_INITIALIZED
@ JOIN_CHANNEL_ERR_NOT_INITIALIZED
Definition: IAgoraRtmService.h:165
agora::rtm::JOIN_CHANNEL_ERR_REJECTED
@ JOIN_CHANNEL_ERR_REJECTED
Definition: IAgoraRtmService.h:130
agora::rtm::LEAVE_CHANNEL_ERR_FAILURE
@ LEAVE_CHANNEL_ERR_FAILURE
Definition: IAgoraRtmService.h:185
agora::rtm::RESPONSE_CODE
RESPONSE_CODE
Definition: IAgoraRtmService.h:265
agora::rtm::LEAVE_CHANNEL_ERR_NOT_IN_CHANNEL
@ LEAVE_CHANNEL_ERR_NOT_IN_CHANNEL
Definition: IAgoraRtmService.h:195
agora::rtm::IChannelEventHandler::onJoinFailure
virtual void onJoinFailure(JOIN_CHANNEL_ERR errorCode)
Definition: IAgoraRtmService.h:451
agora::rtm::IChannelAttributes::getAttributesSize
virtual int getAttributesSize() const =0
agora::rtm::MESSAGE_TYPE_UNDEFINED
@ MESSAGE_TYPE_UNDEFINED
Definition: IAgoraRtmService.h:279
agora::rtm::IRtmServiceEventHandler::onSendMessageState
virtual void onSendMessageState(int64_t messageId, PEER_MESSAGE_STATE state)
Definition: IAgoraRtmService.h:626
agora::rtm::IChannelEventHandler::onLeave
virtual void onLeave(LEAVE_CHANNEL_ERR errorCode)
Definition: IAgoraRtmService.h:456
agora::rtm::CONNECTION_STATE_ABORTED
@ CONNECTION_STATE_ABORTED
Definition: IAgoraRtmService.h:96
agora::rtm::IChannelAttributes::getAttributes
virtual void getAttributes(int size, char **key, char **value) const =0
agora::rtm::LOGIN_ERR_CODE
LOGIN_ERR_CODE
Definition: IAgoraRtmService.h:26
agora::rtm::IChannel::updateAttributes
virtual int updateAttributes(IChannelAttributes *attributes, int64_t &requestId, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtm::IRtmServiceEventHandler
Definition: IAgoraRtmService.h:599
agora::rtm::IRtmService::login
virtual int login(const char *token, const char *userId, aosl_ref_t ares=AOSL_REF_INVALID)=0