[rygel-grilo] Change from MS2_PROP_ID to MS2_PROP_PATH
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel-grilo] Change from MS2_PROP_ID to MS2_PROP_PATH
- Date: Wed, 12 May 2010 09:59:29 +0000 (UTC)
commit 09129cf28f0ac374ec85d1337b1999ec7a0d5cf4
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Wed May 5 12:09:49 2010 +0200
Change from MS2_PROP_ID to MS2_PROP_PATH
Fits better with the new specificacion.
lib/media-server2-client.c | 4 ++--
lib/media-server2-client.h | 2 +-
lib/media-server2-common.h | 2 +-
lib/media-server2-server-table.c | 16 ++++++++--------
lib/media-server2-server.c | 4 ++--
lib/media-server2-server.h | 8 ++++----
src/rygel-grilo.c | 10 +++++-----
src/test-client.c | 6 +++---
8 files changed, 26 insertions(+), 26 deletions(-)
---
diff --git a/lib/media-server2-client.c b/lib/media-server2-client.c
index 936bd79..bca872b 100644
--- a/lib/media-server2-client.c
+++ b/lib/media-server2-client.c
@@ -697,13 +697,13 @@ ms2_client_get_children_finish (MS2Client *client,
* Returns: property value or @NULL if it is not available
**/
const gchar *
-ms2_client_get_id (GHashTable *properties)
+ms2_client_get_path (GHashTable *properties)
{
GValue *val;
g_return_val_if_fail (properties, NULL);
- val = g_hash_table_lookup (properties, MS2_PROP_ID);
+ val = g_hash_table_lookup (properties, MS2_PROP_PATH);
if (!val || !G_VALUE_HOLDS_STRING (val)) {
return NULL;
}
diff --git a/lib/media-server2-client.h b/lib/media-server2-client.h
index 64bfbfa..2e5a302 100644
--- a/lib/media-server2-client.h
+++ b/lib/media-server2-client.h
@@ -120,7 +120,7 @@ GList *ms2_client_get_children_finish (MS2Client *client,
GAsyncResult *res,
GError **error);
-const gchar *ms2_client_get_id (GHashTable *properties);
+const gchar *ms2_client_get_path (GHashTable *properties);
const gchar *ms2_client_get_parent (GHashTable *properties);
diff --git a/lib/media-server2-common.h b/lib/media-server2-common.h
index a3ff9b9..c578c6d 100644
--- a/lib/media-server2-common.h
+++ b/lib/media-server2-common.h
@@ -29,7 +29,7 @@
/* MediaObject2 properties */
#define MS2_PROP_DISPLAY_NAME "DisplayName"
#define MS2_PROP_PARENT "Parent"
-#define MS2_PROP_ID "Path"
+#define MS2_PROP_PATH "Path"
/* MediaItem2 properties */
#define MS2_PROP_ALBUM "Album"
diff --git a/lib/media-server2-server-table.c b/lib/media-server2-server-table.c
index 28e216d..0aab4b4 100644
--- a/lib/media-server2-server-table.c
+++ b/lib/media-server2-server-table.c
@@ -130,21 +130,21 @@ ms2_server_new_properties_hashtable ()
}
/**
- * ms2_server_set_id:
+ * ms2_server_set_path:
* @server: a #MS2Server
* @properties: a #GHashTable
* @id: identifier value
- * @is_container: @TRUE if the @id identifies a a container
+ * @is_container: @TRUE if the @id identifies a container
*
- * Sets the "id" property. Mandatory property
+ * Sets the "Path" property. Mandatory property
*
* @id will be transformed in an object path
**/
void
-ms2_server_set_id (MS2Server *server,
- GHashTable *properties,
- const gchar *id,
- gboolean is_container)
+ms2_server_set_path (MS2Server *server,
+ GHashTable *properties,
+ const gchar *id,
+ gboolean is_container)
{
gchar *object_path;
@@ -153,7 +153,7 @@ ms2_server_set_id (MS2Server *server,
if (id) {
object_path = id_to_object_path (server, id, is_container);
- g_hash_table_insert (properties, MS2_PROP_ID, str_to_value (object_path));
+ g_hash_table_insert (properties, MS2_PROP_PATH, str_to_value (object_path));
g_free (object_path);
}
}
diff --git a/lib/media-server2-server.c b/lib/media-server2-server.c
index 1453e67..46adfdc 100644
--- a/lib/media-server2-server.c
+++ b/lib/media-server2-server.c
@@ -67,7 +67,7 @@ static const gchar listobjects_sgn[] = { DBUS_TYPE_UINT32, DBUS_TYPE_UINT32, DBU
static const gchar *mediaobject2_properties[] = { MS2_PROP_DISPLAY_NAME,
MS2_PROP_PARENT,
- MS2_PROP_ID,
+ MS2_PROP_PATH,
NULL };
static const gchar *mediaitem2_properties[] = { MS2_PROP_ALBUM,
@@ -298,7 +298,7 @@ get_property_value (MS2Server *server,
}
/* If asking for Path, we already can use id */
- if (g_strcmp0 (property, MS2_PROP_ID) == 0) {
+ if (g_strcmp0 (property, MS2_PROP_PATH) == 0) {
v = g_new0 (GValue, 1);
g_value_init (v, G_TYPE_STRING);
path = get_path_from_id (server, id);
diff --git a/lib/media-server2-server.h b/lib/media-server2-server.h
index 07323a2..ddbd680 100644
--- a/lib/media-server2-server.h
+++ b/lib/media-server2-server.h
@@ -107,10 +107,10 @@ const gchar *ms2_server_get_name (MS2Server *server);
GHashTable *ms2_server_new_properties_hashtable (void);
-void ms2_server_set_id (MS2Server *server,
- GHashTable *properties,
- const gchar *id,
- gboolean is_container);
+void ms2_server_set_path (MS2Server *server,
+ GHashTable *properties,
+ const gchar *id,
+ gboolean is_container);
void ms2_server_set_parent (MS2Server *server,
GHashTable *properties,
diff --git a/src/rygel-grilo.c b/src/rygel-grilo.c
index 3641bfb..e32059f 100644
--- a/src/rygel-grilo.c
+++ b/src/rygel-grilo.c
@@ -220,7 +220,7 @@ get_grilo_keys (const gchar **ms_keys, gboolean *contains_parent)
}
for (i = 0; ms_keys[i]; i++) {
- if (g_strcmp0 (ms_keys[i], MS2_PROP_ID) == 0) {
+ if (g_strcmp0 (ms_keys[i], MS2_PROP_PATH) == 0) {
grl_keys = g_list_append (grl_keys,
GRLKEYID_TO_POINTER (GRL_METADATA_KEY_ID));
} else if (g_strcmp0 (ms_keys[i], MS2_PROP_DISPLAY_NAME) == 0) {
@@ -285,10 +285,10 @@ fill_properties_table (MS2Server *server,
case GRL_METADATA_KEY_ID:
id = serialize_media (parent_id, media);
if (id) {
- ms2_server_set_id (server,
- properties_table,
- id,
- GRL_IS_MEDIA_BOX (media));
+ ms2_server_set_path (server,
+ properties_table,
+ id,
+ GRL_IS_MEDIA_BOX (media));
g_free (id);
}
break;
diff --git a/src/test-client.c b/src/test-client.c
index 472765c..fb20e7e 100644
--- a/src/test-client.c
+++ b/src/test-client.c
@@ -3,7 +3,7 @@
#include <glib.h>
#include <string.h>
-static const gchar *properties[] = { MS2_PROP_ID,
+static const gchar *properties[] = { MS2_PROP_PATH,
MS2_PROP_DISPLAY_NAME,
MS2_PROP_PARENT,
MS2_PROP_CHILD_COUNT,
@@ -31,7 +31,7 @@ children_reply (GObject *source,
for (child = children; child; child = g_list_next (child)) {
g_print ("\t* '%s', '%s'\n",
- ms2_client_get_id (child->data),
+ ms2_client_get_path (child->data),
ms2_client_get_display_name(child->data));
}
@@ -227,7 +227,7 @@ test_children_sync ()
for (child = children; child; child = g_list_next (child)) {
g_print ("\t* '%s', '%s'\n",
- ms2_client_get_id (child->data),
+ ms2_client_get_path (child->data),
ms2_client_get_display_name(child->data));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]