|
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 () |
Public Member Functions inherited from RefObject | |
| RefObject () | |
| virtual | ~RefObject () |
| virtual void * | getObject (const String &name) const |
| virtual bool | alive () const |
| bool | ref () |
| bool | deref () |
| int | refcount () const |
| virtual void | destruct () |
Public Member Functions inherited from GenObject | |
| GenObject () | |
| virtual | ~GenObject () |
| virtual const String & | toString () const |
| virtual const String & | traceId () const |
| NamedCounter * | getObjCounter () const |
| NamedCounter * | setObjCounter (NamedCounter *counter) |
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 ts, 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) |
Static Public Member Functions inherited from RefObject | |
| static bool | alive (const RefObject *obj) |
| static bool | efficientIncDec () |
Static Public Member Functions inherited from GenObject | |
| static void * | getObject (const String &name, const GenObject *obj) |
| static bool | getObjCounting () |
| static void | setObjCounting (bool enable) |
| static NamedCounter * | getObjCounter (const String &name, bool create=true) |
| static ObjList & | getObjCounters () |
Protected Attributes | |
| DataBlock | m_data |
| bool | m_retrans |
Additional Inherited Members | |
Protected Member Functions inherited from RefObject | |
| virtual void | zeroRefs () |
| bool | resurrect () |
| virtual void | destroyed () |
This class holds an IAX frame.
This class holds all data needded to manage an IAX frame
| enum Type |
IAX frame type enumeration
|
virtual |
Destructor
|
inlinestatic |
Build a miniframe buffer
| dest | Destination buffer |
| sCallNo | Source call number |
| ts | Frame timestamp |
| data | Data |
| len | Data length |
References DataBlock::append(), DataBlock::assign(), and data().
|
static |
|
inline |
Get the data buffer of the frame
References m_data.
Referenced by buildMiniFrame(), buildVideoMetaFrame(), and IAXEngine::writeSocket().
|
virtual |
Get a pointer to this frame if it is a full frame
Reimplemented in IAXFullFrame.
|
inline |
Get the mark flag
Referenced by buildVideoMetaFrame(), IAXFrame(), IAXFrameOut::IAXFrameOut(), IAXFrameOut::IAXFrameOut(), IAXFullFrame::IAXFullFrame(), IAXFullFrame::IAXFullFrame(), and IAXFullFrame::IAXFullFrame().
|
static |
Pack a subclass value according to IAX protocol
| value | Value to pack |
|
static |
Parse a received buffer and returns a IAXFrame pointer if valid
| buf | Received buffer |
| len | Buffer length |
| engine | The IAXEngine who requested the operation |
| addr | The source address |
References IAXFrame().
|
inline |
Get the retransmission flag of this frame
References m_retrans.
Referenced by IAXFrame(), and IAXFullFrame::IAXFullFrame().
|
inline |
Get the source call number of this frame
|
inline |
Get the timestamp of this frame
|
inline |
Get the type of this frame as enumeration
Referenced by IAXFullFrame::controlTypeText(), IAXFrame(), IAXFrameOut::IAXFrameOut(), IAXFrameOut::IAXFrameOut(), IAXFullFrame::IAXFullFrame(), IAXFullFrame::IAXFullFrame(), IAXFullFrame::IAXFullFrame(), IAXFullFrame::isAuthReq(), IAXFullFrame::isInval(), and typeText().
|
inlinestatic |
Get the string associated with the given IAX frame type
| type | The requested type |
References type().
|
static |
Unpack a subclass value according to IAX protocol
| value | Value to unpack |
|
protected |
Contains the frame's IE list for an incoming frame or the whole frame for an outgoing one
Referenced by data(), and IAXFrameOut::setRetrans().
|
protected |
Retransmission flag
Referenced by retrans(), and IAXFrameOut::setRetrans().