diff options
Diffstat (limited to 'src/dbus-common.c')
-rw-r--r-- | src/dbus-common.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/dbus-common.c b/src/dbus-common.c index 50daedcf58..a072369988 100644 --- a/src/dbus-common.c +++ b/src/dbus-common.c @@ -533,6 +533,22 @@ int bus_property_append_bool(DBusMessageIter *i, const char *property, void *dat return 0; } +int bus_property_append_tristate_false(DBusMessageIter *i, const char *property, void *data) { + int *b = data; + dbus_bool_t db; + + assert(i); + assert(property); + assert(b); + + db = *b > 0; + + if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &db)) + return -ENOMEM; + + return 0; +} + int bus_property_append_uint64(DBusMessageIter *i, const char *property, void *data) { assert(i); assert(property); |