|
|
This class holds a Jingle content negotiated during a session It can be built from a received xml element and it can build an xml element from itself
enum Type { Unknown = -1, UnknownFileTransfer = -2, RtpIceUdp = 1, RtpRawUdp, RtpP2P, RtpGoogleRawUdp, FileBSBOffer, FileBSBRequest, } | Type |
Enumeration of content type
enum Senders { SendUnknown = 0, SendBoth = 1, SendInitiator = 2, SendResponder = 3 } | Senders |
Enumeration values for the 'senders' attribute (required)
enum Creator { CreatorUnknown = 0, CreatorInitiator = 1, CreatorResponder = 2 } | Creator |
Enumeration values for the 'creator' attribute (required)
JGSessionContent (Type t, const char* name, Senders senders,
Creator creator, const char* disposition = 0)
| JGSessionContent |
Constructor
Parameters:
t | Content type as enumeration |
name | Content name |
senders | Content senders as enumeration |
creator | Content creator as enumeration |
disposition | Optional content disposition (defauls to 'session' if empty) |
inline Type type ()
| type |
[const]
Get the content type
Returns: Content type as enumeration
inline Senders senders ()
| senders |
[const]
Get the senders
Returns: Senders as enumeration
inline Creator creator ()
| creator |
[const]
Get the content creator
Returns: Content creator as enumeration
inline bool isValidAudio ()
| isValidAudio |
[const]
Check if this content is a valid audio one: it's media list type is Audio and the payload list is not empty
Returns: True if this content can be used for audio purposes
const String& toString ()
| toString |
[const virtual]
Get the name of this content
Reimplemented from GenObject.
inline bool isSession ()
| isSession |
[const]
Check if the content disposition is session XEP-0166: true if disposition is missing
Returns: True if this content should be processed at session level
inline bool isEarlyMedia ()
| isEarlyMedia |
[const]
Check if the content disposition is early media
Returns: True if this content is an early media one
inline void setEarlyMedia ()
| setEarlyMedia |
Set this content's disposition to early media
XmlElement* toXml (bool minimum, bool addDesc,
bool addTrans, bool addCandidates, bool addAuth)
| toXml |
[const]
Build a 'content' XML element from this object
Parameters:
minimum | Minimum data (only creator and name) |
addDesc | True to add the description child |
addTrans | True to add the transport child |
addCandidates | True to add the transport candidate children |
addAuth | RtpIceUdp only: add auth data |
Returns: Valid XmlElement pointer
JGSessionContent* fromXml (XmlElement* xml, XMPPError::Type& err,
String& error)
| fromXml |
[static]
Decode 'content' element attributes
Parameters:
xml | The XML element |
err | The error on failure |
error | Error text to be sent on failure |
Returns: Valid JGSessionContent pointer on success
static const TokenDict s_senders[] | s_senders[] |
static const TokenDict s_creator[] | s_creator[] |
JGRtpMediaList m_rtpMedia | m_rtpMedia |
JGRtpCandidates m_rtpLocalCandidates | m_rtpLocalCandidates |
JGRtpCandidates m_rtpRemoteCandidates | m_rtpRemoteCandidates |
NamedList m_fileTransfer | m_fileTransfer |
Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54. |