2006-02-27 [wwp] 2.0.0cvs86
[claws.git] / src / plugins / spamassassin / spamassassin.h
index c8736dc5641807a21079bd4be209d2ad8317dbb8..770a8f2a8d3174b8fc2c3bfe04a8cefdd3c1c890 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * 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
@@ -14,7 +14,7 @@
  *
  * 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
 
 #include <glib.h>
 
-extern gboolean spamassassin_enable;
-extern gchar *spamassassin_hostname;
-extern int spamassassin_port;
-extern int spamassassin_max_size;
-extern gboolean spamassassin_receive_spam;
-extern gchar *spamassassin_save_folder;
+typedef struct _SpamAssassinConfig SpamAssassinConfig;
 
-void spamassassin_save_config();
+typedef void (*MessageCallback) (gchar *);
 
+typedef enum {
+       SPAMASSASSIN_DISABLED            = 0,
+       SPAMASSASSIN_TRANSPORT_LOCALHOST = 1,
+       SPAMASSASSIN_TRANSPORT_TCP       = 2,
+       SPAMASSASSIN_TRANSPORT_UNIX      = 3,
+} SpamAssassinTransport;
+
+struct _SpamAssassinConfig
+{
+       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);
+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