summaryrefslogtreecommitdiffstats
path: root/include/hardware/fingerprint.h
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2015-04-08 22:55:51 -0700
committerJim Miller <jaggies@google.com>2015-04-11 09:21:56 -0700
commit1e1f7ba5c99a0f715735c347597e3637e3870626 (patch)
tree7d46c41fc6403875dc88787d818d3358319c12c0 /include/hardware/fingerprint.h
parent3d0ed44138bf5ce3649990275eb5fc6c17517ce3 (diff)
downloadhardware_libhardware-1e1f7ba5c99a0f715735c347597e3637e3870626.zip
hardware_libhardware-1e1f7ba5c99a0f715735c347597e3637e3870626.tar.gz
hardware_libhardware-1e1f7ba5c99a0f715735c347597e3637e3870626.tar.bz2
Clean up FingerprintManager API and make it public.
Change-Id: I416dcc42fd70926875cc77e0c2cc958fdfcd9f9d
Diffstat (limited to 'include/hardware/fingerprint.h')
-rw-r--r--include/hardware/fingerprint.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/include/hardware/fingerprint.h b/include/hardware/fingerprint.h
index 1fe8cc9..1d190a6 100644
--- a/include/hardware/fingerprint.h
+++ b/include/hardware/fingerprint.h
@@ -154,16 +154,26 @@ typedef struct fingerprint_device {
int (*enroll)(struct fingerprint_device *dev, uint32_t gid, uint32_t timeout_sec);
/*
- * Cancel fingerprint enroll request:
- * Switches the HAL state machine back to accept a fingerprint scan mode.
- * (fingerprint_msg.type == FINGERPRINT_TEMPLATE_ENROLLING &&
- * fingerprint_msg.data.enroll.samples_remaining == 0)
+ * Fingerprint pre-enroll enroll request:
+ * Generates a unique token to upper layers to indicate the start of an enrollment transaction.
+ * This token will be wrapped by security for verification and passed to enroll() for
+ * verification before enrollment will be allowed. This is to ensure adding a new fingerprint
+ * template was preceded by some kind of credential confirmation (e.g. device password).
+ *
+ * Function return: 0 if function failed
+ * otherwise, a uint64_t of token
+ */
+ uint64_t (*pre_enroll)(struct fingerprint_device *dev);
+
+ /*
+ * Cancel pending enroll or authenticate, sending FINGERPRINT_ERROR_CANCELED
+ * to all running clients. Switches the HAL state machine back to the idle state.
* will indicate switch back to the scan mode.
*
* Function return: 0 if cancel request is accepted
* -1 otherwise.
*/
- int (*enroll_cancel)(struct fingerprint_device *dev);
+ int (*cancel)(struct fingerprint_device *dev);
/*
* Fingerprint remove request:
@@ -193,7 +203,7 @@ typedef struct fingerprint_device {
* Authenticates an operation identifed by operation_id
*
* Function return: 0 on success
- * -1 if the size is out of bounds.
+ * -1 if the operation cannot be completed
*/
int (*authenticate)(struct fingerprint_device *dev, uint64_t operation_id, uint32_t gid);
@@ -206,8 +216,7 @@ typedef struct fingerprint_device {
* Function return: 0 if callback function is successfuly registered
* -1 otherwise.
*/
- int (*set_notify)(struct fingerprint_device *dev,
- fingerprint_notify_t notify);
+ int (*set_notify)(struct fingerprint_device *dev, fingerprint_notify_t notify);
/*
* Client provided callback function to receive notifications.