[Galago-commits] r2330 - in trunk/libgalago: . libgalago
galago-commits at freedesktop.org
galago-commits at freedesktop.org
Sun Nov 20 01:21:29 PST 2005
Author: chipx86
Date: 2005-11-20 01:21:21 -0800 (Sun, 20 Nov 2005)
New Revision: 2330
Modified:
trunk/libgalago/ChangeLog
trunk/libgalago/libgalago/galago-person.c
Log:
When retrieving a person's property, retrieve the value from a variant container.
Modified: trunk/libgalago/ChangeLog
===================================================================
--- trunk/libgalago/ChangeLog 2005-11-20 09:01:24 UTC (rev 2329)
+++ trunk/libgalago/ChangeLog 2005-11-20 09:21:21 UTC (rev 2330)
@@ -1,3 +1,9 @@
+Sun Nov 20 01:21:00 PST 2005 Christian Hammond <chipx86 at chipx86.com>
+
+ * libgalago/galago-person.c:
+ - When retrieving a person's property, retrieve the value from a
+ variant container.
+
Sun Nov 20 01:00:24 PST 2005 Christian Hammond <chipx86 at chipx86.com>
* libgalago/galago-presence.c:
Modified: trunk/libgalago/libgalago/galago-person.c
===================================================================
--- trunk/libgalago/libgalago/galago-person.c 2005-11-20 09:01:24 UTC (rev 2329)
+++ trunk/libgalago/libgalago/galago-person.c 2005-11-20 09:21:21 UTC (rev 2330)
@@ -1001,7 +1001,7 @@
{
DBusConnection *dbus_conn;
DBusMessage *message, *reply;
- DBusMessageIter iter;
+ DBusMessageIter iter, value_iter;
DBusError error;
GalagoValue *value = NULL;
@@ -1037,32 +1037,41 @@
}
dbus_message_iter_init(reply, &iter);
+ dbus_message_iter_recurse(&iter, &value_iter);
- int type = dbus_message_iter_get_arg_type(&iter);
+ int type = dbus_message_iter_get_arg_type(&value_iter);
- if (type == DBUS_TYPE_STRING)
+ switch (type)
{
- const char *data;
- dbus_message_iter_get_basic(&iter, &data);
- value = galago_value_new(GALAGO_VALUE_TYPE_STRING, &data, NULL);
+ case DBUS_TYPE_STRING:
+ {
+ const char *data;
+ dbus_message_iter_get_basic(&value_iter, &data);
+ value = galago_value_new(GALAGO_VALUE_TYPE_STRING, &data, NULL);
+ break;
+ }
+
+ case DBUS_TYPE_BOOLEAN:
+ {
+ gboolean data;
+ dbus_message_iter_get_basic(&value_iter, &data);
+ value = galago_value_new(GALAGO_VALUE_TYPE_BOOLEAN, &data, NULL);
+ break;
+ }
+
+ case DBUS_TYPE_UINT32:
+ {
+ int data;
+ dbus_message_iter_get_basic(&value_iter, &data);
+ value = galago_value_new(GALAGO_VALUE_TYPE_UINT, &data, NULL);
+ break;
+ }
+
+ default:
+ galago_log_fatal("Unknown property type %d for property %s\n",
+ type, name);
+ break;
}
- else if (type == DBUS_TYPE_BOOLEAN)
- {
- gboolean data;
- dbus_message_iter_get_basic(&iter, &data);
- value = galago_value_new(GALAGO_VALUE_TYPE_BOOLEAN, &data, NULL);
- }
- else if (type == DBUS_TYPE_UINT32)
- {
- int data;
- dbus_message_iter_get_basic(&iter, &data);
- value = galago_value_new(GALAGO_VALUE_TYPE_UINT, &data, NULL);
- }
- else
- {
- galago_log_fatal("Unknown property type %d for property %s\n",
- type, name);
- }
dbus_message_unref(reply);
More information about the galago-commits
mailing list