Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: talk/app/webrtc/peerconnectioninterface.h

Issue 1269843005: Added DtlsCertificate, a ref counted object owning an SSLIdentity (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Cleanup Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // 7. Once a candidate have been found PeerConnection will call the observer 65 // 7. Once a candidate have been found PeerConnection will call the observer
66 // function OnIceCandidate. Send these candidates to the remote peer. 66 // function OnIceCandidate. Send these candidates to the remote peer.
67 67
68 #ifndef TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ 68 #ifndef TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_
69 #define TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ 69 #define TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_
70 70
71 #include <string> 71 #include <string>
72 #include <vector> 72 #include <vector>
73 73
74 #include "talk/app/webrtc/datachannelinterface.h" 74 #include "talk/app/webrtc/datachannelinterface.h"
75 #include "talk/app/webrtc/dtlscertificate.h"
75 #include "talk/app/webrtc/dtlsidentitystore.h" 76 #include "talk/app/webrtc/dtlsidentitystore.h"
76 #include "talk/app/webrtc/dtmfsenderinterface.h" 77 #include "talk/app/webrtc/dtmfsenderinterface.h"
77 #include "talk/app/webrtc/jsep.h" 78 #include "talk/app/webrtc/jsep.h"
78 #include "talk/app/webrtc/mediastreaminterface.h" 79 #include "talk/app/webrtc/mediastreaminterface.h"
79 #include "talk/app/webrtc/statstypes.h" 80 #include "talk/app/webrtc/statstypes.h"
80 #include "talk/app/webrtc/umametrics.h" 81 #include "talk/app/webrtc/umametrics.h"
81 #include "webrtc/base/fileutils.h" 82 #include "webrtc/base/fileutils.h"
82 #include "webrtc/base/network.h" 83 #include "webrtc/base/network.h"
83 #include "webrtc/base/sslstreamadapter.h" 84 #include "webrtc/base/sslstreamadapter.h"
84 #include "webrtc/base/socketaddress.h" 85 #include "webrtc/base/socketaddress.h"
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 // Sets the maximum supported protocol version. The highest version 529 // Sets the maximum supported protocol version. The highest version
529 // supported by both ends will be used for the connection, i.e. if one 530 // supported by both ends will be used for the connection, i.e. if one
530 // party supports DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used. 531 // party supports DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used.
531 rtc::SSLProtocolVersion ssl_max_version; 532 rtc::SSLProtocolVersion ssl_max_version;
532 }; 533 };
533 534
534 virtual void SetOptions(const Options& options) = 0; 535 virtual void SetOptions(const Options& options) = 0;
535 536
536 // TODO(hbos): Temporary CreatePeerConnection function while we transition 537 // TODO(hbos): Temporary CreatePeerConnection function while we transition
537 // from DTLSIdentityServiceInterface to DtlsIdentityStoreInterface. 538 // from DTLSIdentityServiceInterface to DtlsIdentityStoreInterface.
539 // This method takes the ownership of |dtls_identity_service|.
538 rtc::scoped_refptr<PeerConnectionInterface> 540 rtc::scoped_refptr<PeerConnectionInterface>
539 CreatePeerConnection( 541 CreatePeerConnection(
540 const PeerConnectionInterface::RTCConfiguration& configuration, 542 const PeerConnectionInterface::RTCConfiguration& configuration,
541 const MediaConstraintsInterface* constraints, 543 const MediaConstraintsInterface* constraints,
542 PortAllocatorFactoryInterface* allocator_factory, 544 PortAllocatorFactoryInterface* allocator_factory,
543 DTLSIdentityServiceInterface* dtls_identity_service, 545 DTLSIdentityServiceInterface* dtls_identity_service,
544 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, 546 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
545 PeerConnectionObserver* observer) { 547 PeerConnectionObserver* observer) {
546 return CreatePeerConnection(configuration, constraints, allocator_factory, 548 return CreatePeerConnection(configuration, constraints, allocator_factory,
547 dtls_identity_service, observer); 549 dtls_identity_service, observer);
548 } 550 }
549 551
552 // If a |dtls_identity_service| is provided it will be used for
553 // SSLIdentity/DtlsCertificate generation, otherwise a default service will be
554 // used.
550 // This method takes the ownership of |dtls_identity_service|. 555 // This method takes the ownership of |dtls_identity_service|.
551 virtual rtc::scoped_refptr<PeerConnectionInterface> 556 virtual rtc::scoped_refptr<PeerConnectionInterface>
552 CreatePeerConnection( 557 CreatePeerConnection(
553 const PeerConnectionInterface::RTCConfiguration& configuration, 558 const PeerConnectionInterface::RTCConfiguration& configuration,
554 const MediaConstraintsInterface* constraints, 559 const MediaConstraintsInterface* constraints,
555 PortAllocatorFactoryInterface* allocator_factory, 560 PortAllocatorFactoryInterface* allocator_factory,
556 DTLSIdentityServiceInterface* dtls_identity_service, 561 DTLSIdentityServiceInterface* dtls_identity_service,
557 PeerConnectionObserver* observer) = 0; 562 PeerConnectionObserver* observer) = 0;
558 563
564 // With the |certificate| already generated, this version of
565 // CreatePeerConnection can skip the need to generate
566 // SSLIdentity/DtlsCertificate. |certificate| must not be a null reference.
567 virtual rtc::scoped_refptr<PeerConnectionInterface>
568 CreatePeerConnection(
569 const PeerConnectionInterface::RTCConfiguration& configuration,
570 const MediaConstraintsInterface* constraints,
571 PortAllocatorFactoryInterface* allocator_factory,
572 rtc::scoped_refptr<DtlsCertificate> certificate,
573 PeerConnectionObserver* observer) = 0;
574
559 // TODO(mallinath) : Remove below versions after clients are updated 575 // TODO(mallinath) : Remove below versions after clients are updated
560 // to above method. 576 // to above method.
561 // In latest W3C WebRTC draft, PC constructor will take RTCConfiguration, 577 // In latest W3C WebRTC draft, PC constructor will take RTCConfiguration,
562 // and not IceServers. RTCConfiguration is made up of ice servers and 578 // and not IceServers. RTCConfiguration is made up of ice servers and
563 // ice transport type. 579 // ice transport type.
564 // http://dev.w3.org/2011/webrtc/editor/webrtc.html 580 // http://dev.w3.org/2011/webrtc/editor/webrtc.html
565 inline rtc::scoped_refptr<PeerConnectionInterface> 581 inline rtc::scoped_refptr<PeerConnectionInterface>
566 CreatePeerConnection( 582 CreatePeerConnection(
567 const PeerConnectionInterface::IceServers& servers, 583 const PeerConnectionInterface::IceServers& servers,
568 const MediaConstraintsInterface* constraints, 584 const MediaConstraintsInterface* constraints,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 CreatePeerConnectionFactory( 642 CreatePeerConnectionFactory(
627 rtc::Thread* worker_thread, 643 rtc::Thread* worker_thread,
628 rtc::Thread* signaling_thread, 644 rtc::Thread* signaling_thread,
629 AudioDeviceModule* default_adm, 645 AudioDeviceModule* default_adm,
630 cricket::WebRtcVideoEncoderFactory* encoder_factory, 646 cricket::WebRtcVideoEncoderFactory* encoder_factory,
631 cricket::WebRtcVideoDecoderFactory* decoder_factory); 647 cricket::WebRtcVideoDecoderFactory* decoder_factory);
632 648
633 } // namespace webrtc 649 } // namespace webrtc
634 650
635 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ 651 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698