22
22
struct sieve_instance *sieve_init
23
(const struct sieve_environment *env, void *context, bool debug);
23
(const struct sieve_environment *env, const struct sieve_callbacks *callbacks,
24
void *context, bool debug);
26
27
* Frees all memory allocated by the sieve engine.
54
55
* Compiles the script into a binary.
56
57
struct sieve_binary *sieve_compile
57
(struct sieve_instance *svinst, const char *script_path,
58
(struct sieve_instance *svinst, const char *script_location,
58
59
const char *script_name, struct sieve_error_handler *ehandler,
59
60
enum sieve_compile_flags flags, enum sieve_error *error_r);
70
71
(struct sieve_instance *svinst, const char *bin_path,
71
72
enum sieve_error *error_r);
76
* First tries to open the binary version of the specified script and if it
77
* does not exist or if it contains errors, the script is (re-)compiled. Note
78
* that errors in the bytecode are caught only at runtime.
80
struct sieve_binary *sieve_open_script
81
(struct sieve_script *script, struct sieve_error_handler *ehandler,
82
enum sieve_compile_flags flags, enum sieve_error *error_r);
75
86
* First tries to open the binary version of the specified script and if it
77
88
* that errors in the bytecode are caught only at runtime.
79
90
struct sieve_binary *sieve_open
80
(struct sieve_instance *svinst, const char *script_path,
91
(struct sieve_instance *svinst, const char *script_location,
81
92
const char *script_name, struct sieve_error_handler *ehandler,
82
93
enum sieve_compile_flags flags, enum sieve_error *error_r);
97
* Saves the binary as the file indicated by the path parameter. This function
98
* will not write the binary to disk when it was loaded from the indicated
99
* bin_path, unless update is TRUE.
102
(struct sieve_binary *sbin, const char *bin_path, bool update,
103
mode_t save_mode, enum sieve_error *error_r);
86
* Saves the binary as the file indicated by the path parameter. If
87
* path is NULL, it chooses the default path relative to the original
88
* script. This function will not write the binary to disk when it was
89
* loaded from the indicated bin_path, unless update is TRUE.
107
* Saves the binary to the default location. This function will not overwrite
108
* the binary it was loaded earlier from the default location, unless update
92
(struct sieve_binary *sbin, const char *bin_path, bool update,
93
enum sieve_error *error_r);
112
(struct sieve_binary *sbin, bool update, enum sieve_error *error_r);