add whether we're in which eventloop / a worker thread to the log output.
[citadel.git] / citadel / serv_extensions.h
index 59dcfec3a3b93d11d3e064b1351eb3b99a016d17..136be62f1b85d454ec8e17cd01dedefb83b325ce 100644 (file)
  */
 
 typedef void (*CtdlDbgFunction) (const int);
+
+extern int DebugModules;
+#define MDBGLOG(LEVEL) if ((LEVEL != LOG_DEBUG) || (DebugModules != 0))
+
+#define MOD_syslog(LEVEL, FORMAT, ...)                                 \
+       MDBGLOG(LEVEL) syslog(LEVEL,                                    \
+                             "%s Modules: " FORMAT, IOSTR, __VA_ARGS__)
+
+#define MODM_syslog(LEVEL, FORMAT)                             \
+       MDBGLOG(LEVEL) syslog(LEVEL,                            \
+                             "%s Modules: " FORMAT, IOSTR);
+
+
 
 
 /*
@@ -44,6 +56,13 @@ struct CleanupFunctionHook {
 extern CleanupFunctionHook *CleanupHookTable;
 
 
+typedef struct __LogDebugEntry {
+       CtdlDbgFunction F;
+       const char *Name;
+       long Len;
+       const int *LogP;
+} LogDebugEntry;
+extern HashList *LogDebugEntryTable;
 void initialize_server_extensions(void);
 int DLoader_Exec_Cmd(char *cmdbuf);
 char *Dynamic_Module_Init(void);
@@ -51,6 +70,9 @@ char *Dynamic_Module_Init(void);
 void CtdlDestroySessionHooks(void);
 void PerformSessionHooks(int EventType);
 
+int CheckTDAPVeto (int DBType, StrBuf *ErrMsg);
+void CtdlDestroyTDAPVetoHooks(void);
+
 void CtdlDestroyUserHooks(void);
 void PerformUserHooks(struct ctdluser *usbuf, int EventType);
 
@@ -60,7 +82,7 @@ void CtdlDestroyXmsgHooks(void);
 
 
 void CtdlDestroyMessageHook(void);
-int PerformMessageHooks(struct CtdlMessage *, int EventType);
+int PerformMessageHooks(struct CtdlMessage *, recptypes *recps, int EventType);
 
 
 void CtdlDestroyNetprocHooks(void);