# class JGRtpCandidates | A list of RTP transport candidates. More...
Full name | `TelEngine::JGRtpCandidates`
Definition | `#include <libs/yjabber/yatejingle.h>`
Inherits | TelEngine::ObjList [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

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

#### Public Methods

- inline JGRtpCandidates (Type t = Unknown)
- inline const char* typeName () const
- inline void generateIceAuth ()
- inline void generateOldIceAuth ()
- JGRtpCandidate* findByComponent (unsigned int component)
- XmlElement* toXml (bool addCandidates, bool addAuth) const
- void fromXml (XmlElement* element)

#### Public Static Methods

- static void generateIceToken (String& dest, bool pwd, unsigned int max = 0)
- static void generateOldIceToken (String& dest)
- static inline const char* typeName (int t, const char* defVal = "unknown")

#### Public Members

- static const TokenDict s_type[]
- Type m_type
- String m_password
- String m_ufrag

## Detailed Description

This class holds a list of jingle RTP transport candidates

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

Enumeration of transport types

inline JGRtpCandidates (Type t = Unknown) | ### JGRtpCandidates

Constructor. Fill this object from an XML element

Parameters:

t | The transport type

inline const char* typeName () | ### typeName

[const]

Get the name of this list's type

Returns: The name of this list's type

inline void generateIceAuth () | ### generateIceAuth

Fill password and ufrag data

inline void generateOldIceAuth () | ### generateOldIceAuth

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

JGRtpCandidate* findByComponent (unsigned int component) | ### findByComponent

Find a candidate by its component value

Parameters:

component | The value to search

Returns: JGRtpCandidate pointer or 0

XmlElement* toXml (bool addCandidates, bool addAuth) | ### toXml

[const]

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

Parameters:

addCandidates | True to add the candidate children
addAuth | RtpIceUdp only: add auth data

Returns: Valid XmlElement pointer

void fromXml (XmlElement* element) | ### fromXml

Fill this object from a given element

Parameters:

element | The element

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

[static]

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

Parameters:

dest | Destination string
pwd | True to generate a password, false to generate an username (ufrag)
max | Maximum number of characters. The maxmimum value is 256. The minimum value is 22 for password and 4 for username

void generateOldIceToken (String& dest) | ### generateOldIceToken

[static]

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

Parameters:

dest | Destination string

inline const char* typeName (int t, const char* defVal = "unknown") | ### typeName

[static]

Get the name associated with a list's type

Parameters:

t | The desired type
defVal | Default value to return

Returns: The name associated with a list's type

static const TokenDict s_type[] | ### s_type[]

Type m_type | ### m_type

String m_password | ### m_password

String m_ufrag | ### m_ufrag

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.