[brcm63xx] spi driver: remove bcm_rset usage
[openwrt.git] / package / tapi_sip / src / tapi_agent.h
1 #ifndef __TAPI_AGENT_H__
2 #define __TAPI_AGENT_H__
3
4 #include "agent.h"
5 #include <tapi-port.h>
6
7 struct session;
8
9 enum tapi_agent_state {
10         TAPI_AGENT_STATE_IDLE,
11         TAPI_AGENT_STATE_RINGING,
12         TAPI_AGENT_STATE_ACTIVE,
13 };
14
15 struct tapi_agent {
16         struct agent agent;
17         struct tapi_port port;
18         struct tapi_port_event_listener event_listener;
19
20         enum tapi_agent_state state;
21
22         struct session *session;
23 };
24
25 static inline struct tapi_agent *agent_to_tapi_agent(struct agent *agent)
26 {
27         return container_of(agent, struct tapi_agent, agent);
28 }
29
30 static inline struct tapi_agent *port_to_tapi_agent(struct tapi_port *port)
31 {
32         return container_of(port, struct tapi_agent, port);
33 }
34
35 void tapi_agent_init(struct tapi_device *tdev, int port, struct tapi_agent *tagent);
36
37 #endif