Signaling (previously RTM) v1.4.8 API Reference for Unity
Public Member Functions | Public Attributes | List of all members
agora_rtm.RtmChannelEventHandler Class Reference

Public Member Functions

delegate void OnJoinSuccessHandler (int id)
 
delegate void OnJoinFailureHandler (int id, JOIN_CHANNEL_ERR errorCode)
 
delegate void OnLeaveHandler (int id, LEAVE_CHANNEL_ERR errorCode)
 
delegate void OnMessageReceivedHandler (int id, string userId, TextMessage message)
 
delegate void OnImageMessageReceivedHandler (int id, string userId, ImageMessage message)
 
delegate void OnFileMessageReceivedHandler (int id, string userId, FileMessage message)
 
delegate void OnSendMessageResultHandler (int id, Int64 messageId, CHANNEL_MESSAGE_ERR_CODE errorCode)
 
delegate void OnMemberJoinedHandler (int id, RtmChannelMember member)
 
delegate void OnMemberLeftHandler (int id, RtmChannelMember member)
 
delegate void OnGetMembersHandler (int id, RtmChannelMember[] members, int userCount, GET_MEMBERS_ERR errorCode)
 
delegate void OnAttributesUpdatedHandler (int id, RtmChannelAttribute[] attributesList, int numberOfAttributes)
 
delegate void OnMemberCountUpdatedHandler (int id, int memberCount)
 
 RtmChannelEventHandler ()
 
void Release ()
 

Public Attributes

OnJoinSuccessHandler OnJoinSuccess
 
OnJoinFailureHandler OnJoinFailure
 
OnLeaveHandler OnLeave
 
OnMessageReceivedHandler OnMessageReceived
 
OnImageMessageReceivedHandler OnImageMessageReceived
 
OnFileMessageReceivedHandler OnFileMessageReceived
 
OnSendMessageResultHandler OnSendMessageResult
 
OnMemberJoinedHandler OnMemberJoined
 
OnMemberLeftHandler OnMemberLeft
 
OnAttributesUpdatedHandler OnAttributesUpdated
 
OnMemberCountUpdatedHandler OnMemberCountUpdated
 
OnGetMembersHandler OnGetMembers
 

Constructor & Destructor Documentation

◆ RtmChannelEventHandler()

agora_rtm.RtmChannelEventHandler.RtmChannelEventHandler ( )
inline

Member Function Documentation

◆ OnAttributesUpdatedHandler()

delegate void agora_rtm.RtmChannelEventHandler.OnAttributesUpdatedHandler ( int  id,
RtmChannelAttribute[]  attributesList,
int  numberOfAttributes 
)

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
idthe ID of the RtmChannelEventHandler
attributesListAll attribute of this channel.
numberOfAttributesThe total number of the channel attributes.

◆ OnFileMessageReceivedHandler()

delegate void agora_rtm.RtmChannelEventHandler.OnFileMessageReceivedHandler ( int  id,
string  userId,
FileMessage  message 
)

Occurs when receiving a channel file message.

Deprecated:
This callback is deprecated. Agora recommends that you do not use it.
Parameters
idthe ID of the RtmChannelEventHandler
userIdThe the ID of the message sender.
messageThe received channel file message. See FileMessage.

◆ OnGetMembersHandler()

delegate void agora_rtm.RtmChannelEventHandler.OnGetMembersHandler ( int  id,
RtmChannelMember[]  members,
int  userCount,
GET_MEMBERS_ERR  errorCode 
)

Returns the result of the GetMembers method call. When the method call succeeds, the SDK returns the member list of the channel.

Note
Parameters
idthe ID of the RtmChannelEventHandler
membersThe member list. See RtmChannel.
userCountThe number of members.
errorCodeError code. See GET_MEMBERS_ERR.

◆ OnImageMessageReceivedHandler()

delegate void agora_rtm.RtmChannelEventHandler.OnImageMessageReceivedHandler ( int  id,
string  userId,
ImageMessage  message 
)

Occurs when receiving a channel image message.

Deprecated:
This callback is deprecated. Agora recommends that you do not use it.
Parameters
idthe ID of the RtmChannelEventHandler
userIdthe ID of the message sender.
messageThe received channel image message. See ImageMessage.

◆ OnJoinFailureHandler()

delegate void agora_rtm.RtmChannelEventHandler.OnJoinFailureHandler ( int  id,
JOIN_CHANNEL_ERR  errorCode 
)

Occurs when failing to join a channel. The local user receives this callback when the Join method call fails.

Parameters
idthe ID of the RtmChannelEventHandler
errorCodeThe error code. See JOIN_CHANNEL_ERR.

◆ OnJoinSuccessHandler()

delegate void agora_rtm.RtmChannelEventHandler.OnJoinSuccessHandler ( int  id)

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 OnMemberJoinedHandler callback.
Parameters
idthe ID of the RtmChannelEventHandler

◆ OnLeaveHandler()

delegate void agora_rtm.RtmChannelEventHandler.OnLeaveHandler ( int  id,
LEAVE_CHANNEL_ERR  errorCode 
)

Returns the result of the leave method call.

Parameters
idthe ID of the RtmChannelEventHandler
errorCodeThe error code. See LEAVE_CHANNEL_ERR.

◆ OnMemberCountUpdatedHandler()

delegate void agora_rtm.RtmChannelEventHandler.OnMemberCountUpdatedHandler ( int  id,
int  memberCount 
)

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
idthe ID of the RtmChannelEventHandler
memberCountMember count of this channel.

◆ OnMemberJoinedHandler()

delegate void agora_rtm.RtmChannelEventHandler.OnMemberJoinedHandler ( int  id,
RtmChannelMember  member 
)

Occurs when a remote user joins the channel. When a remote user calls the Join method and receives the OnJoinSuccessHandler 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
idthe ID of the RtmChannelEventHandler
memberThe user joining the channel. See ChannelMemberCount.

◆ OnMemberLeftHandler()

delegate void agora_rtm.RtmChannelEventHandler.OnMemberLeftHandler ( int  id,
RtmChannelMember  member 
)

Occurs when a remote member leaves the channel. When a remote member in the channel calls the Leave method and receives the the OnLeaveHandler (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
idthe ID of the RtmChannelEventHandler
memberThe channel member that leaves the channel. See ChannelMember.

◆ OnMessageReceivedHandler()

delegate void agora_rtm.RtmChannelEventHandler.OnMessageReceivedHandler ( int  id,
string  userId,
TextMessage  message 
)

Occurs when receiving a channel message.

Parameters
idthe ID of the RtmChannelEventHandler
userIdthe ID of the message sender.
messageThe received channel message. See IMessage.

◆ OnSendMessageResultHandler()

delegate void agora_rtm.RtmChannelEventHandler.OnSendMessageResultHandler ( int  id,
Int64  messageId,
CHANNEL_MESSAGE_ERR_CODE  errorCode 
)

Returns the result of the SendMessage method call.

Parameters
idthe ID of the RtmChannelEventHandler
messageIdthe ID of the sent channel message.
errorCodeThe error codes. See CHANNEL_MESSAGE_ERR_CODE.

◆ Release()

void agora_rtm.RtmChannelEventHandler.Release ( )
inline

Member Data Documentation

◆ OnAttributesUpdated

OnAttributesUpdatedHandler agora_rtm.RtmChannelEventHandler.OnAttributesUpdated

◆ OnFileMessageReceived

OnFileMessageReceivedHandler agora_rtm.RtmChannelEventHandler.OnFileMessageReceived

◆ OnGetMembers

OnGetMembersHandler agora_rtm.RtmChannelEventHandler.OnGetMembers

◆ OnImageMessageReceived

OnImageMessageReceivedHandler agora_rtm.RtmChannelEventHandler.OnImageMessageReceived

◆ OnJoinFailure

OnJoinFailureHandler agora_rtm.RtmChannelEventHandler.OnJoinFailure

◆ OnJoinSuccess

OnJoinSuccessHandler agora_rtm.RtmChannelEventHandler.OnJoinSuccess

◆ OnLeave

OnLeaveHandler agora_rtm.RtmChannelEventHandler.OnLeave

◆ OnMemberCountUpdated

OnMemberCountUpdatedHandler agora_rtm.RtmChannelEventHandler.OnMemberCountUpdated

◆ OnMemberJoined

OnMemberJoinedHandler agora_rtm.RtmChannelEventHandler.OnMemberJoined

◆ OnMemberLeft

OnMemberLeftHandler agora_rtm.RtmChannelEventHandler.OnMemberLeft

◆ OnMessageReceived

OnMessageReceivedHandler agora_rtm.RtmChannelEventHandler.OnMessageReceived

◆ OnSendMessageResult

OnSendMessageResultHandler agora_rtm.RtmChannelEventHandler.OnSendMessageResult

The documentation for this class was generated from the following file: