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 "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 | 9 |
10 namespace remoting { | 10 namespace remoting { |
11 | 11 |
12 class SignalStrategy; | 12 class SignalStrategy; |
13 | 13 |
14 class HostStatusObserver | 14 class HostStatusObserver |
15 : public base::RefCountedThreadSafe<HostStatusObserver> { | 15 : public base::RefCountedThreadSafe<HostStatusObserver> { |
16 public: | 16 public: |
17 HostStatusObserver() { } | 17 HostStatusObserver() { } |
18 | 18 |
19 // Called on the network thread when status of the XMPP changes. | 19 // Called on the network thread when status of the XMPP changes. |
20 virtual void OnSignallingConnected(SignalStrategy* signal_strategy, | 20 virtual void OnSignallingConnected(SignalStrategy* signal_strategy, |
21 const std::string& full_jid) = 0; | 21 const std::string& full_jid) = 0; |
22 virtual void OnSignallingDisconnected() = 0; | 22 virtual void OnSignallingDisconnected() = 0; |
23 | 23 |
24 // Called on the main thread when a client authenticates, or disconnects. | |
25 // The observer must not tear-down ChromotingHost state on receipt of | |
26 // this callback; it is purely informational. | |
27 virtual void OnAuthenticatedClientsChanged(int authenticated_clients) = 0; | |
Jamie
2011/06/10 18:00:38
Optional: I think that this method is never implem
Wez
2011/06/13 20:30:35
That certainly makes sense, but currently HostStat
| |
28 | |
24 // Called on the main thread when the host shuts down. | 29 // Called on the main thread when the host shuts down. |
25 virtual void OnShutdown() = 0; | 30 virtual void OnShutdown() = 0; |
26 | 31 |
27 protected: | 32 protected: |
28 friend class base::RefCountedThreadSafe<HostStatusObserver>; | 33 friend class base::RefCountedThreadSafe<HostStatusObserver>; |
29 virtual ~HostStatusObserver() { } | 34 virtual ~HostStatusObserver() { } |
30 }; | 35 }; |
31 | 36 |
32 } // namespace remoting | 37 } // namespace remoting |
33 | 38 |
34 #endif // REMOTING_HOST_STATUS_OBSERVER_H_ | 39 #endif // REMOTING_HOST_STATUS_OBSERVER_H_ |
OLD | NEW |