ext-enotify-common.h [plain text]
#ifndef __EXT_ENOTIFY_COMMON_H
#define __EXT_ENOTIFY_COMMON_H
#include "lib.h"
#include "array.h"
#include "sieve-common.h"
#include "sieve-ext-variables.h"
#include "sieve-ext-enotify.h"
extern const struct sieve_extension_def enotify_extension;
extern const struct sieve_extension_capabilities notify_capabilities;
struct ext_enotify_context {
const struct sieve_extension *var_ext;
ARRAY_DEFINE(notify_methods, struct sieve_enotify_method);
};
extern const struct sieve_command_def notify_command;
enum cmd_notify_optional {
CMD_NOTIFY_OPT_END,
CMD_NOTIFY_OPT_FROM,
CMD_NOTIFY_OPT_OPTIONS,
CMD_NOTIFY_OPT_MESSAGE,
CMD_NOTIFY_OPT_IMPORTANCE
};
extern const struct sieve_command_def valid_notify_method_test;
extern const struct sieve_command_def notify_method_capability_test;
extern const struct sieve_operation_def notify_operation;
extern const struct sieve_operation_def valid_notify_method_operation;
extern const struct sieve_operation_def notify_method_capability_operation;
enum ext_variables_opcode {
EXT_ENOTIFY_OPERATION_NOTIFY,
EXT_ENOTIFY_OPERATION_VALID_NOTIFY_METHOD,
EXT_ENOTIFY_OPERATION_NOTIFY_METHOD_CAPABILITY
};
extern const struct sieve_operand_def encodeurl_operand;
extern const struct sieve_variables_modifier_def encodeurl_modifier;
void ext_enotify_methods_init
(struct sieve_instance *svinst, struct ext_enotify_context *ectx);
void ext_enotify_methods_deinit
(struct ext_enotify_context *ectx);
const struct sieve_enotify_method *ext_enotify_method_find
(const struct sieve_extension *ntfy_ext, const char *identifier);
bool ext_enotify_compile_check_arguments
(struct sieve_validator *valdtr, struct sieve_command *cmd,
struct sieve_ast_argument *uri_arg, struct sieve_ast_argument *msg_arg,
struct sieve_ast_argument *from_arg,
struct sieve_ast_argument *options_arg);
bool ext_enotify_runtime_method_validate
(const struct sieve_runtime_env *renv,
string_t *method_uri);
const char *ext_enotify_runtime_get_method_capability
(const struct sieve_runtime_env *renv,
string_t *method_uri, const char *capability);
int ext_enotify_runtime_check_operands
(const struct sieve_runtime_env *renv,
string_t *method_uri, string_t *message, string_t *from,
struct sieve_stringlist *options,
const struct sieve_enotify_method **method_r, void **method_context);
struct sieve_enotify_print_env {
const struct sieve_result_print_env *result_penv;
};
#endif