1 /* 2 * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development 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_SHARING_MOCK_WFD_SOURCE_SCENE_H 17 #define OHOS_SHARING_MOCK_WFD_SOURCE_SCENE_H 18 19 #include <gmock/gmock.h> 20 #include "mock_ipc_msg_adapter.h" 21 #include "mock_sharing_adapter.h" 22 #include "mock_wifi_p2p.h" 23 #define private public 24 #define protected public 25 #define final 26 #include "wfd_source_scene.h" 27 #undef final 28 #undef private 29 #undef protected 30 31 namespace OHOS { 32 namespace Sharing { 33 34 class MockWfdSourceScene : public WfdSourceScene { 35 public: 36 void MockInitialize(); 37 std::shared_ptr<Wifi::WifiP2p> MockGetP2pInstance(); 38 std::shared_ptr<IpcMsgAdapter> MockGetIpcAdapter(); 39 std::shared_ptr<ISharingAdapter> MockGetSharingAdapter(); 40 41 public: 42 sptr<WfdP2pCallback> wfdP2pCallback_ = nullptr; 43 std::shared_ptr<MockWifiP2p> mockWifiP2pInstance_ = nullptr; 44 std::shared_ptr<MockIpcMsgAdapter> mockIpcAdapter_ = nullptr; 45 std::shared_ptr<MockSharingAdapter> mockSharingAdapter_ = nullptr; 46 }; 47 48 } // namespace Sharing 49 } // namespace OHOS 50 #endif 51