class JGRtpMediaList
|
A List of Jingle RTP data payloads. More... |
|
|
Public Types
- enum Media { MediaMissing = -1,
MediaUnknown = 0,
Audio = 1,
}
Public Methods
- inline JGRtpMediaList (Media m = MediaMissing, bool cryptoRequired = false)
- inline ~JGRtpMediaList ()
- inline Media media () const
- inline void add (const char* id, const char* name, const char* clockrate,
const char* synonym = 0, const char* channels = 0,
const char* pTime = 0, const char* maxPTime = 0, const char* bitRate = 0)
- void reset ()
- void setMedia (const JGRtpMediaList& src, const String& only = String::empty())
- void filterMedia (const String& only)
- JGRtpMedia* findMedia (const String& id)
- JGRtpMedia* findSynonym (const String& value) const
- XmlElement* toXml () const
- void fromXml (XmlElement* xml)
- bool createList (String& dest, bool synonym, const char* sep = ",")
- void addTelEvent (XmlElement* xml, const char* name = 0) const
Public Members
Hold a list of RTP data payloads
enum Media { MediaMissing = -1,
MediaUnknown = 0,
Audio = 1,
}
| Media |
Media type enumeration
inline JGRtpMediaList (Media m = MediaMissing, bool cryptoRequired = false)
| JGRtpMediaList |
Constructor
Parameters:
m | Media type as enumeration
|
cryptoRequired | True to require media encryption
|
inline ~JGRtpMediaList ()
| ~JGRtpMediaList |
Destructor
inline Media media ()
| media |
[const]
Get the media type of the payloads owned by this list
Returns: Media type as enumeration
inline void add (const char* id, const char* name, const char* clockrate,
const char* synonym = 0, const char* channels = 0,
const char* pTime = 0, const char* maxPTime = 0, const char* bitRate = 0)
| add |
Append a new data payload
Parameters:
id | The 'id' attribute
|
name | The 'name' attribute
|
clockrate | The 'clockrate' attribute
|
synonym | Optional application synonym for the payload
|
channels | Optional 'channels' attribute (the number of channels)
|
pTime | Optional "ptime" attribute (packet time)
|
maxPTime | Optional "maxptime" attribute (maximum packet time)
|
bitRate | Optional "bitrate" attribute
|
Reset the list and data
void setMedia (const JGRtpMediaList& src, const String& only = String::empty())
| setMedia |
Set media type and payloads from another list
Parameters:
src | Media list to copy into this one
|
only | Optional list of synonyms to set if found in src.
Copy the whole list if this parameter is empty
|
void filterMedia (const String& only)
| filterMedia |
Filter media list preserving only some formats
Parameters:
only | List of synonyms to preserve, do not filter media if this parameter is empty
|
JGRtpMedia* findMedia (const String& id)
| findMedia |
Find a data payload by its id
Parameters:
id | Identifier of media to find
|
Returns: JGRtpMedia pointer or 0 if not found
JGRtpMedia* findSynonym (const String& value)
| findSynonym |
[const]
Find a data payload by its synonym
Parameters:
value | The value to compare with
|
Returns: JGRtpMedia pointer or 0 if not found
XmlElement* toXml ()
| toXml |
[const]
Create a 'description' element and add payload children to it
Returns: Valid XmlElement pointer
void fromXml (XmlElement* xml)
| fromXml |
Fill this list from an XML element's children. Clear before attempting to fill
Parameters:
xml | The source XML element
|
bool createList (String& dest, bool synonym, const char* sep = ",")
| createList |
Create a list from data payloads
Parameters:
dest | Destination string
|
synonym | True to create from synonyms, false to create from names
|
sep | List item separator
|
Returns: False if the list is empty
void addTelEvent (XmlElement* xml, const char* name = 0)
| addTelEvent |
[const]
Build and add telephone-event media child to a parent xml element.
Add a second telephone event media child if set
Parameters:
xml | Parent element
|
name | Optional event name. Defaults to set event name
|
static const TokenDict s_media[]
| s_media[] |
NamedString* m_bandwidth
| m_bandwidth |
bool m_cryptoRequired
| m_cryptoRequired |
ObjList m_cryptoLocal
| m_cryptoLocal |
ObjList m_cryptoRemote
| m_cryptoRemote |
int m_telEvent
| m_telEvent |
String m_telEventName
| m_telEventName |
String m_telEventName2
| m_telEventName2 |
Generated by: paulc on bussard on Sun Oct 20 21:06:06 2013, using kdoc 2.0a54. |