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 #ifndef WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ | 11 #ifndef WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ |
12 #define WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ | 12 #define WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 #include "webrtc/p2p/base/transport.h" | 15 #include "webrtc/p2p/base/transport.h" |
16 #include "webrtc/p2p/base/transportchannel.h" | 16 #include "webrtc/p2p/base/transportchannel.h" |
17 | 17 |
18 namespace buzz { class XmlElement; } | 18 namespace buzz { class XmlElement; } |
19 | 19 |
20 namespace cricket { | 20 namespace cricket { |
21 | 21 |
22 class Candidate; | 22 class Candidate; |
23 | 23 |
| 24 // TODO(pthatcher): Remove this once it's no longer used in |
| 25 // remoting/protocol/libjingle_transport_factory.cc |
| 26 enum IceProtocolType { |
| 27 ICEPROTO_RFC5245 // Standard RFC 5245 version of ICE. |
| 28 }; |
| 29 |
24 // Base class for real implementations of TransportChannel. This includes some | 30 // Base class for real implementations of TransportChannel. This includes some |
25 // methods called only by Transport, which do not need to be exposed to the | 31 // methods called only by Transport, which do not need to be exposed to the |
26 // client. | 32 // client. |
27 class TransportChannelImpl : public TransportChannel { | 33 class TransportChannelImpl : public TransportChannel { |
28 public: | 34 public: |
29 explicit TransportChannelImpl(const std::string& content_name, int component) | 35 explicit TransportChannelImpl(const std::string& content_name, int component) |
30 : TransportChannel(content_name, component) {} | 36 : TransportChannel(content_name, component) {} |
31 | 37 |
32 // Returns the transport that created this channel. | 38 // Returns the transport that created this channel. |
33 virtual Transport* GetTransport() = 0; | 39 virtual Transport* GetTransport() = 0; |
34 | 40 |
35 // For ICE channels. | 41 // For ICE channels. |
36 virtual IceRole GetIceRole() const = 0; | 42 virtual IceRole GetIceRole() const = 0; |
37 virtual void SetIceRole(IceRole role) = 0; | 43 virtual void SetIceRole(IceRole role) = 0; |
38 virtual void SetIceTiebreaker(uint64 tiebreaker) = 0; | 44 virtual void SetIceTiebreaker(uint64 tiebreaker) = 0; |
39 // To toggle G-ICE/ICE. | 45 // TODO(pthatcher): Remove this once it's no longer called in |
40 virtual bool GetIceProtocolType(IceProtocolType* type) const = 0; | 46 // remoting/protocol/libjingle_transport_factory.cc |
41 virtual void SetIceProtocolType(IceProtocolType type) = 0; | 47 virtual void SetIceProtocolType(IceProtocolType type) {} |
42 // SetIceCredentials only need to be implemented by the ICE | 48 // SetIceCredentials only need to be implemented by the ICE |
43 // transport channels. Non-ICE transport channels can just ignore. | 49 // transport channels. Non-ICE transport channels can just ignore. |
44 // The ufrag and pwd should be set before the Connect() is called. | 50 // The ufrag and pwd should be set before the Connect() is called. |
45 virtual void SetIceCredentials(const std::string& ice_ufrag, | 51 virtual void SetIceCredentials(const std::string& ice_ufrag, |
46 const std::string& ice_pwd) = 0; | 52 const std::string& ice_pwd) = 0; |
47 // SetRemoteIceCredentials only need to be implemented by the ICE | 53 // SetRemoteIceCredentials only need to be implemented by the ICE |
48 // transport channels. Non-ICE transport channels can just ignore. | 54 // transport channels. Non-ICE transport channels can just ignore. |
49 virtual void SetRemoteIceCredentials(const std::string& ice_ufrag, | 55 virtual void SetRemoteIceCredentials(const std::string& ice_ufrag, |
50 const std::string& ice_pwd) = 0; | 56 const std::string& ice_pwd) = 0; |
51 | 57 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // channel decreases. | 103 // channel decreases. |
98 sigslot::signal1<TransportChannelImpl*> SignalConnectionRemoved; | 104 sigslot::signal1<TransportChannelImpl*> SignalConnectionRemoved; |
99 | 105 |
100 private: | 106 private: |
101 RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannelImpl); | 107 RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannelImpl); |
102 }; | 108 }; |
103 | 109 |
104 } // namespace cricket | 110 } // namespace cricket |
105 | 111 |
106 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ | 112 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ |
OLD | NEW |