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 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 int component, | 55 int component, |
56 P2PTransport* transport, | 56 P2PTransport* transport, |
57 PortAllocator* allocator); | 57 PortAllocator* allocator); |
58 virtual ~P2PTransportChannel(); | 58 virtual ~P2PTransportChannel(); |
59 | 59 |
60 // From TransportChannelImpl: | 60 // From TransportChannelImpl: |
61 Transport* GetTransport() override { return transport_; } | 61 Transport* GetTransport() override { return transport_; } |
62 TransportChannelState GetState() const override; | 62 TransportChannelState GetState() const override; |
63 void SetIceRole(IceRole role) override; | 63 void SetIceRole(IceRole role) override; |
64 IceRole GetIceRole() const override { return ice_role_; } | 64 IceRole GetIceRole() const override { return ice_role_; } |
65 void SetIceTiebreaker(uint64 tiebreaker) override; | 65 void SetIceTiebreaker(uint64_t tiebreaker) override; |
66 void SetIceCredentials(const std::string& ice_ufrag, | 66 void SetIceCredentials(const std::string& ice_ufrag, |
67 const std::string& ice_pwd) override; | 67 const std::string& ice_pwd) override; |
68 void SetRemoteIceCredentials(const std::string& ice_ufrag, | 68 void SetRemoteIceCredentials(const std::string& ice_ufrag, |
69 const std::string& ice_pwd) override; | 69 const std::string& ice_pwd) override; |
70 void SetRemoteIceMode(IceMode mode) override; | 70 void SetRemoteIceMode(IceMode mode) override; |
71 void Connect() override; | 71 void Connect() override; |
72 void MaybeStartGathering() override; | 72 void MaybeStartGathering() override; |
73 IceGatheringState gathering_state() const override { | 73 IceGatheringState gathering_state() const override { |
74 return gathering_state_; | 74 return gathering_state_; |
75 } | 75 } |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 rtc::scoped_refptr<rtc::RTCCertificate> GetLocalCertificate() const override { | 120 rtc::scoped_refptr<rtc::RTCCertificate> GetLocalCertificate() const override { |
121 return nullptr; | 121 return nullptr; |
122 } | 122 } |
123 | 123 |
124 bool GetRemoteSSLCertificate(rtc::SSLCertificate** cert) const override { | 124 bool GetRemoteSSLCertificate(rtc::SSLCertificate** cert) const override { |
125 return false; | 125 return false; |
126 } | 126 } |
127 | 127 |
128 // Allows key material to be extracted for external encryption. | 128 // Allows key material to be extracted for external encryption. |
129 bool ExportKeyingMaterial(const std::string& label, | 129 bool ExportKeyingMaterial(const std::string& label, |
130 const uint8* context, | 130 const uint8_t* context, |
131 size_t context_len, | 131 size_t context_len, |
132 bool use_context, | 132 bool use_context, |
133 uint8* result, | 133 uint8_t* result, |
134 size_t result_len) override { | 134 size_t result_len) override { |
135 return false; | 135 return false; |
136 } | 136 } |
137 | 137 |
138 bool SetLocalCertificate( | 138 bool SetLocalCertificate( |
139 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) override { | 139 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) override { |
140 return false; | 140 return false; |
141 } | 141 } |
142 | 142 |
143 // Set DTLS Remote fingerprint. Must be after local identity set. | 143 // Set DTLS Remote fingerprint. Must be after local identity set. |
144 bool SetRemoteFingerprint(const std::string& digest_alg, | 144 bool SetRemoteFingerprint(const std::string& digest_alg, |
145 const uint8* digest, | 145 const uint8_t* digest, |
146 size_t digest_len) override { | 146 size_t digest_len) override { |
147 return false; | 147 return false; |
148 } | 148 } |
149 | 149 |
150 int receiving_timeout() const { return receiving_timeout_; } | 150 int receiving_timeout() const { return receiving_timeout_; } |
151 int check_receiving_delay() const { return check_receiving_delay_; } | 151 int check_receiving_delay() const { return check_receiving_delay_; } |
152 | 152 |
153 // Helper method used only in unittest. | 153 // Helper method used only in unittest. |
154 rtc::DiffServCodePoint DefaultDscpValue() const; | 154 rtc::DiffServCodePoint DefaultDscpValue() const; |
155 | 155 |
(...skipping 19 matching lines...) Expand all Loading... |
175 void HandleAllTimedOut(); | 175 void HandleAllTimedOut(); |
176 | 176 |
177 Connection* GetBestConnectionOnNetwork(rtc::Network* network) const; | 177 Connection* GetBestConnectionOnNetwork(rtc::Network* network) const; |
178 bool CreateConnections(const Candidate& remote_candidate, | 178 bool CreateConnections(const Candidate& remote_candidate, |
179 PortInterface* origin_port); | 179 PortInterface* origin_port); |
180 bool CreateConnection(PortInterface* port, | 180 bool CreateConnection(PortInterface* port, |
181 const Candidate& remote_candidate, | 181 const Candidate& remote_candidate, |
182 PortInterface* origin_port); | 182 PortInterface* origin_port); |
183 bool FindConnection(cricket::Connection* connection) const; | 183 bool FindConnection(cricket::Connection* connection) const; |
184 | 184 |
185 uint32 GetRemoteCandidateGeneration(const Candidate& candidate); | 185 uint32_t GetRemoteCandidateGeneration(const Candidate& candidate); |
186 bool IsDuplicateRemoteCandidate(const Candidate& candidate); | 186 bool IsDuplicateRemoteCandidate(const Candidate& candidate); |
187 void RememberRemoteCandidate(const Candidate& remote_candidate, | 187 void RememberRemoteCandidate(const Candidate& remote_candidate, |
188 PortInterface* origin_port); | 188 PortInterface* origin_port); |
189 bool IsPingable(Connection* conn); | 189 bool IsPingable(Connection* conn); |
190 void PingConnection(Connection* conn); | 190 void PingConnection(Connection* conn); |
191 void AddAllocatorSession(PortAllocatorSession* session); | 191 void AddAllocatorSession(PortAllocatorSession* session); |
192 void AddConnection(Connection* connection); | 192 void AddConnection(Connection* connection); |
193 | 193 |
194 void OnPortReady(PortAllocatorSession *session, PortInterface* port); | 194 void OnPortReady(PortAllocatorSession *session, PortInterface* port); |
195 void OnCandidatesReady(PortAllocatorSession *session, | 195 void OnCandidatesReady(PortAllocatorSession *session, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 bool was_writable_; | 236 bool was_writable_; |
237 bool had_connection_ = false; // if connections_ has ever been nonempty | 237 bool had_connection_ = false; // if connections_ has ever been nonempty |
238 typedef std::map<rtc::Socket::Option, int> OptionMap; | 238 typedef std::map<rtc::Socket::Option, int> OptionMap; |
239 OptionMap options_; | 239 OptionMap options_; |
240 std::string ice_ufrag_; | 240 std::string ice_ufrag_; |
241 std::string ice_pwd_; | 241 std::string ice_pwd_; |
242 std::string remote_ice_ufrag_; | 242 std::string remote_ice_ufrag_; |
243 std::string remote_ice_pwd_; | 243 std::string remote_ice_pwd_; |
244 IceMode remote_ice_mode_; | 244 IceMode remote_ice_mode_; |
245 IceRole ice_role_; | 245 IceRole ice_role_; |
246 uint64 tiebreaker_; | 246 uint64_t tiebreaker_; |
247 uint32 remote_candidate_generation_; | 247 uint32_t remote_candidate_generation_; |
248 IceGatheringState gathering_state_; | 248 IceGatheringState gathering_state_; |
249 | 249 |
250 int check_receiving_delay_; | 250 int check_receiving_delay_; |
251 int receiving_timeout_; | 251 int receiving_timeout_; |
252 uint32 last_ping_sent_ms_ = 0; | 252 uint32_t last_ping_sent_ms_ = 0; |
253 bool gather_continually_ = false; | 253 bool gather_continually_ = false; |
254 | 254 |
255 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); | 255 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); |
256 }; | 256 }; |
257 | 257 |
258 } // namespace cricket | 258 } // namespace cricket |
259 | 259 |
260 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ | 260 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ |
OLD | NEW |