RSSyl: Allow use of .netrc by libcurl. Bug/enhancement #3309, by Vincent Pelletier
[claws.git] / src / plugins / bsfilter / bsfilter.h
1 /*
2  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2009 Colin Leroy <colin@colino.net> and 
4  * the Claws Mail team
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  * 
19  */
20
21 #ifndef BSFILTER_H
22 #define BSFILTER_H 1
23
24 #include <glib.h>
25 #include "folder.h"
26
27 typedef struct _BsfilterConfig BsfilterConfig;
28
29 typedef void (*MessageCallback) (gchar *, gint total, gint done, gboolean thread_safe);
30
31 struct _BsfilterConfig
32 {
33         gboolean                 process_emails;
34         gboolean                 receive_spam;
35         gchar                   *save_folder;
36         guint                    max_size;
37         gchar                   *bspath;
38         gboolean                 whitelist_ab;
39         gchar                   *whitelist_ab_folder;
40         gboolean                 learn_from_whitelist;
41         gboolean                 mark_as_read;
42 };
43
44 BsfilterConfig *bsfilter_get_config           (void);
45 void                bsfilter_save_config              (void);
46 void                bsfilter_set_message_callback (MessageCallback callback);
47 gint bsfilter_gtk_init(void);
48 void bsfilter_gtk_done(void);
49 int bsfilter_learn(MsgInfo *msginfo, GSList *msglist, gboolean spam);
50 void bsfilter_register_hook(void);
51 void bsfilter_unregister_hook(void);
52 FolderItem *bsfilter_get_spam_folder(MsgInfo *msginfo);
53 #endif