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 templateIdList Indicates the templates to process. 60 * @param endAfterFirstFail Indicates end authentication after the first authentication failure. 61 * @param extraInfo Indicates extra info of authenticate. 62 * @param callbackObj Indicates authenticate callback object, see {@link IExecutorCallback}. 63 * 64 * @return Returns <b>0</b> if the operation is successful. 65 * @return Returns a non-zero value if the operation fails. 66 * 67 * @since 4.0 68 * @version 1.1 69 */ 70 AuthenticateV1_1([in] unsigned long scheduleId, [in] unsigned long[] templateIdList, [in] boolean endAfterFirstFail, [in] unsigned char[] extraInfo, [in] IExecutorCallback callbackObj); 71 /** 72 * @brief Get property. 73 * 74 * @param templateIdList Indicates the templates to process. 75 * @param propertyTypes Indicates the property types to get. See {@link GetPropertyType}. 76 * @param property Indicates property. See {@link Property}. 77 * 78 * @return Returns <b>0</b> if the operation is successful. 79 * @return Returns a non-zero value if the operation fails. 80 * 81 * @since 4.0 82 * @version 1.1 83 */ 84 GetProperty([in] unsigned long[] templateIdList, [in] enum GetPropertyType[] propertyTypes, [out] struct Property property); 85 /** 86 * @brief Set cached templates. 87 * 88 * @param templateIdList Indicates the templates to cache. 89 * 90 * @return Returns <b>0</b> if the operation is successful. 91 * @return Returns a non-zero value if the operation fails. 92 * 93 * @since 4.0 94 * @version 1.1 95 */ 96 SetCachedTemplates([in] unsigned long[] templateIdList); 97 /** 98 * @brief Register sa command callback. 99 * 100 * @param callbackObj Indicates the sa command callback. 101 * 102 * @return Returns <b>0</b> if the operation is successful. 103 * @return Returns a non-zero value if the operation fails. 104 */ 105 RegisterSaCommandCallback([in] ISaCommandCallback callbackObj); 106}