cce5c51a232f6f9f31bf22869f0ce57e765bfb74
[citadel.git] / citadel / citserver.h
1 /*
2  * Copyright (c) 1987-2015 by the citadel.org team
3  *
4  * This program is open source software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 3.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  */
12
13 /* I fucking hate const and want it to die. */
14 #pragma GCC diagnostic ignored "-Wcast-qual"
15
16 #include "serv_extensions.h"
17 #include "context.h"
18 #include "ctdl_module.h"
19
20 /* Simple linked list structures ... used in a bunch of different places. */
21 typedef struct RoomProcList RoomProcList;
22 struct RoomProcList {
23         struct RoomProcList *next;
24         char name[ROOMNAMELEN];
25         char lcname[ROOMNAMELEN];
26         long namelen;
27         long lastsent;
28         long key;
29         long QRNum;
30 };
31 struct UserProcList {
32         struct UserProcList *next;
33         char user[64];
34 };
35
36 #define CTDLUSERIP      (IsEmptyStr(CC->cs_addr) ?  CC->cs_clientinfo: CC->cs_addr)
37
38 void cit_backtrace(void);
39 void cit_oneline_backtrace(void);
40 void cit_panic_backtrace(int SigNum);
41 void master_startup (void);
42 int master_cleanup (int exitcode);
43 void set_wtmpsupp (char *newtext);
44 void set_wtmpsupp_to_current_room(void);
45 void do_command_loop(void);
46 void do_async_loop(void);
47 void begin_session(struct CitContext *con);
48 void citproto_begin_session(void);
49 void citproto_begin_admin_session(void);
50
51 void help_subst (char *strbuf, char *source, char *dest);
52
53 extern int panic_fd;
54 char CtdlCheckExpress(void);
55 int CtdlIsPublicClient(void);
56 extern time_t server_startup_time;
57 extern int openid_level_supported;