Yate
Public Member Functions | Static Public Member Functions
IAXInfoElementBinary Class Reference

A single IAX2 numeric Information Element. More...

#include <yateiax.h>

Inheritance diagram for IAXInfoElementBinary:
IAXInfoElement RefObject GenObject

List of all members.

Public Member Functions

 IAXInfoElementBinary (Type type, unsigned char *buf, unsigned len)
virtual ~IAXInfoElementBinary ()
int length () const
DataBlockdata ()
void setData (void *buf, unsigned len)
virtual void toBuffer (DataBlock &buf)
virtual void toString (String &buf)

Static Public Member Functions

static IAXInfoElementBinarypackIP (const SocketAddr &addr)
static bool unpackIP (SocketAddr &addr, IAXInfoElementBinary *ie)

Detailed Description

A single IAX2 numeric Information Element.

This class holds a single Information Element with binary data


Constructor & Destructor Documentation

IAXInfoElementBinary ( Type  type,
unsigned char *  buf,
unsigned  len 
) [inline]

Constructor

Parameters:
typeType of this IE
bufSource buffer to construct this IE
lenBuffer length
virtual ~IAXInfoElementBinary ( ) [inline, virtual]

Destructor


Member Function Documentation

DataBlock& data ( ) [inline]

Get the data

Returns:
The data
int length ( ) const [inline]

Get the data length

Returns:
The data length
static IAXInfoElementBinary* packIP ( const SocketAddr addr) [static]

Constructs an APPARENT_ADDR information element from a SocketAddr object

Parameters:
addrSource object
Returns:
A valid IAXInfoElementBinary pointer
void setData ( void *  buf,
unsigned  len 
) [inline]

Set the data

Parameters:
bufSource buffer to construct this IE
lenBuffer length

References DataBlock::assign().

virtual void toBuffer ( DataBlock buf) [virtual]

Constructs a buffer containing this Information Element

Parameters:
bufDestination buffer

Reimplemented from IAXInfoElement.

virtual void toString ( String buf) [virtual]

Add this element to a string

Parameters:
bufDestination string

Reimplemented from IAXInfoElement.

static bool unpackIP ( SocketAddr addr,
IAXInfoElementBinary ie 
) [static]

Decode an APPARENT_ADDR information element and copy it to a SocketAddr object

Parameters:
addrDestination object
ieSource IE
Returns:
False if ie is 0

The documentation for this class was generated from the following file: