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 "device_manager_mock.h"
17
18 namespace OHOS {
19 namespace DistributedHardware {
GetLocalDeviceInfo(const std::string & pkgName,DmDeviceInfo & deviceInfo)20 int32_t DeviceManagerImpl::GetLocalDeviceInfo(const std::string &pkgName, DmDeviceInfo &deviceInfo)
21 {
22 return PasteDeviceManager::pasteDeviceManager->GetLocalDeviceInfo(pkgName, deviceInfo);
23 }
GetUdidByNetworkId(const std::string & pkgName,const std::string & networkId,std::string & udid)24 int32_t DeviceManagerImpl::GetUdidByNetworkId(
25 const std::string &pkgName, const std::string &networkId, std::string &udid)
26 {
27 return PasteDeviceManager::pasteDeviceManager->GetUdidByNetworkId(pkgName, networkId, udid);
28 }
IsSameAccount(const std::string & networkId)29 bool DeviceManagerImpl::IsSameAccount(const std::string &networkId)
30 {
31 return PasteDeviceManager::pasteDeviceManager->IsSameAccount(networkId);
32 }
GetLocalDeviceType(const std::string & pkgName,int32_t & deviceType)33 int32_t DeviceManagerImpl::GetLocalDeviceType(const std::string &pkgName, int32_t &deviceType)
34 {
35 return PasteDeviceManager::pasteDeviceManager->GetLocalDeviceType(pkgName, deviceType);
36 }
GetTrustedDeviceList(const std::string & pkgName,const std::string & extra,std::vector<DmDeviceInfo> & deviceList)37 int32_t DeviceManagerImpl::GetTrustedDeviceList(
38 const std::string &pkgName, const std::string &extra, std::vector<DmDeviceInfo> &deviceList)
39 {
40 return PasteDeviceManager::pasteDeviceManager->GetTrustedDeviceList(pkgName, extra, deviceList);
41 }
42 } // namespace DistributedHardware
43 } // namespace OHOS