2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2006 Hiroyuki Yamamoto & The Sylpheed Claws Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 struct _FilteringAction {
36 typedef struct _FilteringAction FilteringAction;
38 struct _FilteringProp {
42 MatcherList * matchers;
46 typedef struct _FilteringProp FilteringProp;
48 /* extern GSList * prefs_filtering; */
51 FilteringAction * filteringaction_new(int type, int account_id,
53 gint labelcolor, gint score);
54 void filteringaction_free(FilteringAction *action);
55 FilteringAction * filteringaction_parse(gchar **str);
56 gboolean filteringaction_apply_action_list (GSList *action_list, MsgInfo *info);
58 FilteringProp * filteringprop_new(gboolean enabled,
61 MatcherList *matchers,
63 void filteringprop_free(FilteringProp *prop);
65 FilteringProp * filteringprop_parse(gchar **str);
67 void filter_msginfo_move_or_delete(GSList *filtering_list, MsgInfo *info);
68 gboolean filter_message_by_msginfo(GSList *flist, MsgInfo *info, PrefsAccount *ac_prefs);
70 gchar * filteringaction_to_string(gchar *dest, gint destlen, FilteringAction *action);
71 void prefs_filtering_write_config(void);
72 void prefs_filtering_read_config(void);
73 gchar * filteringaction_list_to_string(GSList * action_list);
74 gchar * filteringprop_to_string(FilteringProp *prop);
76 void prefs_filtering_clear(void);
77 void prefs_filtering_clear_folder(Folder *folder);
78 void prefs_filtering_free(GSList *prefs_filtering);
80 FilteringProp * filteringprop_copy(FilteringProp *src);
81 void filtering_move_and_copy_msgs(GSList *msglist);
82 void filtering_move_and_copy_msg(MsgInfo *msginfo);
83 extern GSList * filtering_rules;
84 extern GSList * pre_global_processing;
85 extern GSList * post_global_processing;