From f7548d6d28c313cf80e6f3ef89aed16a19815df1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 11:51:24 +0200 Subject: Adding upstream version 1:2.3.19.1+dfsg1. Signed-off-by: Daniel Baumann --- .../src/plugins/doveadm-sieve/doveadm-sieve-cmd.h | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 pigeonhole/src/plugins/doveadm-sieve/doveadm-sieve-cmd.h (limited to 'pigeonhole/src/plugins/doveadm-sieve/doveadm-sieve-cmd.h') diff --git a/pigeonhole/src/plugins/doveadm-sieve/doveadm-sieve-cmd.h b/pigeonhole/src/plugins/doveadm-sieve/doveadm-sieve-cmd.h new file mode 100644 index 0000000..1296701 --- /dev/null +++ b/pigeonhole/src/plugins/doveadm-sieve/doveadm-sieve-cmd.h @@ -0,0 +1,43 @@ +#ifndef DOVEADM_SIEVE_CMD_H +#define DOVEADM_SIEVE_CMD_H + +struct doveadm_sieve_cmd_context; + +struct doveadm_sieve_cmd_vfuncs { + /* This is the main function which performs all the work for the + command. This is called once per each user. */ + int (*run)(struct doveadm_sieve_cmd_context *ctx); +}; + +struct doveadm_sieve_cmd_context { + struct doveadm_mail_cmd_context ctx; + + struct sieve_instance *svinst; + struct sieve_storage *storage; + + struct doveadm_sieve_cmd_vfuncs v; +}; + +void doveadm_sieve_cmd_failed_error +(struct doveadm_sieve_cmd_context *ctx, enum sieve_error error); +void doveadm_sieve_cmd_failed_storage +(struct doveadm_sieve_cmd_context *ctx, struct sieve_storage *storage); + +#define doveadm_sieve_cmd_alloc(type) \ + (type *)doveadm_sieve_cmd_alloc_size(sizeof(type)) +struct doveadm_sieve_cmd_context * +doveadm_sieve_cmd_alloc_size(size_t size); + +void doveadm_sieve_cmd_scriptnames_check(const char *const args[]); + +extern struct doveadm_cmd_ver2 doveadm_sieve_cmd_list; +extern struct doveadm_cmd_ver2 doveadm_sieve_cmd_get; +extern struct doveadm_cmd_ver2 doveadm_sieve_cmd_put; +extern struct doveadm_cmd_ver2 doveadm_sieve_cmd_delete; +extern struct doveadm_cmd_ver2 doveadm_sieve_cmd_activate; +extern struct doveadm_cmd_ver2 doveadm_sieve_cmd_deactivate; +extern struct doveadm_cmd_ver2 doveadm_sieve_cmd_rename; + +void doveadm_sieve_cmds_init(void); + +#endif -- cgit v1.2.3