• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 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 "softbus_center_mock.h"
17 
18 #include "gtest/gtest.h"
19 
20 namespace OHOS {
21 namespace DistributedHardware {
22 
SoftbusCenterMock()23 SoftbusCenterMock::SoftbusCenterMock()
24 {
25 }
~SoftbusCenterMock()26 SoftbusCenterMock::~SoftbusCenterMock()
27 {
28 }
29 
30 extern "C" {
GetNodeKeyInfo(const char * pkgName,const char * networkId,NodeDeviceInfoKey key,uint8_t * info,int32_t infoLen)31 int32_t GetNodeKeyInfo(const char *pkgName, const char *networkId, NodeDeviceInfoKey key, uint8_t *info,
32     int32_t infoLen)
33 {
34     return SoftbusCenterInterface::softbusCenterInterface_->GetNodeKeyInfo(pkgName, networkId, key, info, infoLen);
35 }
36 
GetLocalNodeDeviceInfo(const char * pkgName,NodeBasicInfo * info)37 int32_t GetLocalNodeDeviceInfo(const char *pkgName, NodeBasicInfo *info)
38 {
39     return SoftbusCenterInterface::softbusCenterInterface_->GetLocalNodeDeviceInfo(pkgName, info);
40 }
41 
GetAllNodeDeviceInfo(const char * pkgName,NodeBasicInfo ** info,int32_t * infoNum)42 int32_t GetAllNodeDeviceInfo(const char *pkgName, NodeBasicInfo **info, int32_t *infoNum)
43 {
44     return SoftbusCenterInterface::softbusCenterInterface_->GetAllNodeDeviceInfo(pkgName, info, infoNum);
45 }
46 }
47 } //namespace DistributedHardware
48 } // namespace OHOS