From 32f545cdf031ebe3718791f18e8fb6b6141fd081 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 28 Aug 2009 20:21:54 -0400 Subject: Simplify EPlugin loading at startup. - Require all EPlugin and EPluginHook subtypes be registered before loading plugins. This drastically simplifies the EPlugin/EPluginHook negotiation. - Turn most EPluginHook subtypes into GTypeModules and register their types from an e_module_load() function (does not include shell hooks). - Convert EPluginLib and the Mono and Python bindings to GTypeModules and register their types from an e_module_load() function, and kill EPluginTypeHook. --- plugins/sa-junk-plugin/em-junk-filter.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'plugins/sa-junk-plugin/em-junk-filter.c') 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 #include #include -#include +#include #include #include @@ -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(); -- cgit v1.2.3