From 76b43f9e4186395754a2d6c70cb648867cd38664 Mon Sep 17 00:00:00 2001 From: Naveen Ramaraj Date: Mon, 22 Jun 2015 17:47:18 -0700 Subject: hardware: gatekeeper: Add delete and delete_all api's Add delete and delete_all api for gatekeeper. Change-Id: I0511cb546ecba54b2a60692d6f704f24c55aa940 --- include/hardware/gatekeeper.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'include') 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, -- cgit v1.1