| OLD | NEW |
| 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 CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_ |
| 6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "chromeos/chromeos_export.h" | 12 #include "chromeos/chromeos_export.h" |
| 13 | 13 |
| 14 namespace chromeos { | 14 namespace chromeos { |
| 15 | 15 |
| 16 class NetworkState; | 16 class NetworkState; |
| 17 | 17 |
| 18 // Observer class for all network state changes, including changes to | 18 // Observer class for all network state changes, including changes to |
| 19 // active (connecting or connected) services. | 19 // active (connecting or connected) services. |
| 20 class CHROMEOS_EXPORT NetworkStateHandlerObserver { | 20 class CHROMEOS_EXPORT NetworkStateHandlerObserver { |
| 21 public: | 21 public: |
| 22 NetworkStateHandlerObserver(); | 22 NetworkStateHandlerObserver(); |
| 23 virtual ~NetworkStateHandlerObserver(); | 23 virtual ~NetworkStateHandlerObserver(); |
| 24 | 24 |
| 25 // Called when one or more network manager properties changes. | |
| 26 virtual void NetworkManagerChanged(); | |
| 27 | |
| 28 // The list of networks changed. | 25 // The list of networks changed. |
| 29 virtual void NetworkListChanged(); | 26 virtual void NetworkListChanged(); |
| 30 | 27 |
| 31 // The list of devices changed, or a property changed (e.g. scanning). | 28 // The list of devices changed, or a property changed (e.g. scanning). |
| 32 virtual void DeviceListChanged(); | 29 virtual void DeviceListChanged(); |
| 33 | 30 |
| 34 // The default network changed (includes VPNs) or one of its properties | 31 // The default network changed (includes VPNs) or one of its properties |
| 35 // changed. This won't be called if the WiFi signal strength property | 32 // changed. This won't be called if the WiFi signal strength property |
| 36 // changes. If interested in those events, use NetworkPropertiesUpdated() | 33 // changes. If interested in those events, use NetworkPropertiesUpdated() |
| 37 // below. | 34 // below. |
| 38 // |network| will be NULL if there is no longer a default network. | 35 // |network| will be NULL if there is no longer a default network. |
| 39 virtual void DefaultNetworkChanged(const NetworkState* network); | 36 virtual void DefaultNetworkChanged(const NetworkState* network); |
| 40 | 37 |
| 41 // The connection state of |network| changed. | 38 // The connection state of |network| changed. |
| 42 virtual void NetworkConnectionStateChanged(const NetworkState* network); | 39 virtual void NetworkConnectionStateChanged(const NetworkState* network); |
| 43 | 40 |
| 44 // One or more properties of |network| have been updated. Note: this will get | 41 // One or more properties of |network| have been updated. Note: this will get |
| 45 // called in *addition* to NetworkConnectionStateChanged() when the | 42 // called in *addition* to NetworkConnectionStateChanged() when the |
| 46 // connection state property changes. Use this to track properties like | 43 // connection state property changes. Use this to track properties like |
| 47 // wifi strength. | 44 // wifi strength. |
| 48 virtual void NetworkPropertiesUpdated(const NetworkState* network); | 45 virtual void NetworkPropertiesUpdated(const NetworkState* network); |
| 49 | 46 |
| 50 private: | 47 private: |
| 51 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandlerObserver); | 48 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandlerObserver); |
| 52 }; | 49 }; |
| 53 | 50 |
| 54 } // namespace chromeos | 51 } // namespace chromeos |
| 55 | 52 |
| 56 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_ | 53 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_ |
| OLD | NEW |