]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
logind: expose long press actions on D-Bus
authorLennart Poettering <lennart@poettering.net>
Tue, 5 Apr 2022 13:50:56 +0000 (15:50 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 5 Apr 2022 14:09:52 +0000 (16:09 +0200)
The settings and internal varables were added, but this was never
exposed on the bus. Add that.

Follow-up-for: a520bb665417af7aa98dcb983f3583659bbab807
Follow-up-for: #19917

man/org.freedesktop.login1.xml
src/login/logind-dbus.c

index d25287b18b1b9129c9e7dfd723eb9ba59a202572..8fc145d7717031a0e809f926429b34c758af895f 100644 (file)
@@ -194,10 +194,20 @@ node /org/freedesktop/login1 {
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly s HandlePowerKey = '...';
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
+      readonly s HandlePowerKeyLongPress = '...';
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
+      readonly s HandleRebootKey = '...';
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
+      readonly s HandleRebootKeyLongPress = '...';
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly s HandleSuspendKey = '...';
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
+      readonly s HandleSuspendKeyLongPress = '...';
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly s HandleHibernateKey = '...';
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
+      readonly s HandleHibernateKeyLongPress = '...';
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly s HandleLidSwitch = '...';
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly s HandleLidSwitchExternalPower = '...';
@@ -242,6 +252,16 @@ node /org/freedesktop/login1 {
 };
     </programlisting>
 
+    <!--property HandlePowerKeyLongPress is not documented!-->
+
+    <!--property HandleRebootKey is not documented!-->
+
+    <!--property HandleRebootKeyLongPress is not documented!-->
+
+    <!--property HandleSuspendKeyLongPress is not documented!-->
+
+    <!--property HandleHibernateKeyLongPress is not documented!-->
+
     <!--Autogenerated cross-references for systemd.directives, do not edit-->
 
     <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.login1.Manager"/>
@@ -418,10 +438,20 @@ node /org/freedesktop/login1 {
 
     <variablelist class="dbus-property" generated="True" extra-ref="HandlePowerKey"/>
 
+    <variablelist class="dbus-property" generated="True" extra-ref="HandlePowerKeyLongPress"/>
+
+    <variablelist class="dbus-property" generated="True" extra-ref="HandleRebootKey"/>
+
+    <variablelist class="dbus-property" generated="True" extra-ref="HandleRebootKeyLongPress"/>
+
     <variablelist class="dbus-property" generated="True" extra-ref="HandleSuspendKey"/>
 
+    <variablelist class="dbus-property" generated="True" extra-ref="HandleSuspendKeyLongPress"/>
+
     <variablelist class="dbus-property" generated="True" extra-ref="HandleHibernateKey"/>
 
+    <variablelist class="dbus-property" generated="True" extra-ref="HandleHibernateKeyLongPress"/>
+
     <variablelist class="dbus-property" generated="True" extra-ref="HandleLidSwitch"/>
 
     <variablelist class="dbus-property" generated="True" extra-ref="HandleLidSwitchExternalPower"/>
index 1212a1ac537c4840c622ddd25424fd1f94ae1558..a9da1e773171ba238eeaafc4e38df82cce3b0373 100644 (file)
@@ -3378,8 +3378,13 @@ static const sd_bus_vtable manager_vtable[] = {
         SD_BUS_PROPERTY("InhibitDelayMaxUSec", "t", NULL, offsetof(Manager, inhibit_delay_max), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("UserStopDelayUSec", "t", NULL, offsetof(Manager, user_stop_delay), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("HandlePowerKey", "s", property_get_handle_action, offsetof(Manager, handle_power_key), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("HandlePowerKeyLongPress", "s", property_get_handle_action, offsetof(Manager, handle_power_key_long_press), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("HandleRebootKey", "s", property_get_handle_action, offsetof(Manager, handle_reboot_key), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("HandleRebootKeyLongPress", "s", property_get_handle_action, offsetof(Manager, handle_reboot_key_long_press), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("HandleSuspendKey", "s", property_get_handle_action, offsetof(Manager, handle_suspend_key), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("HandleSuspendKeyLongPress", "s", property_get_handle_action, offsetof(Manager, handle_suspend_key_long_press), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("HandleHibernateKey", "s", property_get_handle_action, offsetof(Manager, handle_hibernate_key), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("HandleHibernateKeyLongPress", "s", property_get_handle_action, offsetof(Manager, handle_hibernate_key_long_press), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("HandleLidSwitch", "s", property_get_handle_action, offsetof(Manager, handle_lid_switch), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("HandleLidSwitchExternalPower", "s", property_get_handle_action, offsetof(Manager, handle_lid_switch_ep), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("HandleLidSwitchDocked", "s", property_get_handle_action, offsetof(Manager, handle_lid_switch_docked), SD_BUS_VTABLE_PROPERTY_CONST),