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

Side by Side Diff: remoting/host/host_status_observer.h

Issue 9005034: Refactor SignalStrategy so that it can be reused for multiple connections. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 11 months 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/host/heartbeat_sender_unittest.cc ('k') | remoting/host/it2me_host_user_interface.h » ('j') | 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 #ifndef REMOTING_HOST_HOST_STATUS_OBSERVER_H_ 5 #ifndef REMOTING_HOST_HOST_STATUS_OBSERVER_H_
6 #define REMOTING_HOST_HOST_STATUS_OBSERVER_H_ 6 #define REMOTING_HOST_HOST_STATUS_OBSERVER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace remoting { 10 namespace remoting {
11 class SignalStrategy; 11 class SignalStrategy;
12 12
13 // Interface for host status observer. All methods are invoked on the 13 // Interface for host status observer. All methods are invoked on the
14 // network thread. 14 // network thread.
15 class HostStatusObserver { 15 class HostStatusObserver {
16 public: 16 public:
17 HostStatusObserver() { } 17 HostStatusObserver() { }
18 virtual ~HostStatusObserver() { } 18 virtual ~HostStatusObserver() { }
19 19
20 // Called when status of the signalling channel changes. 20 // Called when status of the signalling channel changes.
21 virtual void OnSignallingConnected(SignalStrategy* signal_strategy, 21 virtual void OnSignallingConnected(SignalStrategy* signal_strategy) = 0;
22 const std::string& full_jid) = 0;
23 virtual void OnSignallingDisconnected() = 0; 22 virtual void OnSignallingDisconnected() = 0;
24 23
25 // Called when an unauthorized user attempts to connect to the host. 24 // Called when an unauthorized user attempts to connect to the host.
26 virtual void OnAccessDenied() = 0; 25 virtual void OnAccessDenied() = 0;
27 26
28 // Called when a client authenticates, or disconnects. Observers 27 // Called when a client authenticates, or disconnects. Observers
29 // must not tear-down ChromotingHost state on receipt of this 28 // must not tear-down ChromotingHost state on receipt of this
30 // callback; it is purely informational. 29 // callback; it is purely informational.
31 virtual void OnClientAuthenticated(const std::string& jid) = 0; 30 virtual void OnClientAuthenticated(const std::string& jid) = 0;
32 virtual void OnClientDisconnected(const std::string& jid) = 0; 31 virtual void OnClientDisconnected(const std::string& jid) = 0;
33 32
34 // Called when the host shuts down. 33 // Called when the host shuts down.
35 virtual void OnShutdown() = 0; 34 virtual void OnShutdown() = 0;
36 }; 35 };
37 36
38 } // namespace remoting 37 } // namespace remoting
39 38
40 #endif // REMOTING_HOST_HOST_STATUS_OBSERVER_H_ 39 #endif // REMOTING_HOST_HOST_STATUS_OBSERVER_H_
OLDNEW
« no previous file with comments | « remoting/host/heartbeat_sender_unittest.cc ('k') | remoting/host/it2me_host_user_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698