1/* 2 * Copyright (c) 2024 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 HdfPinAuth 18 * @{ 19 * 20 * @brief Provides APIs for the pin auth driver. 21 * 22 * The pin auth driver provides a unified interface for the pin auth service to access the pin auth driver. 23 * After obtaining the pin auth driver proxy, the service can call related APIs to obtain executors. 24 * After obtaining the pin auth executors, the service can call related APIs to get executor information, get 25 * template information, and enroll, authenticate, and delete templates, etc. 26 * 27 * @since 3.2 28 * @version 1.0 29 */ 30 31/** 32 * @file IExecutorCallback.idl 33 * 34 * @brief Defines the callback for an async API, which can be used to report operation results or 35 * get information of the async API. 36 * 37 * @since 3.2 38 * @version 1.0 39 */ 40 41package ohos.hdi.pin_auth.v2_0; 42 43import ohos.hdi.pin_auth.v2_0.PinAuthTypes; 44 45/** 46 * @brief Defines the callback for an async API, which can be used to report operation results or 47 * get information of the async API. See {@link IExecutor}. 48 * 49 * @since 3.2 50 * @version 1.0 51 */ 52[callback] interface IExecutorCallback { 53 /** 54 * @brief Defines the function for reporting operation results. 55 * 56 * @param result Indicates the result code. 57 * @param extraInfo Indicates extra information to report. 58 * 59 * @return Returns <b>0</b> if the operation is successful. 60 * @return Returns a non-zero value if the operation fails. 61 * 62 * @since 3.2 63 * @version 1.0 64 */ 65 OnResult([in] int result, [in] unsigned char[] extraInfo); 66 /** 67 * @brief Defines the function for reporting information in process. 68 * 69 * @param tip Indicates tip code. See {@link FaceTipsCode}. 70 * @param extraInfo Indicates extra information to report. 71 * 72 * @return Returns <b>0</b> if the operation is successful. 73 * @return Returns a non-zero value if the operation fails. 74 * 75 * @since 5.0 76 * @version 1.0 77 */ 78 OnTip([in] int tip, [in] unsigned char[] extraInfo); 79 /** 80 * @brief Defines the function for getting pin data. 81 * 82 * @param algoParameter is the parameter of the algorithm. 83 * @param authSubType Indicates the pin sub type. 84 * @param algoVersion is the version of the algorithm. 85 * @param challenge is challenge. 86 * @param complexityReg Indicates the complexity reg. 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 3.2 92 * @version 2.0 93 */ 94 OnGetData([in] unsigned char[] algoParameter, [in] unsigned long authSubType, [in] unsigned int algoVersion, 95 [in] unsigned char[] challenge, [in] String complexityReg); 96 /** 97 * @brief Defines the function for reporting message. 98 * 99 * @param destRole is the role of destination. 100 * @param msg is the message content. 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 * @since 5.0 106 * @version 1.0 107 */ 108 OnMessage([in] int destRole, [in] unsigned char[] msg); 109} 110/** @} */