diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-02-02 12:22:59 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-02-02 12:22:59 +0100 |
commit | 3813169516563114bf55d2198b3e01f10f197b9a (patch) | |
tree | 112fdd1a78323fddbd5cdda50a8fd53017c31fe0 /dbus.c | |
parent | 80c5385a8384b2219e5d44c19b2d67eddd540c1f (diff) |
expose more properties
Diffstat (limited to 'dbus.c')
-rw-r--r-- | dbus.c | 28 |
1 files changed, 27 insertions, 1 deletions
@@ -561,7 +561,9 @@ int bus_property_append_string(Manager *m, DBusMessageIter *i, const char *prope assert(m); assert(i); assert(property); - assert(t); + + if (!t) + t = ""; if (!dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &t)) return -ENOMEM; @@ -606,3 +608,27 @@ int bus_property_append_bool(Manager *m, DBusMessageIter *i, const char *propert return 0; } + +int bus_property_append_uint64(Manager *m, DBusMessageIter *i, const char *property, void *data) { + assert(m); + assert(i); + assert(property); + assert(data); + + if (!dbus_message_iter_append_basic(i, DBUS_TYPE_UINT64, data)) + return -ENOMEM; + + return 0; +} + +int bus_property_append_uint32(Manager *m, DBusMessageIter *i, const char *property, void *data) { + assert(m); + assert(i); + assert(property); + assert(data); + + if (!dbus_message_iter_append_basic(i, DBUS_TYPE_UINT32, data)) + return -ENOMEM; + + return 0; +} |