| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright 2015 The WebRTC Project Authors. All rights reserved. | 2  *  Copyright 2015 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 | 
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 106   bool RemoveRemoteCandidates(const Candidates& candidates, std::string* err); | 106   bool RemoveRemoteCandidates(const Candidates& candidates, std::string* err); | 
| 107   bool ReadyForRemoteCandidates(const std::string& transport_name) const; | 107   bool ReadyForRemoteCandidates(const std::string& transport_name) const; | 
| 108   // TODO(deadbeef): GetStats isn't const because all the way down to | 108   // TODO(deadbeef): GetStats isn't const because all the way down to | 
| 109   // OpenSSLStreamAdapter, | 109   // OpenSSLStreamAdapter, | 
| 110   // GetSslCipherSuite and GetDtlsSrtpCryptoSuite are not const. Fix this. | 110   // GetSslCipherSuite and GetDtlsSrtpCryptoSuite are not const. Fix this. | 
| 111   bool GetStats(const std::string& transport_name, TransportStats* stats); | 111   bool GetStats(const std::string& transport_name, TransportStats* stats); | 
| 112   void SetMetricsObserver(webrtc::MetricsObserverInterface* metrics_observer); | 112   void SetMetricsObserver(webrtc::MetricsObserverInterface* metrics_observer); | 
| 113 | 113 | 
| 114   // Creates a channel if it doesn't exist. Otherwise, increments a reference | 114   // Creates a channel if it doesn't exist. Otherwise, increments a reference | 
| 115   // count and returns an existing channel. | 115   // count and returns an existing channel. | 
| 116   virtual TransportChannel* CreateTransportChannel_n( | 116   virtual DtlsTransportInternal* CreateTransportChannel_n( | 
| 117       const std::string& transport_name, | 117       const std::string& transport_name, | 
| 118       int component); | 118       int component); | 
| 119 | 119 | 
| 120   // Decrements a channel's reference count, and destroys the channel if | 120   // Decrements a channel's reference count, and destroys the channel if | 
| 121   // nothing is referencing it. | 121   // nothing is referencing it. | 
| 122   virtual void DestroyTransportChannel_n(const std::string& transport_name, | 122   virtual void DestroyTransportChannel_n(const std::string& transport_name, | 
| 123                                          int component); | 123                                          int component); | 
| 124 | 124 | 
| 125   void use_quic() { quic_ = true; } | 125   void use_quic() { quic_ = true; } | 
| 126   bool quic() const { return quic_; } | 126   bool quic() const { return quic_; } | 
| 127 | 127 | 
| 128   // TODO(deadbeef): Remove all for_testing methods! | 128   // TODO(deadbeef): Remove all for_testing methods! | 
| 129   const rtc::scoped_refptr<rtc::RTCCertificate>& certificate_for_testing() | 129   const rtc::scoped_refptr<rtc::RTCCertificate>& certificate_for_testing() | 
| 130       const { | 130       const { | 
| 131     return certificate_; | 131     return certificate_; | 
| 132   } | 132   } | 
| 133   std::vector<std::string> transport_names_for_testing(); | 133   std::vector<std::string> transport_names_for_testing(); | 
| 134   std::vector<TransportChannelImpl*> channels_for_testing(); | 134   std::vector<DtlsTransportInternal*> channels_for_testing(); | 
| 135   TransportChannelImpl* get_channel_for_testing( | 135   DtlsTransportInternal* get_channel_for_testing( | 
| 136       const std::string& transport_name, | 136       const std::string& transport_name, | 
| 137       int component); | 137       int component); | 
| 138 | 138 | 
| 139   // All of these signals are fired on the signalling thread. | 139   // All of these signals are fired on the signalling thread. | 
| 140 | 140 | 
| 141   // If any transport failed => failed, | 141   // If any transport failed => failed, | 
| 142   // Else if all completed => completed, | 142   // Else if all completed => completed, | 
| 143   // Else if all connected => connected, | 143   // Else if all connected => connected, | 
| 144   // Else => connecting | 144   // Else => connecting | 
| 145   sigslot::signal1<IceConnectionState> SignalConnectionState; | 145   sigslot::signal1<IceConnectionState> SignalConnectionState; | 
| (...skipping 14 matching lines...) Expand all  Loading... | 
| 160 | 160 | 
| 161   sigslot::signal1<rtc::SSLHandshakeError> SignalDtlsHandshakeError; | 161   sigslot::signal1<rtc::SSLHandshakeError> SignalDtlsHandshakeError; | 
| 162 | 162 | 
| 163  protected: | 163  protected: | 
| 164   // TODO(deadbeef): Get rid of these virtual methods. Used by | 164   // TODO(deadbeef): Get rid of these virtual methods. Used by | 
| 165   // FakeTransportController currently, but FakeTransportController shouldn't | 165   // FakeTransportController currently, but FakeTransportController shouldn't | 
| 166   // even be functioning by subclassing TransportController. | 166   // even be functioning by subclassing TransportController. | 
| 167   virtual TransportChannelImpl* CreateIceTransportChannel_n( | 167   virtual TransportChannelImpl* CreateIceTransportChannel_n( | 
| 168       const std::string& transport_name, | 168       const std::string& transport_name, | 
| 169       int component); | 169       int component); | 
| 170   virtual TransportChannelImpl* CreateDtlsTransportChannel_n( | 170   virtual DtlsTransportInternal* CreateDtlsTransportChannel_n( | 
| 171       const std::string& transport_name, | 171       const std::string& transport_name, | 
| 172       int component, | 172       int component, | 
| 173       TransportChannelImpl* ice); | 173       TransportChannelImpl* ice); | 
| 174 | 174 | 
| 175  private: | 175  private: | 
| 176   void OnMessage(rtc::Message* pmsg) override; | 176   void OnMessage(rtc::Message* pmsg) override; | 
| 177 | 177 | 
| 178   class ChannelPair; | 178   class ChannelPair; | 
| 179   typedef rtc::RefCountedObject<ChannelPair> RefCountedChannel; | 179   typedef rtc::RefCountedObject<ChannelPair> RefCountedChannel; | 
| 180 | 180 | 
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 265   bool quic_ = false; | 265   bool quic_ = false; | 
| 266 | 266 | 
| 267   webrtc::MetricsObserverInterface* metrics_observer_ = nullptr; | 267   webrtc::MetricsObserverInterface* metrics_observer_ = nullptr; | 
| 268 | 268 | 
| 269   RTC_DISALLOW_COPY_AND_ASSIGN(TransportController); | 269   RTC_DISALLOW_COPY_AND_ASSIGN(TransportController); | 
| 270 }; | 270 }; | 
| 271 | 271 | 
| 272 }  // namespace cricket | 272 }  // namespace cricket | 
| 273 | 273 | 
| 274 #endif  // WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ | 274 #endif  // WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ | 
| OLD | NEW | 
|---|