#include <lid.h>
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) |
OpalLineInterfaceDevice & | GetDevice () const |
unsigned | GetLineNumber () const |
Protected Attributes | |
OpalLineInterfaceDevice & | device |
unsigned | lineNumber |
BOOL | reading |
BOOL | useDeblocking |
OpalLineChannel::OpalLineChannel | ( | OpalLineInterfaceDevice & | device, | |
unsigned | line, | |||
const H323AudioCodec & | codec | |||
) |
Create a new channel to a line interface device.
device | Device for channel I/O |
line | Number of line |
codec | Codec that uses the channel |
OpalLineChannel::~OpalLineChannel | ( | ) |
PString OpalLineChannel::GetName | ( | ) | const |
Get the device name.
BOOL OpalLineChannel::Close | ( | ) |
Close the channel.
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.
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.
buf | Pointer to a block of memory to write. |
len | Number of bytes to write. |
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.
OpalLineInterfaceDevice& OpalLineChannel::device [protected] |
unsigned OpalLineChannel::lineNumber [protected] |
BOOL OpalLineChannel::reading [protected] |
BOOL OpalLineChannel::useDeblocking [protected] |