1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
4 * Radek Doulik <rodo@ximian.com>
6 * Copyright 2003 Ximian, Inc. (www.ximian.com)
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU Lesser General Public
10 * License as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
27 #include "camel-debug.h"
28 #include "camel-junk-plugin.h"
29 #include "camel-mime-message.h"
31 #define d(x) (camel_debug("junk")?(x):0)
34 camel_junk_plugin_get_name (CamelJunkPlugin *csp)
36 g_return_val_if_fail (csp->get_name != NULL, NULL);
38 d(fprintf (stderr, "camel_junk_plugin_get_namen"));
40 return csp->get_name (csp);
44 camel_junk_plugin_check_junk (CamelJunkPlugin *csp, CamelMimeMessage *message)
46 g_return_val_if_fail (csp->check_junk != NULL, FALSE);
48 d(fprintf (stderr, "camel_junk_plugin_check_junk\n"));
50 return csp->check_junk (csp, message);
54 camel_junk_plugin_report_junk (CamelJunkPlugin *csp, CamelMimeMessage *message)
56 d(fprintf (stderr, "camel_junk_plugin_report_junk\n"));
59 csp->report_junk (csp, message);
63 camel_junk_plugin_report_notjunk (CamelJunkPlugin *csp, CamelMimeMessage *message)
65 d(fprintf (stderr, "camel_junk_plugin_report_notjunk\n"));
67 if (csp->report_notjunk)
68 csp->report_notjunk (csp, message);
72 camel_junk_plugin_commit_reports (CamelJunkPlugin *csp)
74 d(fprintf (stderr, "camel_junk_plugin_commit_reports\n"));
76 if (csp->commit_reports)
77 csp->commit_reports (csp);
81 camel_junk_plugin_init (CamelJunkPlugin *csp)
83 d(fprintf (stderr, "camel_junk_plugin_init\n"));