A Jingle session content. More...
#include <yatejingle.h>
Public Types | |
| enum | Type { Unknown = -1, UnknownFileTransfer = -2, RtpIceUdp = 1, RtpRawUdp = 2, FileBSBOffer = 3, FileBSBRequest = 4 } |
| enum | Senders { SendUnknown = 0, SendBoth = 1, SendInitiator = 2, SendResponder = 3 } |
| enum | Creator { CreatorUnknown = 0, CreatorInitiator = 1, CreatorResponder = 2 } |
Public Member Functions | |
| JGSessionContent (Type t, const char *name, Senders senders, Creator creator, const char *disposition=0) | |
| Type | type () const |
| Senders | senders () const |
| Creator | creator () const |
| bool | isValidAudio () const |
| virtual const String & | toString () const |
| bool | isSession () const |
| bool | isEarlyMedia () const |
| void | setEarlyMedia () |
| XMLElement * | toXml (bool minimum, bool addDesc, bool addTrans, bool addCandidates, bool addAuth) const |
Static Public Member Functions | |
| static JGSessionContent * | fromXml (XMLElement *xml, XMPPError::Type &err, String &error) |
Public Attributes | |
| JGRtpMediaList | m_rtpMedia |
| JGRtpCandidates | m_rtpLocalCandidates |
| JGRtpCandidates | m_rtpRemoteCandidates |
| NamedList | m_fileTransfer |
Static Public Attributes | |
| static TokenDict | s_senders [] |
| static TokenDict | s_creator [] |
A Jingle session content.
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 Creator |
Enumeration values for the 'creator' attribute (required)
| enum Senders |
Enumeration values for the 'senders' attribute (required)
| enum Type |
Enumeration of content type
| JGSessionContent | ( | Type | t, | |
| const char * | name, | |||
| Senders | senders, | |||
| Creator | creator, | |||
| const char * | disposition = 0 | |||
| ) |
Constructor
| 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) |
| Creator creator | ( | ) | const [inline] |
Get the content creator
| static JGSessionContent* fromXml | ( | XMLElement * | xml, | |
| XMPPError::Type & | err, | |||
| String & | error | |||
| ) | [static] |
Decode 'content' element attributes
| xml | The XML element | |
| err | The error on failure | |
| error | Error text to be sent on failure |
| bool isEarlyMedia | ( | ) | const [inline] |
Check if the content disposition is early media
| bool isSession | ( | ) | const [inline] |
Check if the content disposition is session XEP-0166: true if disposition is missing
| bool isValidAudio | ( | ) | const [inline] |
Check if this content is a valid audio one: it's media list type is Audio and the payload list is not empty
| Senders senders | ( | ) | const [inline] |
Get the senders
| void setEarlyMedia | ( | ) | [inline] |
Set this content's disposition to early media
| virtual const String& toString | ( | ) | const [inline, virtual] |
Get the name of this content
Reimplemented from GenObject.
| XMLElement* toXml | ( | bool | minimum, | |
| bool | addDesc, | |||
| bool | addTrans, | |||
| bool | addCandidates, | |||
| bool | addAuth | |||
| ) | const |
Build a 'content' XML element from this object
| 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 |
| Type type | ( | ) | const [inline] |
Get the content type
File info (for file transfer)
The RTP local candidates
The RTP media description if used
The RTP remote candidates
1.6.3