aboutsummaryrefslogtreecommitdiffstats
path: root/plugin.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-09-30 15:10:07 +0200
committerJohannes Berg <johannes@sipsolutions.net>2007-09-30 15:10:07 +0200
commit34ad5cf745e1a1c86243844433f9e2e202523a1e (patch)
tree21e57a8c54bacd21b483de0d500364f80f0ef9c4 /plugin.h
parentd30cef3c11f07889c2f8e86340b013174d28fc5c (diff)
downloaddovecot-antispam-34ad5cf745e1a1c86243844433f9e2e202523a1e.tar.gz
dovecot-antispam-34ad5cf745e1a1c86243844433f9e2e202523a1e.tar.xz
dovecot-antispam-34ad5cf745e1a1c86243844433f9e2e202523a1e.zip
seems to work
Diffstat (limited to 'plugin.h')
-rw-r--r--plugin.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/plugin.h b/plugin.h
index e55bd05..99126eb 100644
--- a/plugin.h
+++ b/plugin.h
@@ -2,14 +2,15 @@
#define _ANTISPAM_PLUGIN_H
#include <unistd.h>
+#include "lib.h"
#include "mempool.h"
-struct signature {
- struct signature *next;
- char *sig;
+struct strlist {
+ struct strlist *next;
+ const char *str;
};
-#ifdef CONFIG_PLUGIN_WANT_SIGNATURE
+#ifdef BACKEND_WANT_SIGNATURE
/*
* Call backend giving
* - pool: dovecot memory pool, will be freed afterwards
@@ -17,18 +18,21 @@ struct signature {
* - sigs: signatures, next == NULL terminates list
* -
*/
-int backend(pool_t pool, int spam, struct signature *sigs);
+bool backend(pool_t pool, bool spam, struct strlist *sigs);
#elif CONFIG_PLUGIN_WANT_MAIL
#error TODO: no support for pristine training yet
#else
#error BUILD SYSTEM ERROR
#endif
+void backend_init(pool_t pool);
+void backend_exit(void);
+
#ifdef CONFIG_DEBUG
void debug(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
#else
-static inline void
-debug(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)))
+static void debug(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
+static inline void debug(const char *fmt, ...)
{
}
#endif