2667a3cd61382fb2631639bb7de2cf2dfc198485
[claws.git] / src / plugins / spam_report / spam_report_prefs.h
1 /*
2  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2007 Colin Leroy <colin@colino.net>
4  * and 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, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20
21 #ifndef SPAMREPORTPREFS_H
22 #define SPAMREPORTPREFS_H
23
24 #include <glib.h>
25
26 #include "procmsg.h"
27
28 #define SPAM_REPORT_USERAGENT "Claws Mail SpamReport plugin "
29
30 typedef struct _SpamReportPrefs SpamReportPrefs;
31
32 typedef enum {
33         INTF_SIGNALSPAM,
34         INTF_SPAMCOP,
35         INTF_DEBIANSPAM,
36         INTF_LAST
37 } InterfaceId;
38
39 typedef enum {
40         INTF_HTTP,
41         INTF_HTTP_AUTH,
42         INTF_MAIL,
43         INTF_HTTP_GET,
44         INTF_NULL
45 } InterfaceType;
46
47 typedef struct _ReportInterface {
48         gchar *name;
49         InterfaceType type;
50         gchar *url;
51         gchar *body;
52         gboolean (*should_report)(MsgInfo *info);
53 } ReportInterface;
54
55 extern ReportInterface spam_interfaces[];
56
57 struct _SpamReportPrefs
58 {
59         gboolean enabled[INTF_LAST];
60         gchar *user[INTF_LAST];
61         gchar *pass[INTF_LAST];
62 };
63
64 extern SpamReportPrefs spamreport_prefs;
65
66 void spamreport_prefs_init(void);
67 void spamreport_prefs_done(void);
68 void spamreport_master_password_change(const gchar *oldp, const gchar *newp);
69
70 #endif