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 = 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 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 TokenDict s_senders []
static 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:
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)

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:
xml The XML element
err The error on failure
error Error 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:
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
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

TokenDict s_creator[] [static]

The list containing the text values for Creator enumeration

TokenDict s_senders[] [static]

The list containing the text values for Senders enumeration


The documentation for this class was generated from the following file:
Generated on Thu Apr 8 18:22:38 2010 for Yate by  doxygen 1.6.3