pbos@webrtc.org | 1ddd57f | 2013-09-18 11:52:42 +0000 | [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 | */ |
| 10 | #ifndef WEBRTC_VIDEO_ENGINE_INTERNAL_TRANSPORT_ADAPTER_H_ |
| 11 | #define WEBRTC_VIDEO_ENGINE_INTERNAL_TRANSPORT_ADAPTER_H_ |
| 12 | |
| 13 | #include "webrtc/common_types.h" |
sprang@webrtc.org | 0a29815 | 2014-01-27 13:03:02 +0000 | [diff] [blame] | 14 | #include "webrtc/system_wrappers/interface/atomic32.h" |
pbos@webrtc.org | 24e2089 | 2013-10-28 16:32:01 +0000 | [diff] [blame] | 15 | #include "webrtc/transport.h" |
pbos@webrtc.org | 1ddd57f | 2013-09-18 11:52:42 +0000 | [diff] [blame] | 16 | |
| 17 | namespace webrtc { |
| 18 | namespace internal { |
| 19 | |
| 20 | class TransportAdapter : public webrtc::Transport { |
| 21 | public: |
| 22 | explicit TransportAdapter(newapi::Transport* transport); |
| 23 | |
| 24 | virtual int SendPacket(int /*channel*/, const void* packet, int length) |
| 25 | OVERRIDE; |
| 26 | virtual int SendRTCPPacket(int /*channel*/, const void* packet, int length) |
| 27 | OVERRIDE; |
| 28 | |
sprang@webrtc.org | 0a29815 | 2014-01-27 13:03:02 +0000 | [diff] [blame] | 29 | void Enable(); |
| 30 | void Disable(); |
| 31 | |
pbos@webrtc.org | 1ddd57f | 2013-09-18 11:52:42 +0000 | [diff] [blame] | 32 | private: |
| 33 | newapi::Transport *transport_; |
sprang@webrtc.org | 0a29815 | 2014-01-27 13:03:02 +0000 | [diff] [blame] | 34 | Atomic32 enabled_; |
pbos@webrtc.org | 1ddd57f | 2013-09-18 11:52:42 +0000 | [diff] [blame] | 35 | }; |
| 36 | } // namespace internal |
| 37 | } // namespace webrtc |
| 38 | |
| 39 | #endif // WEBRTC_VIDEO_ENGINE_INTERNAL_TRANSPORT_ADAPTER_H_ |