OPAL  Version 3.18.8
H323DataChannel Class Reference

#include <channels.h>

Inheritance diagram for H323DataChannel:
Collaboration diagram for H323DataChannel:

Public Member Functions

Construction
 H323DataChannel (H323Connection &connection, const H323Capability &capability, Directions direction, unsigned sessionID)
 
 ~H323DataChannel ()
 
Overrides from class H323Channel
virtual unsigned GetSessionID () const
 
virtual PBoolean OnSendingPDU (H245_OpenLogicalChannel &openPDU) const
 
virtual void OnSendOpenAck (const H245_OpenLogicalChannel &open, H245_OpenLogicalChannelAck &ack) const
 
virtual PBoolean OnReceivedPDU (const H245_OpenLogicalChannel &pdu, unsigned &errorCode)
 
virtual PBoolean OnReceivedAckPDU (const H245_OpenLogicalChannelAck &pdu)
 
Operations
virtual PBoolean CreateListener ()
 
virtual PBoolean CreateTransport ()
 
- Public Member Functions inherited from H323UnidirectionalChannel
 H323UnidirectionalChannel (H323Connection &connection, const H323Capability &capability, Directions direction)
 
 ~H323UnidirectionalChannel ()
 
virtual Directions GetDirection () const
 
virtual PBoolean SetInitialBandwidth ()
 
virtual bool PreOpen ()
 
virtual PBoolean Open ()
 
virtual bool UpdateMediaFormat (const OpalMediaFormat &mediaFormat)
 Update media format options. More...
 
virtual OpalMediaStreamPtr GetMediaStream () const
 
virtual void SetMediaStream (OpalMediaStreamPtr mediaStream)
 
- Public Member Functions inherited from H323Channel
 H323Channel (H323Connection &connection, const H323Capability &capability)
 
 ~H323Channel ()
 
virtual void PrintOn (ostream &strm) const
 
const H323ChannelNumberGetNumber () const
 
void SetNumber (const H323ChannelNumber &num)
 
const H323ChannelNumberGetReverseChannel () const
 
void SetReverseChannel (const H323ChannelNumber &num)
 
OpalBandwidth GetBandwidthUsed () const
 
bool SetBandwidthUsed (OpalBandwidth bandwidth)
 
const H323CapabilityGetCapability () const
 
OpalMediaFormat GetMediaFormat () const
 Get the media format (from capability) More...
 
virtual bool SetSessionID (unsigned sessionID)
 
virtual PBoolean GetMediaTransportAddress (OpalTransportAddress &data, OpalTransportAddress &control) const
 
virtual void Close ()
 
PBoolean IsOpen () const
 
virtual void OnFlowControl (long bitRateRestriction)
 
virtual void OnMiscellaneousCommand (const H245_MiscellaneousCommand_type &type)
 
virtual void OnMiscellaneousIndication (const H245_MiscellaneousIndication_type &type)
 
virtual void OnJitterIndication (DWORD jitter, int skippedFrameCount, int additionalBuffer)
 

Protected Member Functions

virtual void InternalClose ()
 

Protected Attributes

unsigned sessionID
 
H323Listenerlistener
 
PBoolean autoDeleteListener
 
H323Transporttransport
 
PBoolean autoDeleteTransport
 
PBoolean separateReverseChannel
 
- Protected Attributes inherited from H323UnidirectionalChannel
bool receiver
 
OpalMediaStreamPtr m_mediaStream
 
- Protected Attributes inherited from H323Channel
H323EndPointendpoint
 
H323Connectionconnection
 
H323Capabilitycapability
 
H323ChannelNumber number
 
H323ChannelNumber reverseChannel
 
bool opened
 
atomic< bool > m_terminating
 

Detailed Description

This class describes a data logical channel between the two endpoints. They may be created and deleted as required in the H245 protocol.

An application may create a descendent off this class and override functions as required for operating the channel protocol.

Constructor & Destructor Documentation

H323DataChannel::H323DataChannel ( H323Connection connection,
const H323Capability capability,
Directions  direction,
unsigned  sessionID 
)

Create a new channel.

Parameters
connectionConnection to endpoint for channel
capabilityCapability channel is using
directionDirection of channel
sessionIDSession ID for channel
H323DataChannel::~H323DataChannel ( )

Destroy the channel.

Member Function Documentation

virtual PBoolean H323DataChannel::CreateListener ( )
virtual

Create the H323Listener class to be used. This is called on receipt of an OpenLogicalChannel request.

The default behaviour creates a compatible listener using the connections control channel as a basis and returns true if successful.

virtual PBoolean H323DataChannel::CreateTransport ( )
virtual

Create the H323Transport class to be used. This is called on receipt of an OpenLogicalChannelAck response. It should not return true unless the transport member variable is set.

The default behaviour uses the connection signalling channel to create the transport and returns true if successful.

virtual unsigned H323DataChannel::GetSessionID ( ) const
virtual

Indicate the session number of the channel.

Reimplemented from H323Channel.

virtual void H323DataChannel::InternalClose ( )
protectedvirtual

Reimplemented from H323UnidirectionalChannel.

virtual PBoolean H323DataChannel::OnReceivedAckPDU ( const H245_OpenLogicalChannelAck &  pdu)
virtual

This is called after a request to create a channel occurs from the local machine via the H245LogicalChannelDict::Open() function, and the request has been acknowledged by the remote endpoint.

The default makes sure the parameters are compatible and passes on the PDU to the rtp session.

Parameters
pduAcknowledgement PDU

Reimplemented from H323Channel.

Reimplemented in H323_T120Channel.

virtual PBoolean H323DataChannel::OnReceivedPDU ( const H245_OpenLogicalChannel &  pdu,
unsigned &  errorCode 
)
virtual

This is called after a request to create a channel occurs from the local machine via the H245LogicalChannelDict::Open() function, and the request has been acknowledged by the remote endpoint.

The default makes sure the parameters are compatible and passes on the PDU to the rtp session.

Parameters
pduOpen PDU
errorCodeError code on failure

Reimplemented from H323Channel.

Reimplemented in H323_T120Channel.

virtual PBoolean H323DataChannel::OnSendingPDU ( H245_OpenLogicalChannel &  openPDU) const
virtual

Fill out the OpenLogicalChannel PDU for the particular channel type.

Parameters
openPDUOpen PDU to send.

Reimplemented from H323Channel.

Reimplemented in H323_T120Channel.

virtual void H323DataChannel::OnSendOpenAck ( const H245_OpenLogicalChannel &  open,
H245_OpenLogicalChannelAck &  ack 
) const
virtual

This is called when request to create a channel is received from a remote machine and is about to be acknowledged.

Parameters
openOpen PDU
ackAcknowledgement PDU

Reimplemented from H323Channel.

Reimplemented in H323_T120Channel.

Field Documentation

PBoolean H323DataChannel::autoDeleteListener
protected
PBoolean H323DataChannel::autoDeleteTransport
protected
H323Listener* H323DataChannel::listener
protected
PBoolean H323DataChannel::separateReverseChannel
protected
unsigned H323DataChannel::sessionID
protected
H323Transport* H323DataChannel::transport
protected

The documentation for this class was generated from the following file: