From c701dec22bcd1740b75ddf1a95daa9905c9af250 Mon Sep 17 00:00:00 2001 From: Anton Sukhanov Date: Mon, 20 May 2019 18:09:42 -0700 Subject: [PATCH] Add GetTransportParametersOffer method for DatagramTransportInterface This change adds missing GetTransportParametersOffer, which is required for datagram transport setup. We have exactly the same method in MediaTransportInterface. It's possible to add a separate interface, which will be used in both Media and Datagram transports, but I do not want to overcomplicate it now until we know more about future of media and datagram transports. Bug: webrtc:9719 Change-Id: I8b6c9ebc9522acba75f74da2e18e4bb1eb0d1e4c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137861 Commit-Queue: Anton Sukhanov Reviewed-by: Bjorn Mellem Reviewed-by: Steve Anton Cr-Commit-Position: refs/heads/master@{#28011} --- api/datagram_transport_interface.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/api/datagram_transport_interface.h b/api/datagram_transport_interface.h index d64c0f3c3b..271b951c8e 100644 --- a/api/datagram_transport_interface.h +++ b/api/datagram_transport_interface.h @@ -16,6 +16,7 @@ #include #include +#include "absl/types/optional.h" #include "api/array_view.h" #include "api/congestion_control_interface.h" #include "api/media_transport_interface.h" @@ -93,6 +94,18 @@ class DatagramTransportInterface { // SetDataTransportSink(nullptr) before the data transport is destroyed or // before new sink is set. virtual void SetDatagramSink(DatagramSinkInterface* sink) = 0; + + // Retrieves callers config (i.e. media transport offer) that should be passed + // to the callee, before the call is connected. Such config is opaque to SDP + // (sdp just passes it through). The config is a binary blob, so SDP may + // choose to use base64 to serialize it (or any other approach that guarantees + // that the binary blob goes through). This should only be called for the + // caller's perspective. + // + // TODO(sukhanov): Make pure virtual. + virtual absl::optional GetTransportParametersOffer() const { + return absl::nullopt; + } }; } // namespace webrtc