1
/* Copyright (c) 2002-2009 Dovecot Sieve authors, see the included COPYING file
4
#ifndef __EXT_ENOTIFY_COMMON_H
5
#define __EXT_ENOTIFY_COMMON_H
7
#include "sieve-ext-variables.h"
9
#include "sieve-ext-enotify.h"
15
extern const struct sieve_extension enotify_extension;
16
extern const struct sieve_extension_capabilities notify_capabilities;
22
extern const struct sieve_command notify_command;
24
/* Codes for optional arguments */
26
enum cmd_notify_optional {
29
CMD_NOTIFY_OPT_OPTIONS,
30
CMD_NOTIFY_OPT_MESSAGE,
31
CMD_NOTIFY_OPT_IMPORTANCE
38
extern const struct sieve_command valid_notify_method_test;
39
extern const struct sieve_command notify_method_capability_test;
45
extern const struct sieve_operation notify_operation;
46
extern const struct sieve_operation valid_notify_method_operation;
47
extern const struct sieve_operation notify_method_capability_operation;
49
enum ext_variables_opcode {
50
EXT_ENOTIFY_OPERATION_NOTIFY,
51
EXT_ENOTIFY_OPERATION_VALID_NOTIFY_METHOD,
52
EXT_ENOTIFY_OPERATION_NOTIFY_METHOD_CAPABILITY
59
extern const struct sieve_operand encodeurl_operand;
65
extern const struct sieve_variables_modifier encodeurl_modifier;
71
extern const struct sieve_enotify_method mailto_notify;
73
void ext_enotify_methods_init(void);
74
void ext_enotify_methods_deinit(void);
76
const struct sieve_enotify_method *ext_enotify_method_find
77
(const char *identifier);
83
bool ext_enotify_compile_check_arguments
84
(struct sieve_validator *valdtr, struct sieve_ast_argument *uri_arg,
85
struct sieve_ast_argument *msg_arg, struct sieve_ast_argument *from_arg,
86
struct sieve_ast_argument *options_arg);
92
bool ext_enotify_runtime_method_validate
93
(const struct sieve_runtime_env *renv, unsigned int source_line,
94
string_t *method_uri);
96
const char *ext_enotify_runtime_get_method_capability
97
(const struct sieve_runtime_env *renv, unsigned int source_line,
98
string_t *method_uri, const char *capability);
100
int ext_enotify_runtime_check_operands
101
(const struct sieve_runtime_env *renv, unsigned int source_line,
102
string_t *method_uri, string_t *message, string_t *from,
103
struct sieve_coded_stringlist *options,
104
const struct sieve_enotify_method **method_r, void **method_context);
110
struct sieve_enotify_print_env {
111
const struct sieve_result_print_env *result_penv;
118
struct sieve_enotify_log {
119
struct sieve_error_handler *ehandler;
121
const char *location;
125
#endif /* __EXT_ENOTIFY_COMMON_H */