305deb535283e4f752845510ece907993e86f13f
[lcr.git] / socket_server.h
1 /*****************************************************************************\
2 **                                                                           **
3 ** PBX4Linux                                                                 **
4 **                                                                           **
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg                                              **
7 **                                                                           **
8 ** Administration tool header file (server)                                  **
9 **                                                                           **
10 \*****************************************************************************/
11
12 #include "lcrsocket.h"
13
14 struct admin_queue {
15         struct admin_queue      *next;
16         ulong                   offset; /* current offset writing */
17         ulong                   num; /* number of admin messages */
18         struct admin_message    am[0];
19 };
20
21 struct admin_list {
22         struct admin_list *next;
23         int sock;
24         int sockserial;
25         char remote_name[32]; /* socket is connected remote application */
26         struct admin_trace_req trace; /* stores trace, if detail != 0 */
27         unsigned long epointid;
28         struct admin_queue *response;
29 };
30
31 extern struct admin_list *admin_first;
32 int admin_init(void);
33 void admin_cleanup(void);
34 int admin_handle(void);
35 void admin_call_response(int adminid, int message, char *connected, int cause, int location, int notify);
36 int admin_message_to_join(struct admin_message *msg, int remote_id);
37 int admin_message_from_join(int remote_id, unsigned long ref, int message_type, union parameter *param);
38
39
40