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 cryptoRequired=false)
 ~JGRtpMediaList ()
Media media () const
void add (const char *id, const char *name, const char *clockrate, const char *synonym=0, const char *channels=0, const char *pTime=0, const char *maxPTime=0)
void reset ()
void setMedia (const JGRtpMediaList &src, const String &only=String::empty())
JGRtpMediafindMedia (const String &id)
JGRtpMediafindSynonym (const String &value) const
XmlElementtoXml () const
void fromXml (XmlElement *xml)
bool createList (String &dest, bool synonym, const char *sep=",")
void addTelEvent (XmlElement *xml, const char *name=0) const

Public Attributes

Media m_media
String m_ssrc
NamedStringm_bandwidth
bool m_cryptoRequired
ObjList m_cryptoLocal
ObjList m_cryptoRemote
bool m_ready
int m_telEvent
String m_telEventName
String m_telEventName2

Static Public Attributes

static const 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  cryptoRequired = false 
) [inline]

Constructor

Parameters:
mMedia type as enumeration
cryptoRequiredTrue to require media encryption
~JGRtpMediaList ( ) [inline]

Destructor

References TelEngine::destruct().


Member Function Documentation

void add ( const char *  id,
const char *  name,
const char *  clockrate,
const char *  synonym = 0,
const char *  channels = 0,
const char *  pTime = 0,
const char *  maxPTime = 0 
) [inline]

Append a new data payload

Parameters:
idThe 'id' attribute
nameThe 'name' attribute
clockrateThe 'clockrate' attribute
synonymOptional application synonym for the payload
channelsOptional 'channels' attribute (the number of channels)
pTimeOptional "ptime" attribute (packet time)
maxPTimeOptional "maxptime" attribute (maximum packet time)
void addTelEvent ( XmlElement xml,
const char *  name = 0 
) const

Build and add telephone-event media child to a parent xml element. Add a second telephone event media child if set

Parameters:
xmlParent element
nameOptional event name. Defaults to set event name
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
void reset ( )

Reset the list and data

void setMedia ( const JGRtpMediaList src,
const String only = String::empty() 
)

Set media type and payloads from another list

Parameters:
srcMedia list to copy into this one
onlyOptional list of synonyms to set if found in src. Copy the whole list if this parameter is empty
XmlElement* toXml ( ) const

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

Returns:
Valid XmlElement pointer

Member Data Documentation

Optional SDP media bandwith. The name of the string keeps the type ('bwtype') and its value keeps the actual bandwith

Crypto (SRTP) params

The media type

bool m_ready

Flag indicating wether media was negotiated

Synchronization source

Telephone event payload id

Telephone event payload name

Second telephone event payload name

const TokenDict s_media[] [static]

The list of media type names


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