H323Capabilities Class Reference

#include <h323caps.h>

List of all members.

Construction

 H323Capabilities ()
 H323Capabilities (const H323Connection &connection, const H245_TerminalCapabilitySet &pdu)
 H323Capabilities (const H323Capabilities &original)
H323Capabilitiesoperator= (const H323Capabilities &original)

Public Member Functions

Overrides from class PObject
void PrintOn (ostream &strm) const
Operations
PINDEX GetSize () const
H323Capabilityoperator[] (PINDEX i) const
PINDEX SetCapability (PINDEX descriptorNum, PINDEX simultaneous, H323Capability *cap)
PINDEX AddMediaFormat (PINDEX descriptorNum, PINDEX simultaneous, const OpalMediaFormat &mediaFormat)
PINDEX AddAllCapabilities (PINDEX descriptorNum, PINDEX simultaneous, const PString &name, BOOL exact=FALSE)
PINDEX AddAllCapabilities (const H323EndPoint &, PINDEX descriptorNum, PINDEX simultaneous, const PString &name, BOOL exact=FALSE)
void Add (H323Capability *capability)
H323CapabilityCopy (const H323Capability &capability)
void Remove (H323Capability *capability)
void Remove (const PString &formatName)
void Remove (const PStringArray &formatNames)
void RemoveAll ()
H323CapabilityFindCapability (unsigned capabilityNumber) const
H323CapabilityFindCapability (const PString &formatName, H323Capability::CapabilityDirection direction=H323Capability::e_Unknown, BOOL exact=FALSE) const
H323CapabilityFindCapability (H323Capability::CapabilityDirection direction) const
H323CapabilityFindCapability (const H323Capability &capability) const
H323CapabilityFindCapability (const H245_Capability &cap) const
H323CapabilityFindCapability (const H245_DataType &dataType) const
H323CapabilityFindCapability (const H245_ModeElement &modeElement) const
H323CapabilityFindCapability (H323Capability::MainTypes mainType, unsigned subType=UINT_MAX) const
void BuildPDU (const H323Connection &connection, H245_TerminalCapabilitySet &pdu) const
BOOL Merge (const H323Capabilities &newCaps)
void Reorder (const PStringArray &preferenceOrder)
BOOL IsAllowed (const H323Capability &capability)
BOOL IsAllowed (unsigned capabilityNumber)
BOOL IsAllowed (const H323Capability &capability1, const H323Capability &capability2)
BOOL IsAllowed (unsigned capabilityNumber1, unsigned capabilityNumber2)
OpalMediaFormatList GetMediaFormats () const

Protected Attributes

H323CapabilitiesList table
H323CapabilitiesSet set


Detailed Description

This class contains all of the capabilities and their combinations.


Constructor & Destructor Documentation

H323Capabilities::H323Capabilities (  ) 

Construct an empty capability set.

H323Capabilities::H323Capabilities ( const H323Connection connection,
const H245_TerminalCapabilitySet pdu 
)

Construct a capability set from the H.245 PDU provided.

Parameters:
connection  Connection for capabilities
pdu  PDU to convert to a capability set.

H323Capabilities::H323Capabilities ( const H323Capabilities original  ) 

Construct a copy of a capability set. Note this will completely duplicate the set by making clones of every capability in the original set.

Parameters:
original  Original capabilities to duplicate


Member Function Documentation

H323Capabilities& H323Capabilities::operator= ( const H323Capabilities original  ) 

Assign a copy of a capability set. Note this will completely duplicate the set by making clones of every capability in the original set.

Parameters:
original  Original capabilities to duplicate

void H323Capabilities::PrintOn ( ostream &  strm  )  const

Print out the object to the stream, virtual version of << operator.

Parameters:
strm  Stream to print out to.

PINDEX H323Capabilities::GetSize (  )  const [inline]

Get the number of capabilities in the set.

H323Capability& H323Capabilities::operator[] ( PINDEX  i  )  const [inline]

Get the capability at the specified index.

PINDEX H323Capabilities::SetCapability ( PINDEX  descriptorNum,
PINDEX  simultaneous,
H323Capability cap 
)

Set the capability descriptor lists. This is three tier set of codecs. The top most level is a list of particular capabilities. Each of these consists of a list of alternatives that can operate simultaneously. The lowest level is a list of codecs that cannot operate together. See H323 section 6.2.8.1 and H245 section 7.2 for details.

If descriptorNum is P_MAX_INDEX, the the next available index in the array of descriptors is used. Similarly if simultaneous is P_MAX_INDEX the the next available SimultaneousCapabilitySet is used. The return value is the index used for the new entry. Note if both are P_MAX_INDEX then the return value is the descriptor index as the simultaneous index must be zero.

Note that the capability specified here is automatically added to the capability table using the AddCapability() function. A specific instance of a capability is only ever added once, so multiple SetCapability() calls with the same H323Capability pointer will only add that capability once.

Parameters:
descriptorNum  The member of the capabilityDescriptor to add
simultaneous  The member of the SimultaneousCapabilitySet to add
cap  New capability specification

PINDEX H323Capabilities::AddMediaFormat ( PINDEX  descriptorNum,
PINDEX  simultaneous,
const OpalMediaFormat mediaFormat 
)

Add matching capability to media format.

Parameters:
descriptorNum  The member of the capabilityDescriptor to add
simultaneous  The member of the SimultaneousCapabilitySet to add
mediaFormat  Media format to add.

PINDEX H323Capabilities::AddAllCapabilities ( PINDEX  descriptorNum,
PINDEX  simultaneous,
const PString &  name,
BOOL  exact = FALSE 
)

Add all matching capabilities to descriptor lists. All capabilities that match the specified name are added as in the other form of the SetCapability() function.

Parameters:
descriptorNum  The member of the capabilityDescriptor to add
simultaneous  The member of the SimultaneousCapabilitySet to add
name  New capabilities name, if using "known" one.
exact  Capability name must be exact match

PINDEX H323Capabilities::AddAllCapabilities ( const H323EndPoint ,
PINDEX  descriptorNum,
PINDEX  simultaneous,
const PString &  name,
BOOL  exact = FALSE 
) [inline]

Parameters:
descriptorNum  The member of the capabilityDescriptor to add
simultaneous  The member of the SimultaneousCapabilitySet to add
name  New capabilities name, if using "known" one.
exact  Capability name must be exact match

void H323Capabilities::Add ( H323Capability capability  ) 

Add a codec to the capabilities table. This will assure that the assignedCapabilityNumber field in the capability is unique for all capabilities installed on this set.

If the specific instance of the capability is already in the table, it is not added again. Ther can be multiple instances of the same capability class however.

Parameters:
capability  New capability specification

H323Capability* H323Capabilities::Copy ( const H323Capability capability  ) 

Copy a codec to the capabilities table. This will make a clone of the capability and assure that the assignedCapabilityNumber field in the capability is unique for all capabilities installed on this set.

Returns the copy that is put in the table.

Parameters:
capability  New capability specification

void H323Capabilities::Remove ( H323Capability capability  ) 

Remove a capability from the table. Note that the the parameter must be the actual instance of the capability in the table. The instance is deleted when removed from the table.

Parameters:
capability  Existing capability specification

void H323Capabilities::Remove ( const PString &  formatName  ) 

Remove all capabilities matching the string. This uses FindCapability() to locate the first capability whose format name does a partial match for the argument.

Parameters:
formatName  Format name to search for.

void H323Capabilities::Remove ( const PStringArray &  formatNames  ) 

Remove all capabilities matching any of the strings provided. This simply calls Remove() for each string in the list.

Parameters:
formatNames  Array of format names to remove

void H323Capabilities::RemoveAll (  ) 

Remove all of the capabilities.

H323Capability* H323Capabilities::FindCapability ( unsigned  capabilityNumber  )  const

Find the capability given the capability number. This number is guarenteed to be unique for a give capability table. Note that is may not be the same as the index into the table.

Returns: NULL if no capability meeting the criteria was found

H323Capability* H323Capabilities::FindCapability ( const PString &  formatName,
H323Capability::CapabilityDirection  direction = H323Capability::e_Unknown,
BOOL  exact = FALSE 
) const

Find the capability given the capability format name string. This does a partial match for the supplied argument. If the argument matches a substring of the actual capabilities name, then it is returned. For example "GSM" or "0610" will match "GSM 0610". Note case is not significant.

The user should be carefull of using short strings such as "G"!

The direction parameter can further refine the search for specific receive or transmit capabilities. The default value of e_Unknown will wildcard that field.

Returns: NULL if no capability meeting the criteria was found

Parameters:
formatName  Wildcard format name to search for
direction  Optional direction to include into search criteria
exact  Capability name must be exact match

H323Capability* H323Capabilities::FindCapability ( H323Capability::CapabilityDirection  direction  )  const

Find the first capability in the table of the specified direction.

Returns: NULL if no capability meeting the criteria was found

Parameters:
direction  Direction to search for

H323Capability* H323Capabilities::FindCapability ( const H323Capability capability  )  const

Find the capability given the capability. This does a value compare of the two capabilities. Usually this means the mainType and subType are the same.

Returns: NULL if no capability meeting the criteria was found

Parameters:
capability  Capability to search for

H323Capability* H323Capabilities::FindCapability ( const H245_Capability cap  )  const

Find the capability given the H.245 capability PDU.

Returns: NULL if no capability meeting the criteria was found

Parameters:
cap  H245 capability table entry

H323Capability* H323Capabilities::FindCapability ( const H245_DataType dataType  )  const

Find the capability given the H.245 data type PDU.

Returns: NULL if no capability meeting the criteria was found

Parameters:
dataType  H245 data type of codec

H323Capability* H323Capabilities::FindCapability ( const H245_ModeElement modeElement  )  const

Find the capability given the H.245 data type PDU.

Returns: NULL if no capability meeting the criteria was found

Parameters:
modeElement  H245 data type of codec

H323Capability* H323Capabilities::FindCapability ( H323Capability::MainTypes  mainType,
unsigned  subType = UINT_MAX 
) const

Find the capability given the type codecs.

Returns: NULL if no capability meeting the criteria was found

Parameters:
mainType  Main type to find
subType  Sub-type to find (UINT_MAX=ignore)

void H323Capabilities::BuildPDU ( const H323Connection connection,
H245_TerminalCapabilitySet pdu 
) const

Build a H.245 PDU from the information in the capability set.

Parameters:
connection  Connection building PDU for
pdu  PDU to build

BOOL H323Capabilities::Merge ( const H323Capabilities newCaps  ) 

Merge the capabilities into this set.

void H323Capabilities::Reorder ( const PStringArray &  preferenceOrder  ) 

Change the order of capabilities in the table to the order specified. Note that this does not change the unique capability numbers assigned when the capability is first added to the set.

The string matching rules are as for the FindCapability() function.

Parameters:
preferenceOrder  New order

BOOL H323Capabilities::IsAllowed ( const H323Capability capability  ) 

Test if the capability is allowed.

BOOL H323Capabilities::IsAllowed ( unsigned  capabilityNumber  ) 

Test if the capability is allowed.

BOOL H323Capabilities::IsAllowed ( const H323Capability capability1,
const H323Capability capability2 
)

Test if the capabilities are an allowed combination.

BOOL H323Capabilities::IsAllowed ( unsigned  capabilityNumber1,
unsigned  capabilityNumber2 
)

Test if the capabilities are an allowed combination.

OpalMediaFormatList H323Capabilities::GetMediaFormats (  )  const

Get the list of capabilities as a list of media formats.


Member Data Documentation

H323CapabilitiesList H323Capabilities::table [protected]

H323CapabilitiesSet H323Capabilities::set [protected]


The documentation for this class was generated from the following file:
Generated on Fri Mar 7 06:33:57 2008 for OPAL by  doxygen 1.5.1