1 /* $Id$ */
2 /* Copyright (c) 2012 Pierre Pronchery <khorben@defora.org> */
3 /* This file is part of DeforaOS Desktop Mailer */
4 /* This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, version 3 of the License.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program.  If not, see <http://www.gnu.org/licenses/>. */
15 
16 
17 
18 #ifndef DESKTOP_MAILER_PLUGIN_H
19 # define DESKTOP_MAILER_PLUGIN_H
20 
21 # include <gtk/gtk.h>
22 # include "mailer.h"
23 
24 
25 /* MailerPlugin */
26 /* types */
27 typedef struct _MailerPluginHelper
28 {
29 	Mailer * mailer;
30 	int (*error)(Mailer * mailer, char const * message, int ret);
31 } MailerPluginHelper;
32 
33 typedef struct _MailerPlugin MailerPlugin;
34 
35 typedef const struct _MailerPluginDefinition
36 {
37 	char const * name;
38 	char const * icon;
39 	char const * description;
40 	MailerPlugin * (*init)(MailerPluginHelper * helper);
41 	void (*destroy)(MailerPlugin * plugin);
42 	GtkWidget * (*get_widget)(MailerPlugin * plugin);
43 	void (*refresh)(MailerPlugin * plugin, MailerFolder * folder,
44 			MailerMessage * message);
45 } MailerPluginDefinition;
46 
47 #endif /* !DESKTOP_MAILER_PLUGIN_H */
48