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 IChannelAttributescreateChannelAttributes ()
 

Detailed Description

The IChannelAttributes class.

Member Function Documentation

◆ createChannelAttributes()

static IChannelAttributes* createChannelAttributes ( )
static

Creates an IChannelAttributes instance.

Returns

◆ addAttribute()

virtual int addAttribute ( const char *  key,
const char *  value 
)
pure virtual

Adds an attribute to a specified channel.

Parameters
keyThe pointer to the attribute key.
valueThe 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
keyThe 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
sizeThe size of the channel attributes.
keyThe pointer to the key of each channel attribute.
valueThe 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
keyThe 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.