pbos@webrtc.org | e75a1bf | 2013-09-18 11:52:42 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013 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 | */ |
Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [diff] [blame] | 10 | #ifndef WEBRTC_CALL_TRANSPORT_ADAPTER_H_ |
| 11 | #define WEBRTC_CALL_TRANSPORT_ADAPTER_H_ |
pbos@webrtc.org | e75a1bf | 2013-09-18 11:52:42 | [diff] [blame] | 12 | |
| 13 | #include "webrtc/common_types.h" |
sprang@webrtc.org | d9b9560 | 2014-01-27 13:03:02 | [diff] [blame] | 14 | #include "webrtc/system_wrappers/interface/atomic32.h" |
pbos@webrtc.org | 16e03b7 | 2013-10-28 16:32:01 | [diff] [blame] | 15 | #include "webrtc/transport.h" |
pbos@webrtc.org | e75a1bf | 2013-09-18 11:52:42 | [diff] [blame] | 16 | |
| 17 | namespace webrtc { |
| 18 | namespace internal { |
| 19 | |
pbos | 2d56668 | 2015-09-28 16:59:31 | [diff] [blame] | 20 | class TransportAdapter : public Transport { |
pbos@webrtc.org | e75a1bf | 2013-09-18 11:52:42 | [diff] [blame] | 21 | public: |
pbos | 2d56668 | 2015-09-28 16:59:31 | [diff] [blame] | 22 | explicit TransportAdapter(Transport* transport); |
pbos@webrtc.org | e75a1bf | 2013-09-18 11:52:42 | [diff] [blame] | 23 | |
stefan | 1d8a506 | 2015-10-02 10:39:33 | [diff] [blame^] | 24 | bool SendRtp(const uint8_t* packet, |
| 25 | size_t length, |
| 26 | const PacketOptions& options) override; |
pbos | 2d56668 | 2015-09-28 16:59:31 | [diff] [blame] | 27 | bool SendRtcp(const uint8_t* packet, size_t length) override; |
pbos@webrtc.org | e75a1bf | 2013-09-18 11:52:42 | [diff] [blame] | 28 | |
sprang@webrtc.org | d9b9560 | 2014-01-27 13:03:02 | [diff] [blame] | 29 | void Enable(); |
| 30 | void Disable(); |
| 31 | |
pbos@webrtc.org | e75a1bf | 2013-09-18 11:52:42 | [diff] [blame] | 32 | private: |
pbos | 2d56668 | 2015-09-28 16:59:31 | [diff] [blame] | 33 | Transport *transport_; |
sprang@webrtc.org | d9b9560 | 2014-01-27 13:03:02 | [diff] [blame] | 34 | Atomic32 enabled_; |
pbos@webrtc.org | e75a1bf | 2013-09-18 11:52:42 | [diff] [blame] | 35 | }; |
| 36 | } // namespace internal |
| 37 | } // namespace webrtc |
| 38 | |
Peter Boström | 5c389d3 | 2015-09-25 11:58:30 | [diff] [blame] | 39 | #endif // WEBRTC_CALL_TRANSPORT_ADAPTER_H_ |