|
OpenH323
1.18.0
|
#include <vpblid.h>
Classes | |
| struct | LineState |
Public Member Functions | |
| OpalVpbDevice () | |
| ~OpalVpbDevice () | |
| virtual BOOL | Open (const PString &device) |
| virtual BOOL | Close () |
| virtual PString | GetName () const |
| virtual unsigned | GetLineCount () |
| virtual BOOL | IsLineOffHook (unsigned line) |
| virtual BOOL | SetLineOffHook (unsigned line, BOOL newState=TRUE) |
| virtual BOOL | IsLineRinging (unsigned line, DWORD *cadence=NULL) |
| virtual BOOL | IsLineDisconnected (unsigned line, BOOL checkForWink=TRUE) |
| virtual OpalMediaFormat::List | GetMediaFormats () const |
| virtual BOOL | SetReadFormat (unsigned line, const OpalMediaFormat &mediaFormat) |
| virtual BOOL | SetWriteFormat (unsigned line, const OpalMediaFormat &mediaFormat) |
| virtual OpalMediaFormat | GetReadFormat (unsigned line) |
| virtual OpalMediaFormat | GetWriteFormat (unsigned line) |
| virtual BOOL | StopReadCodec (unsigned line) |
| virtual BOOL | StopWriteCodec (unsigned line) |
| virtual BOOL | SetReadFrameSize (unsigned line, PINDEX frameSize) |
| virtual BOOL | SetWriteFrameSize (unsigned line, PINDEX frameSize) |
| virtual PINDEX | GetReadFrameSize (unsigned line) |
| virtual PINDEX | GetWriteFrameSize (unsigned line) |
| virtual BOOL | ReadFrame (unsigned line, void *buf, PINDEX &count) |
| virtual BOOL | WriteFrame (unsigned line, const void *buf, PINDEX count, PINDEX &written) |
| virtual BOOL | SetRecordVolume (unsigned line, unsigned volume) |
| virtual BOOL | SetPlayVolume (unsigned line, unsigned volume) |
| int | GetOSHandle (unsigned line) |
| virtual char | ReadDTMF (unsigned line) |
| virtual BOOL | PlayDTMF (unsigned line, const char *digits, DWORD onTime=90, DWORD offTime=30) |
| virtual unsigned | IsToneDetected (unsigned line) |
| virtual BOOL | PlayTone (unsigned line, CallProgressTones tone) |
| virtual BOOL | StopTone (unsigned line) |
| virtual BOOL | PlayAudio (unsigned line, const PString &filename) |
| virtual BOOL | StopAudio (unsigned line) |
Protected Types | |
| enum | { MaxLineCount = 8 } |
Protected Attributes | |
| unsigned | cardNumber |
| unsigned | lineCount |
| struct OpalVpbDevice::LineState | lineState [MaxLineCount] |
This class describes the Voicetronix line interface device.
Create a new, closed, device for a VPB card.
| OpalVpbDevice::~OpalVpbDevice | ( | ) | [inline] |
| virtual BOOL OpalVpbDevice::Close | ( | ) | [virtual] |
| virtual unsigned OpalVpbDevice::GetLineCount | ( | ) | [virtual] |
Get the total number of lines supported by this device.
Implements OpalLineInterfaceDevice.
| virtual OpalMediaFormat::List OpalVpbDevice::GetMediaFormats | ( | ) | const [virtual] |
Get the media formats this device is capable of using.
Implements OpalLineInterfaceDevice.
| virtual PString OpalVpbDevice::GetName | ( | ) | const [virtual] |
Get the device name.
Implements OpalLineInterfaceDevice.
| int OpalVpbDevice::GetOSHandle | ( | unsigned | line | ) |
Return line handle
| line | Number of line |
| virtual OpalMediaFormat OpalVpbDevice::GetReadFormat | ( | unsigned | line | ) | [virtual] |
Get the media format (codec) for reading on the specified line.
| line | Number of line |
Implements OpalLineInterfaceDevice.
| virtual PINDEX OpalVpbDevice::GetReadFrameSize | ( | unsigned | line | ) | [virtual] |
Get the read frame size in bytes. All calls to ReadFrame() will return this number of bytes.
| line | Number of line |
Implements OpalLineInterfaceDevice.
| virtual OpalMediaFormat OpalVpbDevice::GetWriteFormat | ( | unsigned | line | ) | [virtual] |
Get the media format (codec) for writing on the specified line.
| line | Number of line |
Implements OpalLineInterfaceDevice.
| virtual PINDEX OpalVpbDevice::GetWriteFrameSize | ( | unsigned | line | ) | [virtual] |
Get the write frame size in bytes. All calls to WriteFrame() must be this number of bytes.
| line | Number of line |
Implements OpalLineInterfaceDevice.
| virtual BOOL OpalVpbDevice::IsLineDisconnected | ( | unsigned | line, |
| BOOL | checkForWink = TRUE |
||
| ) | [virtual] |
Determine if line has been disconnected from a call. return TRUE if a tone is detected.
| line | Number of line |
Reimplemented from OpalLineInterfaceDevice.
| virtual BOOL OpalVpbDevice::IsLineOffHook | ( | unsigned | line | ) | [virtual] |
Determine if line is currently off hook. This returns TRUE if GetLineState() is a state that implies the line is off hook (eg OffHook or LineBusy).
| line | Number of line |
Implements OpalLineInterfaceDevice.
| virtual BOOL OpalVpbDevice::IsLineRinging | ( | unsigned | line, |
| DWORD * | cadence = NULL |
||
| ) | [virtual] |
Determine if line is ringing.
| line | Number of line |
| cadence | Cadence of incoming ring |
Reimplemented from OpalLineInterfaceDevice.
| virtual unsigned OpalVpbDevice::IsToneDetected | ( | unsigned | line | ) | [virtual] |
See if a tone is detected.
| line | Number of line |
Reimplemented from OpalLineInterfaceDevice.
| virtual BOOL OpalVpbDevice::Open | ( | const PString & | device | ) | [virtual] |
| virtual BOOL OpalVpbDevice::PlayAudio | ( | unsigned | line, |
| const PString & | filename | ||
| ) | [virtual] |
Play a wav file
| line | Number of line |
| filename | File Name |
Reimplemented from OpalLineInterfaceDevice.
| virtual BOOL OpalVpbDevice::PlayDTMF | ( | unsigned | line, |
| const char * | digits, | ||
| DWORD | onTime = 90, |
||
| DWORD | offTime = 30 |
||
| ) | [virtual] |
Play a DTMF digit. Any characters that are not in the set 0-9, A-D, * or # will be ignored.
| line | Number of line |
| digits | DTMF digits to be played |
| onTime | Number of milliseconds to play each DTMF digit |
| offTime | Number of milliseconds between digits |
Reimplemented from OpalLineInterfaceDevice.
| virtual BOOL OpalVpbDevice::PlayTone | ( | unsigned | line, |
| CallProgressTones | tone | ||
| ) | [virtual] |
Play a tone.
| line | Number of line |
| tone | Tone to be played |
Reimplemented from OpalLineInterfaceDevice.
| virtual char OpalVpbDevice::ReadDTMF | ( | unsigned | line | ) | [virtual] |
Read a DTMF digit detected. This may be characters from the set 0-9, A-D, * or #. A null ('\0') character indicates that there are no tones in the queue.
| line | Number of line |
Reimplemented from OpalLineInterfaceDevice.
| virtual BOOL OpalVpbDevice::ReadFrame | ( | unsigned | line, |
| void * | buf, | ||
| PINDEX & | count | ||
| ) | [virtual] |
Low level read of a frame from the device.
| line | Number of line |
| buf | Pointer to a block of memory to receive the read bytes. |
| count | Number of bytes read, <= GetReadFrameSize() |
Implements OpalLineInterfaceDevice.
| virtual BOOL OpalVpbDevice::SetLineOffHook | ( | unsigned | line, |
| BOOL | newState = TRUE |
||
| ) | [virtual] |
Set the state of the line. Note that not be possible on a given line.
| line | Number of line |
| newState | New state to set |
Implements OpalLineInterfaceDevice.
| virtual BOOL OpalVpbDevice::SetPlayVolume | ( | unsigned | line, |
| unsigned | volume | ||
| ) | [virtual] |
Set volume level for playing. A value of 100 is the maximum volume possible for the hardware. A value of 0 is the minimum volume possible for the hardware.
| line | Number of line |
| volume | Volume level from 0 to 100% |
Reimplemented from OpalLineInterfaceDevice.
| virtual BOOL OpalVpbDevice::SetReadFormat | ( | unsigned | line, |
| const OpalMediaFormat & | mediaFormat | ||
| ) | [virtual] |
Set the codec for reading.
| line | Number of line |
| mediaFormat | Codec type |
Implements OpalLineInterfaceDevice.
| virtual BOOL OpalVpbDevice::SetReadFrameSize | ( | unsigned | line, |
| PINDEX | frameSize | ||
| ) | [virtual] |
Set the read frame size in bytes. Note that a LID may ignore this value so always use GetReadFrameSize() for I/O.
| line | Number of line |
| frameSize | New frame size |
Reimplemented from OpalLineInterfaceDevice.
| virtual BOOL OpalVpbDevice::SetRecordVolume | ( | unsigned | line, |
| unsigned | volume | ||
| ) | [virtual] |
Set volume level for recording. A value of 100 is the maximum volume possible for the hardware. A value of 0 is the minimum volume possible for the hardware.
| line | Number of line |
| volume | Volume level from 0 to 100% |
Reimplemented from OpalLineInterfaceDevice.
| virtual BOOL OpalVpbDevice::SetWriteFormat | ( | unsigned | line, |
| const OpalMediaFormat & | mediaFormat | ||
| ) | [virtual] |
Set the codec for writing.
| line | Number of line |
| mediaFormat | Codec type |
Implements OpalLineInterfaceDevice.
| virtual BOOL OpalVpbDevice::SetWriteFrameSize | ( | unsigned | line, |
| PINDEX | frameSize | ||
| ) | [virtual] |
Set the write frame size in bytes. Note that a LID may ignore this value so always use GetReadFrameSize() for I/O.
| line | Number of line |
| frameSize | New frame size |
Reimplemented from OpalLineInterfaceDevice.
| virtual BOOL OpalVpbDevice::StopAudio | ( | unsigned | line | ) | [virtual] |
Stop playing the Wave File
| line | Number of line |
Reimplemented from OpalLineInterfaceDevice.
| virtual BOOL OpalVpbDevice::StopReadCodec | ( | unsigned | line | ) | [virtual] |
| virtual BOOL OpalVpbDevice::StopTone | ( | unsigned | line | ) | [virtual] |
| virtual BOOL OpalVpbDevice::StopWriteCodec | ( | unsigned | line | ) | [virtual] |
| virtual BOOL OpalVpbDevice::WriteFrame | ( | unsigned | line, |
| const void * | buf, | ||
| PINDEX | count, | ||
| PINDEX & | written | ||
| ) | [virtual] |
Low level write frame to the device.
| line | Number of line |
| buf | Pointer to a block of memory to write. |
| count | Number of bytes to write, <= GetWriteFrameSize() |
| written | Number of bytes written, <= GetWriteFrameSize() |
Implements OpalLineInterfaceDevice.
unsigned OpalVpbDevice::cardNumber [protected] |
unsigned OpalVpbDevice::lineCount [protected] |
struct OpalVpbDevice::LineState OpalVpbDevice::lineState[MaxLineCount] [protected] |
1.7.6.1