[grilo] core: Added GError parameter grl_plugin_registry_load_all
- From: Iago Toral Quiroga <itoral src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] core: Added GError parameter grl_plugin_registry_load_all
- Date: Mon, 20 Dec 2010 11:13:17 +0000 (UTC)
commit 4d222a457ed04df1a718dcbcd166cc885fa0e2e0
Author: Iago Toral Quiroga <itoral igalia com>
Date: Mon Dec 20 09:40:52 2010 +0100
core: Added GError parameter grl_plugin_registry_load_all
src/grl-plugin-registry.c | 11 ++++++++---
src/grl-plugin-registry.h | 3 ++-
2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/grl-plugin-registry.c b/src/grl-plugin-registry.c
index ae4e901..a58b060 100644
--- a/src/grl-plugin-registry.c
+++ b/src/grl-plugin-registry.c
@@ -537,6 +537,7 @@ grl_plugin_registry_load_directory (GrlPluginRegistry *registry,
/**
* grl_plugin_registry_load_all:
* @registry: the registry instance
+ * @error: error return location or @NULL to ignore
*
* Load all the modules available in the default directory path.
*
@@ -544,19 +545,23 @@ grl_plugin_registry_load_directory (GrlPluginRegistry *registry,
* variable %GRL_PLUGIN_PATH and it can contain several paths separated
* by ":"
*
- * Returns: %TRUE always
+ * Returns: %FALSE% is all the configured plugin paths are invalid,
+ * %TRUE% otherwise.
*/
gboolean
-grl_plugin_registry_load_all (GrlPluginRegistry *registry)
+grl_plugin_registry_load_all (GrlPluginRegistry *registry, GError **error)
{
GSList *plugin_dir;
+ gboolean loaded_one = FALSE;
g_return_val_if_fail (GRL_IS_PLUGIN_REGISTRY (registry), TRUE);
for (plugin_dir = registry->priv->plugins_dir;
plugin_dir;
plugin_dir = g_slist_next (plugin_dir)) {
- grl_plugin_registry_load_directory (registry, plugin_dir->data, NULL);
+ if (grl_plugin_registry_load_directory (registry, plugin_dir->data, NULL)) {
+ loaded_one = TRUE;
+ }
}
if (!loaded_one && error) {
diff --git a/src/grl-plugin-registry.h b/src/grl-plugin-registry.h
index b038d00..06b0ea0 100644
--- a/src/grl-plugin-registry.h
+++ b/src/grl-plugin-registry.h
@@ -204,7 +204,8 @@ gboolean grl_plugin_registry_load_directory (GrlPluginRegistry *registry,
void grl_plugin_registry_unload (GrlPluginRegistry *registry,
const gchar *plugin_id);
-gboolean grl_plugin_registry_load_all (GrlPluginRegistry *registry);
+gboolean grl_plugin_registry_load_all (GrlPluginRegistry *registry,
+ GError **error);
gboolean grl_plugin_registry_register_source (GrlPluginRegistry *registry,
const GrlPluginInfo *plugin,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]