Index: talk/app/webrtc/webrtcsession.h |
diff --git a/talk/app/webrtc/webrtcsession.h b/talk/app/webrtc/webrtcsession.h |
index 47b49b661a28f39b25fdbcfa0ad86b141d4280a5..6a70eef1cc2a42d32625523a7905de357f59ba7d 100644 |
--- a/talk/app/webrtc/webrtcsession.h |
+++ b/talk/app/webrtc/webrtcsession.h |
@@ -31,6 +31,7 @@ |
#include <string> |
#include "talk/app/webrtc/datachannel.h" |
+#include "talk/app/webrtc/dtlscertificate.h" |
#include "talk/app/webrtc/dtmfsender.h" |
#include "talk/app/webrtc/mediastreamprovider.h" |
#include "talk/app/webrtc/peerconnectioninterface.h" |
@@ -128,6 +129,11 @@ class WebRtcSession : public cricket::BaseSession, |
const MediaConstraintsInterface* constraints, |
rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
const PeerConnectionInterface::RTCConfiguration& rtc_configuration); |
+ bool Initialize( |
+ const PeerConnectionFactoryInterface::Options& options, |
+ const MediaConstraintsInterface* constraints, |
+ const rtc::scoped_refptr<webrtc::DtlsCertificate>& certificate, |
+ const PeerConnectionInterface::RTCConfiguration& rtc_configuration); |
// Deletes the voice, video and data channel and changes the session state |
// to STATE_RECEIVEDTERMINATE. |
void Terminate(); |
@@ -246,13 +252,17 @@ class WebRtcSession : public cricket::BaseSession, |
void ResetIceRestartLatch(); |
- // Called when an SSLIdentity is generated or retrieved by |
+ // Called when a DtlsCertificate is generated or retrieved by |
// WebRTCSessionDescriptionFactory. Should happen before setLocalDescription. |
- void OnIdentityReady(rtc::SSLIdentity* identity); |
+ void OnCertificateReady( |
+ const rtc::scoped_refptr<DtlsCertificate>& certificate); |
void OnDtlsSetupFailure(cricket::BaseChannel*, bool rtcp); |
// For unit test. |
- bool waiting_for_identity() const; |
+ bool IsWaitingForCertificate() const; |
+ rtc::scoped_refptr<DtlsCertificate> certificate() const { |
tommi (sloooow) - chröme
2015/08/18 14:49:35
const scoped_refptr<>&
Can this be called safely
|
+ return certificate_; |
+ } |
void set_metrics_observer( |
webrtc::MetricsObserverInterface* metrics_observer) { |
@@ -268,6 +278,13 @@ class WebRtcSession : public cricket::BaseSession, |
kAnswer, |
}; |
+ bool InitializeInternal( |
+ const PeerConnectionFactoryInterface::Options& options, |
+ const MediaConstraintsInterface* constraints, |
+ const PeerConnectionInterface::RTCConfiguration& rtc_configuration); |
+ void InitializeFactoryAfterConstruction( |
+ const PeerConnectionFactoryInterface::Options& options); |
+ |
// Invokes ConnectChannels() on transport proxies, which initiates ice |
// candidates allocation. |
bool StartCandidatesAllocation(); |
@@ -393,6 +410,7 @@ class WebRtcSession : public cricket::BaseSession, |
// 3. If both 1&2 are false, data channel is not allowed (DCT_NONE). |
cricket::DataChannelType data_channel_type_; |
rtc::scoped_ptr<IceRestartAnswerLatch> ice_restart_latch_; |
+ rtc::scoped_refptr<DtlsCertificate> certificate_; |
rtc::scoped_ptr<WebRtcSessionDescriptionFactory> |
webrtc_session_desc_factory_; |