|
|
Management class for a list of Information Elements
IAXIEList ()
| IAXIEList |
Constructor
IAXIEList (const IAXFullFrame* frame, bool incoming = true)
| IAXIEList |
Constructor. Construct the list from an IAXFullFrame object
Parameters:
frame | Source object |
incoming | True if it is an incoming frame |
~IAXIEList ()
| ~IAXIEList |
Destructor
inline bool invalidIEList ()
| invalidIEList |
[const]
Get the invalid IE list flag
Returns: False if the last frame parse was unsuccessful
inline void clear ()
| clear |
Clear the list
inline bool empty ()
| empty |
Check if the list is empty
Returns: True if the list is empty
void insertVersion ()
| insertVersion |
Insert a VERSION Information Element in the list if not already done
inline bool validVersion ()
| validVersion |
Get the validity of the VERSION Information Element of the list if any
Returns: False if version is not IAX_PROTOCOL_VERSION or the list doesn't contain a VERSION Information Element
inline void appendIE (IAXInfoElement* ie)
| appendIE |
Append an Information Element to the list
Parameters:
ie | IAXInfoElement pointer to append |
inline bool appendIE (IAXIEList& src, IAXInfoElement::Type type)
| appendIE |
Append an Information Element taken from another list
Parameters:
src | Source IE list |
type | IE to move |
Returns: True if found and added
inline void appendNull (IAXInfoElement::Type type)
| appendNull |
Append an Information Element to the list
Parameters:
type | The type of the IAXInfoElement to append |
inline void appendString (IAXInfoElement::Type type, const String& src)
| appendString |
Append a text Information Element to the list from a String
Parameters:
type | The type of the IAXInfoElementString to append |
src | The source |
inline void appendString (IAXInfoElement::Type type, unsigned char* src, unsigned len)
| appendString |
Append a text Information Element to the list from a buffer
Parameters:
type | The type of the IAXInfoElementString to append |
src | The source |
len | Source length |
inline void appendNumeric (IAXInfoElement::Type type, u_int32_t value, u_int8_t len)
| appendNumeric |
Append a numeric Information Element to the list
Parameters:
type | The type of the IAXInfoElementNumeric to append |
value | The source |
len | Source length |
inline void appendBinary (IAXInfoElement::Type type, unsigned char* data, unsigned len)
| appendBinary |
Append a binary Information Element to the list
Parameters:
type | The type of the IAXInfoElementBinary to append |
data | The source data to append |
len | Source length |
bool createFromFrame (const IAXFullFrame* frame, bool incoming = true)
| createFromFrame |
Construct the list from an IAXFullFrame object. On exit m_invalidIEList will contain the opposite of the returned value
Parameters:
frame | Source object |
incoming | True if it is an incoming frame |
Returns: False if the frame contains invalid IEs
void toBuffer (DataBlock& buf)
| toBuffer |
Construct a buffer from this list
Parameters:
buf | Destination buffer |
void toString (String& dest, const char* indent = 0)
| toString |
Add this list to a string
Parameters:
dest | Destination string |
indent | Optional indent for each element |
IAXInfoElement* getIE (IAXInfoElement::Type type, bool remove = false)
| getIE |
Retrieve an IAXInfoElement from the list
Parameters:
type | The desired type |
remove | True to remove from list. The caller will own the object |
Returns: An IAXInfoElement pointer or 0 if the list doesn't contain an IE of this type
bool getString (IAXInfoElement::Type type, String& dest)
| getString |
Get the data of a list item into a String. Before any operation dest is cleared
Parameters:
type | The desired type |
dest | The destination String |
Returns: False if the list doesn't contain an IE of this type
bool getNumeric (IAXInfoElement::Type type, u_int32_t& dest)
| getNumeric |
Get the data of a list item into a numeric destination
Parameters:
type | The desired type |
dest | The destination |
Returns: False if the list doesn't contain an IE of this type
bool getBinary (IAXInfoElement::Type type, DataBlock& dest)
| getBinary |
Get the data of a list item into a DataBlock. Before any operation dest is cleared
Parameters:
type | The desired type |
dest | The destination buffer |
Returns: False if the list doesn't contain an IE of this type
Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54. |