summaryrefslogtreecommitdiff
path: root/src/logind-session-dbus.c
diff options
context:
space:
mode:
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;
+}