1 /* 2 * Copyright (c) 2024-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 #ifndef OHOS_DEVICE_MANAGER_H 17 #define OHOS_DEVICE_MANAGER_H 18 19 #include <map> 20 #include <memory> 21 #include <string> 22 #include <vector> 23 24 #include "device_manager_callback.h" 25 #include "dm_device_info.h" 26 27 namespace OHOS { 28 namespace DistributedHardware { 29 class DeviceManager { 30 public: 31 static DeviceManager &GetInstance(); 32 33 public: 34 virtual int32_t InitDeviceManager(const std::string &pkgName, std::shared_ptr<DmInitCallback> dmInitCallback) = 0; 35 36 virtual int32_t UnInitDeviceManager(const std::string &pkgName) = 0; 37 38 virtual int32_t GetTrustedDeviceList(const std::string &pkgName, const std::string &extra, 39 std::vector<DmDeviceInfo> &deviceList) = 0; 40 41 virtual int32_t GetLocalDeviceInfo(const std::string &pkgName, DmDeviceInfo &deviceInfo) = 0; 42 43 virtual int32_t GetUdidByNetworkId(const std::string &pkgName, const std::string &netWorkId, std::string &udid) = 0; 44 45 virtual int32_t GetDeviceSecurityLevel(const std::string &pkgName, const std::string &networkId, 46 int32_t &securityLevel) = 0; 47 }; 48 } // namespace DistributedHardware 49 } // namespace OHOS 50 #endif // DEVICE_MANAGER_H