summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw/hwlibdaemons
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-09-22 14:57:33 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-09-22 14:57:33 +0200
commit645e8c58a752ed221388d916b1981483cc6d8811 (patch)
treee98eecd84bb98eca6b431429a976edcb3ad0e182 /tdecore/tdehw/hwlibdaemons
parent101d86a3fc74e30690ed16a74dff105b1f6bb309 (diff)
downloadtdelibs-645e8c58a752ed221388d916b1981483cc6d8811.tar.gz
tdelibs-645e8c58a752ed221388d916b1981483cc6d8811.zip
Add support for freeze suspend state
Diffstat (limited to 'tdecore/tdehw/hwlibdaemons')
-rw-r--r--tdecore/tdehw/hwlibdaemons/dbus/tde_dbus_hardwarecontrol.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/tdecore/tdehw/hwlibdaemons/dbus/tde_dbus_hardwarecontrol.c b/tdecore/tdehw/hwlibdaemons/dbus/tde_dbus_hardwarecontrol.c
index 24a391a3c..6b3a5dc30 100644
--- a/tdecore/tdehw/hwlibdaemons/dbus/tde_dbus_hardwarecontrol.c
+++ b/tdecore/tdehw/hwlibdaemons/dbus/tde_dbus_hardwarecontrol.c
@@ -356,6 +356,12 @@ void reply_Introspect(DBusMessage* msg, DBusConnection* conn) {
" <method name=\"Standby\">\n"
" <arg name=\"value\" direction=\"out\" type=\"b\" />\n"
" </method>\n"
+ " <method name=\"CanFreeze\">\n"
+ " <arg name=\"value\" direction=\"out\" type=\"b\" />\n"
+ " </method>\n"
+ " <method name=\"Freeze\">\n"
+ " <arg name=\"value\" direction=\"out\" type=\"b\" />\n"
+ " </method>\n"
" <method name=\"CanSuspend\">\n"
" <arg name=\"value\" direction=\"out\" type=\"b\" />\n"
" </method>\n"
@@ -487,6 +493,12 @@ void listen() {
else if (dbus_message_is_method_call(msg, "org.trinitydesktop.hardwarecontrol.Power", "Standby")) {
reply_SetPower(msg, conn, "standby");
}
+ else if (dbus_message_is_method_call(msg, "org.trinitydesktop.hardwarecontrol.Power", "CanFreeze")) {
+ reply_CanSetPower(msg, conn, "freeze");
+ }
+ else if (dbus_message_is_method_call(msg, "org.trinitydesktop.hardwarecontrol.Power", "Freeze")) {
+ reply_SetPower(msg, conn, "freeze");
+ }
else if (dbus_message_is_method_call(msg, "org.trinitydesktop.hardwarecontrol.Power", "CanSuspend")) {
reply_CanSetPower(msg, conn, "mem");
}
@@ -508,7 +520,7 @@ void listen() {
else {
error_UnknownMessage(msg, conn);
}
-
+
// free the message
dbus_message_unref(msg);
}