![]() |
Classes | |
struct | VPB_DIGITS |
Digit collection parameters. More... | |
Enumerations | |
enum | CollectEndReason { VPB_DIGIT_TERM = 0, VPB_DIGIT_MAX = 1, VPB_DIGIT_TIME_OUT = 2, VPB_DIGIT_INTER_DIGIT_TIME_OUT = 3 } |
The termination reason passed in the VPB_EVENT::data field of a VPB_DIGIT event. More... | |
Functions | |
int WINAPI | vpb_flush_digits (int handle) |
Clears the internal digit buffer for handle. | |
int WINAPI | vpb_get_digits_async (int handle, VPB_DIGITS *digits, char *digbuf) |
Get a buffer of DTMF digits. | |
CollectEndReason WINAPI | vpb_get_digits_sync (int handle, VPB_DIGITS *digits, char *digbuf) |
Get a buffer of DTMF digits. |
enum CollectEndReason |
The termination reason passed in the VPB_EVENT::data
field of a VPB_DIGIT
event.
int WINAPI vpb_flush_digits | ( | int | handle | ) |
Clears the internal digit buffer for handle.
This function is often called before commencing collection if any digits entered prior to that time should be discarded.
Referenced by vpb_send_cid_t2_sync().
int WINAPI vpb_get_digits_async | ( | int | handle, | |
VPB_DIGITS * | digits, | |||
char * | digbuf | |||
) |
Get a buffer of DTMF
digits.
This functions will return immediately and post a VPB_DIGIT
event for handle when collection is completed. If it is called while collection is already in progress for handle, the process is reset and any digits collected prior to that will be discarded.
handle | The handle to the port to collect digits from. | |
digits | The conditions defining how digits are collected. | |
digbuf | A pointer to storage for at least VPB_DIGITS::max_digits + 1 characters. The returned string of digits will be NULL terminated. |
VPB_OK
if collection starts successfully.various | exceptions may be thrown in the event of an error. |
References VPB_DIGITS::digit_time_out, VPB_DIGITS::inter_digit_time_out, VPB_DIGITS::max_digits, VPB_DIGITS::term_digits, and validate_digits().
CollectEndReason WINAPI vpb_get_digits_sync | ( | int | handle, | |
VPB_DIGITS * | digits, | |||
char * | digbuf | |||
) |
Get a buffer of DTMF
digits.
This functions will block until collection is completed. If it is called while async collection is already in progress for handle, the process is reset and any digits collected prior to that will be discarded. If it is called while synchronous collections is already in progress an exception will be thrown. If it is interrupted by a call to start async collection an exception will be thrown.
handle | The handle to the port to collect digits from. | |
digits | The conditions defining how digits are collected. | |
digbuf | A pointer to storage for at least VPB_DIGITS::max_digits + 1 characters. The returned string of digits will be NULL terminated. |
CollectEndReason
indicating why collection was terminated.various | exceptions may be thrown in the event of an error. |
References VPB_DIGITS::digit_time_out, VPB_DIGITS::inter_digit_time_out, VPB_DIGITS::max_digits, VPB_DIGITS::term_digits, validate_digits(), VPB_DIGIT_INTER_DIGIT_TIME_OUT, VPB_DIGIT_MAX, VPB_DIGIT_TERM, and VPB_DIGIT_TIME_OUT.