summaryrefslogtreecommitdiff
path: root/src/logind-user-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-user-dbus.c
parentda11939561b1e6eeb1131b68dbf43042fd633a05 (diff)
logind: send out PropertyChanged signals where appropriate
Diffstat (limited to 'src/logind-user-dbus.c')
-rw-r--r--src/logind-user-dbus.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/logind-user-dbus.c b/src/logind-user-dbus.c
index c8d47de0e7..623f2c9c24 100644
--- a/src/logind-user-dbus.c
+++ b/src/logind-user-dbus.c
@@ -353,3 +353,31 @@ finish:
return r;
}
+
+int user_send_changed(User *u, const char *properties) {
+ DBusMessage *m;
+ int r = -ENOMEM;
+ char *p = NULL;
+
+ assert(u);
+
+ p = user_bus_path(u);
+ if (!p)
+ return -ENOMEM;
+
+ m = bus_properties_changed_new(p, "org.freedesktop.login1.User", properties);
+ if (!m)
+ goto finish;
+
+ if (!dbus_connection_send(u->manager->bus, m, NULL))
+ goto finish;
+
+ r = 0;
+
+finish:
+ if (m)
+ dbus_message_unref(m);
+ free(p);
+
+ return r;
+}