Sasha Levitskiy | 7bceb23 | 2016-09-02 11:27:42 -0700 | [diff] [blame] | 1 | /* |
Jim Miller | 902de51 | 2016-12-15 19:42:19 -0800 | [diff] [blame] | 2 | * Copyright (C) 2017 The Android Open Source Project |
Sasha Levitskiy | 7bceb23 | 2016-09-02 11:27:42 -0700 | [diff] [blame] | 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 | |
| 17 | package android.hardware.biometrics.fingerprint@2.1; |
| 18 | |
Jim Miller | 902de51 | 2016-12-15 19:42:19 -0800 | [diff] [blame] | 19 | /* This HAL interface communicates asynchronous results from the |
| 20 | fingerprint driver in response to user actions on the fingerprint sensor |
| 21 | */ |
Sasha Levitskiy | 7bceb23 | 2016-09-02 11:27:42 -0700 | [diff] [blame] | 22 | interface IBiometricsFingerprintClientCallback { |
Jim Miller | 902de51 | 2016-12-15 19:42:19 -0800 | [diff] [blame] | 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 |
Sasha Levitskiy | 7bceb23 | 2016-09-02 11:27:42 -0700 | [diff] [blame] | 29 | */ |
Jim Miller | 902de51 | 2016-12-15 19:42:19 -0800 | [diff] [blame] | 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 |
Jim Miller | 5f26c1a | 2017-01-19 18:39:06 -0800 | [diff] [blame] | 46 | * @param token the hardware authentication token to pass to Keystore.addAuthToken() |
Jim Miller | 902de51 | 2016-12-15 19:42:19 -0800 | [diff] [blame] | 47 | */ |
Jim Miller | 5f26c1a | 2017-01-19 18:39:06 -0800 | [diff] [blame] | 48 | oneway onAuthenticated(uint64_t deviceId, uint32_t fingerId, uint32_t groupId, vec<uint8_t> token); |
Jim Miller | 902de51 | 2016-12-15 19:42:19 -0800 | [diff] [blame] | 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); |
Sasha Levitskiy | 7bceb23 | 2016-09-02 11:27:42 -0700 | [diff] [blame] | 76 | }; |