• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2023 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 #include "nci_nfcc_impl_default.h"
17 #include "nfcc_nci_adapter.h"
18 
19 namespace OHOS {
20 namespace NFC {
21 namespace NCI {
Initialize()22 bool NciNfccImplDefault::Initialize()
23 {
24     return NfccNciAdapter::GetInstance().Initialize();
25 }
26 
Deinitialize()27 bool NciNfccImplDefault::Deinitialize()
28 {
29     return NfccNciAdapter::GetInstance().Deinitialize();
30 }
31 
EnableDiscovery(uint16_t techMask,bool enableReaderMode,bool enableHostRouting,bool restart)32 void NciNfccImplDefault::EnableDiscovery(uint16_t techMask, bool enableReaderMode, bool enableHostRouting, bool restart)
33 {
34     NfccNciAdapter::GetInstance().EnableDiscovery(techMask, enableReaderMode, enableHostRouting, restart);
35 }
36 
DisableDiscovery()37 void NciNfccImplDefault::DisableDiscovery()
38 {
39     NfccNciAdapter::GetInstance().DisableDiscovery();
40 }
41 
SetScreenStatus(uint8_t screenStateMask)42 bool NciNfccImplDefault::SetScreenStatus(uint8_t screenStateMask)
43 {
44     NfccNciAdapter::GetInstance().SetScreenStatus(screenStateMask);
45     return true;
46 }
47 
GetNciVersion()48 int NciNfccImplDefault::GetNciVersion()
49 {
50     return NfccNciAdapter::GetInstance().GetNciVersion();
51 }
52 
Abort()53 void NciNfccImplDefault::Abort()
54 {
55     NfccNciAdapter::GetInstance().Abort();
56 }
57 
FactoryReset()58 void NciNfccImplDefault::FactoryReset()
59 {
60     NfccNciAdapter::GetInstance().FactoryReset();
61 }
62 
Shutdown()63 void NciNfccImplDefault::Shutdown()
64 {
65     NfccNciAdapter::GetInstance().Shutdown();
66 }
67 
NotifyMessageToVendor(int key,const std::string & value)68 void NciNfccImplDefault::NotifyMessageToVendor(int key, const std::string& value)
69 {
70 }
71 }  // namespace NCI
72 }  // namespace NFC
73 }  // namespace OHOS