#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
+#include <stdbool.h>
#include <signal.h>
#include <sys/signalfd.h>
dbus_uint16_t valu16;
dbus_int16_t vals16;
const char *valstr;
+ DBusMessageIter subiter;
+ int type;
if (iter == NULL) {
rl_printf("%s%s is nil\n", label, name);
dbus_message_iter_get_basic(iter, &vals16);
rl_printf("%s%s: %d\n", label, name, vals16);
break;
+ case DBUS_TYPE_ARRAY:
+ dbus_message_iter_recurse(iter, &subiter);
+ rl_printf("%s%s:\n", label, name);
+
+ do {
+ type = dbus_message_iter_get_arg_type(&subiter);
+ if (type == DBUS_TYPE_INVALID)
+ break;
+
+ if (type == DBUS_TYPE_STRING) {
+ dbus_message_iter_get_basic(&subiter, &valstr);
+ rl_printf("\t%s\n", valstr);
+ }
+
+ dbus_message_iter_next(&subiter);
+ } while(true);
+
+ break;
default:
rl_printf("%s%s has unsupported type\n", label, name);
break;