|
Yate
|
This class holds an IAX frame. More...
#include <yateiax.h>
Public Types | |
| enum | Type { DTMF = 0x01, Voice = 0x02, Video = 0x03, Control = 0x04, Null = 0x05, IAX = 0x06, Text = 0x07, Image = 0x08, HTML = 0x09, Noise = 0x0a } |
Public Member Functions | |
| IAXFrame (Type type, u_int16_t sCallNo, u_int32_t tStamp, bool retrans, const unsigned char *buf, unsigned int len, bool mark=false) | |
| virtual | ~IAXFrame () |
| Type | type () const |
| DataBlock & | data () |
| bool | retrans () const |
| u_int16_t | sourceCallNo () const |
| u_int32_t | timeStamp () const |
| bool | mark () const |
| virtual IAXFullFrame * | fullFrame () |
Static Public Member Functions | |
| static IAXFrame * | parse (const unsigned char *buf, unsigned int len, IAXEngine *engine=0, const SocketAddr *addr=0) |
| static void | buildMiniFrame (DataBlock &dest, u_int16_t sCallNo, u_int32_t tStamp, void *data, unsigned int len) |
| static void | buildVideoMetaFrame (DataBlock &dest, u_int16_t sCallNo, u_int32_t tStamp, bool mark, void *data, unsigned int len) |
| static u_int8_t | packSubclass (u_int32_t value) |
| static u_int32_t | unpackSubclass (u_int8_t value) |
| static const char * | typeText (int type) |
Protected Attributes | |
| DataBlock | m_data |
| bool | m_retrans |
This class holds an IAX frame.
This class holds all data needded to manage an IAX frame
| enum Type |
IAX frame type enumeration
| IAXFrame | ( | Type | type, |
| u_int16_t | sCallNo, | ||
| u_int32_t | tStamp, | ||
| bool | retrans, | ||
| const unsigned char * | buf, | ||
| unsigned int | len, | ||
| bool | mark = false |
||
| ) |
Constructor. Constructs an incoming frame
| type | Frame type |
| sCallNo | Source call number |
| tStamp | Frame timestamp |
| retrans | Retransmission flag |
| buf | IE buffer |
| len | IE buffer length |
| mark | Mark flag |
| virtual ~IAXFrame | ( | ) | [virtual] |
Destructor
| static void buildMiniFrame | ( | DataBlock & | dest, |
| u_int16_t | sCallNo, | ||
| u_int32_t | tStamp, | ||
| void * | data, | ||
| unsigned int | len | ||
| ) | [static] |
Build a miniframe buffer
| dest | Destination buffer |
| sCallNo | Source call number |
| tStamp | Frame timestamp |
| data | Data |
| len | Data length |
| static void buildVideoMetaFrame | ( | DataBlock & | dest, |
| u_int16_t | sCallNo, | ||
| u_int32_t | tStamp, | ||
| bool | mark, | ||
| void * | data, | ||
| unsigned int | len | ||
| ) | [static] |
Build a video meta frame buffer
| dest | Destination buffer |
| sCallNo | Source call number |
| tStamp | Frame timestamp |
| mark | Frame mark |
| data | Data |
| len | Data length |
Get the data buffer of the frame
Referenced by IAXEngine::writeSocket().
| virtual IAXFullFrame* fullFrame | ( | ) | [virtual] |
Get a pointer to this frame if it is a full frame
Reimplemented in IAXFullFrame.
| bool mark | ( | ) | const [inline] |
Get the mark flag
| static u_int8_t packSubclass | ( | u_int32_t | value | ) | [static] |
Pack a subclass value according to IAX protocol
| value | Value to pack |
| static IAXFrame* parse | ( | const unsigned char * | buf, |
| unsigned int | len, | ||
| IAXEngine * | engine = 0, |
||
| const SocketAddr * | addr = 0 |
||
| ) | [static] |
| bool retrans | ( | ) | const [inline] |
Get the retransmission flag of this frame
| u_int16_t sourceCallNo | ( | ) | const [inline] |
Get the source call number of this frame
| u_int32_t timeStamp | ( | ) | const [inline] |
Get the timestamp of this frame
Get the type of this frame as enumeration
| static const char* typeText | ( | int | type | ) | [inline, static] |
Get the string associated with the given IAX frame type
| type | The requested type |
References TelEngine::lookup().
| static u_int32_t unpackSubclass | ( | u_int8_t | value | ) | [static] |
Unpack a subclass value according to IAX protocol
| value | Value to unpack |
Contains the frame's IE list for an incoming frame or the whole frame for an outgoing one
bool m_retrans [protected] |
Retransmission flag
1.7.6.1