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