Yate
Public Types | Public Member Functions | Public Attributes | Static Public Attributes

JGRtpMediaList Class Reference

A List of Jingle RTP data payloads. More...

#include <yatejingle.h>

Inheritance diagram for JGRtpMediaList:
ObjList GenObject

List of all members.

Public Types

enum  Media { MediaMissing = -1, MediaUnknown = 0, Audio = 1 }

Public Member Functions

 JGRtpMediaList (Media m=MediaMissing, bool cryptoMandatory=false)
Media media () const
void add (const char *id, const char *name, const char *clockrate, const char *bitrate, const char *synonym)
JGRtpMediafindMedia (const String &id)
JGRtpMediafindSynonym (const String &value) const
XMLElementtoXML (bool telEvent=true) const
void fromXML (XMLElement *xml)
bool createList (String &dest, bool synonym, const char *sep=",")

Public Attributes

Media m_media
bool m_cryptoMandatory
ObjList m_cryptoLocal
ObjList m_cryptoRemote
bool m_ready

Static Public Attributes

static TokenDict s_media []

Detailed Description

A List of Jingle RTP data payloads.

Hold a list of RTP data payloads


Member Enumeration Documentation

enum Media

Media type enumeration


Constructor & Destructor Documentation

JGRtpMediaList ( Media  m = MediaMissing,
bool  cryptoMandatory = false 
) [inline]

Constructor

Parameters:
mMedia type as enumeration
cryptoMandatoryTrue to require media encryption

Member Function Documentation

void add ( const char *  id,
const char *  name,
const char *  clockrate,
const char *  bitrate,
const char *  synonym 
) [inline]

Append a new data payload

Parameters:
idThe payload's id
nameThe payload's name
clockrateThe payload's clockrate
bitrateThe payload's bitrate
synonymThe payload's synonym
bool createList ( String dest,
bool  synonym,
const char *  sep = "," 
)

Create a list from data payloads

Parameters:
destDestination string
synonymTrue to create from synonyms, false to create from names
sepList item separator
Returns:
False if the list is empty
JGRtpMedia* findMedia ( const String id)

Find a data payload by its id

Parameters:
idIdentifier of media to find
Returns:
JGRtpMedia pointer or 0 if not found
JGRtpMedia* findSynonym ( const String value) const

Find a data payload by its synonym

Parameters:
valueThe value to compare with
Returns:
JGRtpMedia pointer or 0 if not found
void fromXML ( XMLElement xml)

Fill this list from an XML element's children. Clear before attempting to fill

Parameters:
xmlThe source XML element
Media media ( ) const [inline]

Get the media type of the payloads owned by this list

Returns:
Media type as enumeration
XMLElement* toXML ( bool  telEvent = true) const

Create a 'description' element and add payload children to it

Parameters:
telEventTrue to append a telephone event data payload
Returns:
Valid XMLElement pointer

Member Data Documentation

Crypto (SRTP) params

The media type

bool m_ready

Flag indicating wether media was negotiated

TokenDict s_media[] [static]

The list of media type names


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