PINDEX GetSize() const
- Get the number of capabilities in the set
H323Capability& operator[](PINDEX i) const
- Get the capability at the specified index
PINDEX 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 AddAllCapabilities( H323EndPoint & ep, PINDEX descriptorNum, PINDEX simultaneous, const PString & name )
- 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:
- ep - The endpoint adding the capabilities.
descriptorNum - The member of the capabilityDescriptor to add
simultaneous - The member of the SimultaneousCapabilitySet to add
name - New capabilities name, if using "known" one.
void 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* 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 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 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 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 RemoveAll()
- Remove all of the capabilities
H323Capability* 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* FindCapability( const PString & formatName, H323Capability::CapabilityDirection direction = H323Capability::e_Unknown ) 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
H323Capability* 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* 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* FindCapability( const H245_Capability & cap ) const
- Find the capability given the H245 capability PDU.
Returns:
NULL if no capability meeting the criteria was found
- Parameters:
- cap - H245 capability table entry
H323Capability* FindCapability( const H245_DataType & dataType ) const
- Find the capability given the H245 data type PDU.
Returns:
NULL if no capability meeting the criteria was found
- Parameters:
- dataType - H245 data type of codec
H323Capability* FindCapability( const H245_ModeElement & modeElement ) const
- Find the capability given the H245 data type PDU.
Returns:
NULL if no capability meeting the criteria was found
- Parameters:
- modeElement - H245 data type of codec
H323Capability* FindCapability( H323Capability::MainTypes mainType, const PASN_Choice & subTypePDU, unsigned nonStandardTag ) const
- Find the capability given the sub-type info.
Returns:
NULL if no capability meeting the criteria was found
- Parameters:
- mainType - Main type to find
subTypePDU - Sub-type info
nonStandardTag - NOn-standard tag ID for sub-type
H323Capability* 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 BuildPDU( const H323Connection & connection, H245_TerminalCapabilitySet & pdu ) const
- Build a H245 PDU from the information in the capability set.
- Parameters:
- connection - Connection building PDU for
pdu - PDU to build
BOOL Merge( const H323Capabilities & newCaps )
- Merge the capabilities into this set
void 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 IsAllowed( const H323Capability & capability )
- Test if the capability is allowed
BOOL IsAllowed( unsigned capabilityNumber )
- Test if the capability is allowed
BOOL IsAllowed( const H323Capability & capability1, const H323Capability & capability2 )
- Test if the capabilities are an allowed combination
BOOL IsAllowed( unsigned capabilityNumber1, unsigned capabilityNumber2 )
- Test if the capabilities are an allowed combination