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 "v1_0/iexecutor.h" 22 23 namespace OHOS { 24 namespace HDI { 25 namespace FingerprintAuth { 26 namespace V1_0 { 27 class ExecutorImpl : public IExecutor { 28 public: 29 ExecutorImpl(); 30 31 virtual ~ExecutorImpl() = default; 32 33 int32_t GetExecutorInfo(ExecutorInfo &info) override; 34 35 int32_t GetTemplateInfo(uint64_t templateId, TemplateInfo &info) override; 36 37 int32_t OnRegisterFinish(const std::vector<uint64_t> &templateIdList, 38 const std::vector<uint8_t> &frameworkPublicKey, const std::vector<uint8_t> &extraInfo) override; 39 40 int32_t Enroll(uint64_t scheduleId, const std::vector<uint8_t> &extraInfo, 41 const sptr<IExecutorCallback> &callbackObj) override; 42 43 int32_t Authenticate(uint64_t scheduleId, const std::vector<uint64_t> &templateIdList, 44 const std::vector<uint8_t> &extraInfo, const sptr<IExecutorCallback> &callbackObj) override; 45 46 int32_t Identify(uint64_t scheduleId, const std::vector<uint8_t> &extraInfo, 47 const sptr<IExecutorCallback> &callbackObj) override; 48 49 int32_t Delete(const std::vector<uint64_t> &templateIdList) override; 50 51 int32_t Cancel(uint64_t scheduleId) override; 52 53 int32_t SendCommand(int32_t commandId, const std::vector<uint8_t> &extraInfo, 54 const sptr<IExecutorCallback> &callbackObj) override; 55 56 private: 57 struct ExecutorInfo executorInfo_; 58 }; 59 } // namespace V1_0 60 } // namespace FingerprintAuth 61 } // namespace HDI 62 } // namespace OHOS 63 #endif // EXECUTOR_IMPL_H 64