summaryrefslogtreecommitdiffstats
path: root/src/hardware.h
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2016-05-07 04:03:59 +1000
committerMichele Calgaro <michele.calgaro@yahoo.it>2016-05-07 04:03:59 +1000
commita3caab905b3c008aaa0ff9627c6647615330205d (patch)
tree36800621beebc1279d89a5cc3d0daef59522058a /src/hardware.h
parent676fba0b9f08d41e68b115bc91931b5d0aa53376 (diff)
downloadtdepowersave-a3caab905b3c008aaa0ff9627c6647615330205d.tar.gz
tdepowersave-a3caab905b3c008aaa0ff9627c6647615330205d.zip
Added support for hybrid suspend (aka suspend to RAM + suspend to disk).
This relates to bug 2601. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/hardware.h')
-rw-r--r--src/hardware.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/hardware.h b/src/hardware.h
index b173aa5..d6120b6 100644
--- a/src/hardware.h
+++ b/src/hardware.h
@@ -56,7 +56,8 @@ enum suspend_type {
SUSPEND2DISK,
SUSPEND2RAM,
FREEZE,
- STANDBY
+ STANDBY,
+ SUSPEND_HYBRID,
};
enum cpufreq_type {
@@ -106,6 +107,12 @@ typedef struct SuspendStates {
bool standby_can;
//! true if the machine support standby and PolicyKit allow to call the interface
int standby_allowed;
+ //! true if the machine support hybrid suspend and the interface is available
+ bool suspend_hybrid;
+ //! true if the machine support hybrid suspend, but no interface available
+ bool suspend_hybrid_can;
+ //! true if the machine support hybrid suspend and PolicyKit allow to call the interface
+ int suspend_hybrid_allowed;
SuspendStates () {
suspend2ram = false;
@@ -120,6 +127,9 @@ typedef struct SuspendStates {
standby = false;
standby_can = false;
standby_allowed = -1;
+ suspend_hybrid = false;
+ suspend_hybrid_can = false;
+ suspend_hybrid_allowed = -1;
}
} SuspendStates;