peer_network_dependencies.h (1208B)
1 /* 2 * Copyright (c) 2021 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef API_TEST_PEER_NETWORK_DEPENDENCIES_H_ 12 #define API_TEST_PEER_NETWORK_DEPENDENCIES_H_ 13 14 #include <memory> 15 16 #include "absl/base/nullability.h" 17 #include "rtc_base/network.h" 18 #include "rtc_base/socket_factory.h" 19 #include "rtc_base/thread.h" 20 21 namespace webrtc { 22 namespace webrtc_pc_e2e { 23 24 // Provides interface to obtain all required objects to inject network layer 25 // into PeerConnectionFactory. 26 class PeerNetworkDependencies { 27 public: 28 virtual ~PeerNetworkDependencies() = default; 29 30 virtual Thread* absl_nonnull network_thread() = 0; 31 virtual SocketFactory* absl_nonnull socket_factory() = 0; 32 virtual absl_nonnull std::unique_ptr<NetworkManager> 33 ReleaseNetworkManager() = 0; 34 }; 35 36 } // namespace webrtc_pc_e2e 37 } // namespace webrtc 38 39 #endif // API_TEST_PEER_NETWORK_DEPENDENCIES_H_