diff options
author | Ross Burton <ross@openedhand.com> | 2006-03-10 17:29:48 +0000 |
---|---|---|
committer | Ross Burton <ross@openedhand.com> | 2006-03-10 17:29:48 +0000 |
commit | 14030ddf96b1b1fcd493c0f6bafd64167c9f877f (patch) | |
tree | 53b5c8898b2c6818274cfeaffa97fb2c85e4e091 | |
parent | 3d62ab90e96a6e9562414beefb5c3c41dc9a3764 (diff) |
2006-03-10 Ross Burton <ross@openedhand.com>
* tools/dbus-print-message.c:
Add support for object paths and signatures.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | tools/dbus-print-message.c | 24 |
2 files changed, 26 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2006-03-10 Ross Burton <ross@openedhand.com> + + * tools/dbus-print-message.c: + Add support for object paths and signatures. + 2006-03-06 Sjoerd Simons <sjoerd@luon.net> * bus/bus.c: (bus_context_reload_config): Flush the user database cache on diff --git a/tools/dbus-print-message.c b/tools/dbus-print-message.c index 17531c1..b6b54e6 100644 --- a/tools/dbus-print-message.c +++ b/tools/dbus-print-message.c @@ -61,7 +61,7 @@ print_iter (DBusMessageIter *iter, dbus_bool_t literal, int depth) switch (type) { case DBUS_TYPE_STRING: - dbus_message_iter_get_basic (iter, &str); + dbus_message_iter_get_basic (iter, &str); if (!literal) printf ("string \""); printf ("%s", str); @@ -69,13 +69,31 @@ print_iter (DBusMessageIter *iter, dbus_bool_t literal, int depth) printf ("\"\n"); break; + case DBUS_TYPE_OBJECT_PATH: + dbus_message_iter_get_basic (iter, &str); + if (!literal) + printf ("object path \""); + printf ("%s", str); + if (!literal) + printf ("\"\n"); + break; + + case DBUS_TYPE_SIGNATURE: + dbus_message_iter_get_basic (iter, &str); + if (!literal) + printf ("signature \""); + printf ("%s", str); + if (!literal) + printf ("\"\n"); + break; + case DBUS_TYPE_INT32: - dbus_message_iter_get_basic (iter, &int32); + dbus_message_iter_get_basic (iter, &int32); printf ("int32 %d\n", int32); break; case DBUS_TYPE_UINT32: - dbus_message_iter_get_basic (iter, &uint32); + dbus_message_iter_get_basic (iter, &uint32); printf ("uint32 %u\n", uint32); break; |