From f7a3ced780d1f91a6e400b4909f830cd2efefd8f Mon Sep 17 00:00:00 2001 From: Stephan Bosch <stephan@rename-it.nl> Date: Thu, 7 Jan 2010 02:56:11 +0100 Subject: [PATCH] Variables extension: finished namespaces support. --- .../plugins/variables/ext-variables-namespaces.c | 2 +- src/lib-sieve/plugins/variables/sieve-ext-variables.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/lib-sieve/plugins/variables/ext-variables-namespaces.c b/src/lib-sieve/plugins/variables/ext-variables-namespaces.c index 9e5220acb..69b2cf5d4 100644 --- a/src/lib-sieve/plugins/variables/ext-variables-namespaces.c +++ b/src/lib-sieve/plugins/variables/ext-variables-namespaces.c @@ -177,7 +177,7 @@ const struct sieve_operand_def namespace_variable_operand = { &namespace_variable_interface }; -void ext_variables_opr_namespace_variable_emit +void sieve_variables_opr_namespace_variable_emit (struct sieve_binary *sbin, const struct sieve_extension *var_ext, const struct sieve_extension *ext, const struct sieve_variables_namespace_def *nspc_def) diff --git a/src/lib-sieve/plugins/variables/sieve-ext-variables.h b/src/lib-sieve/plugins/variables/sieve-ext-variables.h index 1013c8f61..64c83d946 100644 --- a/src/lib-sieve/plugins/variables/sieve-ext-variables.h +++ b/src/lib-sieve/plugins/variables/sieve-ext-variables.h @@ -103,6 +103,9 @@ struct sieve_variables_namespace_def { const char *field_name); }; +#define SIEVE_VARIABLES_DEFINE_NAMESPACE(OP) SIEVE_EXT_DEFINE_OBJECT(OP) +#define SIEVE_VARIABLES_DEFINE_NAMESPACES(OPS) SIEVE_EXT_DEFINE_OBJECTS(OPS) + struct sieve_variables_namespace { struct sieve_object object; @@ -114,6 +117,13 @@ void sieve_variables_namespace_register const struct sieve_extension *ext, const struct sieve_variables_namespace_def *nspc_def); +extern const struct sieve_operand_class sieve_variables_namespace_operand_class; + +void sieve_variables_opr_namespace_variable_emit +(struct sieve_binary *sbin, const struct sieve_extension *var_ext, + const struct sieve_extension *ext, + const struct sieve_variables_namespace_def *nspc_def); + /* Iteration over all declared variables */ struct sieve_variable_scope_iter; -- GitLab