more moving to new logging standard
[citadel.git] / citadel / serv_extensions.h
1
2 #ifndef SERV_EXTENSIONS_H
3 #define SERV_EXTENSIONS_H
4
5 #include "server.h"
6
7 /*
8  * This is where we declare all of the server extensions we have.
9  * We'll probably start moving these to a more sane location in the near
10  * future.  For now, this just shuts up the compiler.
11  */
12 //void serv_calendar_destroy(void);
13 //char *serv_test_init(void);
14 //char *serv_postfix_tcpdict(void);
15 /*
16  */
17
18 typedef void (*CtdlDbgFunction) (const int);
19
20
21
22
23 /*
24  * ServiceFunctionHook extensions are used for hooks which implement various
25  * protocols (either on TCP or on unix domain sockets) directly in the Citadel server.
26  */
27 typedef struct ServiceFunctionHook ServiceFunctionHook;
28 struct ServiceFunctionHook {
29         ServiceFunctionHook *next;
30         int tcp_port;
31         char *sockpath;
32         void (*h_greeting_function) (void) ;
33         void (*h_command_function) (void) ;
34         void (*h_async_function) (void) ;
35         int msock;
36         const char* ServiceName; /* this is just for debugging and logging purposes. */
37 };
38 extern ServiceFunctionHook *ServiceHookTable;
39
40 typedef struct CleanupFunctionHook CleanupFunctionHook;
41 struct CleanupFunctionHook {
42         CleanupFunctionHook *next;
43         void (*h_function_pointer) (void);
44 };
45 extern CleanupFunctionHook *CleanupHookTable;
46
47
48 typedef struct __LogDebugEntry {
49         CtdlDbgFunction F;
50         const char *Name;
51         long Len;
52         const int *LogP;
53 } LogDebugEntry;
54 extern HashList *LogDebugEntryTable;
55 void initialize_server_extensions(void);
56 int DLoader_Exec_Cmd(char *cmdbuf);
57 char *Dynamic_Module_Init(void);
58
59 void CtdlDestroySessionHooks(void);
60 void PerformSessionHooks(int EventType);
61
62 int CheckTDAPVeto (int DBType, StrBuf *ErrMsg);
63 void CtdlDestroyTDAPVetoHooks(void);
64
65 void CtdlDestroyUserHooks(void);
66 void PerformUserHooks(struct ctdluser *usbuf, int EventType);
67
68 int PerformXmsgHooks(char *, char *, char *, char *);
69 void CtdlDestroyXmsgHooks(void);
70
71
72
73 void CtdlDestroyMessageHook(void);
74 int PerformMessageHooks(struct CtdlMessage *, recptypes *recps, int EventType);
75
76
77 void CtdlDestroyNetprocHooks(void);
78 int PerformNetprocHooks(struct CtdlMessage *, char *);
79
80 void CtdlDestroyRoomHooks(void);
81 int PerformRoomHooks(struct ctdlroom *);
82
83
84 void CtdlDestroyDeleteHooks(void);
85 void PerformDeleteHooks(char *, long);
86
87
88 void CtdlDestroyCleanupHooks(void);
89
90 void CtdlDestroyProtoHooks(void);
91
92 void CtdlDestroyServiceHook(void);
93
94 void CtdlDestroySearchHooks(void);
95
96 void CtdlDestroyFixedOutputHooks(void);
97 int PerformFixedOutputHooks(char *, char *, int);
98
99 void CtdlRegisterDebugFlagHook(const char *Name, long len, CtdlDbgFunction F, const int *);
100 void CtdlSetDebugLogFacilities(const char **Str, long n);
101 void CtdlDestroyDebugTable(void);
102
103 void netcfg_keyname(char *keybuf, long roomnum);
104
105 #endif /* SERV_EXTENSIONS_H */