summaryrefslogtreecommitdiff
path: root/dbus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-02-02 12:22:59 +0100
committerLennart Poettering <lennart@poettering.net>2010-02-02 12:22:59 +0100
commit3813169516563114bf55d2198b3e01f10f197b9a (patch)
tree112fdd1a78323fddbd5cdda50a8fd53017c31fe0 /dbus.c
parent80c5385a8384b2219e5d44c19b2d67eddd540c1f (diff)
expose more properties
Diffstat (limited to 'dbus.c')
-rw-r--r--dbus.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/dbus.c b/dbus.c
index 84b8fbf094..caafc97570 100644
--- a/dbus.c
+++ b/dbus.c
@@ -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;
+}