blob: d9947e2c97a675371d896a798df15915d74d09f0 [file] [log] [blame]
Bjorn A Mellem05497f22019-08-01 10:48:20 -07001/* Copyright 2019 The WebRTC project authors. All Rights Reserved.
2 *
3 * Use of this source code is governed by a BSD-style license
4 * that can be found in the LICENSE file in the root of the source
5 * tree. An additional intellectual property rights grant can be found
6 * in the file PATENTS. All contributing project authors may
7 * be found in the AUTHORS file in the root of the source tree.
8 */
9
10#include "api/data_channel_transport_interface.h"
11
12namespace webrtc {
13
14// TODO(mellem): Delete these default implementations and make these functions
15// pure virtual as soon as downstream implementations override them.
16
17RTCError DataChannelTransportInterface::OpenChannel(int channel_id) {
18 return RTCError(RTCErrorType::UNSUPPORTED_OPERATION);
19}
20
21RTCError DataChannelTransportInterface::SendData(
22 int channel_id,
23 const SendDataParams& params,
24 const rtc::CopyOnWriteBuffer& buffer) {
25 return RTCError(RTCErrorType::UNSUPPORTED_OPERATION);
26}
27
28RTCError DataChannelTransportInterface::CloseChannel(int channel_id) {
29 return RTCError(RTCErrorType::UNSUPPORTED_OPERATION);
30}
31
32void DataChannelTransportInterface::SetDataSink(DataChannelSink* /*sink*/) {}
33
Bjorn A Mellemb689af42019-08-21 10:44:59 -070034bool DataChannelTransportInterface::IsReadyToSend() const {
35 return false;
36}
37
38void DataChannelSink::OnReadyToSend() {}
39
Bjorn A Mellem05497f22019-08-01 10:48:20 -070040} // namespace webrtc