blob: 79f995be9b6cfe9f7c32399dabc8f1175fc57273 [file] [log] [blame]
pbos@webrtc.org1ddd57f2013-09-18 11:52:42 +00001/*
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.org0a298152014-01-27 13:03:02 +000014#include "webrtc/system_wrappers/interface/atomic32.h"
pbos@webrtc.org24e20892013-10-28 16:32:01 +000015#include "webrtc/transport.h"
pbos@webrtc.org1ddd57f2013-09-18 11:52:42 +000016
17namespace webrtc {
18namespace internal {
19
20class 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.org0a298152014-01-27 13:03:02 +000029 void Enable();
30 void Disable();
31
pbos@webrtc.org1ddd57f2013-09-18 11:52:42 +000032 private:
33 newapi::Transport *transport_;
sprang@webrtc.org0a298152014-01-27 13:03:02 +000034 Atomic32 enabled_;
pbos@webrtc.org1ddd57f2013-09-18 11:52:42 +000035};
36} // namespace internal
37} // namespace webrtc
38
39#endif // WEBRTC_VIDEO_ENGINE_INTERNAL_TRANSPORT_ADAPTER_H_