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
23 #ifndef _CAMEL_JUNK_PLUGIN_H
24 #define _CAMEL_JUNK_PLUGIN_H
26 #define CAMEL_JUNK_PLUGIN(x) ((CamelJunkPlugin *) x)
30 typedef struct _CamelJunkPlugin CamelJunkPlugin;
31 struct _CamelMimeMessage;
33 struct _CamelJunkPlugin
35 /* junk filter human readable name, translated */
36 const char * (*get_name) (struct _CamelJunkPlugin *csp);
38 /* should be set to 1 */
41 /* when called, it should return TRUE if message is identified as junk,
43 int (*check_junk) (struct _CamelJunkPlugin *csp, struct _CamelMimeMessage *message);
45 /* called when user identified a message to be junk */
46 void (*report_junk) (struct _CamelJunkPlugin *csp, struct _CamelMimeMessage *message);
48 /* called when user identified a message not to be junk */
49 void (*report_notjunk) (struct _CamelJunkPlugin *csp, struct _CamelMimeMessage *message);
51 /* called after one or more junk/ham(s) reported */
52 void (*commit_reports) (struct _CamelJunkPlugin *csp);
54 /* called before all other calls to junk plugin for initialization */
55 void (*init) (struct _CamelJunkPlugin *csp);
58 const char * camel_junk_plugin_get_name (CamelJunkPlugin *csp);
59 int camel_junk_plugin_check_junk (CamelJunkPlugin *csp, struct _CamelMimeMessage *message);
60 void camel_junk_plugin_report_junk (CamelJunkPlugin *csp, struct _CamelMimeMessage *message);
61 void camel_junk_plugin_report_notjunk (CamelJunkPlugin *csp, struct _CamelMimeMessage *message);
62 void camel_junk_plugin_commit_reports (CamelJunkPlugin *csp);
63 void camel_junk_plugin_init (CamelJunkPlugin *csp);