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 "softbus_bus_center.h"
17 #include "device_manager_impl_mock.h"
18
19 #include "gtest/gtest.h"
20
21 using namespace OHOS::Storage::DistributedFile;
22
GetLocalNodeDeviceInfo(const char * pkgName,NodeBasicInfo * info)23 int32_t GetLocalNodeDeviceInfo(const char *pkgName, NodeBasicInfo *info)
24 {
25 GTEST_LOG_(INFO) << "GetLocalNodeDeviceInfo start";
26 NodeBasicInfo nodeBasicInfo = {
27 .networkId = "100",
28 .deviceName = "test",
29 .deviceTypeId = 1};
30 (void)pkgName;
31 *info = nodeBasicInfo;
32 return DfsDeviceManagerImpl::dfsDeviceManagerImpl->GetLocalNodeDeviceInfo(pkgName, info);
33 }
34
GetNodeKeyInfo(const char * pkgName,const char * networkId,NodeDeviceInfoKey key,uint8_t * info,int32_t infoLen)35 int32_t GetNodeKeyInfo(const char *pkgName, const char *networkId,
36 NodeDeviceInfoKey key, uint8_t *info, int32_t infoLen)
37 {
38 GTEST_LOG_(INFO) << "GetNodeKeyInfo start";
39 (void)pkgName;
40 (void)networkId;
41 (void)key;
42 (void)info;
43 (void)infoLen;
44 return 0;
45 }