![]() |
![]() |
![]() |
![]() |
The manager is used to manager all plugins in GPlugin. This includes loading, unloading, querying, checking for new plugins, and so on.
void
gplugin_manager_append_path (const gchar *path
);
Adds path
to the end of the list of paths to search for plugins.
void
gplugin_manager_prepend_path (const gchar *path
);
Adds path
to the beginning of the list of paths to search for plugins.
void
gplugin_manager_remove_path (const gchar *path
);
Removes path
from the list of paths to search for plugins.
void
gplugin_manager_remove_paths (void
);
Clears all paths that are set to search for plugins.
void
gplugin_manager_add_default_paths (void
);
Adds the path that GPlugin was installed to to the plugin search path, as well as ${XDG_CONFIG_HOME}/gplugin.
void gplugin_manager_add_app_paths (const gchar *prefix
,const gchar *appname
);
Adds the application installation path for appname
. This will add
$prefix/appname
/plugins to the list as well as
${XDG_CONFIG_HOME}/appname
/plugins.
GList *
gplugin_manager_get_paths (void
);
Gets the list of paths which will be search for plugins.
void
gplugin_manager_register_loader (GType type
);
Registers type
as an available loader.
void
gplugin_manager_unregister_loader (GType type
);
Unregisters type
as an available loader.
void
gplugin_manager_refresh (void
);
Forces a refresh of all plugins found in the search paths.
GSList *
gplugin_manager_find_plugins (const gchar *id
);
Finds all plugins matching id
.
A GSList of
referenced GPluginPlugin's matching id
. Call
gplugin_manager_free_plugin_list on the returned value
when you're done with it.
[element-type GPlugin.Plugin][transfer full]
void
gplugin_manager_free_plugin_list (GSList *plugins_list
);
Frees the return value of gplugin_manager_find_plugins.
plugins_list |
Returned value from gplugin_manager_find_plugins. |
[element-type GPlugin.Plugin] |
GPluginPlugin *
gplugin_manager_find_plugin (const gchar *id
);
Finds the first plugin matching id
. This function uses
gplugin_manager_find_plugins and returns the first plugin in the
list.
A referenced GPluginPlugin instance or NULL
if no plugin matching id
was found.
[transfer full]
GSList * gplugin_manager_get_plugin_dependencies (GPluginPlugin *plugin
,GError **error
);
Returns a list of all the GPluginPlugin's that plugin
depends on.
A GSList of
GPluginPlugin's that plugin
depends on, or NULL on error
with error
set.
[element-type GPlugin.Plugin][transfer full]
gboolean gplugin_manager_load_plugin (GPluginPlugin *plugin
,GError **error
);
Loads plugin
and all of it's dependencies. If a dependency can not be
loaded, plugin
will not be loaded either. However, any other plugins that
plugin
depends on that were loaded from this call, will not be unloaded.
gboolean gplugin_manager_unload_plugin (GPluginPlugin *plugin
,GError **error
);
Unloads plugin
. If plugin
has dependencies, they are not unloaded.
GList *
gplugin_manager_list_plugins (void
);
Returns a GList of all plugin id's. Each id should be queried directly for more information.