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

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

Issue 1186083002: Ability to specify KeyType (RSA, ECDSA) in CreatePeerConnection (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: PeerConnectionFactoryInterface::CreatePeerConnection without KeyType Created 5 years, 6 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/dtmfsenderinterface.h" 75 #include "talk/app/webrtc/dtmfsenderinterface.h"
76 #include "talk/app/webrtc/jsep.h" 76 #include "talk/app/webrtc/jsep.h"
77 #include "talk/app/webrtc/mediastreaminterface.h" 77 #include "talk/app/webrtc/mediastreaminterface.h"
78 #include "talk/app/webrtc/statstypes.h" 78 #include "talk/app/webrtc/statstypes.h"
79 #include "talk/app/webrtc/umametrics.h" 79 #include "talk/app/webrtc/umametrics.h"
80 #include "webrtc/base/fileutils.h" 80 #include "webrtc/base/fileutils.h"
81 #include "webrtc/base/network.h" 81 #include "webrtc/base/network.h"
82 #include "webrtc/base/sslidentity.h"
82 #include "webrtc/base/sslstreamadapter.h" 83 #include "webrtc/base/sslstreamadapter.h"
83 #include "webrtc/base/socketaddress.h" 84 #include "webrtc/base/socketaddress.h"
84 85
85 namespace rtc { 86 namespace rtc {
86 class SSLIdentity; 87 class SSLIdentity;
87 class Thread; 88 class Thread;
88 } 89 }
89 90
90 namespace cricket { 91 namespace cricket {
91 class PortAllocator; 92 class PortAllocator;
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 541
541 virtual void SetOptions(const Options& options) = 0; 542 virtual void SetOptions(const Options& options) = 0;
542 543
543 // This method takes the ownership of |dtls_identity_service|. 544 // This method takes the ownership of |dtls_identity_service|.
544 virtual rtc::scoped_refptr<PeerConnectionInterface> 545 virtual rtc::scoped_refptr<PeerConnectionInterface>
545 CreatePeerConnection( 546 CreatePeerConnection(
546 const PeerConnectionInterface::RTCConfiguration& configuration, 547 const PeerConnectionInterface::RTCConfiguration& configuration,
547 const MediaConstraintsInterface* constraints, 548 const MediaConstraintsInterface* constraints,
548 PortAllocatorFactoryInterface* allocator_factory, 549 PortAllocatorFactoryInterface* allocator_factory,
549 DTLSIdentityServiceInterface* dtls_identity_service, 550 DTLSIdentityServiceInterface* dtls_identity_service,
551 rtc::KeyType key_type,
550 PeerConnectionObserver* observer) = 0; 552 PeerConnectionObserver* observer) = 0;
551 553
552 // TODO(mallinath) : Remove below versions after clients are updated 554 // TODO(mallinath) : Remove below versions after clients are updated
553 // to above method. 555 // to above method.
554 // In latest W3C WebRTC draft, PC constructor will take RTCConfiguration, 556 // In latest W3C WebRTC draft, PC constructor will take RTCConfiguration,
555 // and not IceServers. RTCConfiguration is made up of ice servers and 557 // and not IceServers. RTCConfiguration is made up of ice servers and
556 // ice transport type. 558 // ice transport type.
557 // http://dev.w3.org/2011/webrtc/editor/webrtc.html 559 // http://dev.w3.org/2011/webrtc/editor/webrtc.html
558 inline rtc::scoped_refptr<PeerConnectionInterface> 560 inline rtc::scoped_refptr<PeerConnectionInterface>
559 CreatePeerConnection( 561 CreatePeerConnection(
560 const PeerConnectionInterface::IceServers& servers, 562 const PeerConnectionInterface::IceServers& servers,
561 const MediaConstraintsInterface* constraints, 563 const MediaConstraintsInterface* constraints,
562 PortAllocatorFactoryInterface* allocator_factory, 564 PortAllocatorFactoryInterface* allocator_factory,
563 DTLSIdentityServiceInterface* dtls_identity_service, 565 DTLSIdentityServiceInterface* dtls_identity_service,
566 rtc::KeyType key_type,
567 PeerConnectionObserver* observer) {
568 PeerConnectionInterface::RTCConfiguration rtc_config;
569 rtc_config.servers = servers;
570 return CreatePeerConnection(rtc_config, constraints, allocator_factory,
571 dtls_identity_service, key_type, observer);
572 }
573
574 // TODO(hbos): Remove once chromium uses CreatePeerConnection with KeyType.
575 inline rtc::scoped_refptr<PeerConnectionInterface>
576 CreatePeerConnection(
577 const PeerConnectionInterface::RTCConfiguration& configuration,
578 const MediaConstraintsInterface* constraints,
579 PortAllocatorFactoryInterface* allocator_factory,
580 DTLSIdentityServiceInterface* dtls_identity_service,
564 PeerConnectionObserver* observer) { 581 PeerConnectionObserver* observer) {
565 PeerConnectionInterface::RTCConfiguration rtc_config; 582 return CreatePeerConnection(configuration, constraints, allocator_factory,
566 rtc_config.servers = servers; 583 dtls_identity_service, rtc::KT_DEFAULT,
567 return CreatePeerConnection(rtc_config, constraints, allocator_factory, 584 observer);
568 dtls_identity_service, observer); 585 }
586 // TODO(hbos): Remove once chromium uses CreatePeerConnection with KeyType.
587 inline rtc::scoped_refptr<PeerConnectionInterface>
588 CreatePeerConnection(
589 const PeerConnectionInterface::IceServers& servers,
590 const MediaConstraintsInterface* constraints,
591 PortAllocatorFactoryInterface* allocator_factory,
592 DTLSIdentityServiceInterface* dtls_identity_service,
593 PeerConnectionObserver* observer) {
594 return CreatePeerConnection(servers, constraints, allocator_factory,
595 dtls_identity_service, rtc::KT_DEFAULT,
596 observer);
569 } 597 }
570 598
571 virtual rtc::scoped_refptr<MediaStreamInterface> 599 virtual rtc::scoped_refptr<MediaStreamInterface>
572 CreateLocalMediaStream(const std::string& label) = 0; 600 CreateLocalMediaStream(const std::string& label) = 0;
573 601
574 // Creates a AudioSourceInterface. 602 // Creates a AudioSourceInterface.
575 // |constraints| decides audio processing settings but can be NULL. 603 // |constraints| decides audio processing settings but can be NULL.
576 virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( 604 virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource(
577 const MediaConstraintsInterface* constraints) = 0; 605 const MediaConstraintsInterface* constraints) = 0;
578 606
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 CreatePeerConnectionFactory( 647 CreatePeerConnectionFactory(
620 rtc::Thread* worker_thread, 648 rtc::Thread* worker_thread,
621 rtc::Thread* signaling_thread, 649 rtc::Thread* signaling_thread,
622 AudioDeviceModule* default_adm, 650 AudioDeviceModule* default_adm,
623 cricket::WebRtcVideoEncoderFactory* encoder_factory, 651 cricket::WebRtcVideoEncoderFactory* encoder_factory,
624 cricket::WebRtcVideoDecoderFactory* decoder_factory); 652 cricket::WebRtcVideoDecoderFactory* decoder_factory);
625 653
626 } // namespace webrtc 654 } // namespace webrtc
627 655
628 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ 656 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_
OLDNEW
« no previous file with comments | « talk/app/webrtc/peerconnectionfactoryproxy.h ('k') | talk/app/webrtc/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698