summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-internals.c
diff options
context:
space:
mode:
Diffstat (limited to 'dbus/dbus-internals.c')
-rw-r--r--dbus/dbus-internals.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/dbus/dbus-internals.c b/dbus/dbus-internals.c
index f3527eb2..e24eb56b 100644
--- a/dbus/dbus-internals.c
+++ b/dbus/dbus-internals.c
@@ -21,6 +21,7 @@
*
*/
#include "dbus-internals.h"
+#include "dbus-protocol.h"
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
@@ -337,4 +338,28 @@ _dbus_set_fd_nonblocking (int fd,
return TRUE;
}
+/**
+ * Returns a string describing the given type.
+ *
+ * @param type the type to describe
+ * @returns a constant string describing the type
+ */
+const char *
+_dbus_type_to_string (int type)
+{
+ switch (type)
+ {
+ case DBUS_TYPE_INT32:
+ return "int32";
+ case DBUS_TYPE_UINT32:
+ return "uint32";
+ case DBUS_TYPE_DOUBLE:
+ return "double";
+ case DBUS_TYPE_STRING:
+ return "string";
+ default:
+ return "unknown";
+ }
+}
+
/** @} */