/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2002 Hiroyuki Yamamoto and the Sylpheed-Claws Team
+ * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef SPAMASSASSIN_H
typedef struct _SpamAssassinConfig SpamAssassinConfig;
+typedef void (*MessageCallback) (gchar *);
+
+typedef enum {
+ SPAMASSASSIN_DISABLED = 0,
+ SPAMASSASSIN_TRANSPORT_LOCALHOST = 1,
+ SPAMASSASSIN_TRANSPORT_TCP = 2,
+ SPAMASSASSIN_TRANSPORT_UNIX = 3,
+} SpamAssassinTransport;
+
struct _SpamAssassinConfig
{
- gboolean enable;
- gchar *hostname;
- guint port;
- guint max_size;
- gboolean receive_spam;
- gchar *save_folder;
+ SpamAssassinTransport transport;
+ gchar *hostname;
+ guint port;
+ gchar *socket;
+ gboolean receive_spam;
+ gchar *save_folder;
+ guint max_size;
+ guint timeout;
+ gchar *username;
};
-SpamAssassinConfig *spamassassin_get_config();
-void spamassassin_save_config();
-
+SpamAssassinConfig *spamassassin_get_config (void);
+void spamassassin_save_config (void);
+gint spamassassin_check_username (void);
+void spamassassin_set_message_callback (MessageCallback callback);
+gint spamassassin_gtk_init(void);
+void spamassassin_gtk_done(void);
+void spamassassin_learn(MsgInfo *msginfo, GSList *msglist, gboolean spam);
#endif