[rygel-grilo] Register a new key in Grilo to store Parent property
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel-grilo] Register a new key in Grilo to store Parent property
- Date: Thu, 17 Jun 2010 07:18:56 +0000 (UTC)
commit 68e512afccb11e7f9dce6dfc4430e8bbecb3bd18
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Wed Jun 16 20:46:47 2010 +0200
Register a new key in Grilo to store Parent property
src/rygel-grilo.c | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/src/rygel-grilo.c b/src/rygel-grilo.c
index a2ce9de..0bb7034 100644
--- a/src/rygel-grilo.c
+++ b/src/rygel-grilo.c
@@ -40,6 +40,8 @@ static GHashTable *servers = NULL;
static GList *providers_names = NULL;
static GrlPluginRegistry *registry = NULL;
+static GrlKeyID GRL_METADATA_KEY_RYGEL_GRILO_PARENT = NULL;
+
static gboolean count_items_containers;
static gboolean dups;
static gchar **args = NULL;
@@ -62,7 +64,7 @@ static GOptionEntry entries[] = {
NULL },
{ "limit", 'l', 0,
G_OPTION_ARG_INT, &limit,
- "Limit max. number of children for Items/Containers ( 0 = unlimited)",
+ "Limit max. number of children for Items/Containers (0 = unlimited)",
NULL },
{ "hard-limit", 'L', 0,
G_OPTION_ARG_INT, &hard_limit,
@@ -955,15 +957,28 @@ main (gint argc, gchar **argv)
limit = CLAMP (limit, 0, G_MAXINT);
}
- /* Load grilo plugins */
+ /* Initialize grilo */
grl_init (&argc, &argv);
-
registry = grl_plugin_registry_get_instance ();
if (!registry) {
g_printerr ("Unable to load Grilo registry\n");
return -1;
}
+ /* Register a key to store parent */
+ GRL_METADATA_KEY_RYGEL_GRILO_PARENT =
+ grl_plugin_registry_register_metadata_key (registry,
+ g_param_spec_string ("rygel-grilo-parent",
+ "RygelGriloParent",
+ "Object path to parent container",
+ NULL,
+ G_PARAM_READWRITE));
+
+ if (!GRL_METADATA_KEY_RYGEL_GRILO_PARENT) {
+ g_error ("Unable to register Parent key");
+ return 1;
+ }
+
/* Load configuration */
load_config ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]