#include <icy/stun/attributes.h>Inherits:
Attribute
Implements a STUN/TURN attribute that holds a list of attribute type codes. Used by the UNKNOWN-ATTRIBUTES attribute (RFC 5389 section 15.9).
| Return | Name | Description |
|---|---|---|
UInt16ListAttribute | #### Parameters | |
UInt16ListAttribute | Copy constructor; duplicates the type list. | |
std::unique_ptr< Attribute > | clone virtual | Returns a deep copy of this attribute. |
size_t | size const | #### Returns |
uint16_t | getType const | Returns the type code at the given list position. |
void | setType | Overwrites the type code at the given list position. |
void | addType | Appends a type code to the list and updates the attribute size. |
void | read virtual | Reads the body (not the type or size) for this type of attribute from the given buffer. |
void | write virtual const | Writes the body (not the type or size) to the given buffer. |
UInt16ListAttribute(uint16_t type, uint16_t size)type Wire type code for the concrete attribute.
size Initial body length in bytes.
UInt16ListAttribute(const UInt16ListAttribute & r)Copy constructor; duplicates the type list.
virtual
virtual std::unique_ptr< Attribute > clone()Returns a deep copy of this attribute.
const
size_t size() constNumber of attribute type codes in the list.
const
uint16_t getType(int index) constReturns the type code at the given list position.
index Zero-based list index.Attribute type code at index.
void setType(int index, uint16_t value)Overwrites the type code at the given list position.
index Zero-based list index.
value New attribute type code.
void addType(uint16_t value)Appends a type code to the list and updates the attribute size.
value Attribute type code to append.virtual
virtual void read(BitReader & reader)Reads the body (not the type or size) for this type of attribute from the given buffer.
reader Source bit reader positioned at the attribute body.virtual const
virtual void write(BitWriter & writer) constWrites the body (not the type or size) to the given buffer.
writer Destination bit writer.| Return | Name | Description |
|---|---|---|
std::vector< uint16_t > | _attrTypes |
std::vector< uint16_t > _attrTypes