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