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 #ifndef RTC_TOOLS_DATA_CHANNEL_BENCHMARK_SIGNALING_INTERFACE_H_ 11 #define RTC_TOOLS_DATA_CHANNEL_BENCHMARK_SIGNALING_INTERFACE_H_ 12 13 #include <memory> 14 15 #include "api/jsep.h" 16 17 namespace webrtc { 18 class SignalingInterface { 19 public: 20 virtual ~SignalingInterface() = default; 21 22 // Send an ICE candidate over the transport. 23 virtual void SendIceCandidate( 24 const webrtc::IceCandidateInterface* candidate) = 0; 25 26 // Send a local description over the transport. 27 virtual void SendDescription( 28 const webrtc::SessionDescriptionInterface* sdp) = 0; 29 30 // Set a callback when receiving a description from the transport. 31 virtual void OnRemoteDescription( 32 std::function<void(std::unique_ptr<webrtc::SessionDescriptionInterface> 33 sdp)> callback) = 0; 34 35 // Set a callback when receiving an ICE candidate from the transport. 36 virtual void OnIceCandidate( 37 std::function<void(std::unique_ptr<webrtc::IceCandidateInterface> 38 candidate)> callback) = 0; 39 }; 40 } // namespace webrtc 41 42 #endif // RTC_TOOLS_DATA_CHANNEL_BENCHMARK_SIGNALING_INTERFACE_H_ 43