2 #ifndef SERV_EXTENSIONS_H
3 #define SERV_EXTENSIONS_H
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.
12 //void serv_calendar_destroy(void);
13 //char *serv_test_init(void);
14 //char *serv_postfix_tcpdict(void);
18 typedef void (*CtdlDbgFunction) (const int);
20 extern int DebugModules;
21 #define MDBGLOG(LEVEL) if ((LEVEL != LOG_DEBUG) || (DebugModules != 0))
23 #define MOD_syslog(LEVEL, FORMAT, ...) \
24 MDBGLOG(LEVEL) syslog(LEVEL, \
25 "%s Modules: " FORMAT, IOSTR, __VA_ARGS__)
27 #define MODM_syslog(LEVEL, FORMAT) \
28 MDBGLOG(LEVEL) syslog(LEVEL, \
29 "%s Modules: " FORMAT, IOSTR);
35 * ServiceFunctionHook extensions are used for hooks which implement various
36 * protocols (either on TCP or on unix domain sockets) directly in the Citadel server.
38 typedef struct ServiceFunctionHook ServiceFunctionHook;
39 struct ServiceFunctionHook {
40 ServiceFunctionHook *next;
43 void (*h_greeting_function) (void) ;
44 void (*h_command_function) (void) ;
45 void (*h_async_function) (void) ;
47 const char* ServiceName; /* this is just for debugging and logging purposes. */
49 extern ServiceFunctionHook *ServiceHookTable;
51 typedef struct CleanupFunctionHook CleanupFunctionHook;
52 struct CleanupFunctionHook {
53 CleanupFunctionHook *next;
54 void (*h_function_pointer) (void);
56 extern CleanupFunctionHook *CleanupHookTable;
59 typedef struct __LogDebugEntry {
65 extern HashList *LogDebugEntryTable;
66 void initialize_server_extensions(void);
67 int DLoader_Exec_Cmd(char *cmdbuf);
68 char *Dynamic_Module_Init(void);
70 void CtdlDestroySessionHooks(void);
71 void PerformSessionHooks(int EventType);
73 int CheckTDAPVeto (int DBType, StrBuf *ErrMsg);
74 void CtdlDestroyTDAPVetoHooks(void);
76 void CtdlDestroyUserHooks(void);
77 void PerformUserHooks(struct ctdluser *usbuf, int EventType);
79 int PerformXmsgHooks(char *, char *, char *, char *);
80 void CtdlDestroyXmsgHooks(void);
84 void CtdlDestroyMessageHook(void);
85 int PerformMessageHooks(struct CtdlMessage *, recptypes *recps, int EventType);
88 void CtdlDestroyNetprocHooks(void);
89 int PerformNetprocHooks(struct CtdlMessage *, char *);
91 void CtdlDestroyRoomHooks(void);
92 int PerformRoomHooks(struct ctdlroom *);
95 void CtdlDestroyDeleteHooks(void);
96 void PerformDeleteHooks(char *, long);
99 void CtdlDestroyCleanupHooks(void);
101 void CtdlDestroyProtoHooks(void);
103 void CtdlDestroyServiceHook(void);
105 void CtdlDestroySearchHooks(void);
107 void CtdlDestroyFixedOutputHooks(void);
108 int PerformFixedOutputHooks(char *, char *, int);
110 void CtdlRegisterDebugFlagHook(const char *Name, long len, CtdlDbgFunction F, const int *);
111 void CtdlSetDebugLogFacilities(const char **Str, long n);
112 void CtdlDestroyDebugTable(void);
114 #endif /* SERV_EXTENSIONS_H */