Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: remoting/protocol/session_manager.h

Issue 8774017: Add AUTHENTICATED session state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/session.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 // Connect() must be used to create new session to a remote host. The 11 // Connect() must be used to create new session to a remote host. The
12 // returned session is initially in INITIALIZING state. Later state is 12 // returned session is initially in INITIALIZING state. Later state is
13 // changed to CONNECTED if the session is accepted by the host or 13 // changed to CONNECTED if the session is accepted by the host or
14 // CLOSED if the session is rejected. 14 // CLOSED if the session is rejected.
15 // 15 //
16 // INCOMING SESSIONS 16 // INCOMING SESSIONS
17 // The IncomingSessionCallback is called when a client attempts to connect. 17 // The IncomingSessionCallback is called when a client attempts to connect.
18 // The callback function decides whether the session should be accepted or 18 // The callback function decides whether the session should be accepted or
19 // rejected. 19 // rejected.
20 // 20 //
21 // AUTHENTICATION
22 // Implementations of the Session and SessionManager interfaces
23 // delegate authentication to an Authenticator implementation. For
24 // incoming connections authenticators are created using an
25 // AuthenticatorFactory set via the set_authenticator_factory()
26 // method. For outgoing sessions authenticator must be passed to the
27 // Connect() method. The Session's state changes to AUTHENTICATED once
28 // authentication succeeds.
29 //
21 // SESSION OWNERSHIP AND SHUTDOWN 30 // SESSION OWNERSHIP AND SHUTDOWN
22 // SessionManager owns all Sessions it creates. The manager must not 31 // The SessionManager must not be closed or destroyed before all sessions
23 // be closed or destroyed before all sessions created by that 32 // created by that SessionManager are destroyed. Caller owns Sessions
24 // SessionManager are destroyed. Caller owns Sessions created by a 33 // created by a SessionManager (except rejected
25 // SessionManager (except rejected sessions). Sessions must outlive 34 // sessions). The SignalStrategy must outlive the SessionManager.
26 // SessionManager, and SignalStrategy must outlive SessionManager.
27 // 35 //
28 // PROTOCOL VERSION NEGOTIATION 36 // PROTOCOL VERSION NEGOTIATION
29 // When client connects to a host it sends a session-initiate stanza with list 37 // When client connects to a host it sends a session-initiate stanza with list
30 // of supported configurations for each channel. If the host decides to accept 38 // of supported configurations for each channel. If the host decides to accept
31 // session, then it selects configuration that is supported by both sides 39 // session, then it selects configuration that is supported by both sides
32 // and then replies with the session-accept stanza that contans selected 40 // and then replies with the session-accept stanza that contans selected
33 // configuration. The configuration specified in the session-accept is used 41 // configuration. The configuration specified in the session-accept is used
34 // for the session. 42 // for the session.
35 // 43 //
36 // The CandidateSessionConfig class represents list of configurations 44 // The CandidateSessionConfig class represents list of configurations
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 AuthenticatorFactory* authenticator_factory) = 0; 151 AuthenticatorFactory* authenticator_factory) = 0;
144 152
145 private: 153 private:
146 DISALLOW_COPY_AND_ASSIGN(SessionManager); 154 DISALLOW_COPY_AND_ASSIGN(SessionManager);
147 }; 155 };
148 156
149 } // namespace protocol 157 } // namespace protocol
150 } // namespace remoting 158 } // namespace remoting
151 159
152 #endif // REMOTING_PROTOCOL_SESSION_MANAGER_H_ 160 #endif // REMOTING_PROTOCOL_SESSION_MANAGER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/session.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698