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 17namespace OHOS { 18namespace HDI { 19namespace Nfc { 20NfcVendorAdaptions::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 39NfcVendorAdaptions::~NfcVendorAdaptions() {} 40 41int NfcVendorAdaptions::VendorOpen(NfcStackCallbackT *pCback, NfcStackDataCallbackT *pDataCback) 42{ 43 return 0; 44} 45 46int NfcVendorAdaptions::VendorWrite(uint16_t dataLen, const uint8_t *pData) 47{ 48 return 0; 49} 50 51int NfcVendorAdaptions::VendorCoreInitialized(uint16_t coreInitRspLen, uint8_t *pCoreInitRspParams) 52{ 53 return 0; 54} 55 56int NfcVendorAdaptions::VendorPrediscover(void) 57{ 58 return -1; 59} 60 61int NfcVendorAdaptions::VendorClose(bool bShutdown) 62{ 63 return 0; 64} 65 66int NfcVendorAdaptions::VendorControlGranted(void) 67{ 68 return -1; 69} 70 71int NfcVendorAdaptions::VendorPowerCycle(void) 72{ 73 return 0; 74} 75 76int NfcVendorAdaptions::VendorIoctl(long arg, void *pData) 77{ 78 return 0; 79} 80 81int NfcVendorAdaptions::VendorIoctlWithResponse(long arg, void *pData, uint16_t dataLen, std::vector<uint8_t> &pRetVal) 82{ 83 return 0; 84} 85 86int NfcVendorAdaptions::VendorGetConfig(V1_1::NfcVendorConfig &config) 87{ 88 return -1; 89} 90 91int NfcVendorAdaptions::VendorFactoryReset(void) 92{ 93 return -1; 94} 95 96int NfcVendorAdaptions::VendorShutdownCase(void) 97{ 98 return 0; 99} 100 101std::string NfcVendorAdaptions::GetChipType(void) 102{ 103 return ""; 104} 105 106std::string NfcVendorAdaptions::GetNfcHalFuncNameSuffix(const std::string &chipType) 107{ 108 return ""; 109} 110 111void NfcVendorAdaptions::ResetNfcInterface(void) 112{ 113 return; 114} 115 116int8_t NfcVendorAdaptions::InitNfcHalInterfaces(std::string nfcHalSoName, std::string suffix) 117{ 118 return 0; 119} 120 121void NfcVendorAdaptions::CheckFirmwareUpdate(void) 122{ 123 return; 124} 125} // Nfc 126} // HDI 127} // OHOS