Agora RTC Objective-C API Reference  Refactor
Public Member Functions
IChannelEventHandler Class Reference

Public Member Functions

virtual void onJoinSuccess ()
 
virtual void onJoinFailure (JOIN_CHANNEL_ERR errorCode)
 
virtual void onLeave (LEAVE_CHANNEL_ERR errorCode)
 
virtual void onMessageReceived (const char *userId, const IMessage *message)
 
virtual void onSendMessageState (int64_t messageId, CHANNEL_MESSAGE_STATE state)
 
virtual void onSendMessageResult (long long messageId, CHANNEL_MESSAGE_ERR_CODE state)
 
virtual void onMemberJoined (IChannelMember *member)
 
virtual void onMemberLeft (IChannelMember *member)
 
virtual void onMembersGotten (IChannelMember **members, int userCount)
 
virtual void onAttributesUpdated (const IChannelAttributes *attributes)
 
virtual void onUpdateAttributesResponse (int64_t requestId, RESPONSE_CODE resCode)
 
virtual void onAttributesDeleted (const IChannelAttributes *attributes)
 
virtual void onDeleteAttributesResponse (int64_t requestId, RESPONSE_CODE resCode)
 

Detailed Description

The IChannelEventHandler class.

Constructor & Destructor Documentation

◆ ~IChannelEventHandler()

virtual ~IChannelEventHandler ( )
inlinevirtual

Member Function Documentation

◆ onJoinSuccess()

virtual void onJoinSuccess ( )
inlinevirtual

Occurs when the local user successfully joins a channel.

◆ onJoinFailure()

virtual void onJoinFailure ( JOIN_CHANNEL_ERR  errorCode)
inlinevirtual

Occurs when the local user fails to join a channel.

Parameters
errorCodeThe error code: JOIN_CHANNEL_ERR.

◆ onLeave()

virtual void onLeave ( LEAVE_CHANNEL_ERR  errorCode)
inlinevirtual

Occurs when the local user leaves a channel.

Parameters
errorCodeThe error code. See LEAVE_CHANNEL_ERR.

◆ onMessageReceived()

virtual void onMessageReceived ( const char *  userId,
const IMessage message 
)
inlinevirtual

Occurs when the local user receives a channel message.

Parameters
messageThe pointer to the messsage: IMessage.

◆ onSendMessageState()

virtual void onSendMessageState ( int64_t  messageId,
CHANNEL_MESSAGE_STATE  state 
)
inlinevirtual

Reports the state of the message sent by the local user.

Parameters
messageIdID of the message.
stateThe state of the message: CHANNEL_MESSAGE_STATE.

◆ onSendMessageResult()

virtual void onSendMessageResult ( long long  messageId,
CHANNEL_MESSAGE_ERR_CODE  state 
)
inlinevirtual

Returns the result of the sendMessage method call.

Parameters
messageIdThe ID of the sent channel message.
stateThe error codes. See CHANNEL_MESSAGE_ERR_CODE.

◆ onMemberJoined()

virtual void onMemberJoined ( IChannelMember member)
inlinevirtual

Occurs when another member joins the channel.

Parameters
memberThe pointer to the member who joins the channel: IChannelMember.

◆ onMemberLeft()

virtual void onMemberLeft ( IChannelMember member)
inlinevirtual

Occurs when the other member leaves the channel.

Parameters
memberThe pointer to the member who leaves the channel: IChannelMember.

◆ onMembersGotten()

virtual void onMembersGotten ( IChannelMember **  members,
int  userCount 
)
inlinevirtual

Reports all the members in the channel.

Parameters
membersThe pointer to each member in the channel: IChannelMember.
userCountThe number of users in the channel.

◆ onAttributesUpdated()

virtual void onAttributesUpdated ( const IChannelAttributes attributes)
inlinevirtual

Occurs when the channel attributes are updated.

Parameters
attributesThe pointer to the current channel attributes: IChannelAttributes.

◆ onUpdateAttributesResponse()

virtual void onUpdateAttributesResponse ( int64_t  requestId,
RESPONSE_CODE  resCode 
)
inlinevirtual

Occurs when the local user calls updateAttributes().

Parameters
requestIdID of the current attribute update request.
resCodeThe response code: RESPONSE_CODE.

◆ onAttributesDeleted()

virtual void onAttributesDeleted ( const IChannelAttributes attributes)
inlinevirtual

Occurs when the channel attributes are deleted.

Parameters
attributesThe pointer to the channel attributes that you want to remove: IChannelAttributes.

◆ onDeleteAttributesResponse()

virtual void onDeleteAttributesResponse ( int64_t  requestId,
RESPONSE_CODE  resCode 
)
inlinevirtual

Occurs when the local user calls deleteAttributes().

Parameters
requestIdID of the current attribute delete request.
resCodeThe response code: RESPONSE_CODE.