Agora RTC Objective-C API Reference Refactor

Public Member Functions | Static Public Member Functions
IChannelAttributes Class Referenceabstract

## 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* createChannelAttributes | ( |  | ) |
| static

Creates an IChannelAttributes instance.

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

## ◆ addAttribute()

virtual int 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 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 getAttributesSize | ( |  | ) | const
| pure virtual

Gets the size of the attributes.

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

## ◆ getAttributes()

virtual void 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* 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 release | ( |  | ) |
| pure virtual

Releases the IChannelAttributes instance.

Parameters

  - | 0: Success. < 0: Failure.