1 #include <linux/input.h>
13 #include "tapi-port.h"
15 enum dialdetector_dial_state
{
16 DIALDETECTOR_DIAL_WAIT
= 1,
17 DIALDETECTOR_DIAL_WAIT_TIMEOUT
= 2,
20 enum dialdetector_port_state
{
21 DIALDETECTOR_PORT_INACTIVE
= 0,
22 DIALDETECTOR_PORT_ACTIVE
= 1,
23 DIALDETECTOR_PORT_ACTIVE_DOWN
= 2,
27 enum dialdetector_dial_state dial_state
;
28 enum dialdetector_port_state port_state
;
30 struct tapi_port
*port
;
34 struct event_callback timeout_cb
;
35 struct event_callback impulse_cb
;
36 struct tapi_port_event_listener port_listener
;
39 unsigned char digits
[20];
41 unsigned int impulses
;
43 void (*dial_callback
)(struct tapi_port
*port
, size_t num_digits
, const unsigned char *digits
);
49 struct dialdetector
*dialdetector_alloc(struct tapi_port
*port
);