#include <IAgoraRtmService.h>
◆ setEventHandler()
Sets an event handler for IChannel.
- Parameters
-
◆ join()
virtual int agora::rtm::IChannel::join |
( |
| ) |
|
|
pure virtual |
Joins the current channel.
A successful method call triggers either onJoinSuccess() or onJoinFailure() on the local client, to report the state of joining the channel.
- Returns
- 0: Success.
- < 0: Failure.
◆ leave()
virtual int agora::rtm::IChannel::leave |
( |
| ) |
|
|
pure virtual |
Leaves the current channel.
After the local user successfully leaves the channel, the SDK triggers the onLeave() on the local client.
- Returns
- 0: Success.
- < 0: Failure.
◆ sendMessage()
virtual int agora::rtm::IChannel::sendMessage |
( |
const IMessage * |
message | ) |
|
|
pure virtual |
Sends a channel message.
After you successfully send a channel message, all members in the channel receive the message in the onMessageReceived() callback.
- Parameters
-
message | The pointer to the channel message that you want to send: IMessage. |
- Returns
- 0: Success.
- < 0: Failure.
◆ updateAttributes()
virtual int agora::rtm::IChannel::updateAttributes |
( |
IChannelAttributes * |
attributes, |
|
|
int64_t & |
requestId |
|
) |
| |
|
pure virtual |
Updates the channel attributes.
A successful method call triggers the onUpdateAttributesResponse() callback on the local client.
- Parameters
-
attributes | The pointer to the channel attributes that you want to update: IChannelAttributes. |
requestId | ID of the current update request. |
- Returns
- 0: Success.
- < 0: Failure.
◆ deleteAttributes()
virtual int agora::rtm::IChannel::deleteAttributes |
( |
IChannelAttributes * |
attributes, |
|
|
int64_t & |
requestId |
|
) |
| |
|
pure virtual |
Removes the channel attributes.
A successful method call triggers the onDeleteAttributesResponse() callback on the local client.
- Parameters
-
attributes | The pointer to the channel attributes that you want to remove: IChannelAttributes. |
requestId | ID of the current delete request. |
- Returns
- 0: Success.
- < 0: Failure.
◆ getId()
virtual const char* agora::rtm::IChannel::getId |
( |
| ) |
const |
|
pure virtual |
Gets the current request ID.
- Returns
- The pointer to the request ID, if the method call succeeds.
- An empty pointer NULL, if the method call fails.
◆ release()
virtual int agora::rtm::IChannel::release |
( |
| ) |
|
|
pure virtual |
Releases the IChannel instance.
This is a synchronous method call, which means that the SDK reports the result of this method call after the IChannel instance is successfully released.
- Returns
- 0: Success.
- < 0: Failure.