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