summaryrefslogtreecommitdiffstats
path: root/glib/dbus-gobject.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2004-06-01 03:02:26 +0000
committerHavoc Pennington <hp@redhat.com>2004-06-01 03:02:26 +0000
commite12863aae85dc131fcdd552edd6b32bd15702e12 (patch)
treeed7c53b2388c7136069043f3fa72f64927c95b6f /glib/dbus-gobject.c
parent23e9d3d5040f51870f212ea70a94c9913c90e66b (diff)
2004-05-31 Havoc Pennington <hp@redhat.com>
* glib/dbus-gidl.c (method_info_add_arg): keep args sorted with "in" before "out" * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c * glib/dbus-glib-tool.c (main): set up to have a --self-test option that runs the tests, and start filling in some code including for starters just dumping the interfaces to stdout * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR * test/data/valid-introspection-files/lots-of-types.xml: test of an example introspection file * glib/dbus-gparser.c (parser_check_doctype): doctype should be "node" (I think...)
Diffstat (limited to 'glib/dbus-gobject.c')
-rw-r--r--glib/dbus-gobject.c36
1 files changed, 3 insertions, 33 deletions
diff --git a/glib/dbus-gobject.c b/glib/dbus-gobject.c
index 18e4cb5f..0168697e 100644
--- a/glib/dbus-gobject.c
+++ b/glib/dbus-gobject.c
@@ -149,36 +149,6 @@ gtype_to_dbus_type (GType type)
}
}
-static const char *
-dbus_type_to_string (int type)
-{
- switch (type)
- {
- case DBUS_TYPE_INVALID:
- return "invalid";
- case DBUS_TYPE_NIL:
- return "nil";
- case DBUS_TYPE_BOOLEAN:
- return "boolean";
- 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_CUSTOM:
- return "custom";
- case DBUS_TYPE_ARRAY:
- return "array";
- case DBUS_TYPE_DICT:
- return "dict";
- default:
- return "unknown";
- }
-}
-
static void
introspect_properties (GObject *object, GString *xml)
{
@@ -234,7 +204,7 @@ introspect_properties (GObject *object, GString *xml)
g_string_append (xml, "\">\n");
g_string_append (xml, " <arg type=\"");
- g_string_append (xml, dbus_type_to_string (dbus_type));
+ g_string_append (xml, _dbus_gutils_type_to_string (dbus_type));
g_string_append (xml, "\"/>\n");
}
@@ -245,7 +215,7 @@ introspect_properties (GObject *object, GString *xml)
g_string_append (xml, "\">\n");
g_string_append (xml, " <arg type=\"");
- g_string_append (xml, dbus_type_to_string (dbus_type));
+ g_string_append (xml, _dbus_gutils_type_to_string (dbus_type));
g_string_append (xml, "\" direction=\"out\"/>\n");
}
@@ -292,7 +262,7 @@ introspect_signals (GType type, GString *xml)
int dbus_type = gtype_to_dbus_type (query.param_types[arg]);
g_string_append (xml, " <arg type=\"");
- g_string_append (xml, dbus_type_to_string (dbus_type));
+ g_string_append (xml, _dbus_gutils_type_to_string (dbus_type));
g_string_append (xml, "\"/>\n");
}