Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SDPSessionDescription Class Reference

#include <SDPSessionDescription.h>

Collaboration diagram for SDPSessionDescription:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SDPSessionDescription ()
 SDPSessionDescription (const MNString &sdptext)
 SDPSessionDescription (const SDPSessionDescription &orig)
virtual ~SDPSessionDescription ()
bool ok () const
SDPSessionDescription & operator= (const SDPSessionDescription &orig)
void setField (SDP::SessionFieldName fn, const MNString &in)
void setField (SDP::SessionFieldName fn, const char *in)
void setConnection (const MNString &in)
void setConnection (const char *in)
void insertTime (const MNString &in)
void insertTime (const char *in)
void insertRepeat (const MNString &in)
void insertRepeat (const char *in)
void setKey (const MNString &in)
void setKey (const char *in)
void setRangeAttribute (ParseTimeRange *&in)
void insertAttribute (const MNString &in)
void insertAttribute (const char *in)
void setMediaDescriptionList (MDescList *in)
bool hasVersion () const
const MNString & getVersion ()
bool hasOrigin () const
const MNString & getOrigin () const
bool hasSessionName () const
const MNString & getSessionName () const
bool hasInformation () const
const MNString & getInformation () const
bool hasURI () const
const MNString & getURI () const
bool hasEmail () const
const MNString & getEmail () const
bool hasPhone () const
const MNString & getPhone () const
bool hasARange () const
const ParseTimeRange & getARange () const
bool hasConnection (int idx) const
MNString getConnection (int idx) const
MNString getConnectionAddress (int idx) const
void addBandwidth (const char *in)
bool hasASBandwidth (int idx=-1) const
 addBandwidth
size_t getASBandwidth (int idx=-1) const
 addBandwidth
bool hasRepeat ()
const MNList< MNString > & getRepeats () const
bool hasKey ()
const MNString & getKey () const
bool hasAttributes ()
const MNList< MNString > & getAttributes () const
bool hasANYAttribute (const char *name)
bool getANYAttribute (const char *attributeName, MNString &value)
bool hasPatchAttribute ()
MNString getPatchAttribute ()
void getPatchRange (int &start, int &stop)
bool hasStreamIdAttribute ()
bool hasLCRTPAttribute ()
bool hasFramerateAttribute ()
MNString getFramerateAttribute ()
bool hasMediaDescription ()
int getMediaDescriptionCount () const
void getMediaDescriptions (MDescList &inout) const
const MDescList & getMediaDescriptionArray () const
MDescList & getMediaDescriptionArray ()
int getMainConnection (MNString &host)
ParseTimeRange * getPlayDuration () const
int dump (MNString &desc)
MNString toString ()

Constructor & Destructor Documentation

SDPSessionDescription::SDPSessionDescription (   ) 
 

SDPSessionDescription::SDPSessionDescription (  const MNString &  sdptext  ) 
 

SDPSessionDescription::SDPSessionDescription (  const SDPSessionDescription &  orig  ) 
 

virtual SDPSessionDescription::~SDPSessionDescription (   )  [virtual]
 


Member Function Documentation

void SDPSessionDescription::addBandwidth (  const char *  in  ) 
 

Several bandwidth fields can be added the session description. There should be only one application limit AS and one conference total limit CT, but the SDP RFC ignores this issue entirely, actually doesn't even talk about the possibility of multiple bandwidth fields in words. The grammar, however, allows it, and the interpretation makes sense. In the absence of an official interpretation, we care only about the first AS field (if present). Note (VK): in case of several subsessions, there may be several b=AS tags.

int SDPSessionDescription::dump (  MNString &  desc  ) 
 

bool SDPSessionDescription::getANYAttribute (  const char *  attributeName,
MNString &  value
) 
 

const ParseTimeRange& SDPSessionDescription::getARange (   )  const
 

size_t SDPSessionDescription::getASBandwidth (  int  idx = -1  )  const
 

addBandwidth

const MNList<MNString>& SDPSessionDescription::getAttributes (   )  const
 

MNString SDPSessionDescription::getConnection (  int  idx  )  const
 

Retrieve the entire connection line that applies with the "c="

Parameters:
idx The 0-based index of the media description.
Returns:
The connection line if any, or an empty string.
See also:
hasConnection

MNString SDPSessionDescription::getConnectionAddress (  int  idx  )  const
 

Retrieve only the IP address from the connection line that applies.

Parameters:
idx The 0-based index of the media description.
Returns:
The IP address if any, or an empty string.
See also:
hasConnection

const MNString& SDPSessionDescription::getEmail (   )  const
 

MNString SDPSessionDescription::getFramerateAttribute (   ) 
 

const MNString& SDPSessionDescription::getInformation (   )  const
 

const MNString& SDPSessionDescription::getKey (   )  const
 

int SDPSessionDescription::getMainConnection (  MNString &  host  ) 
 

Returns the connection field of the MC-stream if this sessiondescription has a patch attribute! By convention, that is the last media description in the session. returns 0 on success returns -1 on error

MDescList& SDPSessionDescription::getMediaDescriptionArray (   ) 
 

const MDescList& SDPSessionDescription::getMediaDescriptionArray (   )  const
 

int SDPSessionDescription::getMediaDescriptionCount (   )  const
 

void SDPSessionDescription::getMediaDescriptions (  MDescList &  inout  )  const
 

const MNString& SDPSessionDescription::getOrigin (   )  const
 

MNString SDPSessionDescription::getPatchAttribute (   ) 
 

void SDPSessionDescription::getPatchRange (  int &  start,
int &  stop
) 
 

const MNString& SDPSessionDescription::getPhone (   )  const
 

ParseTimeRange* SDPSessionDescription::getPlayDuration (   )  const
 

Basically, this function should be redundant because getARange exists. This function function should return exactly the same structure. However, we have made a mistake earlier in interpreting the t= tag as the duraction. This mean that we have to interpret the t= tag as the duraction in some cases. This function returns that wrong interpretation when the a=range: tag is not present.

Returns:
NULL if no duration can be found in the description, a pointer to a newly allocated structure of type ParseTimeRange if a duration was found.

const MNList<MNString>& SDPSessionDescription::getRepeats (   )  const
 

const MNString& SDPSessionDescription::getSessionName (   )  const
 

const MNString& SDPSessionDescription::getURI (   )  const
 

const MNString& SDPSessionDescription::getVersion (   ) 
 

bool SDPSessionDescription::hasANYAttribute (  const char *  name  ) 
 

bool SDPSessionDescription::hasARange (   )  const
 

bool SDPSessionDescription::hasASBandwidth (  int  idx = -1  )  const
 

addBandwidth

bool SDPSessionDescription::hasAttributes (   ) 
 

bool SDPSessionDescription::hasConnection (  int  idx  )  const
 

This function checks whether connection fields are present in the SDP message.

Connection fields can be present at the session level or at the media level. The connection information at the media level overwrite those at the session level. In SDP they look like this in the most complicated case: c=IN IP4 224.2.1.1/127/3 IN indicates that this is the INET address family. IP4 means that these are IPv4 addresses. 224.2.1.1 is the first multicast address that is used. /127 is an optional fields that indicates that the TTL is 127. /3 is an optional fields (that we ignore so far in komssys) that indicates that address 224.2.1.2 and 224.2.1.3 are also used for the media.

Parameters:
idx The 0-based index of the media description that should be checked first. -1 indicates that only the session description should be checked.
Returns:
True if connection information is present, false otherwise.

bool SDPSessionDescription::hasEmail (   )  const
 

bool SDPSessionDescription::hasFramerateAttribute (   ) 
 

bool SDPSessionDescription::hasInformation (   )  const
 

bool SDPSessionDescription::hasKey (   ) 
 

bool SDPSessionDescription::hasLCRTPAttribute (   ) 
 

bool SDPSessionDescription::hasMediaDescription (   ) 
 

bool SDPSessionDescription::hasOrigin (   )  const
 

bool SDPSessionDescription::hasPatchAttribute (   ) 
 

bool SDPSessionDescription::hasPhone (   )  const
 

bool SDPSessionDescription::hasRepeat (   ) 
 

bool SDPSessionDescription::hasSessionName (   )  const
 

bool SDPSessionDescription::hasStreamIdAttribute (   ) 
 

bool SDPSessionDescription::hasURI (   )  const
 

bool SDPSessionDescription::hasVersion (   )  const
 

void SDPSessionDescription::insertAttribute (  const char *  in  ) 
 

void SDPSessionDescription::insertAttribute (  const MNString &  in  ) 
 

void SDPSessionDescription::insertRepeat (  const char *  in  ) 
 

void SDPSessionDescription::insertRepeat (  const MNString &  in  ) 
 

void SDPSessionDescription::insertTime (  const char *  in  ) 
 

void SDPSessionDescription::insertTime (  const MNString &  in  ) 
 

bool SDPSessionDescription::ok (   )  const [inline]
 

SDPSessionDescription& SDPSessionDescription::operator= (  const SDPSessionDescription &  orig  ) 
 

void SDPSessionDescription::setConnection (  const char *  in  ) 
 

void SDPSessionDescription::setConnection (  const MNString &  in  ) 
 

void SDPSessionDescription::setField (  SDP::SessionFieldName  fn,
const char *  in
) 
 

void SDPSessionDescription::setField (  SDP::SessionFieldName  fn,
const MNString &  in
) 
 

void SDPSessionDescription::setKey (  const char *  in  ) 
 

void SDPSessionDescription::setKey (  const MNString &  in  ) 
 

void SDPSessionDescription::setMediaDescriptionList (  MDescList *  in  ) 
 

void SDPSessionDescription::setRangeAttribute (  ParseTimeRange *&  in  ) 
 

Set the values of the a=range: attribute. The object that is handed in is not copied but swallowed. This is different from most other functions of this class.

Parameters:
in The parsed time range of an a=range: attribute, When the function returns, the pointer is set to NULL. indicating that it has been swallowed by this class and in order to prevent double deletes.

MNString SDPSessionDescription::toString (   ) 
 


The documentation for this class was generated from the following file:
Generated on Sun Mar 6 13:36:16 2005 for Komssys by doxygen 1.3.8