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

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

Issue 1176383004: DtlsIdentityStore[Interface/Impl] updated, DtlsIdentityService to be removed (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merge w master AFTER the landing of 1268363002. "CreatePC(service,store)" using store instead of service. 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/dtlsidentitystore.h" 75 #include "talk/app/webrtc/dtlsidentitystore.h"
76 #include "talk/app/webrtc/dtmfsenderinterface.h" 76 #include "talk/app/webrtc/dtmfsenderinterface.h"
77 #include "talk/app/webrtc/dtlsidentitystore.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"
85 86
86 namespace rtc { 87 namespace rtc {
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 // After this method is called, the port allocator should consider loopback 461 // After this method is called, the port allocator should consider loopback
461 // network interfaces as well. 462 // network interfaces as well.
462 virtual void SetNetworkIgnoreMask(int network_ignore_mask) { 463 virtual void SetNetworkIgnoreMask(int network_ignore_mask) {
463 } 464 }
464 465
465 protected: 466 protected:
466 PortAllocatorFactoryInterface() {} 467 PortAllocatorFactoryInterface() {}
467 ~PortAllocatorFactoryInterface() {} 468 ~PortAllocatorFactoryInterface() {}
468 }; 469 };
469 470
471 // TODO(hbos): Remove once cr/1176383004 lands.
470 class DTLSIdentityServiceInterface { 472 class DTLSIdentityServiceInterface {
471 public: 473 public:
472 // Asynchronously request a DTLS identity, including a self-signed certificate 474 // Asynchronously request a DTLS identity, including a self-signed certificate
473 // and the private key used to sign the certificate, from the identity store 475 // and the private key used to sign the certificate, from the identity store
474 // for the given identity name. 476 // for the given identity name.
475 // DTLSIdentityRequestObserver::OnSuccess will be called with the identity if 477 // DTLSIdentityRequestObserver::OnSuccess will be called with the identity if
476 // the request succeeded; DTLSIdentityRequestObserver::OnFailure will be 478 // the request succeeded; DTLSIdentityRequestObserver::OnFailure will be
477 // called with an error code if the request failed. 479 // called with an error code if the request failed.
478 // 480 //
479 // Only one request can be made at a time. If a second request is called 481 // Only one request can be made at a time. If a second request is called
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 // Sets the maximum supported protocol version. The highest version 530 // Sets the maximum supported protocol version. The highest version
529 // supported by both ends will be used for the connection, i.e. if one 531 // 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. 532 // party supports DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used.
531 rtc::SSLProtocolVersion ssl_max_version; 533 rtc::SSLProtocolVersion ssl_max_version;
532 }; 534 };
533 535
534 virtual void SetOptions(const Options& options) = 0; 536 virtual void SetOptions(const Options& options) = 0;
535 537
536 // TODO(hbos): Temporary CreatePeerConnection function while we transition 538 // TODO(hbos): Temporary CreatePeerConnection function while we transition
537 // from DTLSIdentityServiceInterface to DtlsIdentityStoreInterface. 539 // from DTLSIdentityServiceInterface to DtlsIdentityStoreInterface.
540 // This method takes the ownership of |dtls_identity_service|.
538 rtc::scoped_refptr<PeerConnectionInterface> 541 rtc::scoped_refptr<PeerConnectionInterface>
539 CreatePeerConnection( 542 CreatePeerConnection(
540 const PeerConnectionInterface::RTCConfiguration& configuration, 543 const PeerConnectionInterface::RTCConfiguration& configuration,
541 const MediaConstraintsInterface* constraints, 544 const MediaConstraintsInterface* constraints,
542 PortAllocatorFactoryInterface* allocator_factory, 545 PortAllocatorFactoryInterface* allocator_factory,
543 DTLSIdentityServiceInterface* dtls_identity_service, 546 DTLSIdentityServiceInterface* dtls_identity_service,
544 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, 547 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
545 PeerConnectionObserver* observer) { 548 PeerConnectionObserver* observer) {
549 if (dtls_identity_service) {
550 // Store used instead of service, our ownership responsibility to delete.
551 delete dtls_identity_service;
552 }
546 return CreatePeerConnection(configuration, constraints, allocator_factory, 553 return CreatePeerConnection(configuration, constraints, allocator_factory,
547 dtls_identity_service, observer); 554 dtls_identity_store.Pass(), observer);
548 } 555 }
549 556
550 // This method takes the ownership of |dtls_identity_service|.
551 virtual rtc::scoped_refptr<PeerConnectionInterface> 557 virtual rtc::scoped_refptr<PeerConnectionInterface>
552 CreatePeerConnection( 558 CreatePeerConnection(
553 const PeerConnectionInterface::RTCConfiguration& configuration, 559 const PeerConnectionInterface::RTCConfiguration& configuration,
554 const MediaConstraintsInterface* constraints, 560 const MediaConstraintsInterface* constraints,
555 PortAllocatorFactoryInterface* allocator_factory, 561 PortAllocatorFactoryInterface* allocator_factory,
556 DTLSIdentityServiceInterface* dtls_identity_service, 562 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
557 PeerConnectionObserver* observer) = 0; 563 PeerConnectionObserver* observer) = 0;
558 564
559 // TODO(mallinath) : Remove below versions after clients are updated 565 // TODO(hbos): Remove below version after clients are updated to above method.
560 // to above method.
561 // In latest W3C WebRTC draft, PC constructor will take RTCConfiguration, 566 // In latest W3C WebRTC draft, PC constructor will take RTCConfiguration,
562 // and not IceServers. RTCConfiguration is made up of ice servers and 567 // and not IceServers. RTCConfiguration is made up of ice servers and
563 // ice transport type. 568 // ice transport type.
564 // http://dev.w3.org/2011/webrtc/editor/webrtc.html 569 // http://dev.w3.org/2011/webrtc/editor/webrtc.html
565 inline rtc::scoped_refptr<PeerConnectionInterface> 570 inline rtc::scoped_refptr<PeerConnectionInterface>
566 CreatePeerConnection( 571 CreatePeerConnection(
567 const PeerConnectionInterface::IceServers& servers, 572 const PeerConnectionInterface::IceServers& servers,
568 const MediaConstraintsInterface* constraints, 573 const MediaConstraintsInterface* constraints,
569 PortAllocatorFactoryInterface* allocator_factory, 574 PortAllocatorFactoryInterface* allocator_factory,
570 DTLSIdentityServiceInterface* dtls_identity_service, 575 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
571 PeerConnectionObserver* observer) { 576 PeerConnectionObserver* observer) {
572 PeerConnectionInterface::RTCConfiguration rtc_config; 577 PeerConnectionInterface::RTCConfiguration rtc_config;
573 rtc_config.servers = servers; 578 rtc_config.servers = servers;
574 return CreatePeerConnection(rtc_config, constraints, allocator_factory, 579 return CreatePeerConnection(rtc_config, constraints, allocator_factory,
575 dtls_identity_service, observer); 580 dtls_identity_store.Pass(), observer);
576 } 581 }
577 582
578 virtual rtc::scoped_refptr<MediaStreamInterface> 583 virtual rtc::scoped_refptr<MediaStreamInterface>
579 CreateLocalMediaStream(const std::string& label) = 0; 584 CreateLocalMediaStream(const std::string& label) = 0;
580 585
581 // Creates a AudioSourceInterface. 586 // Creates a AudioSourceInterface.
582 // |constraints| decides audio processing settings but can be NULL. 587 // |constraints| decides audio processing settings but can be NULL.
583 virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( 588 virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource(
584 const MediaConstraintsInterface* constraints) = 0; 589 const MediaConstraintsInterface* constraints) = 0;
585 590
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 CreatePeerConnectionFactory( 631 CreatePeerConnectionFactory(
627 rtc::Thread* worker_thread, 632 rtc::Thread* worker_thread,
628 rtc::Thread* signaling_thread, 633 rtc::Thread* signaling_thread,
629 AudioDeviceModule* default_adm, 634 AudioDeviceModule* default_adm,
630 cricket::WebRtcVideoEncoderFactory* encoder_factory, 635 cricket::WebRtcVideoEncoderFactory* encoder_factory,
631 cricket::WebRtcVideoDecoderFactory* decoder_factory); 636 cricket::WebRtcVideoDecoderFactory* decoder_factory);
632 637
633 } // namespace webrtc 638 } // namespace webrtc
634 639
635 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ 640 #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