1 /*
2  * e-mail-junk-filter.h
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
11  * for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program; if not, see <http://www.gnu.org/licenses/>.
15  *
16  */
17 
18 #if !defined (__LIBEMAIL_ENGINE_H_INSIDE__) && !defined (LIBEMAIL_ENGINE_COMPILATION)
19 #error "Only <libemail-engine/libemail-engine.h> should be included directly."
20 #endif
21 
22 #ifndef E_MAIL_JUNK_FILTER_H
23 #define E_MAIL_JUNK_FILTER_H
24 
25 #include <gtk/gtk.h>
26 #include <libebackend/libebackend.h>
27 
28 /* Standard GObject macros */
29 #define E_TYPE_MAIL_JUNK_FILTER \
30 	(e_mail_junk_filter_get_type ())
31 #define E_MAIL_JUNK_FILTER(obj) \
32 	(G_TYPE_CHECK_INSTANCE_CAST \
33 	((obj), E_TYPE_MAIL_JUNK_FILTER, EMailJunkFilter))
34 #define E_MAIL_JUNK_FILTER_CLASS(cls) \
35 	(G_TYPE_CHECK_CLASS_CAST \
36 	((cls), E_TYPE_MAIL_JUNK_FILTER, EMailJunkFilterClass))
37 #define E_IS_MAIL_JUNK_FILTER(obj) \
38 	(G_TYPE_CHECK_INSTANCE_TYPE \
39 	((obj), E_TYPE_MAIL_JUNK_FILTER))
40 #define E_IS_MAIL_JUNK_FILTER_CLASS(cls) \
41 	(G_TYPE_CHECK_CLASS_TYPE \
42 	((cls), E_TYPE_MAIL_JUNK_FILTER))
43 #define E_MAIL_JUNK_FILTER_GET_CLASS(obj) \
44 	(G_TYPE_INSTANCE_GET_CLASS \
45 	((obj), E_TYPE_MAIL_JUNK_FILTER, EMailJunkFilterClass))
46 
47 G_BEGIN_DECLS
48 
49 typedef struct _EMailJunkFilter EMailJunkFilter;
50 typedef struct _EMailJunkFilterClass EMailJunkFilterClass;
51 typedef struct _EMailJunkFilterPrivate EMailJunkFilterPrivate;
52 
53 struct _EMailJunkFilter {
54 	EExtension parent;
55 	EMailJunkFilterPrivate *priv;
56 };
57 
58 struct _EMailJunkFilterClass {
59 	EExtensionClass parent_class;
60 
61 	const gchar *filter_name;
62 	const gchar *display_name;
63 
64 	gboolean	(*available)		(EMailJunkFilter *junk_filter);
65 	GtkWidget *	(*new_config_widget)	(EMailJunkFilter *junk_filter);
66 };
67 
68 GType		e_mail_junk_filter_get_type	(void) G_GNUC_CONST;
69 gboolean	e_mail_junk_filter_available	(EMailJunkFilter *junk_filter);
70 GtkWidget *	e_mail_junk_filter_new_config_widget
71 						(EMailJunkFilter *junk_filter);
72 gint		e_mail_junk_filter_compare	(EMailJunkFilter *junk_filter_a,
73 						 EMailJunkFilter *junk_filter_b);
74 
75 G_END_DECLS
76 
77 #endif /* E_MAIL_JUNK_FILTER_H */
78