summaryrefslogtreecommitdiffstats
path: root/include/hardware/gatekeeper.h
diff options
context:
space:
mode:
authorNaveen Ramaraj <nramaraj@codeaurora.org>2015-06-22 17:47:18 -0700
committerAndres Morales <anmorales@google.com>2015-06-23 13:18:52 -0700
commit76b43f9e4186395754a2d6c70cb648867cd38664 (patch)
tree5ccf1e886830a27e61b1e0d824277bb0fa4788ed /include/hardware/gatekeeper.h
parent396d6cbce987deac076ac1a636d3f7282ec9338d (diff)
downloadhardware_libhardware-76b43f9e4186395754a2d6c70cb648867cd38664.zip
hardware_libhardware-76b43f9e4186395754a2d6c70cb648867cd38664.tar.gz
hardware_libhardware-76b43f9e4186395754a2d6c70cb648867cd38664.tar.bz2
hardware: gatekeeper: Add delete and delete_all api's
Add delete and delete_all api for gatekeeper. Change-Id: I0511cb546ecba54b2a60692d6f704f24c55aa940
Diffstat (limited to 'include/hardware/gatekeeper.h')
-rw-r--r--include/hardware/gatekeeper.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/hardware/gatekeeper.h b/include/hardware/gatekeeper.h
index 6d2fb0b..2bb2b08 100644
--- a/include/hardware/gatekeeper.h
+++ b/include/hardware/gatekeeper.h
@@ -143,7 +143,36 @@ struct gatekeeper_device {
const uint8_t *provided_password, uint32_t provided_password_length,
uint8_t **auth_token, uint32_t *auth_token_length, bool *request_reenroll);
+ /*
+ * Deletes the enrolled_password_handle associated wth the uid. Once deleted
+ * the user cannot be verified anymore.
+ * This function is optional and should be set to NULL if it is not implemented.
+ *
+ * Parameters
+ * - dev: pointer to gatekeeper_device acquired via calls to gatekeeper_open
+ * - uid: the Android user identifier
+ *
+ * Returns:
+ * - 0 on success
+ * - An error code < 0 on failure
+ */
+ int (*delete_user)(const struct gatekeeper_device *dev, uint32_t uid);
+
+ /*
+ * Deletes all the enrolled_password_handles for all uid's. Once called,
+ * no users will be enrolled on the device.
+ * This function is optional and should be set to NULL if it is not implemented.
+ *
+ * Parameters
+ * - dev: pointer to gatekeeper_device acquired via calls to gatekeeper_open
+ *
+ * Returns:
+ * - 0 on success
+ * - An error code < 0 on failure
+ */
+ int (*delete_all_users)(const struct gatekeeper_device *dev);
};
+
typedef struct gatekeeper_device gatekeeper_device_t;
static inline int gatekeeper_open(const struct hw_module_t *module,