class H323Capability

This class describes the interface to a capability of the endpoint, usually a codec, used to transfer data via the logical channels opened and managed by the H323 control channel.

Inheritance:


Public Methods

[more] Construction
[more] Overrides from class PObject
[more] Identification functions
[more] Operations
[more] Protocol manipulation
[more] Member variable access

Protected Fields

[more]CapabilityDirection capabilityDirection
Unique ID assigned to capability


Documentation

This class describes the interface to a capability of the endpoint, usually a codec, used to transfer data via the logical channels opened and managed by the H323 control channel.

Note that this is not an instance of the codec itself. Merely the description of that codec. There is typically only one instance of this class contained in the capability tables of the endpoint. There may be several instances of the actualy codec managing the conversion of an individual stream of data.

An application may create a descendent off this class and override functions as required for describing a codec that it implements.

o Construction

o H323Capability()
Create a new capability specification

o Overrides from class PObject

oComparison Compare(const PObject & obj) const
Compare two capability instances. This compares the main and sub-types of the capability.

ovoid PrintOn(ostream & strm) const
Print out the object to the stream, virtual version of << operator

o Identification functions

ovirtual MainTypes GetMainType() const = 0
Get the main type of the capability.

This function is overridden by one of the three main sub-classes off which real capabilities would be descendend.

ovirtual unsigned GetSubType() const = 0
Get the sub-type of the capability. This is a code dependent on the main type of the capability.

ovirtual PString GetFormatName() const = 0
Get the name of the media data format this class represents

o Operations

ostatic H323Capability* Create( H323EndPoint & ep, const PString & name )
Create an H323Capability descendant given a string name. This uses the registration system to create the capability.
Parameters:
ep - EndPoint capability is created for.
name - Name of capability

ovirtual unsigned GetDefaultSessionID() const
Get the default RTP session. This function gets the default RTP session ID for the capability type. For example audio capabilities return the value RTP_Session::DefaultAudioSessionID etc.

The default behaviour returns zero, indicating it is not an RTP based capability.

ovirtual void SetTxFramesInPacket( unsigned frames )
Set the maximum size (in frames) of data that will be transmitted in a single PDU.

This will also be the desired number that will be sent by most codec implemetations.

The default behaviour does nothing.

Parameters:
frames - Number of frames per packet

ovirtual unsigned GetTxFramesInPacket() const
Get the maximum size (in frames) of data that will be transmitted in a single PDU.

The default behaviour returns the value 1.

ovirtual unsigned GetRxFramesInPacket() const
Get the maximum size (in frames) of data that can be received in a single PDU.

The default behaviour returns the value 1.

ovirtual H323Channel* CreateChannel( H323Connection & connection, H323Channel::Directions dir, unsigned sessionID, const H245_H2250LogicalChannelParameters* param ) const = 0
Create the channel instance, allocating resources as required. This creates a logical channel object appropriate for the parameters provided. Not if param is NULL, sessionID must be provided, otherwise this is taken from the fields in param.
Parameters:
connection - Owner connection for channel
dir - Direction of channel
sessionID - Session ID for RTP channel
param - Parameters for channel

ovirtual H323Codec* CreateCodec( H323Codec::Direction direction ) const = 0
Create the codec instance, allocating resources as required.
Parameters:
direction - Direction in which this instance runs

o Protocol manipulation

ovirtual BOOL OnSendingPDU( H245_Capability & pdu ) const = 0
This function is called whenever and outgoing TerminalCapabilitySet PDU is being constructed for the control channel. It allows the capability to set the PDU fields from information in members specific to the class.

The default behaviour is pure.

Parameters:
pdu - PDU to set information on

ovirtual BOOL OnSendingPDU( H245_DataType & pdu ) const = 0
This function is called whenever and outgoing OpenLogicalChannel PDU is being constructed for the control channel. It allows the capability to set the PDU fields from information in members specific to the class.

The default behaviour is pure.

Parameters:
pdu - PDU to set information on

ovirtual BOOL OnSendingPDU( H245_ModeElement & pdu ) const = 0
This function is called whenever and outgoing RequestMode PDU is being constructed for the control channel. It allows the capability to set the PDU fields from information in members specific to the class.

The default behaviour is pure.

Parameters:
pdu - PDU to set information on

ovirtual BOOL OnReceivedPDU( const H245_Capability & pdu )
This function is called whenever and incoming TerminalCapabilitySet PDU is received on the control channel, and a new H323Capability descendent was created. This completes reading fields from the PDU into the classes members.

If the function returns FALSE then the received PDU codec description is not supported, so will be ignored.

The default behaviour sets the capabilityDirection member variable from the PDU and then returns TRUE. Note that this means it is very important to call the ancestor function when overriding.

Parameters:
pdu - PDU to get information from

ovirtual BOOL OnReceivedPDU( const H245_DataType & pdu, BOOL receiver ) = 0
This function is called whenever and incoming OpenLogicalChannel PDU has been used to construct the control channel. It allows the capability to set from the PDU fields, information in members specific to the class.

The default behaviour is pure.

Parameters:
pdu - PDU to get information from
receiver - Is receiver OLC

ovirtual BOOL IsNonStandardMatch( const H245_NonStandardParameter & param ) const
Compare the nonStandardData part of the capability, if applicable.
Parameters:
param - Non standard field in PDU received

ovirtual BOOL IsUsable( const H323Connection & connection ) const
Validate that the capability is usable given the connection. This checks agains the negotiated protocol version number and remote application to determine if this capability should be used in TCS or OLC pdus.

The default behaviour returns TRUE.

o Member variable access

oCapabilityDirection GetCapabilityDirection() const
Get the direction for this capability

ovoid SetCapabilityDirection( CapabilityDirection dir )
Set the direction for this capability.
Parameters:
dir - New direction code

ounsigned GetCapabilityNumber() const
Get unique capability number

ovoid SetCapabilityNumber(unsigned num)
Set unique capability number

oRTP_DataFrame::PayloadTypes GetPayloadType() const
Get the payload type for the capaibility

ovirtual void AttachQoS(RTP_QOS* )
Attach a QoS specification to this channel

oCapabilityDirection capabilityDirection
Unique ID assigned to capability


Direct child classes:
H323_UserInputCapability
H323RealTimeCapability
H323DataCapability
Friends:
ostream & operator<<(ostream & o , MainTypes t)
ostream & operator<<(ostream & o , CapabilityDirection d)

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.