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 16 #include "client_trans_proxy_file_manager_mock.h" 17 18 using namespace testing; 19 using namespace testing::ext; 20 21 namespace OHOS { 22 void *g_clientTransProxyFileManagerInterface; ClientTransProxyFileManagerInterfaceMock()23ClientTransProxyFileManagerInterfaceMock::ClientTransProxyFileManagerInterfaceMock() 24 { 25 g_clientTransProxyFileManagerInterface = reinterpret_cast<void *>(this); 26 } 27 ~ClientTransProxyFileManagerInterfaceMock()28ClientTransProxyFileManagerInterfaceMock::~ClientTransProxyFileManagerInterfaceMock() 29 { 30 g_clientTransProxyFileManagerInterface = nullptr; 31 } 32 GetClientTransProxyFileManagerInterface()33static ClientTransProxyFileManagerInterface *GetClientTransProxyFileManagerInterface() 34 { 35 return reinterpret_cast<ClientTransProxyFileManagerInterface *>(g_clientTransProxyFileManagerInterface); 36 } 37 38 extern "C" { SoftBusLtoHl(uint32_t value)39uint32_t SoftBusLtoHl(uint32_t value) 40 { 41 return GetClientTransProxyFileManagerInterface()->SoftBusLtoHl(value); 42 } 43 SoftBusHtoLl(uint64_t value)44uint32_t SoftBusHtoLl(uint64_t value) 45 { 46 return GetClientTransProxyFileManagerInterface()->SoftBusHtoLl(value); 47 } 48 SoftBusLtoHll(uint64_t value)49uint64_t SoftBusLtoHll(uint64_t value) 50 { 51 return GetClientTransProxyFileManagerInterface()->SoftBusLtoHll(value); 52 } 53 SoftBusHtoLll(uint64_t value)54uint64_t SoftBusHtoLll(uint64_t value) 55 { 56 return GetClientTransProxyFileManagerInterface()->SoftBusHtoLll(value); 57 } 58 } 59 } 60