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:
dbgName Debug name of this parser
sessName Name of the session in SDP
fmts Default media formats

Member Function Documentation

void getAudioFormats ( String buf  )  [inline]

Get the formats list This method is thread safe

Parameters:
buf String 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:
codecs List of supported codecs
hacks List of hacks
general List 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:
sdp Pointer to received SDP body
addr Remote address
oldMedia Optional list of existing media (an already existing media will be moved to returned list)
media Optional 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:
sdp Received SDP body
addr Remote address
oldMedia Optional list of existing media (an already existing media will be moved to returned list)
media Optional 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:
Generated on Thu Apr 8 18:22:39 2010 for Yate by  doxygen 1.6.3