| Index: remoting/protocol/jingle_session_manager.h
|
| diff --git a/remoting/protocol/jingle_session_manager.h b/remoting/protocol/jingle_session_manager.h
|
| index 2f2125e16b7dc9533b7226227869f51a591582ac..a72d9a314bccae12251c56ff476b5b748d6b20a4 100644
|
| --- a/remoting/protocol/jingle_session_manager.h
|
| +++ b/remoting/protocol/jingle_session_manager.h
|
| @@ -43,16 +43,15 @@ class JingleSessionManager
|
| virtual void Init(const std::string& local_jid,
|
| SignalStrategy* signal_strategy,
|
| Listener* listener,
|
| - crypto::RSAPrivateKey* private_key,
|
| - const std::string& certificate,
|
| bool allow_nat_traversal) OVERRIDE;
|
| virtual Session* Connect(
|
| const std::string& host_jid,
|
| - const std::string& host_public_key,
|
| - const std::string& client_token,
|
| + Authenticator* authenticator,
|
| CandidateSessionConfig* config,
|
| const Session::StateChangeCallback& state_change_callback) OVERRIDE;
|
| virtual void Close() OVERRIDE;
|
| + virtual void set_authenticator_factory(
|
| + AuthenticatorFactory* authenticator_factory) OVERRIDE;
|
|
|
| // cricket::SessionClient interface.
|
| virtual void OnSessionCreate(cricket::Session* cricket_session,
|
| @@ -71,10 +70,16 @@ class JingleSessionManager
|
| private:
|
| friend class JingleSession;
|
|
|
| - // Called by JingleSession when a new connection is
|
| - // initiated. Returns true if session is accepted.
|
| - bool AcceptConnection(JingleSession* jingle_session,
|
| - cricket::Session* cricket_session);
|
| + // Called by JingleSession when a new connection is initiated.
|
| + SessionManager::IncomingSessionResponse AcceptConnection(
|
| + JingleSession* jingle_session);
|
| +
|
| + // Creates authenticator for incoming session. Returns NULL if
|
| + // authenticator cannot be created, e.g. if |auth_message| is
|
| + // invalid. Caller reatins ownership of |auth_message| and must
|
| + // accept ownership of the result.
|
| + Authenticator* CreateAuthenticator(const std::string& jid,
|
| + const buzz::XmlElement* auth_message);
|
|
|
| // Called by JingleSession when it is being destroyed.
|
| void SessionDestroyed(JingleSession* jingle_session);
|
| @@ -85,15 +90,6 @@ class JingleSessionManager
|
| const std::vector<std::string>& relay_hosts,
|
| const std::vector<talk_base::SocketAddress>& stun_hosts);
|
|
|
| - // Creates session description for outgoing session.
|
| - static cricket::SessionDescription* CreateClientSessionDescription(
|
| - const CandidateSessionConfig* candidate_config,
|
| - const std::string& auth_token);
|
| - // Creates session description for incoming session.
|
| - static cricket::SessionDescription* CreateHostSessionDescription(
|
| - const CandidateSessionConfig* candidate_config,
|
| - const std::string& certificate);
|
| -
|
| scoped_refptr<base::MessageLoopProxy> message_loop_;
|
|
|
| scoped_ptr<talk_base::NetworkManager> network_manager_;
|
| @@ -101,9 +97,8 @@ class JingleSessionManager
|
|
|
| std::string local_jid_; // Full jid for the local side of the session.
|
| SignalStrategy* signal_strategy_;
|
| + scoped_ptr<AuthenticatorFactory> authenticator_factory_;
|
| Listener* listener_;
|
| - std::string certificate_;
|
| - scoped_ptr<crypto::RSAPrivateKey> private_key_;
|
| bool allow_nat_traversal_;
|
|
|
| scoped_ptr<cricket::PortAllocator> port_allocator_;
|
|
|