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 9288040: Log client IP addresses to syslog in Me2Me host. (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
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 {
11 class IPEndPoint;
12 } // namespace net
13
10 namespace remoting { 14 namespace remoting {
11 class SignalStrategy; 15 class SignalStrategy;
12 16
13 // Interface for host status observer. All methods are invoked on the 17 // Interface for host status observer. All methods are invoked on the
14 // network thread. 18 // network thread.
15 class HostStatusObserver { 19 class HostStatusObserver {
16 public: 20 public:
17 HostStatusObserver() { } 21 HostStatusObserver() { }
18 virtual ~HostStatusObserver() { } 22 virtual ~HostStatusObserver() { }
19 23
20 // Called when an unauthorized user attempts to connect to the host. 24 // Called when an unauthorized user attempts to connect to the host.
21 virtual void OnAccessDenied(const std::string& jid) = 0; 25 virtual void OnAccessDenied(const std::string& jid) = 0;
22 26
23 // Called when a client authenticates, or disconnects. Observers 27 // Called when a client authenticates, or disconnects. Observers
24 // must not tear-down ChromotingHost state on receipt of this 28 // must not tear-down ChromotingHost state on receipt of this
25 // callback; it is purely informational. 29 // callback; it is purely informational.
26 virtual void OnClientAuthenticated(const std::string& jid) = 0; 30 virtual void OnClientAuthenticated(const std::string& jid) = 0;
27 virtual void OnClientDisconnected(const std::string& jid) = 0; 31 virtual void OnClientDisconnected(const std::string& jid) = 0;
28 32
33 // Called on notification of a route change event, when a channel is
34 // connected.
35 virtual void OnClientIpAddress(const std::string& jid,
36 const std::string& channel_name,
37 const net::IPEndPoint& end_point) = 0;
Sergey Ulanov 2012/01/26 00:48:56 It may be better to provide default empty handler
Lambros 2012/01/26 19:40:14 Done.
38
29 // Called when the host shuts down. 39 // Called when the host shuts down.
30 virtual void OnShutdown() = 0; 40 virtual void OnShutdown() = 0;
31 }; 41 };
32 42
33 } // namespace remoting 43 } // namespace remoting
34 44
35 #endif // REMOTING_HOST_HOST_STATUS_OBSERVER_H_ 45 #endif // REMOTING_HOST_HOST_STATUS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698