initial message templates support
[claws.git] / src / filtering.h
blob113e33be0b4ddbe5d4690f0f0f5846debbb36b51
1 /*
2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2001 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #ifndef FILTER_NEW_H
22 #define FILTER_NEW_H
24 #include <glib.h>
25 #include "matcher.h"
26 #include "procmsg.h"
28 struct _FilteringAction {
29 gint type;
30 gint account_id;
31 gchar *destination;
32 gint labelcolor;
35 typedef struct _FilteringAction FilteringAction;
37 struct _FilteringProp {
38 MatcherList * matchers;
39 FilteringAction * action;
42 typedef struct _FilteringProp FilteringProp;
44 extern GSList * prefs_filtering;
47 FilteringAction * filteringaction_new(int type, int account_id,
48 gchar * destination,
49 gint labelcolor);
50 void filteringaction_free(FilteringAction * action);
51 FilteringAction * filteringaction_parse(gchar ** str);
53 FilteringProp * filteringprop_new(MatcherList * matchers,
54 FilteringAction * action);
55 void filteringprop_free(FilteringProp * prop);
57 FilteringProp * filteringprop_parse(gchar ** str);
60 void filter_msginfo(GSList * filtering_list, MsgInfo * info,
61 GHashTable *folder_table);
62 void filter_msginfo_move_or_delete(GSList * filtering_list, MsgInfo * info,
63 GHashTable *folder_table);
64 void filter_message(GSList * filtering_list, FolderItem * item,
65 gint msgnum, GHashTable *folder_table);
66 void filter_incoming_message(FolderItem *default_folder, const gchar *file_name,
67 GHashTable *folder_table);
69 gchar * filteringaction_to_string(FilteringAction * action);
70 void prefs_filtering_write_config(void);
71 void prefs_filtering_read_config(void);
72 gchar * filteringprop_to_string(FilteringProp * prop);
74 #endif