dbus/tools dbus-tree-view.c,1.6,1.7
Havoc Pennington
hp at freedesktop.org
Sat Feb 12 12:27:47 PST 2005
Update of /cvs/dbus/dbus/tools
In directory gabe:/tmp/cvs-serv6754/tools
Modified Files:
dbus-tree-view.c
Log Message:
2005-02-12 Havoc Pennington <hp at redhat.com>
* tools/dbus-tree-view.c (info_set_func_text): display more
details on args
* bus/driver.c (bus_driver_handle_list_services): list the bus
driver
* glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
* glib/dbus-gidl.c (signal_info_get_n_args): new function
(method_info_get_n_args): new function
Index: dbus-tree-view.c
===================================================================
RCS file: /cvs/dbus/dbus/tools/dbus-tree-view.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- dbus-tree-view.c 30 Jan 2005 23:06:32 -0000 1.6
+++ dbus-tree-view.c 12 Feb 2005 20:27:45 -0000 1.7
@@ -25,6 +25,49 @@
#include "dbus-tree-view.h"
#include <glib/gi18n.h>
+/* FIXME this function should just be in the library */
+static const char *
+type_to_string (int type)
+{
+ switch (type)
+ {
+ case DBUS_TYPE_INVALID:
+ return "invalid";
+ case DBUS_TYPE_BOOLEAN:
+ return "boolean";
+ case DBUS_TYPE_BYTE:
+ return "byte";
+ case DBUS_TYPE_INT16:
+ return "int16";
+ case DBUS_TYPE_UINT16:
+ return "uint16";
+ case DBUS_TYPE_INT32:
+ return "int32";
+ case DBUS_TYPE_UINT32:
+ return "uint32";
+ case DBUS_TYPE_DOUBLE:
+ return "double";
+ case DBUS_TYPE_STRING:
+ return "string";
+ case DBUS_TYPE_OBJECT_PATH:
+ return "object_path";
+ case DBUS_TYPE_SIGNATURE:
+ return "signature";
+ case DBUS_TYPE_STRUCT:
+ return "struct";
+ case DBUS_TYPE_ARRAY:
+ return "array";
+ case DBUS_TYPE_VARIANT:
+ return "variant";
+ case DBUS_STRUCT_BEGIN_CHAR:
+ return "begin_struct";
+ case DBUS_STRUCT_END_CHAR:
+ return "end_struct";
+ default:
+ return "unknown";
+ }
+}
+
enum
{
MODEL_COLUMN_INFO,
@@ -292,7 +335,11 @@
g_string_append (str, "<i>property</i>");
break;
case INFO_TYPE_ARG:
- g_string_append (str, "<i>arg</i>");
+ g_string_append_printf (str, "<i>arg</i> %s",
+ arg_info_get_direction ((ArgInfo*)info) == ARG_IN ?
+ "in" : "out");
+ g_string_append_printf (str, " <b>%s</b>",
+ type_to_string (arg_info_get_type ((ArgInfo*)info)));
break;
}
More information about the dbus-commit
mailing list