diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-06-21 21:46:13 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-06-21 21:46:13 +0200 |
commit | 9418f14772e7e646fe981d45506b3bbce68d6ccf (patch) | |
tree | 5488c3550abe14fd8603db723e45423fd0173b2e /src/logind-seat-dbus.c | |
parent | da11939561b1e6eeb1131b68dbf43042fd633a05 (diff) |
logind: send out PropertyChanged signals where appropriate
Diffstat (limited to 'src/logind-seat-dbus.c')
-rw-r--r-- | src/logind-seat-dbus.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/logind-seat-dbus.c b/src/logind-seat-dbus.c index 33eafe5ee5..1895fe6cc3 100644 --- a/src/logind-seat-dbus.c +++ b/src/logind-seat-dbus.c @@ -370,3 +370,31 @@ finish: return r; } + +int seat_send_changed(Seat *s, const char *properties) { + DBusMessage *m; + int r = -ENOMEM; + char *p = NULL; + + assert(s); + + p = seat_bus_path(s); + if (!p) + return -ENOMEM; + + m = bus_properties_changed_new(p, "org.freedesktop.login1.Seat", properties); + if (!m) + goto finish; + + if (!dbus_connection_send(s->manager->bus, m, NULL)) + goto finish; + + r = 0; + +finish: + if (m) + dbus_message_unref(m); + free(p); + + return r; +} |