OpalLineChannel Class Reference

#include <lid.h>

List of all members.

Public Member Functions

 OpalLineChannel (OpalLineInterfaceDevice &device, unsigned line, const H323AudioCodec &codec)
 ~OpalLineChannel ()
PString GetName () const
BOOL Close ()
virtual BOOL Read (void *buf, PINDEX len)
virtual BOOL Write (const void *buf, PINDEX len)
OpalLineInterfaceDeviceGetDevice () const
unsigned GetLineNumber () const

Protected Attributes

OpalLineInterfaceDevicedevice
unsigned lineNumber
BOOL reading
BOOL useDeblocking


Detailed Description

This class describes an I/O channel that uses a Line Interface Device.


Constructor & Destructor Documentation

OpalLineChannel::OpalLineChannel OpalLineInterfaceDevice device,
unsigned  line,
const H323AudioCodec codec
 

Create a new channel to a line interface device.

Parameters:
device  Device for channel I/O
line  Number of line
codec  Codec that uses the channel

OpalLineChannel::~OpalLineChannel  ) 
 


Member Function Documentation

BOOL OpalLineChannel::Close  ) 
 

Close the channel.

OpalLineInterfaceDevice& OpalLineChannel::GetDevice  )  const [inline]
 

Get the device the channel is writing to.

unsigned OpalLineChannel::GetLineNumber  )  const [inline]
 

Get the line number on device the channel is writing to.

PString OpalLineChannel::GetName  )  const
 

Get the device name.

virtual BOOL OpalLineChannel::Read void *  buf,
PINDEX  len
[virtual]
 

Low level read from the channel. This function may block until the requested number of characters were read or the read timeout was reached. The GetLastReadCount() function returns the actual number of bytes read.

The GetErrorCode() function should be consulted after Read() returns FALSE to determine what caused the failure.

Returns:
TRUE indicates that at least one character was read from the channel. FALSE means no bytes were read due to timeout or some other I/O error.
Parameters:
buf  Pointer to a block of memory to receive the read bytes.
len  Maximum number of bytes to read into the buffer.

virtual BOOL OpalLineChannel::Write const void *  buf,
PINDEX  len
[virtual]
 

Low level write to the channel. This function will block until the requested number of characters are written or the write timeout is reached. The GetLastWriteCount() function returns the actual number of bytes written.

The GetErrorCode() function should be consulted after Write() returns FALSE to determine what caused the failure.

Returns:
TRUE if at least len bytes were written to the channel.
Parameters:
buf  Pointer to a block of memory to write.
len  Number of bytes to write.


Member Data Documentation

OpalLineInterfaceDevice& OpalLineChannel::device [protected]
 

unsigned OpalLineChannel::lineNumber [protected]
 

BOOL OpalLineChannel::reading [protected]
 

BOOL OpalLineChannel::useDeblocking [protected]
 


The documentation for this class was generated from the following file:
Generated on Thu May 18 00:26:13 2006 for OpenH323 by  doxygen 1.4.6