]> code.citadel.org Git - citadel.git/blobdiff - citadel/include/ctdl_module.h
Now we name all the private contexts.
[citadel.git] / citadel / include / ctdl_module.h
index e5a544b73365ad9e73cb61311c1f59a3c192ffcf..97fdf7eb36ea1382cba23c183e2f330fe74aae7e 100644 (file)
@@ -3,6 +3,7 @@
 #ifndef CTDL_MODULE_H
 #define CTDL_MODULE_H
 
+#include <libcitadel.h>
 #include "server.h"
 #include "sysdep_decls.h"
 #include "msgbase.h"
@@ -138,5 +139,25 @@ void CtdlThreadAllocTSD(void);
 #define MYTID          (((ThreadTSD*)pthread_getspecific(ThreadKey))->tid)
 #define CT             (((ThreadTSD*)pthread_getspecific(ThreadKey))->self)
 
+/** return the current context list as an array and do it in a safe manner
+ * The returned data is a copy so only reading is useful
+ * The number of contexts is returned in count.
+ * Beware, this does not copy any of the data pointed to by the context.
+ * This means that you can not rely on things like the redirect buffer being valid.
+ * You must free the returned pointer when done.
+ */
+struct CitContext *CtdlGetContextArray (int *count);
+void CtdlFillPrivateContext(struct CitContext *context, char *name);
+
+
+
+/*
+ * CtdlGetCurrentMessageNumber()  -  Obtain the current highest message number in the system
+ * This provides a quick way to initialise a variable that might be used to indicate
+ * messages that should not be processed. EG. a new Sieve script will use this
+ * to record determine that messages older than this should not be processed.
+ * This function is defined in control.c
+ */
+long CtdlGetCurrentMessageNumber(void);
 
 #endif /* CTDL_MODULE_H */