9d0869092816e039a52ddcf1e94ad61d99cb03b7
[claws.git] / src / common / plugin.h
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws Team
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19
20 #ifndef PLUGIN_H
21 #define PLUGIN_H 1
22
23 #include <glib.h>
24
25 typedef struct _Plugin Plugin;
26
27 /* Functions to implement by the plugin */
28 gint plugin_init                (gchar          **error);
29 void plugin_done                (void);
30 const gchar *plugin_name        (void);
31 const gchar *plugin_desc        (void);
32 const gchar *plugin_version     (void);
33
34 /* Functions by the sylpheed plugin system */
35 Plugin *plugin_load             (const gchar     *filename,
36                                  gchar          **error);
37 void plugin_unload              (Plugin          *plugin);
38 void plugin_load_all            (const gchar     *type);
39 void plugin_unload_all          (const gchar     *type);
40 void plugin_save_list           (void);
41
42 GSList *plugin_get_list         (void);
43 GSList *plugin_get_unloaded_list(void);
44 const gchar *plugin_get_name    (Plugin          *plugin);
45 const gchar *plugin_get_desc    (Plugin          *plugin);
46 const gchar *plugin_get_version (Plugin          *plugin);
47 const gchar *plugin_get_error   (Plugin          *plugin);
48 #endif