• 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 #ifndef EXECUTOR_IMPL_H
17 #define EXECUTOR_IMPL_H
18 
19 #include <vector>
20 
21 #include "fingerprint_auth_hdi.h"
22 
23 namespace OHOS {
24 namespace HDI {
25 namespace FingerprintAuth {
26 class ExecutorImpl : public IExecutor {
27 public:
28     ExecutorImpl();
29 
30     ~ExecutorImpl() override = default;
31 
32     int32_t GetExecutorInfo(ExecutorInfo &executorInfo) override;
33 
34     int32_t GetTemplateInfo(uint64_t templateId, TemplateInfo &templateInfo) override;
35 
36     int32_t OnRegisterFinish(const std::vector<uint64_t> &templateIdList,
37         const std::vector<uint8_t> &frameworkPublicKey, const std::vector<uint8_t> &extraInfo) override;
38 
39     int32_t Enroll(uint64_t scheduleId, const std::vector<uint8_t> &extraInfo,
40         const sptr<IExecutorCallback> &callbackObj) override;
41 
42     int32_t Authenticate(uint64_t scheduleId, const std::vector<uint64_t> &templateIdList,
43         const std::vector<uint8_t> &extraInfo, const sptr<IExecutorCallback> &callbackObj) override;
44 
45     int32_t AuthenticateV1_1(uint64_t scheduleId, const std::vector<uint64_t> &templateIdList, bool endAfterFirstFail,
46         const std::vector<uint8_t> &extraInfo, const sptr<IExecutorCallback> &callbackObj) override;
47 
48     int32_t Identify(uint64_t scheduleId, const std::vector<uint8_t> &extraInfo,
49         const sptr<IExecutorCallback> &callbackObj) override;
50 
51     int32_t Delete(const std::vector<uint64_t> &templateIdList) override;
52 
53     int32_t Cancel(uint64_t scheduleId) override;
54 
55     int32_t SendCommand(int32_t commandId, const std::vector<uint8_t> &extraInfo,
56         const sptr<IExecutorCallback> &callbackObj) override;
57 
58     int32_t GetProperty(const std::vector<uint64_t> &templateIdList, const std::vector<GetPropertyType> &propertyTypes,
59         Property &property) override;
60 
61     int32_t SetCachedTemplates(const std::vector<uint64_t> &templateIdList) override;
62 
63     int32_t RegisterSaCommandCallback(const sptr<ISaCommandCallback> &callbackObj) override;
64 
65 private:
66     ExecutorInfo executorInfo_;
67 };
68 } // namespace FingerprintAuth
69 } // namespace HDI
70 } // namespace OHOS
71 #endif // EXECUTOR_IMPL_H
72