| 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 virtual bool NegotiateTransportDescription(ContentAction local_role, | 305 virtual bool NegotiateTransportDescription(ContentAction local_role, |
| 306 std::string* error_desc); | 306 std::string* error_desc); |
| 307 | 307 |
| 308 // Pushes down the transport parameters obtained via negotiation. | 308 // Pushes down the transport parameters obtained via negotiation. |
| 309 // Derived classes can set their specific parameters here, but must call the | 309 // Derived classes can set their specific parameters here, but must call the |
| 310 // base as well. | 310 // base as well. |
| 311 virtual bool ApplyNegotiatedTransportDescription( | 311 virtual bool ApplyNegotiatedTransportDescription( |
| 312 TransportChannelImpl* channel, | 312 TransportChannelImpl* channel, |
| 313 std::string* error_desc); | 313 std::string* error_desc); |
| 314 | 314 |
| 315 // Returns false if the certificate's identity does not match the fingerprint, |
| 316 // or either is NULL. |
| 317 virtual bool VerifyCertificateFingerprint( |
| 318 const rtc::RTCCertificate* certificate, |
| 319 const rtc::SSLFingerprint* fingerprint, |
| 320 std::string* error_desc) const; |
| 321 |
| 322 // Negotiates the SSL role based off the offer and answer as specified by |
| 323 // RFC 4145, section-4.1. Returns false if the SSL role cannot be determined |
| 324 // from the local description and remote description. |
| 325 virtual bool NegotiateRole(ContentAction local_role, |
| 326 rtc::SSLRole* ssl_role, |
| 327 std::string* error_desc) const; |
| 328 |
| 315 private: | 329 private: |
| 316 // If a candidate is not acceptable, returns false and sets error. | 330 // If a candidate is not acceptable, returns false and sets error. |
| 317 // Call this before calling OnRemoteCandidates. | 331 // Call this before calling OnRemoteCandidates. |
| 318 bool VerifyCandidate(const Candidate& candidate, std::string* error); | 332 bool VerifyCandidate(const Candidate& candidate, std::string* error); |
| 319 bool VerifyCandidates(const Candidates& candidates, std::string* error); | 333 bool VerifyCandidates(const Candidates& candidates, std::string* error); |
| 320 | 334 |
| 321 // Candidate component => TransportChannelImpl* | 335 // Candidate component => TransportChannelImpl* |
| 322 typedef std::map<int, TransportChannelImpl*> ChannelMap; | 336 typedef std::map<int, TransportChannelImpl*> ChannelMap; |
| 323 | 337 |
| 324 // Helper function that invokes the given function on every channel. | 338 // Helper function that invokes the given function on every channel. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 340 | 354 |
| 341 ChannelMap channels_; | 355 ChannelMap channels_; |
| 342 | 356 |
| 343 RTC_DISALLOW_COPY_AND_ASSIGN(Transport); | 357 RTC_DISALLOW_COPY_AND_ASSIGN(Transport); |
| 344 }; | 358 }; |
| 345 | 359 |
| 346 | 360 |
| 347 } // namespace cricket | 361 } // namespace cricket |
| 348 | 362 |
| 349 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ | 363 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ |
| OLD | NEW |