1 /*
2  * Copyright (C) 2024 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 #include "mock.h"
16 
17 namespace OHOS {
18 namespace HDI {
19 namespace Nfc {
NfcVendorAdaptions()20 NfcVendorAdaptions::NfcVendorAdaptions()
21 {
22     nfcHalHandle = nullptr;
23     nfcHalInf.nfcHalOpen = nullptr;
24     nfcHalInf.nfcHalWrite = nullptr;
25     nfcHalInf.nfcHalCoreInitialized = nullptr;
26     nfcHalInf.nfcHalPrediscover = nullptr;
27     nfcHalInf.nfcHalClose = nullptr;
28     nfcHalInf.nfcHalControlGranted = nullptr;
29     nfcHalInf.nfcHalPowerCycle = nullptr;
30     nfcHalInf.nfcHalIoctl = nullptr;
31     nfcHalInf.nfcHalGetConfig = nullptr;
32     nfcHalInf.nfcHalFactoryReset = nullptr;
33     nfcHalInf.nfcHalShutdownCase = nullptr;
34     nfcExtHandle = nullptr;
35     nfcExtInf.getNfcChipType = nullptr;
36     nfcExtInf.getNfcHalFuncNameSuffix = nullptr;
37 }
38 
~NfcVendorAdaptions()39 NfcVendorAdaptions::~NfcVendorAdaptions() {}
40 
VendorOpen(NfcStackCallbackT * pCback,NfcStackDataCallbackT * pDataCback)41 int NfcVendorAdaptions::VendorOpen(NfcStackCallbackT *pCback, NfcStackDataCallbackT *pDataCback)
42 {
43     return 0;
44 }
45 
VendorWrite(uint16_t dataLen,const uint8_t * pData)46 int NfcVendorAdaptions::VendorWrite(uint16_t dataLen, const uint8_t *pData)
47 {
48     return 0;
49 }
50 
VendorCoreInitialized(uint16_t coreInitRspLen,uint8_t * pCoreInitRspParams)51 int NfcVendorAdaptions::VendorCoreInitialized(uint16_t coreInitRspLen, uint8_t *pCoreInitRspParams)
52 {
53     return 0;
54 }
55 
VendorPrediscover(void)56 int NfcVendorAdaptions::VendorPrediscover(void)
57 {
58     return -1;
59 }
60 
VendorClose(bool bShutdown)61 int NfcVendorAdaptions::VendorClose(bool bShutdown)
62 {
63     return 0;
64 }
65 
VendorControlGranted(void)66 int NfcVendorAdaptions::VendorControlGranted(void)
67 {
68     return -1;
69 }
70 
VendorPowerCycle(void)71 int NfcVendorAdaptions::VendorPowerCycle(void)
72 {
73     return 0;
74 }
75 
VendorIoctl(long arg,void * pData)76 int NfcVendorAdaptions::VendorIoctl(long arg, void *pData)
77 {
78     return 0;
79 }
80 
VendorIoctlWithResponse(long arg,void * pData,uint16_t dataLen,std::vector<uint8_t> & pRetVal)81 int NfcVendorAdaptions::VendorIoctlWithResponse(long arg, void *pData, uint16_t dataLen, std::vector<uint8_t> &pRetVal)
82 {
83     return 0;
84 }
85 
VendorGetConfig(V1_1::NfcVendorConfig & config)86 int NfcVendorAdaptions::VendorGetConfig(V1_1::NfcVendorConfig &config)
87 {
88     return -1;
89 }
90 
VendorFactoryReset(void)91 int NfcVendorAdaptions::VendorFactoryReset(void)
92 {
93     return -1;
94 }
95 
VendorShutdownCase(void)96 int NfcVendorAdaptions::VendorShutdownCase(void)
97 {
98     return 0;
99 }
100 
GetChipType(void)101 std::string NfcVendorAdaptions::GetChipType(void)
102 {
103     return "";
104 }
105 
GetNfcHalFuncNameSuffix(const std::string & chipType)106 std::string NfcVendorAdaptions::GetNfcHalFuncNameSuffix(const std::string &chipType)
107 {
108     return "";
109 }
110 
ResetNfcInterface(void)111 void NfcVendorAdaptions::ResetNfcInterface(void)
112 {
113     return;
114 }
115 
InitNfcHalInterfaces(std::string nfcHalSoName,std::string suffix)116 int8_t NfcVendorAdaptions::InitNfcHalInterfaces(std::string nfcHalSoName, std::string suffix)
117 {
118     return 0;
119 }
120 
CheckFirmwareUpdate(void)121 void NfcVendorAdaptions::CheckFirmwareUpdate(void)
122 {
123     return;
124 }
125 } // Nfc
126 } // HDI
127 } // OHOS