~ubuntu-dev/ubuntu/lucid/dovecot/lucid-201002101901

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* Copyright (c) 2002-2009 Dovecot Sieve authors, see the included COPYING file
 */

/* Extension variables 
 * -------------------
 *
 * Authors: Stephan Bosch
 * Specification: RFC 5183
 * Implementation: full
 * Status: experimental, not thoroughly tested
 *
 */
 
#include "lib.h"
#include "str.h"
#include "unichar.h"

#include "sieve-extensions.h"
#include "sieve-commands.h"
#include "sieve-binary.h"
#include "sieve-interpreter.h"

#include "sieve-validator.h"

#include "ext-environment-common.h"

/* 
 * Extension 
 */

static bool ext_environment_validator_load(struct sieve_validator *validator);

static int ext_my_id = -1;
	
const struct sieve_extension environment_extension = { 
	"environment", 
	&ext_my_id,
	ext_environment_init, 
	ext_environment_deinit,
	ext_environment_validator_load,
	NULL, NULL, NULL, NULL, NULL,
	SIEVE_EXT_DEFINE_OPERATION(tst_environment_operation), 
	SIEVE_EXT_DEFINE_NO_OPERANDS
};

static bool ext_environment_validator_load
	(struct sieve_validator *validator)
{
	sieve_validator_register_command(validator, &tst_environment);
	
	return TRUE;
}