aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-plugin.h
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-11-03 15:24:41 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-11-03 15:24:41 +0800
commitbf47fc3d5125846c517f935de1f5506b9bd3f056 (patch)
tree1313a7030c7cd355eb222ef0ea5ca98f99f271f1 /e-util/e-plugin.h
parentd3a3af650720f48f4cc493c00d1f8c7f4308c95b (diff)
downloadgsoc2013-evolution-bf47fc3d5125846c517f935de1f5506b9bd3f056.tar
gsoc2013-evolution-bf47fc3d5125846c517f935de1f5506b9bd3f056.tar.gz
gsoc2013-evolution-bf47fc3d5125846c517f935de1f5506b9bd3f056.tar.bz2
gsoc2013-evolution-bf47fc3d5125846c517f935de1f5506b9bd3f056.tar.lz
gsoc2013-evolution-bf47fc3d5125846c517f935de1f5506b9bd3f056.tar.xz
gsoc2013-evolution-bf47fc3d5125846c517f935de1f5506b9bd3f056.tar.zst
gsoc2013-evolution-bf47fc3d5125846c517f935de1f5506b9bd3f056.zip
added helper api to list all plugins. (ep_construct): load authors into
2004-11-03 Not Zed <NotZed@Ximian.com> * e-plugin.c (e_plugin_list_plugins): added helper api to list all plugins. (ep_construct): load authors into new list for them. (e_plugin_register_type): setup disabled list. (ep_construct): dont load the hooks if we're not enabled. (e_plugin_enable): make this a virutal method. (e_plugin_invoke): if we're disabled, noop. svn path=/trunk/; revision=27809
Diffstat (limited to 'e-util/e-plugin.h')
-rw-r--r--e-util/e-plugin.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/e-util/e-plugin.h b/e-util/e-plugin.h
index 60635ae2dc..efc53d5108 100644
--- a/e-util/e-plugin.h
+++ b/e-util/e-plugin.h
@@ -13,6 +13,13 @@ typedef struct _EPluginClass EPluginClass;
#define E_PLUGIN_CLASSID "org.gnome.evolution.plugin"
+/* Structure to define the author(s) names and addresses */
+typedef struct _EPluginAuthor EPluginAuthor;
+struct _EPluginAuthor {
+ char *name;
+ char *email;
+};
+
/**
* struct _EPlugin - An EPlugin instance.
*
@@ -43,6 +50,7 @@ struct _EPlugin {
char *name;
char *domain;
GSList *hooks;
+ GSList *authors; /* EPluginAuthor structures */
int enabled:1;
};
@@ -59,6 +67,7 @@ struct _EPlugin {
* @invoke: The invoke virtual method loads the plugin code, resolves
* the function name, and marshals a simple pointer to execute the
* plugin.
+ * @enable: Virtual method to enable/disable the plugin.
*
* The EPluginClass represents each plugin type. The type of each class is
* registered in a global table and is used to instantiate a
@@ -75,6 +84,7 @@ struct _EPluginClass {
int (*construct)(EPlugin *, xmlNodePtr root);
void *(*invoke)(EPlugin *, const char *name, void *data);
+ void (*enable)(EPlugin *, int state);
};
GType e_plugin_get_type(void);
@@ -82,6 +92,7 @@ GType e_plugin_get_type(void);
int e_plugin_construct(EPlugin *ep, xmlNodePtr root);
void e_plugin_add_load_path(const char *);
int e_plugin_load_plugins(void);
+GSList * e_plugin_list_plugins(void);
void e_plugin_register_type(GType type);