2006-03-10 [colin] 2.0.0cvs130
[claws.git] / src / plugins / spamassassin / spamassassin.h
index d2d310d2704b7e56a8a48ec4aa39de829076b207..671b5916c4389920636b28d0d11624c72f09bfde 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
 
 typedef struct _SpamAssassinConfig SpamAssassinConfig;
 
+typedef void (*MessageCallback) (gchar *);
+
+typedef enum {
+       SPAMASSASSIN_DISABLED            = 0, /* unused, just for compatibility */
+       SPAMASSASSIN_TRANSPORT_LOCALHOST = 1,
+       SPAMASSASSIN_TRANSPORT_TCP       = 2,
+       SPAMASSASSIN_TRANSPORT_UNIX      = 3,
+} SpamAssassinTransport;
+
 struct _SpamAssassinConfig
 {
-       gboolean         enable;
-       gchar           *hostname;
-       guint            port;
-       gboolean         receive_spam;
-       gchar           *save_folder;
-       guint            max_size;
-       guint            timeout;
+       gboolean                 enable;
+       SpamAssassinTransport    transport;
+       gchar                   *hostname;
+       guint                    port;
+       gchar                   *socket;
+       gboolean                 process_emails;
+       gboolean                 receive_spam;
+       gchar                   *save_folder;
+       guint                    max_size;
+       guint                    timeout;
+       gchar                   *username;
 };
 
-SpamAssassinConfig *spamassassin_get_config    (void);
-void               spamassassin_save_config    (void);
-
+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);
+int spamassassin_learn(MsgInfo *msginfo, GSList *msglist, gboolean spam);
+void spamassassin_register_hook(void);
+void spamassassin_unregister_hook(void);
 #endif