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 #ifndef REMOTING_HOST_STATUS_OBSERVER_H_ | 5 #ifndef REMOTING_HOST_STATUS_OBSERVER_H_ |
6 #define REMOTING_HOST_STATUS_OBSERVER_H_ | 6 #define REMOTING_HOST_STATUS_OBSERVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 namespace remoting { | 10 namespace remoting { |
| 11 class SignalStrategy; |
11 | 12 |
12 class SignalStrategy; | 13 namespace protocol { |
| 14 class ConnectionToClient; |
| 15 } |
13 | 16 |
14 class HostStatusObserver { | 17 class HostStatusObserver { |
15 public: | 18 public: |
16 HostStatusObserver() { } | 19 HostStatusObserver() { } |
17 virtual ~HostStatusObserver() { } | 20 virtual ~HostStatusObserver() { } |
18 | 21 |
19 // Called on the network thread when status of the XMPP changes. | 22 // Called on the network thread when status of the XMPP changes. |
20 virtual void OnSignallingConnected(SignalStrategy* signal_strategy, | 23 virtual void OnSignallingConnected(SignalStrategy* signal_strategy, |
21 const std::string& full_jid) = 0; | 24 const std::string& full_jid) = 0; |
22 virtual void OnSignallingDisconnected() = 0; | 25 virtual void OnSignallingDisconnected() = 0; |
23 | 26 |
24 // Called on the network thread when an unauthorized user attempts | 27 // Called on the network thread when an unauthorized user attempts |
25 // to connect to the host. | 28 // to connect to the host. |
26 virtual void OnAccessDenied() = 0; | 29 virtual void OnAccessDenied() = 0; |
27 | 30 |
28 // Called on the main thread when a client authenticates, or disconnects. | 31 // Called on the main thread when a client authenticates, or disconnects. |
29 // The observer must not tear-down ChromotingHost state on receipt of | 32 // The observer must not tear-down ChromotingHost state on receipt of |
30 // this callback; it is purely informational. | 33 // this callback; it is purely informational. |
31 virtual void OnAuthenticatedClientsChanged(int authenticated_clients) = 0; | 34 virtual void OnClientAuthenticated( |
| 35 remoting::protocol::ConnectionToClient* client) = 0; |
| 36 virtual void OnClientDisconnected( |
| 37 remoting::protocol::ConnectionToClient* client) = 0; |
32 | 38 |
33 // Called on the main thread when the host shuts down. | 39 // Called on the main thread when the host shuts down. |
34 virtual void OnShutdown() = 0; | 40 virtual void OnShutdown() = 0; |
35 }; | 41 }; |
36 | 42 |
37 } // namespace remoting | 43 } // namespace remoting |
38 | 44 |
39 #endif // REMOTING_HOST_STATUS_OBSERVER_H_ | 45 #endif // REMOTING_HOST_STATUS_OBSERVER_H_ |
OLD | NEW |