1 /* 2 * Copyright (c) 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 #ifndef OHOS_UTTEST_MINE_SOFTBUS_LISTENER_H 16 #define OHOS_UTTEST_MINE_SOFTBUS_LISTENER_H 17 18 #include <gtest/gtest.h> 19 #include <refbase.h> 20 #include <map> 21 #include <memory> 22 #include <mutex> 23 #include <string> 24 #include <vector> 25 26 #include "softbus_adapter.h" 27 #include "softbus_bus_center.h" 28 #include "softbus_listener.h" 29 #include "dm_device_info.h" 30 #include "dm_subscribe_info.h" 31 #include "inner_session.h" 32 #include "mine_softbus_listener.h" 33 #include "session.h" 34 35 namespace OHOS { 36 namespace DistributedHardware { 37 class MineSoftbusListenerTest : public testing::Test { 38 public: 39 static void SetUpTestCase(); 40 static void TearDownTestCase(); 41 void SetUp(); 42 void TearDown(); 43 }; 44 45 class ISoftbusDiscoveringCallbackTest : public ISoftbusDiscoveringCallback { 46 public: ~ISoftbusDiscoveringCallbackTest()47 virtual ~ISoftbusDiscoveringCallbackTest() 48 { 49 } OnDeviceFound(const std::string & pkgName,const DmDeviceInfo & info,bool isOnline)50 void OnDeviceFound(const std::string &pkgName, const DmDeviceInfo &info, bool isOnline) override 51 { 52 (void)pkgName; 53 (void)info; 54 (void)isOnline; 55 } OnDiscoveringResult(const std::string & pkgName,int32_t subscribeId,int32_t result)56 void OnDiscoveringResult(const std::string &pkgName, int32_t subscribeId, int32_t result) override 57 { 58 (void)pkgName; 59 (void)subscribeId; 60 (void)result; 61 } 62 }; 63 } // namespace DistributedHardware 64 } // namespace OHOS 65 #endif 66