1 #ifndef __TAPI_AGENT_H__
2 #define __TAPI_AGENT_H__
9 enum tapi_agent_state
{
10 TAPI_AGENT_STATE_IDLE
,
11 TAPI_AGENT_STATE_RINGING
,
12 TAPI_AGENT_STATE_ACTIVE
,
17 struct tapi_port port
;
18 struct tapi_port_event_listener event_listener
;
20 enum tapi_agent_state state
;
22 struct session
*session
;
25 static inline struct tapi_agent
*agent_to_tapi_agent(struct agent
*agent
)
27 return container_of(agent
, struct tapi_agent
, agent
);
30 static inline struct tapi_agent
*port_to_tapi_agent(struct tapi_port
*port
)
32 return container_of(port
, struct tapi_agent
, port
);
35 void tapi_agent_init(struct tapi_device
*tdev
, int port
, struct tapi_agent
*tagent
);