• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 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  * @file iam_executor_idriver_manager.h
18  *
19  * @brief Driver manager of executor.
20  * @since 3.1
21  * @version 3.2
22  */
23 
24 #ifndef IAM_EXECUTOR_IEXECUTE_CALLBACK_H
25 #define IAM_EXECUTOR_IEXECUTE_CALLBACK_H
26 
27 #include <cstdint>
28 #include <vector>
29 
30 #include "iam_common_defines.h"
31 
32 namespace OHOS {
33 namespace UserIam {
34 namespace UserAuth {
35 class IExecuteCallback {
36 public:
37     using ResultCode = UserIam::UserAuth::ResultCode;
38 
39     /**
40      * @brief Default constructor.
41      */
42     IExecuteCallback() = default;
43 
44     /**
45      * @brief Deconstructor.
46      */
47     virtual ~IExecuteCallback() = default;
48 
49     /**
50      * @brief The callback return execute result.
51      *
52      * @param result The result success or error code{@link ResultCode}.
53      * @param extraInfo Other related information about execute.
54      */
55     virtual void OnResult(ResultCode result, const std::vector<uint8_t> &extraInfo) = 0;
56 
57     /**
58      * @brief The callback return execute result.
59      *
60      * @param result The result success or error code{@link ResultCode}.
61      */
62     virtual void OnResult(ResultCode result) = 0;
63 
64     /**
65      * @brief The callback return authenticate acquire information.
66      *
67      * @param acquireInfo Acquire info needed to be pass in.
68      * @param extraInfo Other related information about execute.
69      */
70     virtual void OnAcquireInfo(int32_t acquire, const std::vector<uint8_t> &extraInfo) = 0;
71 };
72 } // namespace UserAuth
73 } // namespace UserIam
74 } // namespace OHOS
75 
76 #endif // IAM_EXECUTOR_EXECUTE_CALLBACK_H