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 CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_
6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_
11 #include "base/basictypes.h"
12 #include "chromeos/chromeos_export.h"
18 // Observer class for all network state changes, including changes to
19 // active (connecting or connected) services.
20 class CHROMEOS_EXPORT NetworkStateHandlerObserver
{
22 NetworkStateHandlerObserver();
23 virtual ~NetworkStateHandlerObserver();
25 // The list of networks changed.
26 virtual void NetworkListChanged();
28 // The list of devices changed, or a property changed (e.g. scanning).
29 virtual void DeviceListChanged();
31 // The default network changed (includes VPNs) or one of its properties
32 // changed. This won't be called if the WiFi signal strength property
33 // changes. If interested in those events, use NetworkPropertiesUpdated()
35 // |network| will be NULL if there is no longer a default network.
36 virtual void DefaultNetworkChanged(const NetworkState
* network
);
38 // The connection state of |network| changed.
39 virtual void NetworkConnectionStateChanged(const NetworkState
* network
);
41 // One or more properties of |network| have been updated. Note: this will get
42 // called in *addition* to NetworkConnectionStateChanged() when the
43 // connection state property changes. Use this to track properties like
45 virtual void NetworkPropertiesUpdated(const NetworkState
* network
);
48 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandlerObserver
);
51 } // namespace chromeos
53 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_