#include <opalusbdevice.h>
Inheritance diagram for OpalUSBDevice:
Public Types | |
enum | { POTSLine, PSTNLine, NumLines } |
Public Member Functions | |
OpalUSBDevice () | |
OpalUSBDevice (PluginHID_Definition *hid) | |
~OpalUSBDevice () | |
virtual BOOL | Open (const PString &device) |
virtual BOOL | IsOpen () const |
virtual BOOL | Close () |
virtual PString | GetName () const |
virtual BOOL | IsLineTerminal (unsigned line) |
virtual BOOL | IsLinePresent (unsigned line, BOOL force=FALSE) |
virtual BOOL | IsLineOffHook (unsigned line) |
virtual BOOL | SetLineOffHook (unsigned line, BOOL newState=TRUE) |
virtual BOOL | IsLineRinging (unsigned line, DWORD *cadence=NULL) |
virtual BOOL | RingLine (unsigned line, DWORD cadence) |
virtual BOOL | IsLineDisconnected (unsigned line, BOOL checkForWink=TRUE) |
virtual PINDEX | GetReadFrameSize (unsigned line) |
virtual BOOL | SetReadFrameSize (unsigned, PINDEX) |
virtual PINDEX | GetWriteFrameSize (unsigned line) |
virtual BOOL | SetWriteFrameSize (unsigned, PINDEX) |
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) |
virtual BOOL | GetRecordVolume (unsigned line, unsigned &volume) |
virtual BOOL | GetPlayVolume (unsigned line, unsigned &volume) |
virtual BOOL | PlayDTMF (unsigned line, const char *digits, DWORD onTime=DefaultDTMFOnTime, DWORD offTime=DefaultDTMFOffTime) |
virtual char | ReadDTMF (unsigned line) |
virtual BOOL | PlayTone (unsigned line, CallProgressTones tone) |
virtual BOOL | IsTonePlaying (unsigned line) |
virtual BOOL | StopTone (unsigned line) |
virtual BOOL | GetCallerID (unsigned line, PString &idString, BOOL full=FALSE) |
virtual BOOL | SetCallerID (unsigned line, const PString &idString) |
virtual unsigned | GetLineCount () |
virtual OpalMediaFormat::List | GetMediaFormats () const |
virtual BOOL | SetReadFormat (unsigned line, const OpalMediaFormat &mediaFormat) |
virtual | 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 OpalLineInterfaceDevice::DeviceType | GetDeviceType () |
Public Attributes | |
PString | soundDev |
BOOL | exitTone |
Sound DeviceName. | |
Protected Member Functions | |
void | InterpretInput (unsigned int ret) |
Exit Tone Thread Flag. | |
BOOL | CreateSoundDevice (BOOL IsEncoder, const PString &device, PINDEX rate=8000, PINDEX samples=1) |
unsigned int | InvokeMessage (unsigned msg, unsigned val=0) |
PDECLARE_NOTIFIER (PThread, OpalUSBDevice, Monitor) | |
Poll wait. | |
PDECLARE_NOTIFIER (PThread, OpalUSBDevice, TonePlay) | |
Tone Thread. | |
Protected Attributes | |
OpalMediaFormat | MediaFormat |
PluginHID_Definition * | HID |
PThread * | MonitorThread |
HID Definition from the Plugin. | |
PSyncPoint | monitorTickle |
Monitor Thread. | |
BOOL | exitFlag |
Declaration of the Thread. | |
BOOL | PluggedIn |
Exit Thread Monitor Flag. | |
unsigned int | InputData |
Device plugged in. | |
PString | digitbuffer |
Data sent to the USB Phone. | |
BOOL | OffHookState |
Digit Buffer from USB Phone. | |
BOOL | isRinging |
Hook state. | |
BOOL | useSound |
Whether the device is ringing. | |
PSoundChannel * | RecSound |
Flag to specify is Regular Sound device. | |
PSoundChannel * | PlaySound |
Sound Record Channel. | |
PINDEX | soundChannelBuffers |
Sound Play Channel. | |
PINDEX | vol |
Sound Channel Buffers. | |
BOOL | useTones |
Current Speaker volume. | |
CallProgressTones | CurTone |
Tones required. | |
PThread * | ToneThread |
Current Tone to Play. | |
PMutex | vbMutex |
Declaration of the ToneThread. | |
BOOL | hasPSTN |
Mute. | |
BOOL | isCell |
Classes | |
class | SoundTones |
|
|
|
Create a new, closed, device for a USB Hardware device. |
|
|
|
|
|
Close the USB device. Reimplemented from OpalLineInterfaceDevice. |
|
|
|
Get Caller ID from the last incoming ring. The idString parameter is either simply the "number" field of the caller ID data, or if full is TRUE, all of the fields in the caller ID data. The full data of the caller ID string consists of the number field, the time/date and the name field separated by tabs ('').
Reimplemented from OpalLineInterfaceDevice. |
|
Get Device Type Reimplemented from OpalLineInterfaceDevice. |
|
Get Line Count. At resent this returns 0 Implements OpalLineInterfaceDevice. |
|
GetMedia Formats Implements OpalLineInterfaceDevice. |
|
Get the device name. Implements OpalLineInterfaceDevice. |
|
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.
Reimplemented from OpalLineInterfaceDevice. |
|
Get the Read format Implements OpalLineInterfaceDevice. |
|
Get the read frame size in bytes. All calls to ReadFrame() will return this number of bytes.
Implements OpalLineInterfaceDevice. |
|
Get 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.
Reimplemented from OpalLineInterfaceDevice. |
|
Get the Write Format Implements OpalLineInterfaceDevice. |
|
Get the write frame size in bytes. All calls to WriteFrame() must be this number of bytes.
Implements OpalLineInterfaceDevice. |
|
Exit Tone Thread Flag. Interpret input received from the HID |
|
|
|
Determine if line has been disconnected from a call.
Reimplemented from OpalLineInterfaceDevice. |
|
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).
Implements OpalLineInterfaceDevice. |
|
Determine if a physical line is present on the logical line.
Reimplemented from OpalLineInterfaceDevice. |
|
Determine if line is ringing.
Reimplemented from OpalLineInterfaceDevice. |
|
Get the type of the line.
Reimplemented from OpalLineInterfaceDevice. |
|
Determine if the line interface device is plugged in. Reimplemented from OpalLineInterfaceDevice. |
|
Determine if a tone is still playing
Reimplemented from OpalLineInterfaceDevice. |
|
Open and detect USB device.
Implements OpalLineInterfaceDevice. |
|
Tone Thread.
|
|
Poll wait.
|
|
Play a DTMF digit. Any characters that are not in the set 0-9, A-D, * or # will be ignored.
Reimplemented from OpalLineInterfaceDevice. |
|
Play a tone.
Reimplemented from OpalLineInterfaceDevice. |
|
Read a DTMF digit detected. This may be characters from the set 0-9, A-D, * or #. A null ('') character indicates that there are no tones in the queue.
Reimplemented from OpalLineInterfaceDevice. |
|
Low level read of a frame from the device.
Implements OpalLineInterfaceDevice. |
|
Begin ringing local phone set with specified cadence. If cadence is zero then stops ringing.
Reimplemented from OpalLineInterfaceDevice. |
|
Set Caller ID for use in next RingLine() call. The full data of the caller ID string consists of the number field, the time/date and the name field separated by tabs (''). If the date field is missing (two consecutive tabs) then the current time and date is used. Using an empty string will clear the caller ID so that no caller ID is sent on the next RingLine() call.
Reimplemented from OpalLineInterfaceDevice. |
|
Set the state of the line. Note that not be possible on a given line.
Implements OpalLineInterfaceDevice. |
|
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.
Reimplemented from OpalLineInterfaceDevice. |
|
Set Read Frame size Implements OpalLineInterfaceDevice. |
|
Set the read frame size in bytes. Note that a LID may ignore this value so always use GetReadFrameSize() for I/O. Reimplemented from OpalLineInterfaceDevice. |
|
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.
Reimplemented from OpalLineInterfaceDevice. |
|
Set write Frame size Implements OpalLineInterfaceDevice. |
|
Set the write frame size in bytes. Note that a LID may ignore this value so always use GetReadFrameSize() for I/O. Reimplemented from OpalLineInterfaceDevice. |
|
Stop the read codec.
Reimplemented from OpalLineInterfaceDevice. |
|
Stop playing a tone.
Reimplemented from OpalLineInterfaceDevice. |
|
Stop the write codec.
Reimplemented from OpalLineInterfaceDevice. |
|
Low level write frame to the device.
Implements OpalLineInterfaceDevice. |
|
Tones required.
|
|
Data sent to the USB Phone.
|
|
Declaration of the Thread.
|
|
Sound DeviceName.
|
|
Mute.
|
|
|
|
Device plugged in.
|
|
|
|
Hook state.
|
|
|
|
HID Definition from the Plugin.
|
|
Monitor Thread.
|
|
Digit Buffer from USB Phone.
|
|
Sound Record Channel.
|
|
Exit Thread Monitor Flag.
|
|
Flag to specify is Regular Sound device.
|
|
Sound Play Channel.
|
|
|
|
Current Tone to Play.
|
|
Whether the device is ringing.
|
|
Current Speaker volume.
|
|
Declaration of the ToneThread.
|
|
Sound Channel Buffers.
|