diff options
author | Jim Miller <jaggies@google.com> | 2015-03-24 19:25:47 -0700 |
---|---|---|
committer | Jim Miller <jaggies@google.com> | 2015-03-24 19:27:57 -0700 |
commit | 1fb1e33454467b44f5e370454dec2c6caccc58a2 (patch) | |
tree | 3cf840e76b6200715ba74322d580b3e275081e1e /include/hardware/fingerprint.h | |
parent | 147814cd4c2231400aa6a2ea633f7c342498bc7d (diff) | |
download | hardware_libhardware-1fb1e33454467b44f5e370454dec2c6caccc58a2.zip hardware_libhardware-1fb1e33454467b44f5e370454dec2c6caccc58a2.tar.gz hardware_libhardware-1fb1e33454467b44f5e370454dec2c6caccc58a2.tar.bz2 |
Update fingerprint.h for new API
This adds vendor-specific messaging capabilities to the
HAL driver to avoid the possibility of vendors clobbering
general-purpose methods. The framework translates these
additional messages as an offset into a custom message array.
Additionally, authenticate() now takes a group id to restrict
authentication to a subset of possible fingerprints.
Bug 16487912
Change-Id: I8a92a6c86b4729af03a5576b4a150b1c73fbc9cc
Diffstat (limited to 'include/hardware/fingerprint.h')
-rw-r--r-- | include/hardware/fingerprint.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/hardware/fingerprint.h b/include/hardware/fingerprint.h index 69307fe..1fe8cc9 100644 --- a/include/hardware/fingerprint.h +++ b/include/hardware/fingerprint.h @@ -34,7 +34,10 @@ typedef enum fingerprint_error { FINGERPRINT_ERROR_HW_UNAVAILABLE = 1, FINGERPRINT_ERROR_UNABLE_TO_PROCESS = 2, FINGERPRINT_ERROR_TIMEOUT = 3, - FINGERPRINT_ERROR_NO_SPACE = 4 /* No space available to store a template */ + FINGERPRINT_ERROR_NO_SPACE = 4, /* No space available to store a template */ + FINGERPRINT_ERROR_CANCELED = 5, + FINGERPRINT_ERROR_UNABLE_TO_REMOVE = 6, /* fingerprint id can't be removed */ + FINGERPRINT_ERROR_VENDOR_BASE = 1000 /* vendor-specific error messages start here */ } fingerprint_error_t; typedef enum fingerprint_acquired_info { @@ -44,7 +47,7 @@ typedef enum fingerprint_acquired_info { FINGERPRINT_ACQUIRED_IMAGER_DIRTY = 3, FINGERPRINT_ACQUIRED_TOO_SLOW = 4, FINGERPRINT_ACQUIRED_TOO_FAST = 5, - FINGERPRINT_ACQUIRED_VENDOR_DEFINED = 6 + FINGERPRINT_ACQUIRED_VENDOR_BASE = 1000 /* vendor-specific acquisition messages start here */ } fingerprint_acquired_info_t; typedef struct fingerprint_finger_id { @@ -78,9 +81,9 @@ typedef enum fingerprint_enroll_msg_type { typedef struct fingerprint_enroll { fingerprint_finger_id_t finger; - uint32_t samples_remaining; /* samples_remaining goes from N (no data collected, but N scans needed) * to 0 (no more data is needed to build a template). */ + uint32_t samples_remaining; fingerprint_enroll_msg_type_t msg_type; size_t msg_size; void *msg; @@ -192,7 +195,7 @@ typedef struct fingerprint_device { * Function return: 0 on success * -1 if the size is out of bounds. */ - int (*authenticate)(struct fingerprint_device *dev, uint64_t operation_id); + int (*authenticate)(struct fingerprint_device *dev, uint64_t operation_id, uint32_t gid); /* * Set notification callback: |