only for backup, still in coding state - no compile!!!
[lcr.git] / endpoint.h
1 /*****************************************************************************\
2 **                                                                           **
3 ** PBX4Linux                                                                 **
4 **                                                                           **
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg                                              **
7 **                                                                           **
8 ** Endpoint header file                                                      **
9 **                                                                           **
10 \*****************************************************************************/ 
11
12
13 /* structure of port_list */
14 struct port_list {
15         struct port_list        *next;
16         unsigned long           port_id;
17         int                     port_type;
18 };
19
20 /* structure of an Enpoint */
21 class Endpoint
22 {
23         public:
24         Endpoint(int port_id, int call_id);
25         ~Endpoint();
26         class Endpoint          *next;          /* next in list */
27         unsigned long           ep_serial;      /* a unique serial to identify */
28         int                     handler(void);
29
30         /* applocaton relation */
31         class EndpointApp       *ep_app;                /* link to application class */
32
33         /* port relation */
34         struct port_list        *ep_portlist;   /* link to list of ports */
35         struct port_list *portlist_new(unsigned long port_id, int port_type);
36         void free_portlist(struct port_list *portlist);
37
38         /* call relation */
39         unsigned long           ep_call_id;     /* link to call */
40
41         /* if still used by threads */
42         int                     ep_use;
43
44         /* application indipendant states */
45         int                     ep_park;                /* indicates that the epoint is parked */
46         unsigned char           ep_park_callid[8];
47         int                     ep_park_len;
48 };
49
50 extern class Endpoint *epoint_first;
51
52 class Endpoint *find_epoint_id(unsigned long epoint_id);
53