blob: d913cf130141ab3c6f122996b70688f1714982fa [file] [log] [blame]
Sasha Levitskiy7bceb232016-09-02 11:27:42 -07001/*
Jim Miller902de512016-12-15 19:42:19 -08002 * Copyright (C) 2017 The Android Open Source Project
Sasha Levitskiy7bceb232016-09-02 11:27:42 -07003 *
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
Jim Miller902de512016-12-15 19:42:19 -080019/* This HAL interface communicates asynchronous results from the
20 fingerprint driver in response to user actions on the fingerprint sensor
21*/
Sasha Levitskiy7bceb232016-09-02 11:27:42 -070022interface IBiometricsFingerprintClientCallback {
Jim Miller902de512016-12-15 19:42:19 -080023 /**
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 Levitskiy7bceb232016-09-02 11:27:42 -070029 */
Jim Miller902de512016-12-15 19:42:19 -080030 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 Miller5f26c1a2017-01-19 18:39:06 -080046 * @param token the hardware authentication token to pass to Keystore.addAuthToken()
Jim Miller902de512016-12-15 19:42:19 -080047 */
Jim Miller5f26c1a2017-01-19 18:39:06 -080048 oneway onAuthenticated(uint64_t deviceId, uint32_t fingerId, uint32_t groupId, vec<uint8_t> token);
Jim Miller902de512016-12-15 19:42:19 -080049
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 Levitskiy7bceb232016-09-02 11:27:42 -070076};