OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "webrtc/p2p/base/rawtransport.h" | 13 #include "webrtc/p2p/base/rawtransport.h" |
14 #include "webrtc/p2p/base/rawtransportchannel.h" | 14 #include "webrtc/p2p/base/rawtransportchannel.h" |
15 #include "webrtc/base/common.h" | 15 #include "webrtc/base/common.h" |
16 | 16 |
17 #if defined(FEATURE_ENABLE_PSTN) | 17 #if defined(FEATURE_ENABLE_PSTN) |
18 namespace cricket { | 18 namespace cricket { |
19 | 19 |
20 RawTransport::RawTransport(rtc::Thread* signaling_thread, | 20 RawTransport::RawTransport(rtc::Thread* signaling_thread, |
juberti1
2015/07/31 01:14:00
I think we should probably just kill this off at t
| |
21 rtc::Thread* worker_thread, | 21 rtc::Thread* worker_thread, |
22 const std::string& content_name, | 22 const std::string& content_name, |
23 PortAllocator* allocator) | 23 PortAllocator* allocator) |
24 : Transport(signaling_thread, worker_thread, | 24 : Transport(signaling_thread, worker_thread, |
25 content_name, NS_GINGLE_RAW, allocator) { | 25 content_name, allocator) { |
26 } | 26 } |
27 | 27 |
28 RawTransport::~RawTransport() { | 28 RawTransport::~RawTransport() { |
29 DestroyAllChannels(); | 29 DestroyAllChannels(); |
30 } | 30 } |
31 | 31 |
32 TransportChannelImpl* RawTransport::CreateTransportChannel(int component) { | 32 TransportChannelImpl* RawTransport::CreateTransportChannel(int component) { |
33 return new RawTransportChannel(content_name(), component, this, | 33 return new RawTransportChannel(content_name(), component, this, |
34 worker_thread(), | 34 worker_thread(), |
35 port_allocator()); | 35 port_allocator()); |
36 } | 36 } |
37 | 37 |
38 void RawTransport::DestroyTransportChannel(TransportChannelImpl* channel) { | 38 void RawTransport::DestroyTransportChannel(TransportChannelImpl* channel) { |
39 delete channel; | 39 delete channel; |
40 } | 40 } |
41 | 41 |
42 } // namespace cricket | 42 } // namespace cricket |
43 #endif // defined(FEATURE_ENABLE_PSTN) | 43 #endif // defined(FEATURE_ENABLE_PSTN) |
OLD | NEW |