# H323DataChannel Class Reference

`#include <channels.h>`

Inheritance diagram for H323DataChannel:

[legend]
Collaboration diagram for H323DataChannel:
[legend]

## 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 ()

## Protected Member Functions

virtual void | InternalClose ()

## Protected Attributes

unsigned | sessionID
H323Listener * | listener
PBoolean | autoDeleteListener
H323Transport * | transport
PBoolean | autoDeleteTransport
PBoolean | separateReverseChannel

## 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:

  connection | Connection to endpoint for channel
  capability | Capability channel is using
  direction | Direction of channel
  sessionID | Session 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 | ( |  | ) | `[protected, virtual]`

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:

  pdu | Acknowledgement 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:

  pdu | Open PDU
  errorCode | Error 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:

  openPDU | Open PDU to send.

Implements 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:

  open | Open PDU
  ack | Acknowledgement 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:

- channels.h