[ifxmips]
[openwrt/svn-archive/archive.git] / package / lqtapi / src / include / linux / tapi / tapi-event.h
1 #ifndef __LINUX_TAPI_TAPI_EVENT_H__
2 #define __LINUX_TAPI_TAPI_EVENT_H__
3
4
5 struct tapi_device;
6 struct tapi_port;
7
8 struct tapi_hook_event {
9 bool on;
10 };
11
12 struct tapi_dtmf_event {
13 unsigned char code;
14 };
15
16 enum tapi_event_type {
17 TAPI_EVENT_TYPE_HOOK,
18 TAPI_EVENT_TYPE_DTMF,
19 };
20
21 struct tapi_event {
22 struct timeval time;
23 enum tapi_event_type type;
24 unsigned int port;
25 union {
26 struct tapi_hook_event hook;
27 struct tapi_dtmf_event dtmf;
28 };
29 };
30
31 void tapi_report_event(struct tapi_device *tdev, struct tapi_event *event);
32 void tapi_report_hook_event(struct tapi_device *tdev, struct tapi_port *port,
33 bool on);
34 void tapi_report_dtmf_event(struct tapi_device *tdev, struct tapi_port *port,
35 unsigned char code);
36
37 #endif