
DataChannelTransportInterface takes the OpenChannel, SendData, CloseChannel, and SetDataSink methods. MediaTransportInterface inherits from DataChannelTransportInterface. DatagramTransportInterface, the newer alternative to MediaTransportInterface, also inherits from DataChannelTransportInterface. This will allow further refactors to enable the use of media-transport style data channels alongside the datagram transport. Bug: webrtc:9719 Change-Id: I2dd873785ea52d38055b62545c17e9e17c4e70c6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147840 Reviewed-by: Steve Anton <steveanton@webrtc.org> Commit-Queue: Bjorn Mellem <mellem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28846}
35 lines
1.2 KiB
C++
35 lines
1.2 KiB
C++
/* Copyright 2019 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#include "api/data_channel_transport_interface.h"
|
|
|
|
namespace webrtc {
|
|
|
|
// TODO(mellem): Delete these default implementations and make these functions
|
|
// pure virtual as soon as downstream implementations override them.
|
|
|
|
RTCError DataChannelTransportInterface::OpenChannel(int channel_id) {
|
|
return RTCError(RTCErrorType::UNSUPPORTED_OPERATION);
|
|
}
|
|
|
|
RTCError DataChannelTransportInterface::SendData(
|
|
int channel_id,
|
|
const SendDataParams& params,
|
|
const rtc::CopyOnWriteBuffer& buffer) {
|
|
return RTCError(RTCErrorType::UNSUPPORTED_OPERATION);
|
|
}
|
|
|
|
RTCError DataChannelTransportInterface::CloseChannel(int channel_id) {
|
|
return RTCError(RTCErrorType::UNSUPPORTED_OPERATION);
|
|
}
|
|
|
|
void DataChannelTransportInterface::SetDataSink(DataChannelSink* /*sink*/) {}
|
|
|
|
} // namespace webrtc
|