Agora Java API Reference for Android

Public Member Functions | Static Public Member Functions | List of all members
agora::rtm::IChannelAttributes Class Referenceabstract

`#include <IAgoraRtmService.h>`

## Public Member Functions
virtual int | addAttribute (const char *key, const char *value)=0
virtual int | removeAttribute (const char *key)=0
virtual int | getAttributesSize () const =0
virtual void | getAttributes (int size, char **key, char **value) const =0
virtual const char * | getAttributeValue (const char *key) const =0
virtual int | release ()=0

## Static Public Member Functions
static IChannelAttributes * | createChannelAttributes ()

## Detailed Description

The IChannelAttributes class.

## Member Function Documentation

## ◆ createChannelAttributes()

static IChannelAttributes* agora::rtm::IChannelAttributes::createChannelAttributes | ( |  | ) |
| static

Creates an IChannelAttributes instance.

Returns
  - An IChannelAttributes instance, if the method call succeeds.

## ◆ addAttribute()

virtual int agora::rtm::IChannelAttributes::addAttribute | ( | const char * | key,
|  | const char * | value
| ) |  |
| pure virtual

Adds an attribute to a specified channel.

Parameters

  key | The pointer to the attribute key.
  value | The pointer to the attribute value.

Returns
  - 0: Success.
  - < 0: Failure.

## ◆ removeAttribute()

virtual int agora::rtm::IChannelAttributes::removeAttribute | ( | const char * | key | ) |
| pure virtual

Removes an attribute from the channel.

Parameters

  key | The pointer to the attribute key.

Returns
  - 0: Success.
  - < 0: Failure.

## ◆ getAttributesSize()

virtual int agora::rtm::IChannelAttributes::getAttributesSize | ( |  | ) | const
| pure virtual

Gets the size of the attributes.

Returns
  - 0: Success.
  - < 0: Failure.

## ◆ getAttributes()

virtual void agora::rtm::IChannelAttributes::getAttributes | ( | int | size,
|  | char ** | key,
|  | char ** | value
| ) |  | const
| pure virtual

Gets the channel attributes.

Parameters

  size | The size of the channel attributes.
  key | The pointer to the key of each channel attribute.
  value | The pointer to the value of each channel attribute.

## ◆ getAttributeValue()

virtual const char* agora::rtm::IChannelAttributes::getAttributeValue | ( | const char * | key | ) | const
| pure virtual

Gets the value of a channel attribute using the attribute key.

Parameters

  key | The pointer to the key of the channel attribute that you want to get.

## ◆ release()

virtual int agora::rtm::IChannelAttributes::release | ( |  | ) |
| pure virtual

Releases the IChannelAttributes instance.

Parameters

  - | 0: Success. < 0: Failure.