aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/camel-junk-plugin.c9
-rw-r--r--camel/camel-junk-plugin.h4
3 files changed, 19 insertions, 0 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index b67943a9a9..a9b3daf8aa 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2004-10-12 Radek Doulik <rodo@ximian.com>
+
+ * camel-junk-plugin.c: new init method implementation
+
+ * camel-junk-plugin.h: added junk plugin init declaration
+
2004-11-10 Not Zed <NotZed@Ximian.com>
** See bug #69109.
diff --git a/camel/camel-junk-plugin.c b/camel/camel-junk-plugin.c
index a203b45c3e..52a11ef34b 100644
--- a/camel/camel-junk-plugin.c
+++ b/camel/camel-junk-plugin.c
@@ -73,3 +73,12 @@ camel_junk_plugin_commit_reports (CamelJunkPlugin *csp)
if (csp->commit_reports)
(*csp->commit_reports) ();
}
+
+void
+camel_junk_plugin_init (CamelJunkPlugin *csp)
+{
+ d(fprintf (stderr, "camel_junk_plugin_init\n");)
+
+ if (csp->init)
+ (*csp->init) ();
+}
diff --git a/camel/camel-junk-plugin.h b/camel/camel-junk-plugin.h
index 79d1bf6331..fe28a8ee73 100644
--- a/camel/camel-junk-plugin.h
+++ b/camel/camel-junk-plugin.h
@@ -48,6 +48,9 @@ struct _CamelJunkPlugin
/* called after one or more junk/ham(s) reported */
void (*commit_reports) (void);
+
+ /* called before all other calls to junk plugin for initialization */
+ void (*init) (void);
};
const char * camel_junk_plugin_get_name (CamelJunkPlugin *csp);
@@ -55,5 +58,6 @@ int camel_junk_plugin_check_junk (CamelJunkPlugin *csp, struct _CamelMimeMessage
void camel_junk_plugin_report_junk (CamelJunkPlugin *csp, struct _CamelMimeMessage *message);
void camel_junk_plugin_report_notjunk (CamelJunkPlugin *csp, struct _CamelMimeMessage *message);
void camel_junk_plugin_commit_reports (CamelJunkPlugin *csp);
+void camel_junk_plugin_init (CamelJunkPlugin *csp);
#endif