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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 // Generic interface for Chromoting session manager. | 103 // Generic interface for Chromoting session manager. |
104 // | 104 // |
105 // TODO(sergeyu): Split this into two separate interfaces: one for the | 105 // TODO(sergeyu): Split this into two separate interfaces: one for the |
106 // client side and one for the host side. | 106 // client side and one for the host side. |
107 class SessionManager : public base::NonThreadSafe { | 107 class SessionManager : public base::NonThreadSafe { |
108 public: | 108 public: |
109 SessionManager() { } | 109 SessionManager() { } |
110 virtual ~SessionManager() { } | 110 virtual ~SessionManager() { } |
111 | 111 |
112 enum IncomingSessionResponse { | 112 enum IncomingSessionResponse { |
113 // Accept the session. | |
113 ACCEPT, | 114 ACCEPT, |
115 | |
116 // Reject the session due to incompatible session configuration. | |
114 INCOMPATIBLE, | 117 INCOMPATIBLE, |
118 | |
119 // Reject the session because the host is currently disabled due | |
120 // to previous login attempts. | |
121 DISABLED, | |
Wez
2012/03/27 16:23:56
nit: "DISABLED" seems like a bad name for this, si
Sergey Ulanov
2012/03/27 18:00:52
There is HOST_IS_OFFLINE error code that we use to
Wez
2012/03/27 19:49:41
If we have "offline" and "disabled" then it's natu
| |
122 | |
123 // Reject the session because the client is not allowed to connect | |
124 // to the host. | |
115 DECLINE, | 125 DECLINE, |
116 }; | 126 }; |
117 | 127 |
118 class Listener { | 128 class Listener { |
119 public: | 129 public: |
120 Listener() { } | 130 Listener() { } |
121 ~Listener() { } | 131 ~Listener() { } |
122 | 132 |
123 // Called when the session manager is ready to create outgoing | 133 // Called when the session manager is ready to create outgoing |
124 // sessions. May be called from Init() or after Init() | 134 // sessions. May be called from Init() or after Init() |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 scoped_ptr<AuthenticatorFactory> authenticator_factory) = 0; | 181 scoped_ptr<AuthenticatorFactory> authenticator_factory) = 0; |
172 | 182 |
173 private: | 183 private: |
174 DISALLOW_COPY_AND_ASSIGN(SessionManager); | 184 DISALLOW_COPY_AND_ASSIGN(SessionManager); |
175 }; | 185 }; |
176 | 186 |
177 } // namespace protocol | 187 } // namespace protocol |
178 } // namespace remoting | 188 } // namespace remoting |
179 | 189 |
180 #endif // REMOTING_PROTOCOL_SESSION_MANAGER_H_ | 190 #endif // REMOTING_PROTOCOL_SESSION_MANAGER_H_ |
OLD | NEW |