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
11 namespace agora {
12
13 namespace rtm {
14
15 enum PEER_MESSAGE_STATE {
16 PEER_MESSAGE_INIT = 0,
17 PEER_MESSAGE_FAILURE = 1,
18 PEER_MESSAGE_PEER_UNREACHABLE = 2,
19 PEER_MESSAGE_RECEIVED_BY_PEER = 3,
20 PEER_MESSAGE_SENT_TIMEOUT = 4,
21 };
25 enum LOGIN_ERR_CODE {
29 LOGIN_ERR_OK = 0,
33 LOGIN_ERR_UNKNOWN = 1,
38 LOGIN_ERR_REJECTED = 2, // ALREADY LOGIN OR NOT INITIALIZED, SERVER REJECT
42 LOGIN_ERR_INVALID_ARGUMENT = 3,
46 LOGIN_ERR_INVALID_APP_ID = 4,
50 LOGIN_ERR_INVALID_TOKEN = 5,
54 LOGIN_ERR_TOKEN_EXPIRED = 6,
58 LOGIN_ERR_NOT_AUTHORIZED = 7,
62 LOGIN_ERR_TIMEOUT = 8,
63 };
67 enum LOGOUT_ERR_CODE {
71 LOGOUT_ERR_OK = 0,
75 LOGOUT_ERR_REJECTED = 1,
76 };
80 enum CONNECTION_STATE {
84 CONNECTION_STATE_CONNECTED = 1,
88 CONNECTION_STATE_DISCONNECTED = 2,
95 CONNECTION_STATE_ABORTED = 3,
96 };
97
101 enum CHANNEL_MESSAGE_STATE {
105 CHANNEL_MESSAGE_RECEIVED_BY_SERVER = 1,
110 CHANNEL_MESSAGE_SENT_TIMEOUT = 3,
111 };
115 enum JOIN_CHANNEL_ERR {
119 JOIN_CHANNEL_ERR_OK = 0,
120
124 JOIN_CHANNEL_ERR_FAILURE = 1,
125
129 JOIN_CHANNEL_ERR_REJECTED = 2, // Usually occurs when the user is already in the channel
130
134 JOIN_CHANNEL_ERR_INVALID_ARGUMENT = 3,
135
139 JOIN_CHANNEL_TIMEOUT = 4,
140
144 JOIN_CHANNEL_ERR_EXCEED_LIMIT = 5,
145
149 JOIN_CHANNEL_ERR_ALREADY_JOINED = 6,
150
154 JOIN_CHANNEL_ERR_TOO_OFTEN = 7,
155
159 JOIN_CHANNEL_ERR_JOIN_SAME_CHANNEL_TOO_OFTEN = 8,
160
164 JOIN_CHANNEL_ERR_NOT_INITIALIZED = 101,
165
169 JOIN_CHANNEL_ERR_USER_NOT_LOGGED_IN = 102,
170 };
174 enum LEAVE_CHANNEL_ERR {
175
179 LEAVE_CHANNEL_ERR_OK = 0,
180
184 LEAVE_CHANNEL_ERR_FAILURE = 1,
185
189 LEAVE_CHANNEL_ERR_REJECTED = 2,
190
194 LEAVE_CHANNEL_ERR_NOT_IN_CHANNEL = 3,
195
199 LEAVE_CHANNEL_ERR_NOT_INITIALIZED = 101,
200
204 LEAVE_CHANNEL_ERR_USER_NOT_LOGGED_IN = 102,
205 };
206
210 enum LEAVE_CHANNEL_REASON {
214 LEAVE_CHANNEL_REASON_QUIT = 1,
218 LEAVE_CHANNEL_REASON_KICKED = 2,
219 };
223 enum CHANNEL_MESSAGE_ERR_CODE {
224
228 CHANNEL_MESSAGE_ERR_OK = 0,
229
233 CHANNEL_MESSAGE_ERR_FAILURE = 1,
234
238 CHANNEL_MESSAGE_ERR_SENT_TIMEOUT = 2,
239
243 CHANNEL_MESSAGE_ERR_TOO_OFTEN = 3,
244
248 CHANNEL_MESSAGE_ERR_INVALID_MESSAGE = 4,
249
253 CHANNEL_MESSAGE_ERR_NOT_INITIALIZED = 101,
254
258 CHANNEL_MESSAGE_ERR_USER_NOT_LOGGED_IN = 102,
259 };
260
264 enum RESPONSE_CODE {
268 RESPONSE_CODE_SUCCESS = 1,
269 RESPONSE_CODE_FAILURE = 2,
270 };
274 enum MESSAGE_TYPE {
278 MESSAGE_TYPE_UNDEFINED = 0,
282 MESSAGE_TYPE_TEXT = 1,
286 MESSAGE_TYPE_BINARY = 2,
290 MESSAGE_TYPE_CONVERGE = 4,
291 };
295 class IMessage {
296 public:
306 static IMessage *createMessage();
307 virtual ~IMessage() {}
312 virtual int64_t getMessageId() const = 0;
319 virtual int getMessageType() const = 0;
325 virtual void setText(const char *str) = 0;
331 virtual const char *getText() const = 0;
337 virtual const unsigned char *getRawMessageData() const = 0;
343 virtual int getRawMessageLength() const = 0;
347 virtual void setMessageType(int32_t type) = 0;
351 virtual void setRawMessage(const uint8_t* data, int length) = 0;
355 virtual void release() = 0;
356 };
357
361 class IChannelMember {
362 public:
363 virtual ~IChannelMember() {}
368 virtual const char *getMemberId() const = 0;
373 virtual const char *getChannelId() const = 0;
377 virtual void release() = 0;
378 };
382 class IChannelAttributes {
383 public:
389 static IChannelAttributes *createChannelAttributes();
399 virtual int addAttribute(const char *key, const char *value) = 0;
407 virtual int removeAttribute(const char *key) = 0;
414 virtual int getAttributesSize() const = 0;
421 virtual void getAttributes(int size, char **key,
422 char **value) const = 0; // todo: discussion, how to traveral
427 virtual const char *getAttributeValue(const char *key) const = 0;
434 virtual int release() = 0;
435 };
439 class IChannelEventHandler {
440 public:
441 virtual ~IChannelEventHandler() {}
445 virtual void onJoinSuccess() {}
450 virtual void onJoinFailure(JOIN_CHANNEL_ERR errorCode) {}
455 virtual void onLeave(LEAVE_CHANNEL_ERR errorCode) {}
460 virtual void onMessageReceived(const char *userId, const IMessage *message) {}
466 virtual void onSendMessageState(int64_t messageId, CHANNEL_MESSAGE_STATE state) {}
473 virtual void onSendMessageResult(long long messageId, CHANNEL_MESSAGE_ERR_CODE state) {}
478 virtual void onMemberJoined(IChannelMember *member) {}
483 virtual void onMemberLeft(IChannelMember *member) {}
489 virtual void onMembersGotten(IChannelMember **members, int userCount) {}
494 virtual void onAttributesUpdated(const IChannelAttributes *attributes) {}
500 virtual void onUpdateAttributesResponse(int64_t requestId, RESPONSE_CODE resCode) {}
505 virtual void onAttributesDeleted(const IChannelAttributes *attributes) {}
511 virtual void onDeleteAttributesResponse(int64_t requestId, RESPONSE_CODE resCode) {}
512 };
516 class IChannel {
517 public:
522 virtual void setEventHandler(IChannelEventHandler *eventHandler) = 0;
532 virtual int join() = 0;
541 virtual int leave() = 0;
552 virtual int sendMessage(const IMessage *message) = 0;
563 virtual int updateAttributes(IChannelAttributes *attributes, int64_t &requestId) = 0;
574 virtual int deleteAttributes(IChannelAttributes *attributes, int64_t &requestId) = 0;
581 virtual const char *getId() const = 0;
582
583 // sync_call
593 virtual int release() = 0;
594 };
598 class IRtmServiceEventHandler {
599 public:
600 virtual ~IRtmServiceEventHandler() {}
601
605 virtual void onLoginSuccess() {}
610 virtual void onLoginFailure(LOGIN_ERR_CODE errorCode) {}
614 virtual void onLogout() {}
619 virtual void onConnectionStateChanged(CONNECTION_STATE state) {}
625 virtual void onSendMessageState(int64_t messageId, PEER_MESSAGE_STATE state) {}
631 virtual void onMessageReceivedFromPeer(const char *peerId, const IMessage *message) {}
632 };
636 class IRtmService {
637 public:
638 virtual ~IRtmService() {}
648 virtual int initialize(const char *appId, IRtmServiceEventHandler *eventHandler) = 0;
653 virtual void unregisterObserver(IRtmServiceEventHandler *eventHandler) = 0;
664 virtual int release(bool sync = false) = 0;
677 virtual int login(const char *token, const char *userId) = 0;
684 virtual int logout() = 0;
694 virtual int sendMessageToPeer(const char *peerId, const IMessage *message) = 0;
711 virtual IChannel *createChannel(const char *channelId, IChannelEventHandler *eventHandler) = 0;
712 };
713
714 } // namespace rtm
715 } // namespace agora
agora::rtm::IChannelEventHandler::onSendMessageResult
virtual void onSendMessageResult(long long messageId, CHANNEL_MESSAGE_ERR_CODE state)
Definition: IAgoraRtmService.h:473
agora::rtm::JOIN_CHANNEL_ERR_TOO_OFTEN
@ JOIN_CHANNEL_ERR_TOO_OFTEN
Definition: IAgoraRtmService.h:154
agora::rtm::LEAVE_CHANNEL_ERR_NOT_INITIALIZED
@ LEAVE_CHANNEL_ERR_NOT_INITIALIZED
Definition: IAgoraRtmService.h:199
agora::rtm::RESPONSE_CODE_SUCCESS
@ RESPONSE_CODE_SUCCESS
Definition: IAgoraRtmService.h:268
agora::rtm::IChannelEventHandler::onMessageReceived
virtual void onMessageReceived(const char *userId, const IMessage *message)
Definition: IAgoraRtmService.h:460
agora::rtm::IMessage::release
virtual void release()=0
agora::rtm::LOGIN_ERR_UNKNOWN
@ LOGIN_ERR_UNKNOWN
Definition: IAgoraRtmService.h:33
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:149
agora::rtm::LOGIN_ERR_INVALID_TOKEN
@ LOGIN_ERR_INVALID_TOKEN
Definition: IAgoraRtmService.h:50
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:619
agora::rtm::PEER_MESSAGE_RECEIVED_BY_PEER
@ PEER_MESSAGE_RECEIVED_BY_PEER
Definition: IAgoraRtmService.h:19
agora::rtm::IChannel::join
virtual int join()=0
agora::rtm::IMessage::createMessage
static IMessage * createMessage()
agora::rtm::JOIN_CHANNEL_TIMEOUT
@ JOIN_CHANNEL_TIMEOUT
Definition: IAgoraRtmService.h:139
agora::rtm::IChannel::leave
virtual int leave()=0
agora::rtm::LEAVE_CHANNEL_ERR_REJECTED
@ LEAVE_CHANNEL_ERR_REJECTED
Definition: IAgoraRtmService.h:189
agora::rtm::IRtmService::~IRtmService
virtual ~IRtmService()
Definition: IAgoraRtmService.h:638
agora::rtm::IChannel::sendMessage
virtual int sendMessage(const IMessage *message)=0
agora::rtm::RESPONSE_CODE_FAILURE
@ RESPONSE_CODE_FAILURE
Definition: IAgoraRtmService.h:269
agora::rtm::CONNECTION_STATE_DISCONNECTED
@ CONNECTION_STATE_DISCONNECTED
Definition: IAgoraRtmService.h:88
agora::rtm::IRtmService
Definition: IAgoraRtmService.h:636
agora::rtm::IMessage::~IMessage
virtual ~IMessage()
Definition: IAgoraRtmService.h:307
agora::rtm::IChannelEventHandler::onJoinSuccess
virtual void onJoinSuccess()
Definition: IAgoraRtmService.h:445
agora::rtm::IChannelEventHandler::onAttributesUpdated
virtual void onAttributesUpdated(const IChannelAttributes *attributes)
Definition: IAgoraRtmService.h:494
agora::rtm::IRtmServiceEventHandler::onLoginFailure
virtual void onLoginFailure(LOGIN_ERR_CODE errorCode)
Definition: IAgoraRtmService.h:610
agora::rtm::LEAVE_CHANNEL_ERR
LEAVE_CHANNEL_ERR
Error codes related to leaving a channel.
Definition: IAgoraRtmService.h:174
agora::rtm::JOIN_CHANNEL_ERR
JOIN_CHANNEL_ERR
Definition: IAgoraRtmService.h:115
agora::rtm::IChannelMember::getChannelId
virtual const char * getChannelId() const =0
agora::rtm::CHANNEL_MESSAGE_ERR_OK
@ CHANNEL_MESSAGE_ERR_OK
Definition: IAgoraRtmService.h:228
agora::rtm::IChannelEventHandler::onDeleteAttributesResponse
virtual void onDeleteAttributesResponse(int64_t requestId, RESPONSE_CODE resCode)
Definition: IAgoraRtmService.h:511
agora::rtm::IRtmService::unregisterObserver
virtual void unregisterObserver(IRtmServiceEventHandler *eventHandler)=0
agora::rtm::MESSAGE_TYPE_TEXT
@ MESSAGE_TYPE_TEXT
Definition: IAgoraRtmService.h:282
agora::rtm::IMessage::getText
virtual const char * getText() const =0
agora::rtm::IMessage
Definition: IAgoraRtmService.h:295
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:42
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:489
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:124
agora::rtm::JOIN_CHANNEL_ERR_EXCEED_LIMIT
@ JOIN_CHANNEL_ERR_EXCEED_LIMIT
Definition: IAgoraRtmService.h:144
agora::rtm::IRtmService::logout
virtual int logout()=0
agora::rtm::IMessage::getMessageId
virtual int64_t getMessageId() const =0
agora::rtm::IChannelAttributes
Definition: IAgoraRtmService.h:382
agora::rtm::IRtmServiceEventHandler::onMessageReceivedFromPeer
virtual void onMessageReceivedFromPeer(const char *peerId, const IMessage *message)
Definition: IAgoraRtmService.h:631
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:58
agora::rtm::IChannel::deleteAttributes
virtual int deleteAttributes(IChannelAttributes *attributes, int64_t &requestId)=0
agora::rtm::LEAVE_CHANNEL_REASON
LEAVE_CHANNEL_REASON
Definition: IAgoraRtmService.h:210
agora::rtm::LOGOUT_ERR_REJECTED
@ LOGOUT_ERR_REJECTED
Definition: IAgoraRtmService.h:75
agora::rtm::IChannelEventHandler::onUpdateAttributesResponse
virtual void onUpdateAttributesResponse(int64_t requestId, RESPONSE_CODE resCode)
Definition: IAgoraRtmService.h:500
agora::rtm::IChannelAttributes::release
virtual int release()=0
agora::rtm::JOIN_CHANNEL_ERR_INVALID_ARGUMENT
@ JOIN_CHANNEL_ERR_INVALID_ARGUMENT
Definition: IAgoraRtmService.h:134
agora::rtm::IChannelMember::~IChannelMember
virtual ~IChannelMember()
Definition: IAgoraRtmService.h:363
agora::rtm::IRtmServiceEventHandler::onLogout
virtual void onLogout()
Definition: IAgoraRtmService.h:614
agora::rtm::IChannel
Definition: IAgoraRtmService.h:516
agora::rtm::CONNECTION_STATE_CONNECTED
@ CONNECTION_STATE_CONNECTED
Definition: IAgoraRtmService.h:84
agora::rtm::CHANNEL_MESSAGE_RECEIVED_BY_SERVER
@ CHANNEL_MESSAGE_RECEIVED_BY_SERVER
Definition: IAgoraRtmService.h:105
agora::rtm::CONNECTION_STATE
CONNECTION_STATE
Definition: IAgoraRtmService.h:80
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:204
agora::rtm::LOGIN_ERR_TIMEOUT
@ LOGIN_ERR_TIMEOUT
Definition: IAgoraRtmService.h:62
agora::rtm::IChannelEventHandler::~IChannelEventHandler
virtual ~IChannelEventHandler()
Definition: IAgoraRtmService.h:441
agora::rtm::JOIN_CHANNEL_ERR_JOIN_SAME_CHANNEL_TOO_OFTEN
@ JOIN_CHANNEL_ERR_JOIN_SAME_CHANNEL_TOO_OFTEN
Definition: IAgoraRtmService.h:159
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:258
agora::rtm::IChannelMember
Definition: IAgoraRtmService.h:361
agora::rtm::CHANNEL_MESSAGE_ERR_NOT_INITIALIZED
@ CHANNEL_MESSAGE_ERR_NOT_INITIALIZED
Definition: IAgoraRtmService.h:253
agora::rtm::IChannel::setEventHandler
virtual void setEventHandler(IChannelEventHandler *eventHandler)=0
agora::rtm::IMessage::getMessageType
virtual int getMessageType() const =0
agora::rtm::CHANNEL_MESSAGE_ERR_INVALID_MESSAGE
@ CHANNEL_MESSAGE_ERR_INVALID_MESSAGE
Definition: IAgoraRtmService.h:248
agora::rtm::LOGIN_ERR_TOKEN_EXPIRED
@ LOGIN_ERR_TOKEN_EXPIRED
Definition: IAgoraRtmService.h:54
agora::rtm::IChannel::updateAttributes
virtual int updateAttributes(IChannelAttributes *attributes, int64_t &requestId)=0
agora::rtm::IMessage::getRawMessageLength
virtual int getRawMessageLength() const =0
agora::rtm::LOGIN_ERR_INVALID_APP_ID
@ LOGIN_ERR_INVALID_APP_ID
Definition: IAgoraRtmService.h:46
agora::rtm::PEER_MESSAGE_FAILURE
@ PEER_MESSAGE_FAILURE
Definition: IAgoraRtmService.h:17
agora::rtm::CHANNEL_MESSAGE_ERR_TOO_OFTEN
@ CHANNEL_MESSAGE_ERR_TOO_OFTEN
Definition: IAgoraRtmService.h:243
agora::rtm::LEAVE_CHANNEL_REASON_QUIT
@ LEAVE_CHANNEL_REASON_QUIT
Definition: IAgoraRtmService.h:214
agora::rtm::LEAVE_CHANNEL_REASON_KICKED
@ LEAVE_CHANNEL_REASON_KICKED
Definition: IAgoraRtmService.h:218
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:466
agora::rtm::PEER_MESSAGE_INIT
@ PEER_MESSAGE_INIT
Definition: IAgoraRtmService.h:16
agora::rtm::LEAVE_CHANNEL_ERR_OK
@ LEAVE_CHANNEL_ERR_OK
Definition: IAgoraRtmService.h:179
agora::rtm::LOGIN_ERR_OK
@ LOGIN_ERR_OK
Definition: IAgoraRtmService.h:29
agora::rtm::JOIN_CHANNEL_ERR_OK
@ JOIN_CHANNEL_ERR_OK
Definition: IAgoraRtmService.h:119
agora::rtm::IChannel::release
virtual int release()=0
agora::rtm::LOGOUT_ERR_OK
@ LOGOUT_ERR_OK
Definition: IAgoraRtmService.h:71
agora::rtm::JOIN_CHANNEL_ERR_USER_NOT_LOGGED_IN
@ JOIN_CHANNEL_ERR_USER_NOT_LOGGED_IN
Definition: IAgoraRtmService.h:169
agora::rtm::CHANNEL_MESSAGE_STATE
CHANNEL_MESSAGE_STATE
Definition: IAgoraRtmService.h:101
agora::rtm::CHANNEL_MESSAGE_ERR_CODE
CHANNEL_MESSAGE_ERR_CODE
Error codes related to sending a channel message.
Definition: IAgoraRtmService.h:223
agora::rtm::CHANNEL_MESSAGE_SENT_TIMEOUT
@ CHANNEL_MESSAGE_SENT_TIMEOUT
Definition: IAgoraRtmService.h:110
agora::rtm::MESSAGE_TYPE_BINARY
@ MESSAGE_TYPE_BINARY
Definition: IAgoraRtmService.h:286
agora::rtm::IChannelEventHandler::onMemberJoined
virtual void onMemberJoined(IChannelMember *member)
Definition: IAgoraRtmService.h:478
agora::rtm::PEER_MESSAGE_STATE
PEER_MESSAGE_STATE
Definition: IAgoraRtmService.h:15
agora::rtm::MESSAGE_TYPE_CONVERGE
@ MESSAGE_TYPE_CONVERGE
Definition: IAgoraRtmService.h:290
agora::rtm::PEER_MESSAGE_PEER_UNREACHABLE
@ PEER_MESSAGE_PEER_UNREACHABLE
Definition: IAgoraRtmService.h:18
agora::rtm::IRtmService::login
virtual int login(const char *token, const char *userId)=0
agora::rtm::IRtmServiceEventHandler::~IRtmServiceEventHandler
virtual ~IRtmServiceEventHandler()
Definition: IAgoraRtmService.h:600
agora::rtm::LOGIN_ERR_REJECTED
@ LOGIN_ERR_REJECTED
Definition: IAgoraRtmService.h:38
agora::rtm::IChannelEventHandler
Definition: IAgoraRtmService.h:439
agora::rtm::IChannelEventHandler::onMemberLeft
virtual void onMemberLeft(IChannelMember *member)
Definition: IAgoraRtmService.h:483
agora::rtm::IRtmServiceEventHandler::onLoginSuccess
virtual void onLoginSuccess()
Definition: IAgoraRtmService.h:605
agora::rtm::CHANNEL_MESSAGE_ERR_FAILURE
@ CHANNEL_MESSAGE_ERR_FAILURE
Definition: IAgoraRtmService.h:233
agora::rtm::CHANNEL_MESSAGE_ERR_SENT_TIMEOUT
@ CHANNEL_MESSAGE_ERR_SENT_TIMEOUT
Definition: IAgoraRtmService.h:238
agora::rtm::IChannelAttributes::removeAttribute
virtual int removeAttribute(const char *key)=0
agora::rtm::PEER_MESSAGE_SENT_TIMEOUT
@ PEER_MESSAGE_SENT_TIMEOUT
Definition: IAgoraRtmService.h:20
agora::rtm::MESSAGE_TYPE
MESSAGE_TYPE
Definition: IAgoraRtmService.h:274
agora::rtm::LOGOUT_ERR_CODE
LOGOUT_ERR_CODE
Definition: IAgoraRtmService.h:67
agora::rtm::IChannelEventHandler::onAttributesDeleted
virtual void onAttributesDeleted(const IChannelAttributes *attributes)
Definition: IAgoraRtmService.h:505
agora::rtm::JOIN_CHANNEL_ERR_NOT_INITIALIZED
@ JOIN_CHANNEL_ERR_NOT_INITIALIZED
Definition: IAgoraRtmService.h:164
agora::rtm::JOIN_CHANNEL_ERR_REJECTED
@ JOIN_CHANNEL_ERR_REJECTED
Definition: IAgoraRtmService.h:129
agora::rtm::LEAVE_CHANNEL_ERR_FAILURE
@ LEAVE_CHANNEL_ERR_FAILURE
Definition: IAgoraRtmService.h:184
agora::rtm::RESPONSE_CODE
RESPONSE_CODE
Definition: IAgoraRtmService.h:264
agora::rtm::LEAVE_CHANNEL_ERR_NOT_IN_CHANNEL
@ LEAVE_CHANNEL_ERR_NOT_IN_CHANNEL
Definition: IAgoraRtmService.h:194
agora::rtm::IChannelEventHandler::onJoinFailure
virtual void onJoinFailure(JOIN_CHANNEL_ERR errorCode)
Definition: IAgoraRtmService.h:450
agora::rtm::IChannelAttributes::getAttributesSize
virtual int getAttributesSize() const =0
agora::rtm::MESSAGE_TYPE_UNDEFINED
@ MESSAGE_TYPE_UNDEFINED
Definition: IAgoraRtmService.h:278
agora::rtm::IRtmServiceEventHandler::onSendMessageState
virtual void onSendMessageState(int64_t messageId, PEER_MESSAGE_STATE state)
Definition: IAgoraRtmService.h:625
agora::rtm::IChannelEventHandler::onLeave
virtual void onLeave(LEAVE_CHANNEL_ERR errorCode)
Definition: IAgoraRtmService.h:455
agora::rtm::CONNECTION_STATE_ABORTED
@ CONNECTION_STATE_ABORTED
Definition: IAgoraRtmService.h:95
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:25
agora::rtm::IRtmServiceEventHandler
Definition: IAgoraRtmService.h:598
agora::rtm::IRtmService::sendMessageToPeer
virtual int sendMessageToPeer(const char *peerId, const IMessage *message)=0