summaryrefslogtreecommitdiff
path: root/src/logind-session-dbus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-06-21 21:46:13 +0200
committerLennart Poettering <lennart@poettering.net>2011-06-21 21:46:13 +0200
commit9418f14772e7e646fe981d45506b3bbce68d6ccf (patch)
tree5488c3550abe14fd8603db723e45423fd0173b2e /src/logind-session-dbus.c
parentda11939561b1e6eeb1131b68dbf43042fd633a05 (diff)
logind: send out PropertyChanged signals where appropriate
Diffstat (limited to 'src/logind-session-dbus.c')
-rw-r--r--src/logind-session-dbus.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/logind-session-dbus.c b/src/logind-session-dbus.c
index edc96dd644..0ce880c590 100644
--- a/src/logind-session-dbus.c
+++ b/src/logind-session-dbus.c
@@ -419,3 +419,31 @@ finish:
return r;
}
+
+int session_send_changed(Session *s, const char *properties) {
+ DBusMessage *m;
+ int r = -ENOMEM;
+ char *p = NULL;
+
+ assert(s);
+
+ p = session_bus_path(s);
+ if (!p)
+ return -ENOMEM;
+
+ m = bus_properties_changed_new(p, "org.freedesktop.login1.Session", 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;
+}