#include <IAgoraRtmService.h>
◆ ~IChannelEventHandler()
virtual agora::rtm::IChannelEventHandler::~IChannelEventHandler
|
( |
|
) |
|
|
inlinevirtual
|
◆ onJoinSuccess()
virtual void agora::rtm::IChannelEventHandler::onJoinSuccess
|
( |
|
) |
|
|
inlinevirtual
|
Occurs when successfully joining a channel.
When the local user calls the
join
method and successfully joins the channel:
- The SDK triggers this callback;
-
All remote users in the channel receive the
onMemberJoined
callback.
◆ onJoinFailure()
virtual void agora::rtm::IChannelEventHandler::onJoinFailure
|
( |
JOIN_CHANNEL_ERR
|
errorCode |
) |
|
|
inlinevirtual
|
Occurs when failing to join a channel.
The local user receives this callback when the
join
method call fails.
- Parameters
-
◆ onLeave()
virtual void agora::rtm::IChannelEventHandler::onLeave |
( |
LEAVE_CHANNEL_ERR
|
errorCode |
) |
|
|
inlinevirtual
|
Returns the result of the
leave
method call.
- Parameters
-
◆ onMessageReceived()
virtual void agora::rtm::IChannelEventHandler::onMessageReceived
|
( |
const char * |
userId, |
|
|
const
IMessage *
|
message |
|
) |
|
|
|
inlinevirtual
|
Occurs when receiving a channel message.
- Parameters
-
userId |
The message sender. |
message |
The received channel message. See
IMessage.
|
◆ onImageMessageReceived()
virtual void agora::rtm::IChannelEventHandler::onImageMessageReceived
|
( |
const char * |
userId, |
|
|
const
IImageMessage
*
|
message |
|
) |
|
|
|
inlinevirtual
|
-
Deprecated:
- Deprecated as of v1.5.0. Agora recommends that you do not use it.
Occurs when receiving a channel image message.
- Parameters
-
userId |
The message sender. |
message |
The received channel image message. See
IImageMessage.
|
◆ onFileMessageReceived()
virtual void agora::rtm::IChannelEventHandler::onFileMessageReceived
|
( |
const char * |
userId, |
|
|
const
IFileMessage
*
|
message |
|
) |
|
|
|
inlinevirtual
|
-
Deprecated:
- Deprecated as of v1.5.0. Agora recommends that you do not use it.
Occurs when receiving a channel file message.
- Parameters
-
userId |
The message sender. |
message |
The received channel file message. See
IFileMessage.
|
◆ onSendMessageResult()
virtual void agora::rtm::IChannelEventHandler::onSendMessageResult
|
( |
long long |
messageId, |
|
|
CHANNEL_MESSAGE_ERR_CODE
|
state |
|
) |
|
|
|
inlinevirtual
|
Returns the result of the
sendMessage
method call.
- Parameters
-
◆ onMemberJoined()
virtual void agora::rtm::IChannelEventHandler::onMemberJoined
|
( |
IChannelMember
*
|
member |
) |
|
|
inlinevirtual
|
Occurs when a remote user joins the channel.
When a remote user calls the
join
method and receives the
onJoinSuccess
callback (successfully joins the channel), the local user receives this callback.
- Note
- This callback is disabled when the number of the channel members exceeds 512.
- Parameters
-
◆ onMemberLeft()
virtual void agora::rtm::IChannelEventHandler::onMemberLeft
|
( |
IChannelMember
*
|
member |
) |
|
|
inlinevirtual
|
Occurs when a remote member leaves the channel.
When a remote member in the channel calls the
leave
method and receives the the
onLeave (LEAVE_CHANNEL_ERR_OK)
callback, the local user receives this callback.
- Note
- This callback is disabled when the number of the channel members exceeds 512.
- Parameters
-
member |
The channel member that leaves the channel. See
IChannelMember.
|
◆ onGetMembers()
Returns the result of the
getMembers
method call.
When the method call succeeds, the SDK returns the member list of the channel.
- Parameters
-
◆ onAttributesUpdated()
virtual void agora::rtm::IChannelEventHandler::onAttributesUpdated
|
( |
const
IRtmChannelAttribute
*
|
attributes[], |
|
|
int |
numberOfAttributes |
|
) |
|
|
|
inlinevirtual
|
Occurs when channel attributes are updated, and returns all attributes of the channel.
- Note
-
This callback is enabled only when the user, who updates the attributes of the
channel, sets
enableNotificationToChannelMembers
as true. Also note that this flag is valid only within the current channel attribute
method call.
- Parameters
-
attributes |
All attribute of this channel. |
numberOfAttributes |
The total number of the channel attributes. |
◆ onMemberCountUpdated()
virtual void agora::rtm::IChannelEventHandler::onMemberCountUpdated
|
( |
int |
memberCount |
) |
|
|
inlinevirtual
|
Occurs when the number of the channel members changes, and returns the new number.
- Note
-
-
When the number of channel members ≤ 512, the SDK returns this callback when
the number changes at the frequency of once per second.
-
When the number of channel members exceeds 512, the SDK returns this callback when
the number changes at the frequency of once every three seconds.
-
You will receive this callback when successfully joining an RTM channel, so Agora
recommends implementing this callback to receive timely updates on the number of
the channel members.
- Parameters
-
memberCount |
Member count of this channel. |