• 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 PIN_AUTH_DRIVER_HDI
17 #define PIN_AUTH_DRIVER_HDI
18 
19 #include <mutex>
20 #include <vector>
21 
22 #include <iauth_driver_hdi.h>
23 #include "iremote_broker.h"
24 #include "iauth_executor_hdi.h"
25 #include "pin_auth_interface_adapter.h"
26 #include "nocopyable.h"
27 
28 namespace OHOS {
29 namespace UserIam {
30 namespace PinAuth {
31 namespace PinHdi = OHOS::HDI::PinAuth::V1_0;
32 class PinAuthDriverHdi : public UserAuth::IAuthDriverHdi, public NoCopyable {
33 public:
34     explicit PinAuthDriverHdi(const std::shared_ptr<PinAuthInterfaceAdapter> &pinAuthInterfaceAdapter);
35     ~PinAuthDriverHdi() override = default;
36     void GetExecutorList(std::vector<std::shared_ptr<UserAuth::IAuthExecutorHdi>> &executorList) override;
37 
38 private:
39     static std::mutex mutex_;
40     const std::shared_ptr<PinAuthInterfaceAdapter> pinAuthInterfaceAdapter_;
41 };
42 } // PinAuth
43 } // UserIam
44 } // OHOS
45 
46 #endif // PIN_AUTH_DRIVER_HDI