/* * Copyright (c) 2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @addtogroup HdfFingerprintAuth * @{ * * @brief Provides APIs for the fingerprint auth driver. * * The fingerprint auth driver provides a unified interface for the fingerprint auth service to access the fingerprint auth driver. * After obtaining the fingerprint auth driver proxy, the service can call related APIs to obtain executors. * After obtaining the fingerprint auth executors, the service can call related APIs to get executor info, get * template info, enroll template, authenticate template, delete template, etc. * * @since 3.2 */ /** * @file IExecutorCallback.idl * * @brief Defines the callback for async API. These callback can be used to report operation result or info * of async API. * * @since 3.2 */ package ohos.hdi.fingerprint_auth.v1_0; /** * @brief Defines the callback for async API. This callback needs to be registered when * executor user calls an async function. For details, see {@link IExecutor}. * * @since 3.2 * @version 1.0 */ [callback] interface IExecutorCallback { /** * @brief Defines the function for reporting operation result. * * @param result Indicates result code. * @param extraInfo Indicates extra info to report. * * @return Returns 0 if the operation is successful. * @return Returns a non-zero value if the operation fails. */ OnResult([in] int result, [in] unsigned char[] extraInfo); /** * @brief defines the function for reporting info in process. * * @param tip Indicates tip code, see {@link FingerprintTipsCode}. * @param extraInfo Indicates extra info to report. * * @return Returns 0 if the operation is successful. * @return Returns a non-zero value if the operation fails. */ OnTip([in] int tip, [in] unsigned char[] extraInfo); }