1 #ifndef __TAPI_PORT_H__
2 #define __TAPI_PORT_H__
12 struct tapi_dtmf_event
{
17 struct tapi_hook_event
{
21 enum tapi_event_type
{
27 enum tapi_event_type type
;
29 struct tapi_dtmf_event dtmf
;
30 struct tapi_hook_event hook
;
34 struct tapi_port_event_listener
{
35 void (*callback
)(struct tapi_port
*, struct tapi_event
*event
, void *data
);
38 struct list_head head
;
47 struct event_callback input_cb
;
49 struct list_head event_listeners
;
52 int tapi_port_open(struct tapi_device
*dev
, unsigned int id
, struct tapi_port
54 int tapi_port_set_ring(struct tapi_port
*port
, bool ring
);
55 int tapi_port_register_event(struct tapi_port
*port
,
56 struct tapi_port_event_listener
*cb
);
58 void tapi_port_unregister_event(struct tapi_port
*port
,
59 struct tapi_port_event_listener
*cb
);
61 static inline int tapi_port_get_endpoint(struct tapi_port
*port
)