1c5e268c6Sopenharmony_ci/*
2c5e268c6Sopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd.
3c5e268c6Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4c5e268c6Sopenharmony_ci * you may not use this file except in compliance with the License.
5c5e268c6Sopenharmony_ci * You may obtain a copy of the License at
6c5e268c6Sopenharmony_ci *
7c5e268c6Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8c5e268c6Sopenharmony_ci *
9c5e268c6Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10c5e268c6Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11c5e268c6Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12c5e268c6Sopenharmony_ci * See the License for the specific language governing permissions and
13c5e268c6Sopenharmony_ci * limitations under the License.
14c5e268c6Sopenharmony_ci */
15c5e268c6Sopenharmony_ci
16c5e268c6Sopenharmony_ci/**
17c5e268c6Sopenharmony_ci * @addtogroup HdfFingerprintAuth
18c5e268c6Sopenharmony_ci * @{
19c5e268c6Sopenharmony_ci *
20c5e268c6Sopenharmony_ci * @brief Provides APIs for the fingerprint auth driver.
21c5e268c6Sopenharmony_ci *
22c5e268c6Sopenharmony_ci * The fingerprint auth driver provides a unified interface for the fingerprint auth service to access the fingerprint auth driver.
23c5e268c6Sopenharmony_ci * After obtaining the fingerprint auth driver proxy, the service can call related APIs to obtain executors.
24c5e268c6Sopenharmony_ci * After obtaining the fingerprint auth executors, the service can call related APIs to get executor info, get
25c5e268c6Sopenharmony_ci * template info, enroll template, authenticate template, delete template, etc.
26c5e268c6Sopenharmony_ci *
27c5e268c6Sopenharmony_ci * @since 4.0
28c5e268c6Sopenharmony_ci */
29c5e268c6Sopenharmony_ci
30c5e268c6Sopenharmony_ci/**
31c5e268c6Sopenharmony_ci * @file IExecutor.idl
32c5e268c6Sopenharmony_ci *
33c5e268c6Sopenharmony_ci * @brief Defines the APIs of executor. These APIs can be used to get executor info, get
34c5e268c6Sopenharmony_ci * template info, enroll template, authenticate template, delete template, etc.
35c5e268c6Sopenharmony_ci *
36c5e268c6Sopenharmony_ci * @since 4.0
37c5e268c6Sopenharmony_ci */
38c5e268c6Sopenharmony_ci
39c5e268c6Sopenharmony_cipackage ohos.hdi.fingerprint_auth.v1_1;
40c5e268c6Sopenharmony_ci
41c5e268c6Sopenharmony_ciimport ohos.hdi.fingerprint_auth.v1_0.FingerprintAuthTypes;
42c5e268c6Sopenharmony_ciimport ohos.hdi.fingerprint_auth.v1_0.IExecutor;
43c5e268c6Sopenharmony_ciimport ohos.hdi.fingerprint_auth.v1_0.IExecutorCallback;
44c5e268c6Sopenharmony_ciimport ohos.hdi.fingerprint_auth.v1_1.FingerprintAuthTypes;
45c5e268c6Sopenharmony_ciimport ohos.hdi.fingerprint_auth.v1_1.ISaCommandCallback;
46c5e268c6Sopenharmony_ci
47c5e268c6Sopenharmony_ci/**
48c5e268c6Sopenharmony_ci * @brief Defines the APIs of executor. These APIs can be used to get executor info, get
49c5e268c6Sopenharmony_ci * template info, enroll template, authenticate template, delete template, etc.
50c5e268c6Sopenharmony_ci *
51c5e268c6Sopenharmony_ci * @since 4.0
52c5e268c6Sopenharmony_ci * @version 1.1
53c5e268c6Sopenharmony_ci */
54c5e268c6Sopenharmony_ciinterface IExecutor extends ohos.hdi.fingerprint_auth.v1_0.IExecutor {
55c5e268c6Sopenharmony_ci    /**
56c5e268c6Sopenharmony_ci     * @brief Authenticate template.
57c5e268c6Sopenharmony_ci     *
58c5e268c6Sopenharmony_ci     * @param scheduleId Indicates schedule id of authenticate.
59c5e268c6Sopenharmony_ci     * @param templateIdList Indicates the templates to process.
60c5e268c6Sopenharmony_ci     * @param endAfterFirstFail Indicates end authentication after the first authentication failure.
61c5e268c6Sopenharmony_ci     * @param extraInfo Indicates extra info of authenticate.
62c5e268c6Sopenharmony_ci     * @param callbackObj Indicates authenticate callback object, see {@link IExecutorCallback}.
63c5e268c6Sopenharmony_ci     *
64c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful.
65c5e268c6Sopenharmony_ci     * @return Returns a non-zero value if the operation fails.
66c5e268c6Sopenharmony_ci     *
67c5e268c6Sopenharmony_ci     * @since 4.0
68c5e268c6Sopenharmony_ci     * @version 1.1
69c5e268c6Sopenharmony_ci     */
70c5e268c6Sopenharmony_ci    AuthenticateV1_1([in] unsigned long scheduleId, [in] unsigned long[] templateIdList, [in] boolean endAfterFirstFail, [in] unsigned char[] extraInfo, [in] IExecutorCallback callbackObj);
71c5e268c6Sopenharmony_ci    /**
72c5e268c6Sopenharmony_ci     * @brief Get property.
73c5e268c6Sopenharmony_ci     *
74c5e268c6Sopenharmony_ci     * @param templateIdList Indicates the templates to process.
75c5e268c6Sopenharmony_ci     * @param propertyTypes Indicates the property types to get. See {@link GetPropertyType}.
76c5e268c6Sopenharmony_ci     * @param property Indicates property. See {@link Property}.
77c5e268c6Sopenharmony_ci     *
78c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful.
79c5e268c6Sopenharmony_ci     * @return Returns a non-zero value if the operation fails.
80c5e268c6Sopenharmony_ci     *
81c5e268c6Sopenharmony_ci     * @since 4.0
82c5e268c6Sopenharmony_ci     * @version 1.1
83c5e268c6Sopenharmony_ci     */
84c5e268c6Sopenharmony_ci    GetProperty([in] unsigned long[] templateIdList, [in] enum GetPropertyType[] propertyTypes, [out] struct Property property);
85c5e268c6Sopenharmony_ci    /**
86c5e268c6Sopenharmony_ci     * @brief Set cached templates.
87c5e268c6Sopenharmony_ci     *
88c5e268c6Sopenharmony_ci     * @param templateIdList Indicates the templates to cache.
89c5e268c6Sopenharmony_ci     *
90c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful.
91c5e268c6Sopenharmony_ci     * @return Returns a non-zero value if the operation fails.
92c5e268c6Sopenharmony_ci     *
93c5e268c6Sopenharmony_ci     * @since 4.0
94c5e268c6Sopenharmony_ci     * @version 1.1
95c5e268c6Sopenharmony_ci     */
96c5e268c6Sopenharmony_ci    SetCachedTemplates([in] unsigned long[] templateIdList);
97c5e268c6Sopenharmony_ci    /**
98c5e268c6Sopenharmony_ci     * @brief Register sa command callback.
99c5e268c6Sopenharmony_ci     *
100c5e268c6Sopenharmony_ci     * @param callbackObj Indicates the sa command callback.
101c5e268c6Sopenharmony_ci     *
102c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful.
103c5e268c6Sopenharmony_ci     * @return Returns a non-zero value if the operation fails.
104c5e268c6Sopenharmony_ci     */
105c5e268c6Sopenharmony_ci    RegisterSaCommandCallback([in] ISaCommandCallback callbackObj);
106c5e268c6Sopenharmony_ci}