diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-10-01 22:16:00 +0200 |
---|---|---|
committer | Johannes Berg <johannes@sipsolutions.net> | 2007-10-01 22:16:00 +0200 |
commit | b359532647ccd3ac3221dcb37dca7bdb4cbb2e58 (patch) | |
tree | 19d4cf35186177294a565f06aafd6b918d20506d /antispam-plugin.h | |
parent | 6ea8c069b7df7cc37b8c8daa8cd220ad3ca1d57e (diff) | |
download | dovecot-antispam-b359532647ccd3ac3221dcb37dca7bdb4cbb2e58.tar.gz dovecot-antispam-b359532647ccd3ac3221dcb37dca7bdb4cbb2e58.tar.xz dovecot-antispam-b359532647ccd3ac3221dcb37dca7bdb4cbb2e58.zip |
use 'enum classification' instead of 'bool from_spam'
Diffstat (limited to '')
-rw-r--r-- | antispam-plugin.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/antispam-plugin.h b/antispam-plugin.h index de5dca3..7719262 100644 --- a/antispam-plugin.h +++ b/antispam-plugin.h @@ -9,18 +9,23 @@ struct antispam_transaction_context; -/* - * Call backend giving - * - pool: dovecot memory pool, will be freed afterwards - * - spam: whether mail comes from spam folder or not - * - sigs: signatures, next == NULL terminates list - * - - */ +enum classification { + CLASS_NOTSPAM, + CLASS_SPAM, +}; + void backend_init(pool_t pool); void backend_exit(void); +/* + * Handle mail; parameters are + * - t: transaction context + * - ast: transaction context from backend_start() + * - mail: the message + * - wanted: the wanted classification determined by the user + */ int backend_handle_mail(struct mailbox_transaction_context *t, struct antispam_transaction_context *ast, - struct mail *mail, bool from_spam); + struct mail *mail, enum classification wanted); struct antispam_transaction_context *backend_start(struct mailbox *box); void backend_rollback(struct antispam_transaction_context *ast); int backend_commit(struct mailbox_transaction_context *ctx, |