| Index: talk/app/webrtc/peerconnectioninterface.h
|
| diff --git a/talk/app/webrtc/peerconnectioninterface.h b/talk/app/webrtc/peerconnectioninterface.h
|
| index ce32b50291a7a46c061bf36aabe9d7cf8d9096b2..5983cb5f5b58bbceff0d848a809aa2535e3cb625 100644
|
| --- a/talk/app/webrtc/peerconnectioninterface.h
|
| +++ b/talk/app/webrtc/peerconnectioninterface.h
|
| @@ -73,6 +73,7 @@
|
|
|
| #include "talk/app/webrtc/datachannelinterface.h"
|
| #include "talk/app/webrtc/dtmfsenderinterface.h"
|
| +#include "talk/app/webrtc/dtlsidentitystore.h"
|
| #include "talk/app/webrtc/jsep.h"
|
| #include "talk/app/webrtc/mediastreaminterface.h"
|
| #include "talk/app/webrtc/statstypes.h"
|
| @@ -466,53 +467,6 @@ class PortAllocatorFactoryInterface : public rtc::RefCountInterface {
|
| ~PortAllocatorFactoryInterface() {}
|
| };
|
|
|
| -// Used to receive callbacks of DTLS identity requests.
|
| -class DTLSIdentityRequestObserver : public rtc::RefCountInterface {
|
| - public:
|
| - virtual void OnFailure(int error) = 0;
|
| - // TODO(jiayl): Unify the OnSuccess method once Chrome code is updated.
|
| - virtual void OnSuccess(const std::string& der_cert,
|
| - const std::string& der_private_key) = 0;
|
| - // |identity| is a scoped_ptr because rtc::SSLIdentity is not copyable and the
|
| - // client has to get the ownership of the object to make use of it.
|
| - virtual void OnSuccessWithIdentityObj(
|
| - rtc::scoped_ptr<rtc::SSLIdentity> identity) = 0;
|
| -
|
| - protected:
|
| - virtual ~DTLSIdentityRequestObserver() {}
|
| -};
|
| -
|
| -class DTLSIdentityServiceInterface {
|
| - public:
|
| - // Asynchronously request a DTLS identity, including a self-signed certificate
|
| - // and the private key used to sign the certificate, from the identity store
|
| - // for the given identity name.
|
| - // DTLSIdentityRequestObserver::OnSuccess will be called with the identity if
|
| - // the request succeeded; DTLSIdentityRequestObserver::OnFailure will be
|
| - // called with an error code if the request failed.
|
| - //
|
| - // Only one request can be made at a time. If a second request is called
|
| - // before the first one completes, RequestIdentity will abort and return
|
| - // false.
|
| - //
|
| - // |identity_name| is an internal name selected by the client to identify an
|
| - // identity within an origin. E.g. an web site may cache the certificates used
|
| - // to communicate with differnent peers under different identity names.
|
| - //
|
| - // |common_name| is the common name used to generate the certificate. If the
|
| - // certificate already exists in the store, |common_name| is ignored.
|
| - //
|
| - // |observer| is the object to receive success or failure callbacks.
|
| - //
|
| - // Returns true if either OnFailure or OnSuccess will be called.
|
| - virtual bool RequestIdentity(
|
| - const std::string& identity_name,
|
| - const std::string& common_name,
|
| - DTLSIdentityRequestObserver* observer) = 0;
|
| -
|
| - virtual ~DTLSIdentityServiceInterface() {}
|
| -};
|
| -
|
| // PeerConnectionFactoryInterface is the factory interface use for creating
|
| // PeerConnection, MediaStream and media tracks.
|
| // PeerConnectionFactoryInterface will create required libjingle threads,
|
| @@ -548,17 +502,15 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface {
|
|
|
| virtual void SetOptions(const Options& options) = 0;
|
|
|
| - // This method takes the ownership of |dtls_identity_service|.
|
| virtual rtc::scoped_refptr<PeerConnectionInterface>
|
| CreatePeerConnection(
|
| const PeerConnectionInterface::RTCConfiguration& configuration,
|
| const MediaConstraintsInterface* constraints,
|
| PortAllocatorFactoryInterface* allocator_factory,
|
| - DTLSIdentityServiceInterface* dtls_identity_service,
|
| + rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
|
| PeerConnectionObserver* observer) = 0;
|
|
|
| - // TODO(mallinath) : Remove below versions after clients are updated
|
| - // to above method.
|
| + // TODO(hbos): Remove below version after clients are updated to above method.
|
| // In latest W3C WebRTC draft, PC constructor will take RTCConfiguration,
|
| // and not IceServers. RTCConfiguration is made up of ice servers and
|
| // ice transport type.
|
| @@ -568,12 +520,12 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface {
|
| const PeerConnectionInterface::IceServers& servers,
|
| const MediaConstraintsInterface* constraints,
|
| PortAllocatorFactoryInterface* allocator_factory,
|
| - DTLSIdentityServiceInterface* dtls_identity_service,
|
| + rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
|
| PeerConnectionObserver* observer) {
|
| PeerConnectionInterface::RTCConfiguration rtc_config;
|
| rtc_config.servers = servers;
|
| return CreatePeerConnection(rtc_config, constraints, allocator_factory,
|
| - dtls_identity_service, observer);
|
| + dtls_identity_store.Pass(), observer);
|
| }
|
|
|
| virtual rtc::scoped_refptr<MediaStreamInterface>
|
|
|