UInt16ListAttribute
#include <icy/stun/attributes.h>
class UInt16ListAttributeDefined in src/stun/include/icy/stun/attributes.h:425
- 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).
List of all members
| Name | Kind | Owner |
|---|---|---|
UInt16ListAttribute | function | Declared here |
UInt16ListAttribute | function | Declared here |
~UInt16ListAttribute | function | Declared here |
clone | function | Declared here |
size | function | Declared here |
getType | function | Declared here |
setType | function | Declared here |
addType | function | Declared here |
read | function | Declared here |
write | function | Declared here |
_attrTypes | variable | Declared here |
~Attribute | function | Inherited from Attribute |
clone | function | Inherited from Attribute |
read | function | Inherited from Attribute |
write | function | Inherited from Attribute |
type | function | Inherited from Attribute |
size | function | Inherited from Attribute |
paddingBytes | function | Inherited from Attribute |
paddedBytes | function | Inherited from Attribute |
consumePadding | function | Inherited from Attribute |
writePadding | function | Inherited from Attribute |
typeString | function | Inherited from Attribute |
TypeID | variable | Inherited from Attribute |
create | function | Inherited from Attribute |
paddingBytes | function | Inherited from Attribute |
paddedBytes | function | Inherited from Attribute |
typeString | function | Inherited from Attribute |
_type | variable | Inherited from Attribute |
_size | variable | Inherited from Attribute |
Attribute | function | Inherited from Attribute |
setLength | function | Inherited from Attribute |
Type | enum | Inherited from Attribute |
Inherited from Attribute
| Kind | Name | Description |
|---|---|---|
function | ~Attribute virtual inline | |
function | clone virtual | Returns a deep copy of this attribute. |
function | read virtual | Reads the body (not the type or size) for this type of attribute from the given buffer. |
function | write virtual const | Writes the body (not the type or size) to the given buffer. |
function | type const | |
function | size const | |
function | paddingBytes const inline | |
function | paddedBytes const inline | |
function | consumePadding const | Advances the reader past any 4-byte alignment padding that follows this attribute's body. |
function | writePadding const | Writes zero-fill padding bytes to align this attribute to a 4-byte boundary. |
function | typeString | |
variable | TypeID static constexpr | |
function | create static | Creates an attribute of the given wire type and body size. Returns nullptr if the type is unknown or the size is invalid. |
function | paddingBytes static inline constexpr | Returns the 4-byte alignment padding required for a body of size bytes. |
function | paddedBytes static inline constexpr | Returns the body length including 4-byte alignment padding. |
function | typeString static | |
variable | _type | |
variable | _size | |
function | Attribute | |
function | setLength | Updates the stored body length. |
enum | Type |
Public Methods
| Return | Name | Description |
|---|---|---|
UInt16ListAttribute | ||
UInt16ListAttribute | Copy constructor; duplicates the type list. | |
~UInt16ListAttribute virtual | ||
std::unique_ptr< Attribute > | clone virtual override | Returns a deep copy of this attribute. |
size_t | size const | |
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 override | Reads the body (not the type or size) for this type of attribute from the given buffer. |
void | write virtual const override | Writes the body (not the type or size) to the given buffer. |
UInt16ListAttribute
UInt16ListAttribute(uint16_t type, uint16_t size)Defined in src/stun/include/icy/stun/attributes.h:430
Parameters
| Parameter | Type | Description |
|---|---|---|
type | uint16_t | Wire type code for the concrete attribute. |
size | uint16_t | Initial body length in bytes. |
UInt16ListAttribute
UInt16ListAttribute(const UInt16ListAttribute & r)Defined in src/stun/include/icy/stun/attributes.h:433
Copy constructor; duplicates the type list.
~UInt16ListAttribute
virtual
virtual ~UInt16ListAttribute()Defined in src/stun/include/icy/stun/attributes.h:434
clone
virtual override
virtual std::unique_ptr< Attribute > clone() overrideDefined in src/stun/include/icy/stun/attributes.h:437
Returns a deep copy of this attribute.
Reimplements
size
const
size_t size() constDefined in src/stun/include/icy/stun/attributes.h:440
Returns
Number of attribute type codes in the list.
getType
const
uint16_t getType(int index) constDefined in src/stun/include/icy/stun/attributes.h:445
Returns the type code at the given list position.
Returns
Attribute type code at index.
Parameters
| Parameter | Type | Description |
|---|---|---|
index | int | Zero-based list index. |
setType
void setType(int index, uint16_t value)Defined in src/stun/include/icy/stun/attributes.h:450
Overwrites the type code at the given list position.
Parameters
| Parameter | Type | Description |
|---|---|---|
index | int | Zero-based list index. |
value | uint16_t | New attribute type code. |
addType
void addType(uint16_t value)Defined in src/stun/include/icy/stun/attributes.h:454
Appends a type code to the list and updates the attribute size.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | uint16_t | Attribute type code to append. |
read
virtual override
virtual void read(BitReader & reader) overrideDefined in src/stun/include/icy/stun/attributes.h:456
Reads the body (not the type or size) for this type of attribute from the given buffer.
Reimplements
Parameters
| Parameter | Type | Description |
|---|---|---|
reader | BitReader & | Source bit reader positioned at the attribute body. |
write
virtual const override
virtual void write(BitWriter & writer) const overrideDefined in src/stun/include/icy/stun/attributes.h:457
Writes the body (not the type or size) to the given buffer.
Reimplements
Parameters
| Parameter | Type | Description |
|---|---|---|
writer | BitWriter & | Destination bit writer. |
Private Attributes
| Return | Name | Description |
|---|---|---|
std::vector< uint16_t > | _attrTypes |
_attrTypes
std::vector< uint16_t > _attrTypes