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 HdfFaceAuth 18 * @{ 19 * 20 * @brief Provides APIs for the face auth driver. 21 * 22 * The face auth driver provides a unified interface for the face auth service to access the face auth driver. 23 * After obtaining the face auth driver proxy, the service can call related APIs to obtain executors. 24 * After obtaining the face 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 */ 29 30/** 31 * @file IExecutorCallback.idl 32 * 33 * @brief Defines the callback for an async API, which can be used to report operation results or information 34 * of the async API. 35 * 36 * @since 3.2 37 */ 38 39package ohos.hdi.face_auth.v2_0; 40 41/** 42 * @brief Defines the callback for an async API, which can be used to report operation results or information 43 * of the async API. 44 * 45 * @since 3.2 46 * @version 2.0 47 */ 48[callback] interface IExecutorCallback { 49 /** 50 * @brief Defines the function for reporting operation results. 51 * 52 * @param result Indicates the result code. 53 * @param extraInfo Indicates extra information to report. 54 * 55 * @return Returns <b>0</b> if the operation is successful. 56 * @return Returns a non-zero value if the operation fails. 57 * 58 * @since 3.2 59 * @version 1.0 60 */ 61 OnResult([in] int result, [in] unsigned char[] extraInfo); 62 /** 63 * @brief Defines the function for reporting information in process. 64 * 65 * @param tip Indicates tip code. See {@link FaceTipsCode}. 66 * @param extraInfo Indicates extra information to report. 67 * 68 * @return Returns <b>0</b> if the operation is successful. 69 * @return Returns a non-zero value if the operation fails. 70 * 71 * @since 3.2 72 * @version 2.0 73 */ 74 OnTip([in] int tip, [in] unsigned char[] extraInfo); 75 /** 76 * @brief Defines the function for reporting message. 77 * 78 * @param destRole is the role of destination. 79 * @param msg is the message content. 80 * 81 * @return Returns <b>0</b> if the operation is successful. 82 * @return Returns a non-zero value if the operation fails. 83 * 84 * @since 5.0 85 * @version 1.0 86 */ 87 OnMessage([in] int destRole, [in] unsigned char[] msg); 88} 89/** @} */