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
3 // found in the LICENSE file.
5 #ifndef REMOTING_HOST_HOST_STATUS_OBSERVER_H_
6 #define REMOTING_HOST_HOST_STATUS_OBSERVER_H_
10 #include "third_party/skia/include/core/SkRect.h"
20 struct TransportRoute
;
23 // Interface for host status observer. All methods are invoked on the
24 // network thread. Observers must not tear-down ChromotingHost state
25 // on receipt of these callbacks; they are purely informational.
26 class HostStatusObserver
{
28 HostStatusObserver() { }
29 virtual ~HostStatusObserver() { }
31 // Called when an unauthorized user attempts to connect to the host.
32 virtual void OnAccessDenied(const std::string
& jid
) {}
34 // A new client is authenticated.
35 virtual void OnClientAuthenticated(const std::string
& jid
) {}
37 // All channels for an autheticated client are connected.
38 virtual void OnClientConnected(const std::string
& jid
) {}
40 // An authenticated client is disconnected.
41 virtual void OnClientDisconnected(const std::string
& jid
) {}
43 // Called on notification of a route change event, when a channel is
45 virtual void OnClientRouteChange(const std::string
& jid
,
46 const std::string
& channel_name
,
47 const protocol::TransportRoute
& route
) {}
49 // Called when hosting is started for an account.
50 virtual void OnStart(const std::string
& xmpp_login
) {}
52 // Called when the host shuts down.
53 virtual void OnShutdown() {}
56 } // namespace remoting
58 #endif // REMOTING_HOST_HOST_STATUS_OBSERVER_H_