summaryrefslogtreecommitdiff
path: root/libupower-glib/up-client.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-client.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-client.h')
-rw-r--r--libupower-glib/up-client.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/libupower-glib/up-client.h b/libupower-glib/up-client.h
index aa522ab..482cd90 100644
--- a/libupower-glib/up-client.h
+++ b/libupower-glib/up-client.h
@@ -55,11 +55,15 @@ typedef struct
GObjectClass parent_class;
void (*device_added) (UpClient *client,
UpDevice *device);
- void (*device_changed) (UpClient *client,
+ void (*device_changed) (UpClient *client,
UpDevice *device);
- void (*device_removed) (UpClient *client,
+ void (*device_removed) (UpClient *client,
UpDevice *device);
- void (*changed) (UpClient *client);
+ void (*changed) (UpClient *client);
+ void (*notify_sleep) (UpClient *client,
+ UpSleepKind sleep_kind);
+ void (*notify_resume) (UpClient *client,
+ UpSleepKind sleep_kind);
/*< private >*/
/* Padding for future expansion */
void (*_up_client_reserved1) (void);
@@ -87,6 +91,7 @@ gboolean up_client_suspend_sync (UpClient *client,
GCancellable *cancellable,
GError **error);
gboolean up_client_about_to_sleep_sync (UpClient *client,
+ UpSleepKind sleep_kind,
GCancellable *cancellable,
GError **error);
gboolean up_client_hibernate_sync (UpClient *client,