chiark / gitweb /
tree-wide: drop 'This file is part of systemd' blurb
[elogind.git] / src / login / logind-user-dbus.c
index cc694b672509fd9aaa9ef54dd8bd480f66f658ea..f4bc12a185806df614d9604243f4cef4473e6a34 100644 (file)
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 /***
-  This file is part of systemd.
-
   Copyright 2011 Lennart Poettering
 ***/
 
@@ -17,6 +15,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 +40,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,