Yate
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
JGSessionContent Class Reference

A Jingle session content. More...

#include <yatejingle.h>

Inheritance diagram for JGSessionContent:
RefObject GenObject

List of all members.

Public Types

enum  Type {
  Unknown = -1, UnknownFileTransfer = -2, RtpIceUdp = 1, RtpRawUdp,
  RtpP2P, FileBSBOffer, FileBSBRequest
}
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 StringtoString () const
bool isSession () const
bool isEarlyMedia () const
void setEarlyMedia ()
XmlElementtoXml (bool minimum, bool addDesc, bool addTrans, bool addCandidates, bool addAuth) const

Static Public Member Functions

static JGSessionContentfromXml (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 const TokenDict s_senders []
static const TokenDict s_creator []

Detailed Description

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


Member Enumeration Documentation

enum Creator

Enumeration values for the 'creator' attribute (required)

enum Senders

Enumeration values for the 'senders' attribute (required)

enum Type

Enumeration of content type


Constructor & Destructor Documentation

JGSessionContent ( Type  t,
const char *  name,
Senders  senders,
Creator  creator,
const char *  disposition = 0 
)

Constructor

Parameters:
tContent type as enumeration
nameContent name
sendersContent senders as enumeration
creatorContent creator as enumeration
dispositionOptional content disposition (defauls to 'session' if empty)

Member Function Documentation

Creator creator ( ) const [inline]

Get the content creator

Returns:
Content creator as enumeration
static JGSessionContent* fromXml ( XmlElement xml,
XMPPError::Type err,
String error 
) [static]

Decode 'content' element attributes

Parameters:
xmlThe XML element
errThe error on failure
errorError text to be sent on failure
Returns:
Valid JGSessionContent pointer on success
bool isEarlyMedia ( ) const [inline]

Check if the content disposition is early media

Returns:
True if this content is an early media one
bool isSession ( ) const [inline]

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
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

Returns:
True if this content can be used for audio purposes
Senders senders ( ) const [inline]

Get the senders

Returns:
Senders as enumeration
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

Parameters:
minimumMinimum data (only creator and name)
addDescTrue to add the description child
addTransTrue to add the transport child
addCandidatesTrue to add the transport candidate children
addAuthRtpIceUdp only: add auth data
Returns:
Valid XmlElement pointer
Type type ( ) const [inline]

Get the content type

Returns:
Content type as enumeration

Member Data Documentation

File info (for file transfer)

The RTP local candidates

The RTP media description if used

The RTP remote candidates

const TokenDict s_creator[] [static]

The list containing the text values for Creator enumeration

const TokenDict s_senders[] [static]

The list containing the text values for Senders enumeration


The documentation for this class was generated from the following file: