179a732c7Sopenharmony_ci/* 279a732c7Sopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd. 379a732c7Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 479a732c7Sopenharmony_ci * you may not use this file except in compliance with the License. 579a732c7Sopenharmony_ci * You may obtain a copy of the License at 679a732c7Sopenharmony_ci * 779a732c7Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 879a732c7Sopenharmony_ci * 979a732c7Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1079a732c7Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1179a732c7Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1279a732c7Sopenharmony_ci * See the License for the specific language governing permissions and 1379a732c7Sopenharmony_ci * limitations under the License. 1479a732c7Sopenharmony_ci */ 1579a732c7Sopenharmony_ci 1679a732c7Sopenharmony_ci#ifndef OHOS_DM_IMPL_TEST_H 1779a732c7Sopenharmony_ci#define OHOS_DM_IMPL_TEST_H 1879a732c7Sopenharmony_ci 1979a732c7Sopenharmony_ci#include <gtest/gtest.h> 2079a732c7Sopenharmony_ci 2179a732c7Sopenharmony_ci#include "device_manager.h" 2279a732c7Sopenharmony_ci#include "device_manager_callback.h" 2379a732c7Sopenharmony_ci#include "device_manager_impl.h" 2479a732c7Sopenharmony_ci 2579a732c7Sopenharmony_cinamespace OHOS { 2679a732c7Sopenharmony_cinamespace DistributedHardware { 2779a732c7Sopenharmony_ciclass DeviceManagerImplTest : public testing::Test { 2879a732c7Sopenharmony_cipublic: 2979a732c7Sopenharmony_ci static void SetUpTestCase(); 3079a732c7Sopenharmony_ci static void TearDownTestCase(); 3179a732c7Sopenharmony_ci void SetUp() override; 3279a732c7Sopenharmony_ci void TearDown() override; 3379a732c7Sopenharmony_ci}; 3479a732c7Sopenharmony_ci 3579a732c7Sopenharmony_ciclass DmInitCallbackTest : public DmInitCallback { 3679a732c7Sopenharmony_cipublic: 3779a732c7Sopenharmony_ci DmInitCallbackTest() : DmInitCallback() {} 3879a732c7Sopenharmony_ci ~DmInitCallbackTest() {} 3979a732c7Sopenharmony_ci void OnRemoteDied() {} 4079a732c7Sopenharmony_ci}; 4179a732c7Sopenharmony_ci 4279a732c7Sopenharmony_ciclass DmDeviceStateCallbackTest : public DeviceStateCallback { 4379a732c7Sopenharmony_cipublic: 4479a732c7Sopenharmony_ci DmDeviceStateCallbackTest() : DeviceStateCallback() {} 4579a732c7Sopenharmony_ci ~DmDeviceStateCallbackTest() {} 4679a732c7Sopenharmony_ci void OnDeviceOnline(const DmDeviceInfo &deviceInfo) {} 4779a732c7Sopenharmony_ci void OnDeviceOffline(const DmDeviceInfo &deviceInfo) {} 4879a732c7Sopenharmony_ci void OnDeviceChanged(const DmDeviceInfo &deviceInfo) {} 4979a732c7Sopenharmony_ci void OnDeviceReady(const DmDeviceInfo &deviceInfo) {} 5079a732c7Sopenharmony_ci}; 5179a732c7Sopenharmony_ci 5279a732c7Sopenharmony_ciclass DiscoveryCallbackTest : public DiscoveryCallback { 5379a732c7Sopenharmony_cipublic: 5479a732c7Sopenharmony_ci DiscoveryCallbackTest() : DiscoveryCallback() {} 5579a732c7Sopenharmony_ci ~DiscoveryCallbackTest() {} 5679a732c7Sopenharmony_ci void OnDiscoverySuccess(uint16_t subscribeId) {}; 5779a732c7Sopenharmony_ci void OnDiscoveryFailed(uint16_t subscribeId, int32_t failedReason) {}; 5879a732c7Sopenharmony_ci void OnDeviceFound(uint16_t subscribeId, const DmDeviceInfo &deviceInfo) {}; 5979a732c7Sopenharmony_ci void OnDeviceFound(uint16_t subscribeId, const DmDeviceBasicInfo &deviceBasicInfo) {}; 6079a732c7Sopenharmony_ci}; 6179a732c7Sopenharmony_ci} // namespace DistributedHardware 6279a732c7Sopenharmony_ci} // namespace OHOS 6379a732c7Sopenharmony_ci 6479a732c7Sopenharmony_ci#endif // OHOS_DM_IMPL_TEST_H 65