/src/pigeonhole/src/lib-sieve/plugins/duplicate/ext-duplicate.c
Line | Count | Source |
1 | | /* Copyright (c) 2002-2018 Pigeonhole authors, see the included COPYING file |
2 | | */ |
3 | | |
4 | | /* Extension duplicate |
5 | | * ------------------- |
6 | | * |
7 | | * Authors: Stephan Bosch |
8 | | * Specification: vendor-defined; spec-bosch-sieve-duplicate |
9 | | * Implementation: full |
10 | | * Status: experimental |
11 | | * |
12 | | */ |
13 | | |
14 | | #include "lib.h" |
15 | | |
16 | | #include "sieve-extensions.h" |
17 | | #include "sieve-commands.h" |
18 | | #include "sieve-binary.h" |
19 | | |
20 | | #include "sieve-validator.h" |
21 | | |
22 | | #include "ext-duplicate-common.h" |
23 | | |
24 | | /* |
25 | | * Extensions |
26 | | */ |
27 | | |
28 | | static bool ext_duplicate_validator_load |
29 | | (const struct sieve_extension *ext, struct sieve_validator *valdtr); |
30 | | |
31 | | const struct sieve_extension_def duplicate_extension = { |
32 | | .name = "duplicate", |
33 | | .load = ext_duplicate_load, |
34 | | .unload = ext_duplicate_unload, |
35 | | .validator_load = ext_duplicate_validator_load, |
36 | | SIEVE_EXT_DEFINE_OPERATION(tst_duplicate_operation) |
37 | | }; |
38 | | |
39 | | /* |
40 | | * Validation |
41 | | */ |
42 | | |
43 | | static bool ext_duplicate_validator_load |
44 | | (const struct sieve_extension *ext, struct sieve_validator *valdtr) |
45 | 0 | { |
46 | | /* Register duplicate test */ |
47 | 0 | sieve_validator_register_command(valdtr, ext, &tst_duplicate); |
48 | |
|
49 | 0 | return TRUE; |
50 | 0 | } |
51 | | |