1/* 2 * Copyright (C) 2017 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package android.hardware.biometrics.fingerprint@2.1; 18 19/* This HAL interface communicates asynchronous results from the 20 fingerprint driver in response to user actions on the fingerprint sensor 21*/ 22interface IBiometricsFingerprintClientCallback { 23 /** 24 * Sent when one enrollment step is complete. 25 * @param deviceId the instance of this fingerprint device 26 * @param fingerId the fingerprint templetate being enrolled 27 * @param groupId the groupid for the template being enrolled 28 * @param remaining the number of remaining steps before enrolllment is complete 29 */ 30 oneway onEnrollResult(uint64_t deviceId, uint32_t fingerId, uint32_t groupId, uint32_t remaining); 31 32 /** 33 * Sent when a fingerprint image is acquired by the sensor 34 * @param deviceId the instance of this fingerprint device 35 * @param acquiredInfo a message about the quality of the acquired image 36 * @param vendorCode a vendor-specific message about the quality of the image. Only 37 * valid when acquiredInfo == ACQUIRED_VENDOR 38 */ 39 oneway onAcquired(uint64_t deviceId, FingerprintAcquiredInfo acquiredInfo, int32_t vendorCode); 40 41 /** 42 * Sent when a fingerprint is authenticated 43 * @param deviceId the instance of this fingerprint device 44 * @param fingerId the fingerprint templetate that was authenticated 45 * @param groupId the groupid for the template that was authenticated 46 * @param token the hardware authentication token to pass to Keystore.addAuthToken() 47 */ 48 oneway onAuthenticated(uint64_t deviceId, uint32_t fingerId, uint32_t groupId, vec<uint8_t> token); 49 50 /** 51 * Sent when a fingerprint error occurs 52 * @param deviceId the instance of this fingerprint device 53 * @param error a message about the error that occurred 54 * @param vendorCode a vendor-speicifc error message. Only valid 55 * when error == ERROR_VENDOR 56 */ 57 oneway onError(uint64_t deviceId, FingerprintError error, int32_t vendorCode); 58 59 /** 60 * Sent when one template is removed 61 * @param deviceId the instance of this fingerprint device 62 * @param fingerId the fingerprint templetate being removed 63 * @param groupId the groupid for the template being removed 64 * @param remaining the number of remaining templates that will be removed. 65 */ 66 oneway onRemoved(uint64_t deviceId, uint32_t fingerId, uint32_t groupId, uint32_t remaining); 67 68 /** 69 * Sent when one fingerprint template is enumerated 70 * @param deviceId the instance of this fingerprint device 71 * @param fingerId the fingerprint for this templetate 72 * @param groupId the groupid for this template 73 * @param remaining the number of remaining steps before enumeration is complete 74 */ 75 oneway onEnumerate(uint64_t deviceId, uint32_t fingerId, uint32_t groupId, uint32_t remaining); 76}; 77