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 #ifndef OHOS_MINI_DM_DEVICE_MANAGER_IMPL_MINI_H 17 #define OHOS_MINI_DM_DEVICE_MANAGER_IMPL_MINI_H 18 19 #include "device_manager_mini.h" 20 21 #include <map> 22 #include <mutex> 23 #include <set> 24 25 #include "ipc_client_manager_mini.h" 26 #include "ipc_client_proxy.h" 27 28 namespace OHOS { 29 namespace DistributedHardware { 30 class DeviceManagerImplMini : public DeviceManagerMini { 31 public: 32 static DeviceManagerImplMini &GetInstance(); 33 34 public: 35 /** 36 * @tc.name: DeviceManagerImpl::InitDeviceManager 37 * @tc.desc: Initialize DeviceManager 38 * @tc.type: FUNC 39 */ 40 virtual int32_t InitDeviceManager(const std::string &pkgName) override; 41 /** 42 * @tc.name: DeviceManagerImpl::UnInitDeviceManager 43 * @tc.desc: UnInitialize DeviceManager 44 * @tc.type: FUNC 45 */ 46 virtual int32_t UnInitDeviceManager(const std::string &pkgName) override; 47 int32_t OnDmServiceDied(); 48 virtual int32_t GetLocalDisplayDeviceName(const std::string &pkgName, int32_t maxNameLength, 49 std::string &displayName) override; 50 51 private: 52 DeviceManagerImplMini() = default; 53 ~DeviceManagerImplMini() = default; 54 DeviceManagerImplMini(const DeviceManagerImplMini &) = delete; 55 DeviceManagerImplMini &operator=(const DeviceManagerImplMini &) = delete; 56 DeviceManagerImplMini(DeviceManagerImplMini &&) = delete; 57 DeviceManagerImplMini &operator=(DeviceManagerImplMini &&) = delete; 58 59 private: 60 std::shared_ptr<IpcClientProxy> ipcClientProxy_ = 61 std::make_shared<IpcClientProxy>(std::make_shared<IpcClientManagerMini>()); 62 }; 63 } // namespace DistributedHardware 64 } // namespace OHOS 65 #endif // OHOS_MINI_DM_DEVICE_MANAGER_IMPL_MINI_H 66