| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // The purpose of SessionManager is to facilitate creation of chromotocol | 5 // The purpose of SessionManager is to facilitate creation of chromotocol |
| 6 // sessions. Both host and client use it to establish chromotocol | 6 // sessions. Both host and client use it to establish chromotocol |
| 7 // sessions. JingleChromotocolServer implements this inteface using | 7 // sessions. JingleChromotocolServer implements this inteface using |
| 8 // libjingle. | 8 // libjingle. |
| 9 // | 9 // |
| 10 // OUTGOING SESSIONS | 10 // OUTGOING SESSIONS |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 SessionManager() {} | 99 SessionManager() {} |
| 100 virtual ~SessionManager() {} | 100 virtual ~SessionManager() {} |
| 101 | 101 |
| 102 // Starts accepting incoming connections. | 102 // Starts accepting incoming connections. |
| 103 virtual void AcceptIncoming( | 103 virtual void AcceptIncoming( |
| 104 const IncomingSessionCallback& incoming_session_callback) = 0; | 104 const IncomingSessionCallback& incoming_session_callback) = 0; |
| 105 | 105 |
| 106 // Sets local protocol configuration to be used when negotiating outgoing and | 106 // Sets local protocol configuration to be used when negotiating outgoing and |
| 107 // incoming connections. | 107 // incoming connections. |
| 108 virtual void set_protocol_config( | 108 virtual void set_protocol_config( |
| 109 scoped_ptr<CandidateSessionConfig> config) = 0; | 109 std::unique_ptr<CandidateSessionConfig> config) = 0; |
| 110 | 110 |
| 111 // Tries to create a session to the host |jid|. | 111 // Tries to create a session to the host |jid|. |
| 112 // | 112 // |
| 113 // |host_jid| is the full jid of the host to connect to. | 113 // |host_jid| is the full jid of the host to connect to. |
| 114 // |authenticator| is a client authenticator for the session. | 114 // |authenticator| is a client authenticator for the session. |
| 115 virtual scoped_ptr<Session> Connect( | 115 virtual std::unique_ptr<Session> Connect( |
| 116 const std::string& host_jid, | 116 const std::string& host_jid, |
| 117 scoped_ptr<Authenticator> authenticator) = 0; | 117 std::unique_ptr<Authenticator> authenticator) = 0; |
| 118 | 118 |
| 119 // Set authenticator factory that should be used to authenticate | 119 // Set authenticator factory that should be used to authenticate |
| 120 // incoming connection. No connections will be accepted if | 120 // incoming connection. No connections will be accepted if |
| 121 // authenticator factory isn't set. Must not be called more than | 121 // authenticator factory isn't set. Must not be called more than |
| 122 // once per SessionManager because it may not be safe to delete | 122 // once per SessionManager because it may not be safe to delete |
| 123 // factory before all authenticators it created are deleted. | 123 // factory before all authenticators it created are deleted. |
| 124 virtual void set_authenticator_factory( | 124 virtual void set_authenticator_factory( |
| 125 scoped_ptr<AuthenticatorFactory> authenticator_factory) = 0; | 125 std::unique_ptr<AuthenticatorFactory> authenticator_factory) = 0; |
| 126 | 126 |
| 127 private: | 127 private: |
| 128 DISALLOW_COPY_AND_ASSIGN(SessionManager); | 128 DISALLOW_COPY_AND_ASSIGN(SessionManager); |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 } // namespace protocol | 131 } // namespace protocol |
| 132 } // namespace remoting | 132 } // namespace remoting |
| 133 | 133 |
| 134 #endif // REMOTING_PROTOCOL_SESSION_MANAGER_H_ | 134 #endif // REMOTING_PROTOCOL_SESSION_MANAGER_H_ |
| OLD | NEW |