New file. Provides standard sieve actions (all noops, so far).
Showing
1 changed file
with
76 additions
and
0 deletions
libsieve/actions.c
0 → 100644
1 | /* GNU mailutils - a suite of utilities for electronic mail | ||
2 | Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU Lesser General Public License as published by | ||
6 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU Lesser General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Lesser General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
17 | |||
18 | #ifdef HAVE_CONFIG_H | ||
19 | # include <config.h> | ||
20 | #endif | ||
21 | |||
22 | #include <stdio.h> | ||
23 | #include <stdlib.h> | ||
24 | #include <unistd.h> | ||
25 | #include <string.h> | ||
26 | #include <sieve.h> | ||
27 | |||
28 | int | ||
29 | sieve_action_stop (sieve_machine_t *mach, list_t *args) | ||
30 | { | ||
31 | } | ||
32 | |||
33 | int | ||
34 | sieve_action_keep (sieve_machine_t *mach, list_t *args) | ||
35 | { | ||
36 | } | ||
37 | |||
38 | int | ||
39 | sieve_action_discard (sieve_machine_t *mach, list_t *args) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | int | ||
44 | sieve_action_fileinto (sieve_machine_t *mach, list_t *args) | ||
45 | { | ||
46 | } | ||
47 | |||
48 | int | ||
49 | sieve_action_reject (sieve_machine_t *mach, list_t *args) | ||
50 | { | ||
51 | } | ||
52 | |||
53 | int | ||
54 | sieve_action_redirect (sieve_machine_t *mach, list_t *args) | ||
55 | { | ||
56 | } | ||
57 | |||
58 | sieve_data_type fileinto_args[] = { | ||
59 | SVT_STRING_LIST, | ||
60 | SVT_VOID | ||
61 | }; | ||
62 | |||
63 | void | ||
64 | sieve_register_standard_actions () | ||
65 | { | ||
66 | sieve_register_action ("stop", sieve_action_stop, NULL, NULL, 1); | ||
67 | sieve_register_action ("keep", sieve_action_keep, NULL, NULL, 1); | ||
68 | sieve_register_action ("discard", sieve_action_keep, NULL, NULL, 1); | ||
69 | sieve_register_action ("fileinto", sieve_action_keep, fileinto_args, | ||
70 | NULL, 1); | ||
71 | sieve_register_action ("reject", sieve_action_reject, fileinto_args, | ||
72 | NULL, 0); | ||
73 | sieve_register_action ("redirect", sieve_action_redirect, fileinto_args, | ||
74 | NULL, 0); | ||
75 | } | ||
76 |
-
Please register or sign in to post a comment