1cb7eb8c9Sopenharmony_ci/* 2cb7eb8c9Sopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd. 3cb7eb8c9Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4cb7eb8c9Sopenharmony_ci * you may not use this file except in compliance with the License. 5cb7eb8c9Sopenharmony_ci * You may obtain a copy of the License at 6cb7eb8c9Sopenharmony_ci * 7cb7eb8c9Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8cb7eb8c9Sopenharmony_ci * 9cb7eb8c9Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10cb7eb8c9Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11cb7eb8c9Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12cb7eb8c9Sopenharmony_ci * See the License for the specific language governing permissions and 13cb7eb8c9Sopenharmony_ci * limitations under the License. 14cb7eb8c9Sopenharmony_ci */ 15cb7eb8c9Sopenharmony_ci 16cb7eb8c9Sopenharmony_ci#include "device_manager_impl.h" 17cb7eb8c9Sopenharmony_ci#include "device_manager_impl_mock.h" 18cb7eb8c9Sopenharmony_ci#include "dm_constants.h" 19cb7eb8c9Sopenharmony_ci 20cb7eb8c9Sopenharmony_ci#include "gtest/gtest.h" 21cb7eb8c9Sopenharmony_ci 22cb7eb8c9Sopenharmony_cinamespace OHOS { 23cb7eb8c9Sopenharmony_cinamespace DistributedHardware { 24cb7eb8c9Sopenharmony_ciusing namespace OHOS::Storage::DistributedFile; 25cb7eb8c9Sopenharmony_ciconst std::string NETWORKID_ONE = "45656596896323231"; 26cb7eb8c9Sopenharmony_ciconst std::string NETWORKID_TWO = "45656596896323232"; 27cb7eb8c9Sopenharmony_ciconst std::string NETWORKID_THREE = "45656596896323233"; 28cb7eb8c9Sopenharmony_ciconstexpr int32_t NETWORKTYPE_WITH_WIFI = 2; 29cb7eb8c9Sopenharmony_ciconstexpr int32_t NETWORKTYPE_NONE_WIFI = 4; 30cb7eb8c9Sopenharmony_ciDeviceManagerImpl &DeviceManagerImpl::GetInstance() 31cb7eb8c9Sopenharmony_ci{ 32cb7eb8c9Sopenharmony_ci GTEST_LOG_(INFO) << "GetInstance start"; 33cb7eb8c9Sopenharmony_ci static DeviceManagerImpl instance; 34cb7eb8c9Sopenharmony_ci return instance; 35cb7eb8c9Sopenharmony_ci} 36cb7eb8c9Sopenharmony_ci 37cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::InitDeviceManager(const std::string &pkgName, std::shared_ptr<DmInitCallback> dmInitCallback) 38cb7eb8c9Sopenharmony_ci{ 39cb7eb8c9Sopenharmony_ci return DfsDeviceManagerImpl::dfsDeviceManagerImpl->InitDeviceManager(pkgName, dmInitCallback); 40cb7eb8c9Sopenharmony_ci} 41cb7eb8c9Sopenharmony_ci 42cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::UnInitDeviceManager(const std::string &pkgName) 43cb7eb8c9Sopenharmony_ci{ 44cb7eb8c9Sopenharmony_ci return DfsDeviceManagerImpl::dfsDeviceManagerImpl->UnInitDeviceManager(pkgName); 45cb7eb8c9Sopenharmony_ci} 46cb7eb8c9Sopenharmony_ci 47cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::GetTrustedDeviceList(const std::string &pkgName, 48cb7eb8c9Sopenharmony_ci const std::string &extra, 49cb7eb8c9Sopenharmony_ci std::vector<DmDeviceInfo> &deviceList) 50cb7eb8c9Sopenharmony_ci{ 51cb7eb8c9Sopenharmony_ci return DfsDeviceManagerImpl::dfsDeviceManagerImpl->GetTrustedDeviceList(pkgName, extra, deviceList); 52cb7eb8c9Sopenharmony_ci} 53cb7eb8c9Sopenharmony_ci 54cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::GetTrustedDeviceList(const std::string &pkgName, 55cb7eb8c9Sopenharmony_ci const std::string &extra, 56cb7eb8c9Sopenharmony_ci bool isRefresh, 57cb7eb8c9Sopenharmony_ci std::vector<DmDeviceInfo> &deviceList) 58cb7eb8c9Sopenharmony_ci{ 59cb7eb8c9Sopenharmony_ci return 0; 60cb7eb8c9Sopenharmony_ci} 61cb7eb8c9Sopenharmony_ci 62cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::GetAvailableDeviceList(const std::string &pkgName, 63cb7eb8c9Sopenharmony_ci std::vector<DmDeviceBasicInfo> &deviceList) 64cb7eb8c9Sopenharmony_ci{ 65cb7eb8c9Sopenharmony_ci return 0; 66cb7eb8c9Sopenharmony_ci} 67cb7eb8c9Sopenharmony_ci 68cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::GetDeviceInfo(const std::string &pkgName, 69cb7eb8c9Sopenharmony_ci const std::string networkId, 70cb7eb8c9Sopenharmony_ci DmDeviceInfo &deviceInfo) 71cb7eb8c9Sopenharmony_ci{ 72cb7eb8c9Sopenharmony_ci return 0; 73cb7eb8c9Sopenharmony_ci} 74cb7eb8c9Sopenharmony_ci 75cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::GetLocalDeviceInfo(const std::string &pkgName, DmDeviceInfo &info) 76cb7eb8c9Sopenharmony_ci{ 77cb7eb8c9Sopenharmony_ci return DfsDeviceManagerImpl::dfsDeviceManagerImpl->GetLocalDeviceInfo(pkgName, info); 78cb7eb8c9Sopenharmony_ci} 79cb7eb8c9Sopenharmony_ci 80cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::RegisterDevStateCallback(const std::string &pkgName, 81cb7eb8c9Sopenharmony_ci const std::string &extra, 82cb7eb8c9Sopenharmony_ci std::shared_ptr<DeviceStateCallback> callback) 83cb7eb8c9Sopenharmony_ci{ 84cb7eb8c9Sopenharmony_ci return DfsDeviceManagerImpl::dfsDeviceManagerImpl->RegisterDevStateCallback(pkgName, extra, callback); 85cb7eb8c9Sopenharmony_ci} 86cb7eb8c9Sopenharmony_ci 87cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::RegisterDevStatusCallback(const std::string &pkgName, 88cb7eb8c9Sopenharmony_ci const std::string &extra, 89cb7eb8c9Sopenharmony_ci std::shared_ptr<DeviceStatusCallback> callback) 90cb7eb8c9Sopenharmony_ci{ 91cb7eb8c9Sopenharmony_ci return 0; 92cb7eb8c9Sopenharmony_ci} 93cb7eb8c9Sopenharmony_ci 94cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::UnRegisterDevStateCallback(const std::string &pkgName) 95cb7eb8c9Sopenharmony_ci{ 96cb7eb8c9Sopenharmony_ci return DfsDeviceManagerImpl::dfsDeviceManagerImpl->UnRegisterDevStateCallback(pkgName); 97cb7eb8c9Sopenharmony_ci} 98cb7eb8c9Sopenharmony_ci 99cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::UnRegisterDevStatusCallback(const std::string &pkgName) 100cb7eb8c9Sopenharmony_ci{ 101cb7eb8c9Sopenharmony_ci return 0; 102cb7eb8c9Sopenharmony_ci} 103cb7eb8c9Sopenharmony_ci 104cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::StartDeviceDiscovery(const std::string &pkgName, 105cb7eb8c9Sopenharmony_ci const DmSubscribeInfo &subscribeInfo, 106cb7eb8c9Sopenharmony_ci const std::string &extra, 107cb7eb8c9Sopenharmony_ci std::shared_ptr<DiscoveryCallback> callback) 108cb7eb8c9Sopenharmony_ci{ 109cb7eb8c9Sopenharmony_ci return 0; 110cb7eb8c9Sopenharmony_ci} 111cb7eb8c9Sopenharmony_ci 112cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::StartDeviceDiscovery(const std::string &pkgName, 113cb7eb8c9Sopenharmony_ci uint64_t tokenId, 114cb7eb8c9Sopenharmony_ci const std::string &filterOptions, 115cb7eb8c9Sopenharmony_ci std::shared_ptr<DiscoveryCallback> callback) 116cb7eb8c9Sopenharmony_ci{ 117cb7eb8c9Sopenharmony_ci return 0; 118cb7eb8c9Sopenharmony_ci} 119cb7eb8c9Sopenharmony_ci 120cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::StopDeviceDiscovery(const std::string &pkgName, uint16_t subscribeId) 121cb7eb8c9Sopenharmony_ci{ 122cb7eb8c9Sopenharmony_ci return 0; 123cb7eb8c9Sopenharmony_ci} 124cb7eb8c9Sopenharmony_ci 125cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::StopDeviceDiscovery(uint64_t tokenId, const std::string &pkgName) 126cb7eb8c9Sopenharmony_ci{ 127cb7eb8c9Sopenharmony_ci return 0; 128cb7eb8c9Sopenharmony_ci} 129cb7eb8c9Sopenharmony_ci 130cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::PublishDeviceDiscovery(const std::string &pkgName, 131cb7eb8c9Sopenharmony_ci const DmPublishInfo &publishInfo, 132cb7eb8c9Sopenharmony_ci std::shared_ptr<PublishCallback> callback) 133cb7eb8c9Sopenharmony_ci{ 134cb7eb8c9Sopenharmony_ci return 0; 135cb7eb8c9Sopenharmony_ci} 136cb7eb8c9Sopenharmony_ci 137cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::UnPublishDeviceDiscovery(const std::string &pkgName, int32_t publishId) 138cb7eb8c9Sopenharmony_ci{ 139cb7eb8c9Sopenharmony_ci return 0; 140cb7eb8c9Sopenharmony_ci} 141cb7eb8c9Sopenharmony_ci 142cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::AuthenticateDevice(const std::string &pkgName, 143cb7eb8c9Sopenharmony_ci int32_t authType, 144cb7eb8c9Sopenharmony_ci const DmDeviceInfo &deviceInfo, 145cb7eb8c9Sopenharmony_ci const std::string &extra, 146cb7eb8c9Sopenharmony_ci std::shared_ptr<AuthenticateCallback> callback) 147cb7eb8c9Sopenharmony_ci{ 148cb7eb8c9Sopenharmony_ci return 0; 149cb7eb8c9Sopenharmony_ci} 150cb7eb8c9Sopenharmony_ci 151cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::UnAuthenticateDevice(const std::string &pkgName, const DmDeviceInfo &deviceInfo) 152cb7eb8c9Sopenharmony_ci{ 153cb7eb8c9Sopenharmony_ci return 0; 154cb7eb8c9Sopenharmony_ci} 155cb7eb8c9Sopenharmony_ci 156cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::RegisterDeviceManagerFaCallback(const std::string &pkgName, 157cb7eb8c9Sopenharmony_ci std::shared_ptr<DeviceManagerUiCallback> callback) 158cb7eb8c9Sopenharmony_ci{ 159cb7eb8c9Sopenharmony_ci return 0; 160cb7eb8c9Sopenharmony_ci} 161cb7eb8c9Sopenharmony_ci 162cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::UnRegisterDeviceManagerFaCallback(const std::string &pkgName) 163cb7eb8c9Sopenharmony_ci{ 164cb7eb8c9Sopenharmony_ci return 0; 165cb7eb8c9Sopenharmony_ci} 166cb7eb8c9Sopenharmony_ci 167cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::VerifyAuthentication(const std::string &pkgName, 168cb7eb8c9Sopenharmony_ci const std::string &authPara, 169cb7eb8c9Sopenharmony_ci std::shared_ptr<VerifyAuthCallback> callback) 170cb7eb8c9Sopenharmony_ci{ 171cb7eb8c9Sopenharmony_ci return 0; 172cb7eb8c9Sopenharmony_ci} 173cb7eb8c9Sopenharmony_ci 174cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::GetFaParam(const std::string &pkgName, DmAuthParam &dmFaParam) 175cb7eb8c9Sopenharmony_ci{ 176cb7eb8c9Sopenharmony_ci return 0; 177cb7eb8c9Sopenharmony_ci} 178cb7eb8c9Sopenharmony_ci 179cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::SetUserOperation(const std::string &pkgName, int32_t action, const std::string ¶ms) 180cb7eb8c9Sopenharmony_ci{ 181cb7eb8c9Sopenharmony_ci return 0; 182cb7eb8c9Sopenharmony_ci} 183cb7eb8c9Sopenharmony_ci 184cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::GetUdidByNetworkId(const std::string &pkgName, 185cb7eb8c9Sopenharmony_ci const std::string &netWorkId, 186cb7eb8c9Sopenharmony_ci std::string &udid) 187cb7eb8c9Sopenharmony_ci{ 188cb7eb8c9Sopenharmony_ci return 0; 189cb7eb8c9Sopenharmony_ci} 190cb7eb8c9Sopenharmony_ci 191cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::GetUuidByNetworkId(const std::string &pkgName, 192cb7eb8c9Sopenharmony_ci const std::string &netWorkId, 193cb7eb8c9Sopenharmony_ci std::string &uuid) 194cb7eb8c9Sopenharmony_ci{ 195cb7eb8c9Sopenharmony_ci return 0; 196cb7eb8c9Sopenharmony_ci} 197cb7eb8c9Sopenharmony_ci 198cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::RegisterDevStateCallback(const std::string &pkgName, const std::string &extra) 199cb7eb8c9Sopenharmony_ci{ 200cb7eb8c9Sopenharmony_ci return 0; 201cb7eb8c9Sopenharmony_ci} 202cb7eb8c9Sopenharmony_ci 203cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::UnRegisterDevStateCallback(const std::string &pkgName, const std::string &extra) 204cb7eb8c9Sopenharmony_ci{ 205cb7eb8c9Sopenharmony_ci return 0; 206cb7eb8c9Sopenharmony_ci} 207cb7eb8c9Sopenharmony_ci 208cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::RequestCredential(const std::string &pkgName, 209cb7eb8c9Sopenharmony_ci const std::string &reqJsonStr, 210cb7eb8c9Sopenharmony_ci std::string &returnJsonStr) 211cb7eb8c9Sopenharmony_ci{ 212cb7eb8c9Sopenharmony_ci return 0; 213cb7eb8c9Sopenharmony_ci} 214cb7eb8c9Sopenharmony_ci 215cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::ImportCredential(const std::string &pkgName, const std::string &credentialInfo) 216cb7eb8c9Sopenharmony_ci{ 217cb7eb8c9Sopenharmony_ci return 0; 218cb7eb8c9Sopenharmony_ci} 219cb7eb8c9Sopenharmony_ci 220cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::DeleteCredential(const std::string &pkgName, const std::string &deleteInfo) 221cb7eb8c9Sopenharmony_ci{ 222cb7eb8c9Sopenharmony_ci return 0; 223cb7eb8c9Sopenharmony_ci} 224cb7eb8c9Sopenharmony_ci 225cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::RegisterCredentialCallback(const std::string &pkgName, 226cb7eb8c9Sopenharmony_ci std::shared_ptr<CredentialCallback> callback) 227cb7eb8c9Sopenharmony_ci{ 228cb7eb8c9Sopenharmony_ci return 0; 229cb7eb8c9Sopenharmony_ci} 230cb7eb8c9Sopenharmony_ci 231cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::UnRegisterCredentialCallback(const std::string &pkgName) 232cb7eb8c9Sopenharmony_ci{ 233cb7eb8c9Sopenharmony_ci return 0; 234cb7eb8c9Sopenharmony_ci} 235cb7eb8c9Sopenharmony_ci 236cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::NotifyEvent(const std::string &pkgName, const int32_t eventId, const std::string &event) 237cb7eb8c9Sopenharmony_ci{ 238cb7eb8c9Sopenharmony_ci return 0; 239cb7eb8c9Sopenharmony_ci} 240cb7eb8c9Sopenharmony_ci 241cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::OnDmServiceDied() 242cb7eb8c9Sopenharmony_ci{ 243cb7eb8c9Sopenharmony_ci return 0; 244cb7eb8c9Sopenharmony_ci} 245cb7eb8c9Sopenharmony_ci 246cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::GetEncryptedUuidByNetworkId(const std::string &pkgName, 247cb7eb8c9Sopenharmony_ci const std::string &networkId, 248cb7eb8c9Sopenharmony_ci std::string &uuid) 249cb7eb8c9Sopenharmony_ci{ 250cb7eb8c9Sopenharmony_ci return 0; 251cb7eb8c9Sopenharmony_ci} 252cb7eb8c9Sopenharmony_ci 253cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::GenerateEncryptedUuid(const std::string &pkgName, 254cb7eb8c9Sopenharmony_ci const std::string &uuid, 255cb7eb8c9Sopenharmony_ci const std::string &appId, 256cb7eb8c9Sopenharmony_ci std::string &encryptedUuid) 257cb7eb8c9Sopenharmony_ci{ 258cb7eb8c9Sopenharmony_ci return 0; 259cb7eb8c9Sopenharmony_ci} 260cb7eb8c9Sopenharmony_ci 261cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::CheckAPIAccessPermission() 262cb7eb8c9Sopenharmony_ci{ 263cb7eb8c9Sopenharmony_ci return 0; 264cb7eb8c9Sopenharmony_ci} 265cb7eb8c9Sopenharmony_ci 266cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::CheckNewAPIAccessPermission() 267cb7eb8c9Sopenharmony_ci{ 268cb7eb8c9Sopenharmony_ci return 0; 269cb7eb8c9Sopenharmony_ci} 270cb7eb8c9Sopenharmony_ci 271cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::GetLocalDeviceNetWorkId(const std::string &pkgName, std::string &networkId) 272cb7eb8c9Sopenharmony_ci{ 273cb7eb8c9Sopenharmony_ci return 0; 274cb7eb8c9Sopenharmony_ci} 275cb7eb8c9Sopenharmony_ci 276cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::GetLocalDeviceId(const std::string &pkgName, std::string &deviceId) 277cb7eb8c9Sopenharmony_ci{ 278cb7eb8c9Sopenharmony_ci return 0; 279cb7eb8c9Sopenharmony_ci} 280cb7eb8c9Sopenharmony_ci 281cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::GetLocalDeviceName(const std::string &pkgName, std::string &deviceName) 282cb7eb8c9Sopenharmony_ci{ 283cb7eb8c9Sopenharmony_ci return 0; 284cb7eb8c9Sopenharmony_ci} 285cb7eb8c9Sopenharmony_ci 286cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::GetLocalDeviceType(const std::string &pkgName, int32_t &deviceType) 287cb7eb8c9Sopenharmony_ci{ 288cb7eb8c9Sopenharmony_ci return 0; 289cb7eb8c9Sopenharmony_ci} 290cb7eb8c9Sopenharmony_ci 291cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::GetDeviceName(const std::string &pkgName, 292cb7eb8c9Sopenharmony_ci const std::string &networkId, 293cb7eb8c9Sopenharmony_ci std::string &deviceName) 294cb7eb8c9Sopenharmony_ci{ 295cb7eb8c9Sopenharmony_ci return 0; 296cb7eb8c9Sopenharmony_ci} 297cb7eb8c9Sopenharmony_ci 298cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::GetDeviceType(const std::string &pkgName, const std::string &networkId, int32_t &deviceType) 299cb7eb8c9Sopenharmony_ci{ 300cb7eb8c9Sopenharmony_ci return 0; 301cb7eb8c9Sopenharmony_ci} 302cb7eb8c9Sopenharmony_ci 303cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::BindDevice(const std::string &pkgName, 304cb7eb8c9Sopenharmony_ci int32_t bindType, 305cb7eb8c9Sopenharmony_ci const std::string &deviceId, 306cb7eb8c9Sopenharmony_ci const std::string &bindParam, 307cb7eb8c9Sopenharmony_ci std::shared_ptr<AuthenticateCallback> callback) 308cb7eb8c9Sopenharmony_ci{ 309cb7eb8c9Sopenharmony_ci return 0; 310cb7eb8c9Sopenharmony_ci} 311cb7eb8c9Sopenharmony_ci 312cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::UnBindDevice(const std::string &pkgName, const std::string &deviceId) 313cb7eb8c9Sopenharmony_ci{ 314cb7eb8c9Sopenharmony_ci return 0; 315cb7eb8c9Sopenharmony_ci} 316cb7eb8c9Sopenharmony_ci 317cb7eb8c9Sopenharmony_ciint32_t DeviceManagerImpl::GetNetworkTypeByNetworkId(const std::string &pkgName, 318cb7eb8c9Sopenharmony_ci const std::string &netWorkId, 319cb7eb8c9Sopenharmony_ci int32_t &netWorkType) 320cb7eb8c9Sopenharmony_ci{ 321cb7eb8c9Sopenharmony_ci GTEST_LOG_(INFO) << "GetTrustedDeviceList start"; 322cb7eb8c9Sopenharmony_ci if (netWorkId == NETWORKID_ONE) { 323cb7eb8c9Sopenharmony_ci return ERR_DM_INPUT_PARA_INVALID; 324cb7eb8c9Sopenharmony_ci } 325cb7eb8c9Sopenharmony_ci 326cb7eb8c9Sopenharmony_ci if (netWorkId == NETWORKID_TWO) { 327cb7eb8c9Sopenharmony_ci netWorkType = NETWORKTYPE_WITH_WIFI; 328cb7eb8c9Sopenharmony_ci return DM_OK; 329cb7eb8c9Sopenharmony_ci } 330cb7eb8c9Sopenharmony_ci 331cb7eb8c9Sopenharmony_ci netWorkType = NETWORKTYPE_NONE_WIFI; 332cb7eb8c9Sopenharmony_ci return DM_OK; 333cb7eb8c9Sopenharmony_ci} 334cb7eb8c9Sopenharmony_ci} // namespace DistributedHardware 335cb7eb8c9Sopenharmony_ci} // namespace OHOS 336