class IAXFrame

This class holds an IAX frame. More...

Full nameTelEngine::IAXFrame
Definition#include <libs/yiax/yateiax.h>
InheritsTelEngine::RefObject [public ]
Inherited byIAXFrameOut, IAXFullFrame
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Public Static Methods

Protected Members


Detailed Description

This class holds all data needded to manage an IAX frame

enum Type { DTMF = 0x01, Voice = 0x02, Video = 0x03, Control = 0x04, Null = 0x05, IAX = 0x06, Text = 0x07, Image = 0x08, HTML = 0x09, Noise = 0x0a, }

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)

IAXFrame

Constructor. Constructs an incoming frame

Parameters:
typeFrame type
sCallNoSource call number
tStampFrame timestamp
retransRetransmission flag
bufIE buffer
lenIE buffer length

 ~IAXFrame ()

~IAXFrame

[virtual]

Destructor

inline Type  type ()

type

[const]

Get the type of this frame as enumeration

Returns: The type of this frame as enumeration

inline DataBlock&  data ()

data

Get the data buffer of the frame

Returns: The data buffer of the frame

inline bool  retrans ()

retrans

[const]

Get the retransmission flag of this frame

Returns: The retransmission flag of this frame

inline u_int16_t  sourceCallNo ()

sourceCallNo

[const]

Get the source call number of this frame

Returns: The source call number of this frame

inline u_int32_t  timeStamp ()

timeStamp

[const]

Get the timestamp of this frame

Returns: The timestamp of this frame

const IAXFullFrame*  fullFrame ()

fullFrame

[const virtual]

Get a pointer to this frame if it is a full frame

Returns: A pointer to this frame if it is a full frame or 0

IAXFrame*  parse (const unsigned char* buf, unsigned int len, IAXEngine* engine = 0, const SocketAddr* addr = 0)

parse

[static]

Parse a received buffer and returns a IAXFrame pointer if valid

Parameters:
bufReceived buffer
lenBuffer length
engineThe IAXEngine who requested the operation
addrThe source address

Returns: A frame pointer on success or 0

u_int8_t  packSubclass (u_int32_t value)

packSubclass

[static]

Pack a subclass value according to IAX protocol

Parameters:
valueValue to pack

Returns: The packed subclass value or 0 if invalid (>255 and not a power of 2)

u_int32_t  unpackSubclass (u_int8_t value)

unpackSubclass

[static]

Unpack a subclass value according to IAX protocol

Parameters:
valueValue to unpack

Returns: The unpacked subclass value

inline const char*  typeText (int type)

typeText

[static]

Get the string associated with the given IAX frame type

Parameters:
typeThe requested type

Returns: The text if type is valid or 0

DataBlock m_data

m_data

[protected]

bool m_retrans

m_retrans

[protected]


Generated by: paulc on bussard on Mon Mar 8 12:18:15 2010, using kdoc 2.0a54.