Yate
JGRtpCandidates Class Reference

A list of RTP transport candidates. More...

#include <yatejingle.h>

Inheritance diagram for JGRtpCandidates:
ObjList GenObject

Public Types

enum  Type {
  Unknown = -1 , RtpIceUdp = 1 , RtpRawUdp , RtpP2P ,
  RtpGoogleRawUdp
}
 

Public Member Functions

 JGRtpCandidates (Type t=Unknown)
 
const char * typeName () const
 
void generateIceAuth ()
 
void generateOldIceAuth ()
 
JGRtpCandidatefindByComponent (unsigned int component)
 
XmlElementtoXml (bool addCandidates, bool addAuth) const
 
void fromXml (XmlElement *element)
 
- Public Member Functions inherited from ObjList
 ObjList ()
 
virtual ~ObjList ()
 
virtual void * getObject (const String &name) const
 
unsigned int length () const
 
unsigned int count () const
 
GenObjectget () const
 
GenObjectset (const GenObject *obj, bool delold=true)
 
ObjListnext () const
 
ObjListlast () const
 
ObjListskipNull () const
 
ObjListskipNext () const
 
GenObjectat (int index) const
 
ObjListoperator+ (int index) const
 
GenObjectoperator[] (signed int index) const
 
GenObjectoperator[] (unsigned int index) const
 
GenObjectoperator[] (const String &str) const
 
ObjListfind (const GenObject *obj) const
 
ObjListfind (const String &str) const
 
int index (const GenObject *obj) const
 
int index (const String &str) const
 
ObjListinsert (const GenObject *obj, bool compact=true)
 
ObjListappend (const GenObject *obj, bool compact=true)
 
ObjListsetUnique (const GenObject *obj, bool compact=true)
 
GenObjectremove (bool delobj=true)
 
GenObjectremove (GenObject *obj, bool delobj=true)
 
GenObjectremove (const String &str, bool delobj=true)
 
void clear ()
 
void compact ()
 
bool autoDelete ()
 
void setDelete (bool autodelete)
 
void sort (int(*callbackCompare)(GenObject *obj1, GenObject *obj2, void *context), void *context=0)
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual bool alive () const
 
virtual void destruct ()
 
virtual const StringtoString () const
 
virtual const StringtraceId () const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 

Static Public Member Functions

static void generateIceToken (String &dest, bool pwd, unsigned int max=0)
 
static void generateOldIceToken (String &dest)
 
static const char * typeName (int t, const char *defVal="unknown")
 
- Static Public Member Functions inherited from ObjList
static const ObjListempty ()
 
- Static Public Member Functions inherited from GenObject
static void * getObject (const String &name, const GenObject *obj)
 
static bool getObjCounting ()
 
static void setObjCounting (bool enable)
 
static NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 

Public Attributes

Type m_type
 
String m_password
 
String m_ufrag
 

Static Public Attributes

static const TokenDict s_type []
 

Detailed Description

A list of RTP transport candidates.

This class holds a list of jingle RTP transport candidates

Member Enumeration Documentation

◆ Type

enum Type

Enumeration of transport types

Constructor & Destructor Documentation

◆ JGRtpCandidates()

JGRtpCandidates ( Type t = Unknown)
inline

Constructor. Fill this object from an XML element

Parameters
tThe transport type

Member Function Documentation

◆ findByComponent()

JGRtpCandidate * findByComponent ( unsigned int component)

Find a candidate by its component value

Parameters
componentThe value to search
Returns
JGRtpCandidate pointer or 0

◆ fromXml()

void fromXml ( XmlElement * element)

Fill this object from a given element

Parameters
elementThe element

◆ generateIceAuth()

void generateIceAuth ( )
inline

Fill password and ufrag data

References generateIceToken().

◆ generateIceToken()

static void generateIceToken ( String & dest,
bool pwd,
unsigned int max = 0 )
static

Generate a random password or username to be used with ICE-UDP transport

Parameters
destDestination string
pwdTrue to generate a password, false to generate an username (ufrag)
maxMaximum number of characters. The maxmimum value is 256. The minimum value is 22 for password and 4 for username

Referenced by generateIceAuth().

◆ generateOldIceAuth()

void generateOldIceAuth ( )
inline

Fill password and ufrag data using old transport restrictions (16 bytes length)

References generateOldIceToken().

◆ generateOldIceToken()

static void generateOldIceToken ( String & dest)
static

Generate a random password or username to be used with old ICE-UDP transport

Parameters
destDestination string

Referenced by generateOldIceAuth().

◆ toXml()

XmlElement * toXml ( bool addCandidates,
bool addAuth ) const

Create a 'transport' element from this object. Add candidates

Parameters
addCandidatesTrue to add the candidate children
addAuthRtpIceUdp only: add auth data
Returns
Valid XmlElement pointer

◆ typeName() [1/2]

const char * typeName ( ) const
inline

Get the name of this list's type

Returns
The name of this list's type

References typeName().

Referenced by typeName().

◆ typeName() [2/2]

static const char * typeName ( int t,
const char * defVal = "unknown" )
inlinestatic

Get the name associated with a list's type

Parameters
tThe desired type
defValDefault value to return
Returns
The name associated with a list's type

References s_type.

Member Data Documentation

◆ s_type

const TokenDict s_type[]
static

The list of type names

Referenced by typeName().


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