aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sa-junk-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sa-junk-plugin')
-rw-r--r--plugins/sa-junk-plugin/Makefile.am6
-rw-r--r--plugins/sa-junk-plugin/em-junk-filter.c18
-rw-r--r--plugins/sa-junk-plugin/org-gnome-sa-junk-plugin.eplug.xml16
3 files changed, 22 insertions, 18 deletions
diff --git a/plugins/sa-junk-plugin/Makefile.am b/plugins/sa-junk-plugin/Makefile.am
index eebfdf0c26..66e31a0d6b 100644
--- a/plugins/sa-junk-plugin/Makefile.am
+++ b/plugins/sa-junk-plugin/Makefile.am
@@ -1,5 +1,6 @@
AM_CPPFLAGS = \
-I$(top_srcdir) \
+ -I$(top_srcdir)/widgets \
$(EVOLUTION_MAIL_CFLAGS)
@EVO_PLUGIN_RULE@
@@ -10,6 +11,11 @@ plugin_LTLIBRARIES = liborg-gnome-sa-junk-plugin.la
liborg_gnome_sa_junk_plugin_la_SOURCES = em-junk-filter.c
liborg_gnome_sa_junk_plugin_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_sa_junk_plugin_la_LIBADD = \
+ $(top_builddir)/mail/libevolution-mail.la \
+ $(top_builddir)/e-util/libeutil.la \
+ $(EVOLUTION_MAIL_LIBS) \
+ $(GNOME_PLATFORM_LIBS)
BUILT_SOURCES = $(plugin_DATA) $(error_DATA)
diff --git a/plugins/sa-junk-plugin/em-junk-filter.c b/plugins/sa-junk-plugin/em-junk-filter.c
index 74010f2555..ff38f18d6a 100644
--- a/plugins/sa-junk-plugin/em-junk-filter.c
+++ b/plugins/sa-junk-plugin/em-junk-filter.c
@@ -42,7 +42,7 @@
#include <camel/camel-stream-fs.h>
#include <camel/camel-stream-mem.h>
#include <camel/camel-i18n.h>
-#include <mail/em-junk-hook.h>
+#include <mail/em-junk.h>
#include <mail/em-utils.h>
#include <e-util/e-mktemp.h>
@@ -58,10 +58,10 @@ static pthread_mutex_t em_junk_sa_report_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t em_junk_sa_preferred_socket_path_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t em_junk_sa_spamd_restart_lock = PTHREAD_MUTEX_INITIALIZER;
-gint e_plugin_lib_enable (EPluginLib *ep, gint enable);
-gboolean em_junk_sa_check_junk (EPlugin *ep, EMJunkHookTarget *target);
-void em_junk_sa_report_junk (EPlugin *ep, EMJunkHookTarget *target);
-void em_junk_sa_report_non_junk (EPlugin *ep, EMJunkHookTarget *target);
+gint e_plugin_lib_enable (EPlugin *ep, gint enable);
+gboolean em_junk_sa_check_junk (EPlugin *ep, EMJunkTarget *target);
+void em_junk_sa_report_junk (EPlugin *ep, EMJunkTarget *target);
+void em_junk_sa_report_non_junk (EPlugin *ep, EMJunkTarget *target);
void em_junk_sa_commit_reports (EPlugin *ep);
gpointer em_junk_sa_validate_binary (EPlugin *ep);
GtkWidget *org_gnome_sa_use_remote_tests (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data);
@@ -571,7 +571,7 @@ em_junk_sa_respawn_spamd ()
}
gboolean
-em_junk_sa_check_junk(EPlugin *ep, EMJunkHookTarget *target)
+em_junk_sa_check_junk(EPlugin *ep, EMJunkTarget *target)
{
GByteArray *out = NULL;
const gchar *argv[7];
@@ -675,7 +675,7 @@ get_spamassassin_version ()
}
void
-em_junk_sa_report_junk (EPlugin *ep, EMJunkHookTarget *target)
+em_junk_sa_report_junk (EPlugin *ep, EMJunkTarget *target)
{
const gchar *sync_op =
(get_spamassassin_version () >= 3)
@@ -715,7 +715,7 @@ em_junk_sa_report_junk (EPlugin *ep, EMJunkHookTarget *target)
}
void
-em_junk_sa_report_non_junk (EPlugin *ep, EMJunkHookTarget *target)
+em_junk_sa_report_non_junk (EPlugin *ep, EMJunkTarget *target)
{
const gchar *sync_op =
(get_spamassassin_version () >= 3)
@@ -812,7 +812,7 @@ em_junk_sa_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry,
}
gint
-e_plugin_lib_enable (EPluginLib *ep, gint enable)
+e_plugin_lib_enable (EPlugin *ep, gint enable)
{
em_junk_sa_init();
diff --git a/plugins/sa-junk-plugin/org-gnome-sa-junk-plugin.eplug.xml b/plugins/sa-junk-plugin/org-gnome-sa-junk-plugin.eplug.xml
index 3403a3b8aa..83ed170c74 100644
--- a/plugins/sa-junk-plugin/org-gnome-sa-junk-plugin.eplug.xml
+++ b/plugins/sa-junk-plugin/org-gnome-sa-junk-plugin.eplug.xml
@@ -6,14 +6,12 @@
<_description>Filter junk messages using SpamAssassin.</_description>
<author name="Vivek Jain" email="jvivek@novell.com"/>
<hook class="org.gnome.evolution.mail.junk:1.0">
- <group id="EMJunk" >
- <item name="SpamAssassin"
- check_junk="em_junk_sa_check_junk"
- report_junk="em_junk_sa_report_junk"
- report_non_junk="em_junk_sa_report_non_junk"
- commit_reports="em_junk_sa_commit_reports"
- validate_binary="em_junk_sa_validate_binary"/>
- </group>
+ <interface name="SpamAssassin"
+ check_junk="em_junk_sa_check_junk"
+ report_junk="em_junk_sa_report_junk"
+ report_non_junk="em_junk_sa_report_non_junk"
+ commit_reports="em_junk_sa_commit_reports"
+ validate_binary="em_junk_sa_validate_binary"/>
</hook>
<!-- hook into the 'mail properties' menu -->
<hook class="org.gnome.evolution.mail.config:1.0">
@@ -21,6 +19,6 @@
<item type="section_table" path="40.junk/10.options" _label="SpamAssassin Options"/>
<item type="item_table" path="40.junk/20.options" factory="org_gnome_sa_use_remote_tests"/>
</group>
- </hook>
+ </hook>
</e-plugin>
</e-plugin-list>