Fix error creation and warning
[claws.git] / src / plugins / spam_report / spam_report_prefs.h
blobf254c02d62c0b3e51f06f8c6b3859c608cfa9f6e
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
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.
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.
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.
21 #ifndef SPAMREPORTPREFS_H
22 #define SPAMREPORTPREFS_H
24 #include <glib.h>
26 #include "procmsg.h"
27 #include "passwordstore.h"
29 #define SPAM_REPORT_USERAGENT "Claws Mail SpamReport plugin "
31 typedef struct _SpamReportPrefs SpamReportPrefs;
33 typedef enum {
34 INTF_SIGNALSPAM,
35 INTF_SPAMCOP,
36 INTF_DEBIANSPAM,
37 INTF_LAST
38 } InterfaceId;
40 typedef enum {
41 INTF_HTTP,
42 INTF_HTTP_AUTH,
43 INTF_MAIL,
44 INTF_HTTP_GET,
45 INTF_NULL
46 } InterfaceType;
48 typedef struct _ReportInterface {
49 gchar *name;
50 InterfaceType type;
51 gchar *url;
52 gchar *body;
53 gboolean (*should_report)(MsgInfo *info);
54 } ReportInterface;
56 extern ReportInterface spam_interfaces[];
58 struct _SpamReportPrefs
60 gboolean enabled[INTF_LAST];
61 gchar *user[INTF_LAST];
62 gchar *pass[INTF_LAST];
65 extern SpamReportPrefs spamreport_prefs;
67 void spamreport_prefs_init(void);
68 void spamreport_prefs_done(void);
70 #define spamreport_passwd_set(id, pwd) \
71 passwd_store_set(PWS_PLUGIN, "SpamReport", id, pwd, FALSE)
72 #define spamreport_passwd_get(id) \
73 passwd_store_get(PWS_PLUGIN, "SpamReport", id)
75 #endif