mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
device: Implement suspend/resume methods
The assumption here is that in most cases, we will just cancel any ongoing operation. However, if the device choses to implement suspend/resume handling and it returns success, then operations will not be cancelled. Note that suspend/resume requests cannot be cancelled. Closes: #256
This commit is contained in:
@@ -53,6 +53,7 @@ typedef struct
|
||||
|
||||
gboolean is_removed;
|
||||
gboolean is_open;
|
||||
gboolean is_suspended;
|
||||
|
||||
gchar *device_id;
|
||||
gchar *device_name;
|
||||
@@ -83,6 +84,12 @@ typedef struct
|
||||
guint critical_section;
|
||||
GSource *critical_section_flush_source;
|
||||
gboolean cancel_queued;
|
||||
gboolean suspend_queued;
|
||||
gboolean resume_queued;
|
||||
|
||||
/* Suspend/resume tasks */
|
||||
GTask *suspend_resume_task;
|
||||
GError *suspend_error;
|
||||
|
||||
/* Device temperature model information and state */
|
||||
GSource *temp_timeout;
|
||||
@@ -123,5 +130,7 @@ typedef struct
|
||||
|
||||
void match_data_free (FpMatchData *match_data);
|
||||
|
||||
void fpi_device_configure_wakeup (FpDevice *device,
|
||||
gboolean enabled);
|
||||
void fpi_device_update_temp (FpDevice *device,
|
||||
gboolean is_active);
|
||||
|
||||
Reference in New Issue
Block a user