| 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_JSEPTRANSPORT_H_ | 11 #ifndef WEBRTC_P2P_BASE_JSEPTRANSPORT_H_ |
| 12 #define WEBRTC_P2P_BASE_JSEPTRANSPORT_H_ | 12 #define WEBRTC_P2P_BASE_JSEPTRANSPORT_H_ |
| 13 | 13 |
| 14 #include <map> | 14 #include <map> |
| 15 #include <memory> | 15 #include <memory> |
| 16 #include <string> | 16 #include <string> |
| 17 #include <vector> | 17 #include <vector> |
| 18 | 18 |
| 19 #include "webrtc/base/constructormagic.h" | 19 #include "webrtc/base/constructormagic.h" |
| 20 #include "webrtc/base/messagequeue.h" | |
| 21 #include "webrtc/base/optional.h" | 20 #include "webrtc/base/optional.h" |
| 22 #include "webrtc/base/rtccertificate.h" | |
| 23 #include "webrtc/base/sigslot.h" | |
| 24 #include "webrtc/base/sslstreamadapter.h" | |
| 25 #include "webrtc/p2p/base/candidate.h" | 21 #include "webrtc/p2p/base/candidate.h" |
| 26 #include "webrtc/p2p/base/p2pconstants.h" | 22 #include "webrtc/p2p/base/p2pconstants.h" |
| 27 #include "webrtc/p2p/base/sessiondescription.h" | 23 #include "webrtc/p2p/base/sessiondescription.h" |
| 28 #include "webrtc/p2p/base/transportinfo.h" | 24 #include "webrtc/p2p/base/transportinfo.h" |
| 25 #include "webrtc/base/messagequeue.h" |
| 26 #include "webrtc/base/rtccertificate.h" |
| 27 #include "webrtc/base/sigslot.h" |
| 28 #include "webrtc/base/sslstreamadapter.h" |
| 29 | 29 |
| 30 namespace cricket { | 30 namespace cricket { |
| 31 | 31 |
| 32 class TransportChannelImpl; | 32 class TransportChannelImpl; |
| 33 class TransportChannelImpl; | 33 class TransportChannelImpl; |
| 34 | 34 |
| 35 typedef std::vector<Candidate> Candidates; | 35 typedef std::vector<Candidate> Candidates; |
| 36 | 36 |
| 37 // TODO(deadbeef): Move all of these enums, POD types and utility methods to | 37 // TODO(deadbeef): Move all of these enums, POD types and utility methods to |
| 38 // another header file. | 38 // another header file. |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 std::string* error_desc) const; | 328 std::string* error_desc) const; |
| 329 | 329 |
| 330 // Negotiates the SSL role based off the offer and answer as specified by | 330 // Negotiates the SSL role based off the offer and answer as specified by |
| 331 // RFC 4145, section-4.1. Returns false if the SSL role cannot be determined | 331 // RFC 4145, section-4.1. Returns false if the SSL role cannot be determined |
| 332 // from the local description and remote description. | 332 // from the local description and remote description. |
| 333 bool NegotiateRole(ContentAction local_role, | 333 bool NegotiateRole(ContentAction local_role, |
| 334 rtc::SSLRole* ssl_role, | 334 rtc::SSLRole* ssl_role, |
| 335 std::string* error_desc) const; | 335 std::string* error_desc) const; |
| 336 | 336 |
| 337 private: | 337 private: |
| 338 TransportChannelImpl* GetChannel(int component); |
| 339 |
| 338 // Negotiates the transport parameters based on the current local and remote | 340 // Negotiates the transport parameters based on the current local and remote |
| 339 // transport description, such as the ICE role to use, and whether DTLS | 341 // transport description, such as the ICE role to use, and whether DTLS |
| 340 // should be activated. | 342 // should be activated. |
| 341 // | 343 // |
| 342 // Called when an answer TransportDescription is applied. | 344 // Called when an answer TransportDescription is applied. |
| 343 bool NegotiateTransportDescription(ContentAction local_role, | 345 bool NegotiateTransportDescription(ContentAction local_role, |
| 344 std::string* error_desc); | 346 std::string* error_desc); |
| 345 | 347 |
| 346 // Pushes down the transport parameters from the local description, such | 348 // Pushes down the transport parameters from the local description, such |
| 347 // as the ICE ufrag and pwd. | 349 // as the ICE ufrag and pwd. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 370 | 372 |
| 371 // Candidate component => DTLS channel | 373 // Candidate component => DTLS channel |
| 372 std::map<int, TransportChannelImpl*> channels_; | 374 std::map<int, TransportChannelImpl*> channels_; |
| 373 | 375 |
| 374 RTC_DISALLOW_COPY_AND_ASSIGN(JsepTransport); | 376 RTC_DISALLOW_COPY_AND_ASSIGN(JsepTransport); |
| 375 }; | 377 }; |
| 376 | 378 |
| 377 } // namespace cricket | 379 } // namespace cricket |
| 378 | 380 |
| 379 #endif // WEBRTC_P2P_BASE_JSEPTRANSPORT_H_ | 381 #endif // WEBRTC_P2P_BASE_JSEPTRANSPORT_H_ |
| OLD | NEW |