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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // being accepted then the IncomingSessionCallback callback function must | 50 // being accepted then the IncomingSessionCallback callback function must |
51 // select session configuration and then set it with Session::set_config(). | 51 // select session configuration and then set it with Session::set_config(). |
52 | 52 |
53 #ifndef REMOTING_PROTOCOL_SESSION_MANAGER_H_ | 53 #ifndef REMOTING_PROTOCOL_SESSION_MANAGER_H_ |
54 #define REMOTING_PROTOCOL_SESSION_MANAGER_H_ | 54 #define REMOTING_PROTOCOL_SESSION_MANAGER_H_ |
55 | 55 |
56 #include <string> | 56 #include <string> |
57 | 57 |
58 #include "base/callback.h" | 58 #include "base/callback.h" |
59 #include "base/macros.h" | 59 #include "base/macros.h" |
60 #include "base/threading/non_thread_safe.h" | |
61 #include "remoting/protocol/session.h" | 60 #include "remoting/protocol/session.h" |
62 | 61 |
63 namespace remoting { | 62 namespace remoting { |
64 | 63 |
65 class SignalingAddress; | 64 class SignalingAddress; |
66 class SignalStrategy; | 65 class SignalStrategy; |
67 | 66 |
68 namespace protocol { | 67 namespace protocol { |
69 | 68 |
70 class Authenticator; | 69 class Authenticator; |
71 class AuthenticatorFactory; | 70 class AuthenticatorFactory; |
72 | 71 |
73 // Generic interface for Chromoting session manager. | 72 // Generic interface for Chromoting session manager. |
74 class SessionManager : public base::NonThreadSafe { | 73 class SessionManager { |
75 public: | 74 public: |
76 enum IncomingSessionResponse { | 75 enum IncomingSessionResponse { |
77 // Accept the session. | 76 // Accept the session. |
78 ACCEPT, | 77 ACCEPT, |
79 | 78 |
80 // Reject the session because the host is currently disabled due | 79 // Reject the session because the host is currently disabled due |
81 // to previous login attempts. | 80 // to previous login attempts. |
82 OVERLOAD, | 81 OVERLOAD, |
83 | 82 |
84 // Reject the session because the client is not allowed to connect | 83 // Reject the session because the client is not allowed to connect |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 std::unique_ptr<AuthenticatorFactory> authenticator_factory) = 0; | 125 std::unique_ptr<AuthenticatorFactory> authenticator_factory) = 0; |
127 | 126 |
128 private: | 127 private: |
129 DISALLOW_COPY_AND_ASSIGN(SessionManager); | 128 DISALLOW_COPY_AND_ASSIGN(SessionManager); |
130 }; | 129 }; |
131 | 130 |
132 } // namespace protocol | 131 } // namespace protocol |
133 } // namespace remoting | 132 } // namespace remoting |
134 | 133 |
135 #endif // REMOTING_PROTOCOL_SESSION_MANAGER_H_ | 134 #endif // REMOTING_PROTOCOL_SESSION_MANAGER_H_ |
OLD | NEW |