blob: 72f9baabcfab123628bb215520cc102f207f84f7 [file] [log] [blame]
pbos@webrtc.orge75a1bf2013-09-18 11:52:421/*
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öm5c389d32015-09-25 11:58:3010#ifndef WEBRTC_CALL_TRANSPORT_ADAPTER_H_
11#define WEBRTC_CALL_TRANSPORT_ADAPTER_H_
pbos@webrtc.orge75a1bf2013-09-18 11:52:4212
13#include "webrtc/common_types.h"
sprang@webrtc.orgd9b95602014-01-27 13:03:0214#include "webrtc/system_wrappers/interface/atomic32.h"
pbos@webrtc.org16e03b72013-10-28 16:32:0115#include "webrtc/transport.h"
pbos@webrtc.orge75a1bf2013-09-18 11:52:4216
17namespace webrtc {
18namespace internal {
19
pbos2d566682015-09-28 16:59:3120class TransportAdapter : public Transport {
pbos@webrtc.orge75a1bf2013-09-18 11:52:4221 public:
pbos2d566682015-09-28 16:59:3122 explicit TransportAdapter(Transport* transport);
pbos@webrtc.orge75a1bf2013-09-18 11:52:4223
stefan1d8a5062015-10-02 10:39:3324 bool SendRtp(const uint8_t* packet,
25 size_t length,
26 const PacketOptions& options) override;
pbos2d566682015-09-28 16:59:3127 bool SendRtcp(const uint8_t* packet, size_t length) override;
pbos@webrtc.orge75a1bf2013-09-18 11:52:4228
sprang@webrtc.orgd9b95602014-01-27 13:03:0229 void Enable();
30 void Disable();
31
pbos@webrtc.orge75a1bf2013-09-18 11:52:4232 private:
pbos2d566682015-09-28 16:59:3133 Transport *transport_;
sprang@webrtc.orgd9b95602014-01-27 13:03:0234 Atomic32 enabled_;
pbos@webrtc.orge75a1bf2013-09-18 11:52:4235};
36} // namespace internal
37} // namespace webrtc
38
Peter Boström5c389d32015-09-25 11:58:3039#endif // WEBRTC_CALL_TRANSPORT_ADAPTER_H_