Yate
Public Member Functions | Static Public Attributes | Friends

SDPParser Class Reference

A SDP parser. More...

#include <yatesdp.h>

Inheritance diagram for SDPParser:
DebugEnabler Mutex Lockable

List of all members.

Public Member Functions

 SDPParser (const char *dbgName, const char *sessName, const char *fmts="alaw,mulaw")
void getAudioFormats (String &buf)
bool rfc2833 () const
bool secure () const
bool sdpForward () const
bool ignorePort () const
ObjListparse (const MimeSdpBody &sdp, String &addr, ObjList *oldMedia=0, const String &media=String::empty())
ObjListparse (const MimeSdpBody *sdp, String &addr, ObjList *oldMedia=0, const String &media=String::empty())
void initialize (const NamedList *codecs, const NamedList *hacks, const NamedList *general=0)

Static Public Attributes

static const TokenDict s_payloads []
static const TokenDict s_rtpmap []

Friends

class SDPSession

Detailed Description

A SDP parser.

This class holds a SDP parser and additional data used by SDP objects


Constructor & Destructor Documentation

SDPParser ( const char *  dbgName,
const char *  sessName,
const char *  fmts = "alaw,mulaw" 
) [inline]

Constructor

Parameters:
dbgNameDebug name of this parser
sessNameName of the session in SDP
fmtsDefault media formats

Member Function Documentation

void getAudioFormats ( String buf) [inline]

Get the formats list This method is thread safe

Parameters:
bufString to be filled with comma separated list of formats
bool ignorePort ( ) const [inline]

Get the RTP port change ignore flag

Returns:
True if a port change should not cause an offer change
void initialize ( const NamedList codecs,
const NamedList hacks,
const NamedList general = 0 
)

Update configuration. This method should be called after a configuration file is loaded

Parameters:
codecsList of supported codecs
hacksList of hacks
generalList of general settings
ObjList* parse ( const MimeSdpBody sdp,
String addr,
ObjList oldMedia = 0,
const String media = String::empty() 
) [inline]

Parse a received SDP body, returns NULL if SDP is not present This method is thread safe

Parameters:
sdpPointer to received SDP body
addrRemote address
oldMediaOptional list of existing media (an already existing media will be moved to returned list)
mediaOptional expected media type. If not empty this will be the only media type returned (if found)
Returns:
List of SDPMedia objects, may be NULL

References SDPParser::parse().

Referenced by SDPParser::parse().

ObjList* parse ( const MimeSdpBody sdp,
String addr,
ObjList oldMedia = 0,
const String media = String::empty() 
)

Parse a received SDP body This method is thread safe

Parameters:
sdpReceived SDP body
addrRemote address
oldMediaOptional list of existing media (an already existing media will be moved to returned list)
mediaOptional expected media type. If not empty this will be the only media type returned (if found)
Returns:
List of SDPMedia objects, may be NULL
bool rfc2833 ( ) const [inline]

Get the RFC 2833 offer flag

Returns:
True if RFC 2883 telephony events will be offered
bool sdpForward ( ) const [inline]

Get the SDP forward flag

Returns:
True if raw SDP should be added to RTP forward offer
bool secure ( ) const [inline]

Get the secure offer flag

Returns:
True if SDES descriptors for SRTP will be offered

Member Data Documentation

const TokenDict s_payloads[] [static]

Yate Payloads for the AV profile

const TokenDict s_rtpmap[] [static]

SDP Payloads for the AV profile


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