summaryrefslogtreecommitdiff
path: root/libupower-glib/up-types.h
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2011-03-30 15:09:57 +0100
committerRichard Hughes <richard@hughsie.com>2011-05-04 17:57:13 +0100
commit0fd304c3f3ed41b503fdd4b0e36fe84ba939fb69 (patch)
tree0b4b47e6c5f217573fc8b2021532094035c6a767 /libupower-glib/up-types.h
parent62024c49c8de4c447a1b04a927f32366f3760960 (diff)
downloadupower-0fd304c3f3ed41b503fdd4b0e36fe84ba939fb69.tar.gz
Add new NotifySleep() and NotifyResume() signals that include the sleep type
This allows session power managers to do different actions depending on whether the user is suspending or hibernating. This allows the session policy agent to poke other things (for instance, the screensaver) even if another process initiated the sleep. This is based on a patch from Phillip Susi <psusi@cfl.rr.com>, many thanks.
Diffstat (limited to 'libupower-glib/up-types.h')
-rw-r--r--libupower-glib/up-types.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/libupower-glib/up-types.h b/libupower-glib/up-types.h
index 4e1d285..083d3d9 100644
--- a/libupower-glib/up-types.h
+++ b/libupower-glib/up-types.h
@@ -95,6 +95,19 @@ typedef enum {
UP_QOS_KIND_LAST
} UpQosKind;
+/**
+ * UpSleepKind:
+ *
+ * The type of QOS request.
+ **/
+typedef enum {
+ UP_SLEEP_KIND_UNKNOWN,
+ UP_SLEEP_KIND_SUSPEND,
+ UP_SLEEP_KIND_HIBERNATE,
+ UP_SLEEP_KIND_HYBRID,
+ UP_SLEEP_KIND_LAST
+} UpSleepKind;
+
const gchar *up_device_kind_to_string (UpDeviceKind type_enum);
const gchar *up_device_state_to_string (UpDeviceState state_enum);
const gchar *up_device_technology_to_string (UpDeviceTechnology technology_enum);
@@ -103,6 +116,9 @@ UpDeviceState up_device_state_from_string (const gchar *state);
UpDeviceTechnology up_device_technology_from_string (const gchar *technology);
const gchar *up_qos_kind_to_string (UpQosKind type);
UpQosKind up_qos_kind_from_string (const gchar *type);
+const gchar *up_sleep_kind_to_string (UpSleepKind sleep_kind_enum);
+UpSleepKind up_sleep_kind_from_string (const gchar *sleep_kind);
+
G_END_DECLS