MediaDescriptor Class Reference

#include <NatTraversalAgentDataTypes.h>

List of all members.


Detailed Description

The MediaDescriptor class is used to store the information related a given media negotiation for both the caller (original UAC) and the callee (original UAS) as well as some information common to both the caller and the callee (session directionality and type for example). The information stored in this class is mainly extracted the offer's and answer's Media Description section of an SDP Offer/Answer. Each instance of a MediaDescriptor is responsible for storing the information of a single Media Description section inside an SDP that is why all the APIs that accept an SDP body as a parameter also accept an index parameter which represents the 0-based index of the Media Description section that pay attention to.

Because this class stores information about both the caller and callee endpoints, method that are used to save information about a particular endpoint also accept a parameter that describes the role (see EndpointRole) of the endpoint to which the information pertains. Note that the designation of the caller and callee is established at call set-up time and does not change thoughout the lifetime of the dialog. That means that the CALLER endpoint role will be attributed to the original UAC of the dialog and vice versa.

On top of collecting information from the offer/answer SDPs, this class play the important role of remembering all the tentative media relay handles and currently used media relay handle. These handles link back to a symmitron bridge that actually performs the media relay function.

Public Member Functions

 MediaDescriptor (const SdpBody &sdpBody, size_t index, EndpointRole endpointRole)
 MediaDescriptor (const MediaDescriptor &referenceMediaDescriptor)
const UtlStringgetType (void) const
MediaDirectionality getDirectionality (void) const
void setDirectionalityOverride (MediaDirectionality override)
MediaDirectionality getDirectionalityOverride (void) const
void setMediaTypeAndDirectionalityData (const SdpBody &sdpBody, size_t index)
const MediaEndpointgetEndpoint (EndpointRole endpointRole) const
bool setEndpointData (const SdpBody &sdpBody, size_t index, EndpointRole endpointRole)
 Returns true if 'set' operation resulted in a change in the saved data. Returns false if saved already matched new values.
void setCurrentMediaRelayHandle (const tMediaRelayHandle handle)
tMediaRelayHandle getCurrentMediaRelayHandle (void) const
void clearCurrentMediaRelayHandle (void)
void setTentativeInitialMediaRelayHandle (const tMediaRelayHandle handle)
tMediaRelayHandle getTentativeInitialMediaRelayHandle (void) const
void clearTentativeInitialMediaRelayHandle (void)
void setTentativeNonInitialMediaRelayHandle (const tMediaRelayHandle handle)
tMediaRelayHandle getTentativeNonInitialMediaRelayHandle (void) const
void clearTentativeNonInitialMediaRelayHandle (void)
MediaDescriptoroperator= (const MediaDescriptor &rhs)

Static Public Member Functions

static MediaDirectionality sdpDirectionalityAttributeToMediaDirectionalityValue (const SdpBody &sdpBody, size_t index)
static void mediaDirectionalityValueToSdpDirectionalityAttribute (const MediaDirectionality valueToConvert, UtlString &conversion)

Private Member Functions

const MediaEndpointgetCallerEndpoint (void) const
bool setCallerEndpointData (const SdpBody &sdpBody, size_t index)
const MediaEndpointgetCalleeEndpoint (void) const
bool setCalleeEndpointData (const SdpBody &sdpBody, size_t index)

Private Attributes

UtlString mType
size_t mMediaDescriptionIndex
MediaDirectionality mDirectionality
MediaDirectionality mDirectionalityOverride
MediaEndpoint mCaller
MediaEndpoint mCallee
tMediaRelayHandle mCurrentMediaRelayHandle
tMediaRelayHandle mTentativeInitialMediaRelayHandle
tMediaRelayHandle mTentativeNonInitialMediaRelayHandle


Constructor & Destructor Documentation

MediaDescriptor ( const SdpBody sdpBody,
size_t  index,
EndpointRole  endpointRole 
)

MediaDescriptor ( const MediaDescriptor referenceMediaDescriptor  ) 


Member Function Documentation

const UtlString & getType ( void   )  const

MediaDirectionality getDirectionality ( void   )  const

void setDirectionalityOverride ( MediaDirectionality  override  ) 

MediaDirectionality getDirectionalityOverride ( void   )  const

void setMediaTypeAndDirectionalityData ( const SdpBody sdpBody,
size_t  index 
)

const MediaEndpoint & getEndpoint ( EndpointRole  endpointRole  )  const

bool setEndpointData ( const SdpBody sdpBody,
size_t  index,
EndpointRole  endpointRole 
)

Returns true if 'set' operation resulted in a change in the saved data. Returns false if saved already matched new values.

void setCurrentMediaRelayHandle ( const tMediaRelayHandle  handle  ) 

tMediaRelayHandle getCurrentMediaRelayHandle ( void   )  const

void clearCurrentMediaRelayHandle ( void   ) 

void setTentativeInitialMediaRelayHandle ( const tMediaRelayHandle  handle  ) 

tMediaRelayHandle getTentativeInitialMediaRelayHandle ( void   )  const

void clearTentativeInitialMediaRelayHandle ( void   ) 

void setTentativeNonInitialMediaRelayHandle ( const tMediaRelayHandle  handle  ) 

tMediaRelayHandle getTentativeNonInitialMediaRelayHandle ( void   )  const

void clearTentativeNonInitialMediaRelayHandle ( void   ) 

MediaDirectionality sdpDirectionalityAttributeToMediaDirectionalityValue ( const SdpBody sdpBody,
size_t  index 
) [static]

void mediaDirectionalityValueToSdpDirectionalityAttribute ( const MediaDirectionality  valueToConvert,
UtlString conversion 
) [static]

MediaDescriptor & operator= ( const MediaDescriptor rhs  ) 

const MediaEndpoint & getCallerEndpoint ( void   )  const [private]

bool setCallerEndpointData ( const SdpBody sdpBody,
size_t  index 
) [private]

const MediaEndpoint & getCalleeEndpoint ( void   )  const [private]

bool setCalleeEndpointData ( const SdpBody sdpBody,
size_t  index 
) [private]


Member Data Documentation

UtlString mType [private]

size_t mMediaDescriptionIndex [private]


Online Library Docs

sipXecs home page

Version 4.2.1-018930 2010-07-31T01:50:17 build33 abuild