Add -lncurses to LDD flags
[lcr.git] / endpoint.h
1 /*****************************************************************************\
2 **                                                                           **
3 ** Linux Call Router                                                         **
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 int            port_id;
17         int                     port_type;
18         int                     early_b; /* if patterns are available */
19 };
20
21 /* structure of an Enpoint */
22 class Endpoint
23 {
24         public:
25         Endpoint(unsigned int port_id, unsigned int join_id);
26         ~Endpoint();
27         class Endpoint          *next;          /* next in list */
28         unsigned int            ep_serial;      /* a unique serial to identify */
29
30         /* applocaton relation */
31         int                     ep_app_type;
32         class EndpointApp       *ep_app;                /* link to application class */
33
34         /* port relation */
35         struct port_list        *ep_portlist;   /* link to list of ports */
36         struct port_list *portlist_new(unsigned int port_id, int port_type, int earlyb);
37         void free_portlist(struct port_list *portlist);
38
39         /* join relation */
40         unsigned int            ep_join_id;     /* link to join */
41
42         /* if still used by threads */
43         int                     ep_use;
44         struct lcr_work         ep_delete;
45
46         /* application indipendant states */
47         int                     ep_park;                /* indicates that the epoint is parked */
48         unsigned char           ep_park_callid[8];
49         int                     ep_park_len;
50 };
51
52 extern class Endpoint *epoint_first;
53
54 class Endpoint *find_epoint_id(unsigned int epoint_id);
55