chiark / gitweb /
tree-wide: remove Lennart's copyright lines
[elogind.git] / src / login / logind-user-dbus.c
index cc694b672509fd9aaa9ef54dd8bd480f66f658ea..c662a26b9fa1c501ffdd94883f3f7b39dbf6ca24 100644 (file)
@@ -1,9 +1,4 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
-/***
-  This file is part of systemd.
-
-  Copyright 2011 Lennart Poettering
-***/
 
 #include <errno.h>
 #include <string.h>
@@ -17,6 +12,8 @@
 #include "strv.h"
 #include "user-util.h"
 
+static BUS_DEFINE_PROPERTY_GET2(property_get_state, "s", User, user_get_state, user_state_to_string);
+
 static int property_get_display(
                 sd_bus *bus,
                 const char *path,
@@ -40,24 +37,6 @@ static int property_get_display(
         return sd_bus_message_append(reply, "(so)", u->display ? u->display->id : "", p);
 }
 
-static int property_get_state(
-                sd_bus *bus,
-                const char *path,
-                const char *interface,
-                const char *property,
-                sd_bus_message *reply,
-                void *userdata,
-                sd_bus_error *error) {
-
-        User *u = userdata;
-
-        assert(bus);
-        assert(reply);
-        assert(u);
-
-        return sd_bus_message_append(reply, "s", user_state_to_string(user_get_state(u)));
-}
-
 static int property_get_sessions(
                 sd_bus *bus,
                 const char *path,