Mirko Bonadei | 79eb4dd | 2018-07-19 08:39:30 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018 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 | |
Steve Anton | 10542f2 | 2019-01-11 17:11:00 | [diff] [blame] | 11 | #include "api/data_channel_interface.h" |
Mirko Bonadei | 79eb4dd | 2018-07-19 08:39:30 | [diff] [blame] | 12 | |
Tommi | a50a81a | 2023-04-11 15:32:34 | [diff] [blame] | 13 | #include "rtc_base/checks.h" |
| 14 | |
Mirko Bonadei | 79eb4dd | 2018-07-19 08:39:30 | [diff] [blame] | 15 | namespace webrtc { |
| 16 | |
| 17 | bool DataChannelInterface::ordered() const { |
| 18 | return false; |
| 19 | } |
| 20 | |
| 21 | uint16_t DataChannelInterface::maxRetransmitTime() const { |
| 22 | return 0; |
| 23 | } |
| 24 | |
| 25 | uint16_t DataChannelInterface::maxRetransmits() const { |
| 26 | return 0; |
| 27 | } |
| 28 | |
Harald Alvestrand | f3736ed | 2019-04-08 11:09:30 | [diff] [blame] | 29 | absl::optional<int> DataChannelInterface::maxRetransmitsOpt() const { |
| 30 | return absl::nullopt; |
| 31 | } |
| 32 | |
| 33 | absl::optional<int> DataChannelInterface::maxPacketLifeTime() const { |
| 34 | return absl::nullopt; |
| 35 | } |
| 36 | |
Mirko Bonadei | 79eb4dd | 2018-07-19 08:39:30 | [diff] [blame] | 37 | std::string DataChannelInterface::protocol() const { |
| 38 | return std::string(); |
| 39 | } |
| 40 | |
| 41 | bool DataChannelInterface::negotiated() const { |
| 42 | return false; |
| 43 | } |
| 44 | |
Florent Castelli | a563a2a | 2021-10-18 09:46:21 | [diff] [blame] | 45 | uint64_t DataChannelInterface::MaxSendQueueSize() { |
| 46 | return 16 * 1024 * 1024; // 16 MiB |
| 47 | } |
| 48 | |
Tommi | a50a81a | 2023-04-11 15:32:34 | [diff] [blame] | 49 | // TODO(tommi): Remove method once downstream implementations have been removed. |
| 50 | bool DataChannelInterface::Send(const DataBuffer& buffer) { |
| 51 | RTC_DCHECK_NOTREACHED(); |
| 52 | return false; |
| 53 | } |
| 54 | |
| 55 | // TODO(tommi): Remove implementation once method is pure virtual. |
| 56 | void DataChannelInterface::SendAsync( |
| 57 | DataBuffer buffer, |
| 58 | absl::AnyInvocable<void(RTCError) &&> on_complete) { |
| 59 | RTC_DCHECK_NOTREACHED(); |
| 60 | } |
| 61 | |
Mirko Bonadei | 79eb4dd | 2018-07-19 08:39:30 | [diff] [blame] | 62 | } // namespace webrtc |