![]() |
Functions | |
int | RunTimeError (const Wobbly &w, const char *api_function) |
void | CheckHandle (VPBPortHandle handle, const char *where) |
Check for a valid device handle. | |
void | ValidHandleCheck (int handle) |
void | validate_digits (const char *digits) |
Validate a NULL terminated string of DTMF digits. | |
int | putevt (VPB_EVENT *event, unsigned long mask=0) |
Internal function to place an event on the API event queue. | |
void | apifunc_trace (char s[]) |
int | get_driver_type (int board) |
Return the symbolic type of the driver for board. | |
VPB_MODEL | get_board_type (int board) |
Return the symbolic VPB_MODEL type of a board. | |
void | get_board_model (int board, char *s) |
Return a descriptive model name for board in s. | |
VPB_PORT | get_port_type (int board, int port) |
Return the type of a port on some board. VPB_FXO or VPB_FXS . | |
size_t | get_total_port_count () |
Return the total number of ports on all registered boards. | |
void | set_country (int board, int port, const Country *country) |
Set the country data for port on board. | |
const Country * | get_country (int board, int port) |
Return the country data for port on board. | |
void | ring_station_async (int board, int port, int cadence) |
Internal function to control ringing on port of board. | |
void | set_codec_reg (int handle, unsigned short addr, unsigned short data, Comm *comm) |
Write directly to a V4PCI codec register. | |
Variables | |
Comm * | vpb_c |
Pointer to the global comm object. |
These functions mostly mirror some of those from the public API but are implemented without error checking, or for invocation using already decomposed parameters.
void CheckHandle | ( | VPBPortHandle | handle, | |
const char * | where | |||
) |
Check for a valid device handle.
The handle is valid if the device has been opened with a prior call to vpb_open()
.
VpbException | will be thrown, stating where, if handle is invalid. |
References Totalchans, and VPB_OFF.
Referenced by vpb_close(), vpb_deltonedet(), vpb_disable_event(), vpb_disable_tone_event(), vpb_enable_event(), vpb_enable_tone_event(), vpb_flush_events(), vpb_get_card_type(), vpb_get_event_ch_async(), vpb_get_event_ch_sync(), vpb_get_event_mask(), vpb_get_hookstate(), vpb_get_model(), vpb_get_port_country(), vpb_get_port_type(), vpb_get_tone_event_mask(), vpb_play_buf_start(), vpb_play_get_gain(), vpb_play_get_hw_gain(), vpb_play_set(), vpb_play_set_gain(), vpb_play_set_hw_gain(), vpb_record_buf_start(), vpb_record_get_gain(), vpb_record_get_hw_gain(), vpb_record_set(), vpb_record_set_gain(), vpb_record_set_hw_gain(), vpb_reset(), vpb_ring_station_async(), vpb_set_country(), vpb_set_event_callback(), vpb_set_event_mask(), vpb_set_tone_event_mask(), vpb_sethook_async(), and vpb_settonedet().
int putevt | ( | VPB_EVENT * | event, | |
unsigned long | mask = 0 | |||
) |
Internal function to place an event on the API event queue.
event | The event to place on the API queue. | |
mask | The mask to use for this event (set to 0 if not required). |
References VPB_DEV::APIQ, VPB_DEV::callback_mutex, VPB_DEV::context, VPB_DEV::devstate, VPB_DEV::event_callback, VPB_DEV::evtmask, VPB_EVENT::handle, and VPB_ON.
void set_codec_reg | ( | int | handle, | |
unsigned short | addr, | |||
unsigned short | data, | |||
Comm * | comm | |||
) |
Write directly to a V4PCI
codec register.
handle | The handle returned by a call to vpb_open() . | |
addr | 8-bit address of the codec register. | |
data | 8-bit data to write to the register. | |
comm | The comm object used to send the message. |
Referenced by playrec_open().
void validate_digits | ( | const char * | digits | ) |
Validate a NULL
terminated string of DTMF
digits.
DTMF
digits, user defined tone characters will fail if passed here, even if they are valid to be passed to vpb_dial_{a
,}sync(). Wobbly | will be thrown if any of the digits are not valid. |
Referenced by vpb_get_digits_async(), vpb_get_digits_sync(), vpb_play_set(), and vpb_record_set().