2005-12-02 [paul] 1.9.100cvs55
[claws.git] / src / plugins / spamassassin / spamassassin.h
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2002 Hiroyuki Yamamoto and the Sylpheed-Claws Team
4  *
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.
9  *
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.
14  *
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.
18  */
19
20 #ifndef SPAMASSASSIN_H
21 #define SPAMASSASSIN_H 1
22
23 #include <glib.h>
24
25 typedef struct _SpamAssassinConfig SpamAssassinConfig;
26
27 typedef void (*MessageCallback) (gchar *);
28
29 typedef enum {
30         SPAMASSASSIN_DISABLED            = 0,
31         SPAMASSASSIN_TRANSPORT_LOCALHOST = 1,
32         SPAMASSASSIN_TRANSPORT_TCP       = 2,
33         SPAMASSASSIN_TRANSPORT_UNIX      = 3,
34 } SpamAssassinTransport;
35
36 struct _SpamAssassinConfig
37 {
38         SpamAssassinTransport    transport;
39         gchar                   *hostname;
40         guint                    port;
41         gchar                   *socket;
42         gboolean                 receive_spam;
43         gchar                   *save_folder;
44         guint                    max_size;
45         guint                    timeout;
46 };
47
48 SpamAssassinConfig *spamassassin_get_config           (void);
49 void                spamassassin_save_config          (void);
50 void                spamassassin_set_message_callback (MessageCallback callback);
51 gint spamassassin_gtk_init(void);
52 void spamassassin_gtk_done(void);
53
54 #endif