OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 // |client_oauth_token| is a short-lived OAuth token identify the client. | 128 // |client_oauth_token| is a short-lived OAuth token identify the client. |
129 // |config| contains the session configurations that the client supports. | 129 // |config| contains the session configurations that the client supports. |
130 // |state_change_callback| is called when the connection state changes. | 130 // |state_change_callback| is called when the connection state changes. |
131 // | 131 // |
132 // Ownership of the |config| is passed to the new session. | 132 // Ownership of the |config| is passed to the new session. |
133 virtual Session* Connect( | 133 virtual Session* Connect( |
134 const std::string& host_jid, | 134 const std::string& host_jid, |
135 const std::string& host_public_key, | 135 const std::string& host_public_key, |
136 const std::string& client_token, | 136 const std::string& client_token, |
137 CandidateSessionConfig* config, | 137 CandidateSessionConfig* config, |
138 Session::StateChangeCallback* state_change_callback) = 0; | 138 const Session::StateChangeCallback& state_change_callback) = 0; |
139 | 139 |
140 // Close session manager. Can be called only after all corresponding | 140 // Close session manager. Can be called only after all corresponding |
141 // sessions are destroyed. No callbacks are called after this method | 141 // sessions are destroyed. No callbacks are called after this method |
142 // returns. | 142 // returns. |
143 virtual void Close() = 0; | 143 virtual void Close() = 0; |
144 | 144 |
145 private: | 145 private: |
146 DISALLOW_COPY_AND_ASSIGN(SessionManager); | 146 DISALLOW_COPY_AND_ASSIGN(SessionManager); |
147 }; | 147 }; |
148 | 148 |
149 } // namespace protocol | 149 } // namespace protocol |
150 } // namespace remoting | 150 } // namespace remoting |
151 | 151 |
152 #endif // REMOTING_PROTOCOL_SESSION_MANAGER_H_ | 152 #endif // REMOTING_PROTOCOL_SESSION_MANAGER_H_ |
OLD | NEW |