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

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

Issue 9727005: Log connection type to syslogs and to the server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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/host_mock_objects.cc ('k') | remoting/host/log_to_server.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) 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 #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 net { 10 namespace net {
11 class IPEndPoint; 11 class IPEndPoint;
12 } // namespace net 12 } // namespace net
13 13
14 namespace remoting { 14 namespace remoting {
15 class SignalStrategy; 15 class SignalStrategy;
16 16
17 namespace protocol {
18 struct TransportRoute;
19 };
20
17 // Interface for host status observer. All methods are invoked on the 21 // Interface for host status observer. All methods are invoked on the
18 // network thread. 22 // network thread.
19 class HostStatusObserver { 23 class HostStatusObserver {
20 public: 24 public:
21 HostStatusObserver() { } 25 HostStatusObserver() { }
22 virtual ~HostStatusObserver() { } 26 virtual ~HostStatusObserver() { }
23 27
24 // Called when an unauthorized user attempts to connect to the host. 28 // Called when an unauthorized user attempts to connect to the host.
25 virtual void OnAccessDenied(const std::string& jid) = 0; 29 virtual void OnAccessDenied(const std::string& jid) = 0;
26 30
27 // Called when a client authenticates, or disconnects. Observers 31 // Called when a client authenticates, or disconnects. Observers
28 // must not tear-down ChromotingHost state on receipt of this 32 // must not tear-down ChromotingHost state on receipt of this
29 // callback; it is purely informational. 33 // callback; it is purely informational.
30 virtual void OnClientAuthenticated(const std::string& jid) = 0; 34 virtual void OnClientAuthenticated(const std::string& jid) = 0;
31 virtual void OnClientDisconnected(const std::string& jid) = 0; 35 virtual void OnClientDisconnected(const std::string& jid) = 0;
32 36
33 // Called on notification of a route change event, when a channel is 37 // Called on notification of a route change event, when a channel is
34 // connected. 38 // connected.
35 virtual void OnClientRouteChange(const std::string& jid, 39 virtual void OnClientRouteChange(const std::string& jid,
36 const std::string& channel_name, 40 const std::string& channel_name,
37 const net::IPEndPoint& remote_end_point, 41 const protocol::TransportRoute& route) { }
38 const net::IPEndPoint& local_end_point) { }
39 42
40 // Called when the host shuts down. 43 // Called when the host shuts down.
41 virtual void OnShutdown() = 0; 44 virtual void OnShutdown() = 0;
42 }; 45 };
43 46
44 } // namespace remoting 47 } // namespace remoting
45 48
46 #endif // REMOTING_HOST_HOST_STATUS_OBSERVER_H_ 49 #endif // REMOTING_HOST_HOST_STATUS_OBSERVER_H_
OLDNEW
« no previous file with comments | « remoting/host/host_mock_objects.cc ('k') | remoting/host/log_to_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698