OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_ | |
6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_ | |
7 | |
8 #include <string> | |
9 #include <vector> | |
10 | |
11 #include "base/basictypes.h" | |
12 #include "chromeos/chromeos_export.h" | |
13 | |
14 namespace chromeos { | |
15 | |
16 class NetworkState; | |
17 | |
18 // Observer class for all network state changes, including changes to | |
19 // active (connecting or connected) services. | |
20 class CHROMEOS_EXPORT NetworkStateHandlerObserver { | |
21 public: | |
22 typedef std::vector<const NetworkState*> NetworkStateList; | |
23 | |
24 NetworkStateHandlerObserver(); | |
25 virtual ~NetworkStateHandlerObserver(); | |
26 | |
27 // If |property| is non empty then that property has changed. Otherwise | |
gauravsh
2012/11/06 01:56:59
stale comment?
stevenjb
2012/11/06 03:17:03
Fixed.
| |
28 // we received a complete update so multiple properties may have changed. | |
29 virtual void NetworkManagerChanged(); | |
30 | |
31 // The list of networks changed. | |
32 virtual void NetworkListChanged(const NetworkStateList& networks); | |
33 | |
34 // The list of devices changed. Typically we don't care about the list | |
35 // of devices, so they are not passed in the method. | |
36 virtual void DeviceListChanged(); | |
37 | |
38 // The active network changed. |network| will be NULL if there is no longer | |
39 // an active network. | |
40 virtual void ActiveNetworkChanged(const NetworkState* network); | |
41 | |
42 // The state of the active network changed. | |
43 virtual void ActiveNetworkStateChanged(const NetworkState* network); | |
44 | |
45 // One or more network service properties changed. Note: for the active | |
46 // network, this will be called in *addition* to ActiveNetworkStateChanged() | |
47 // if the state property changed. | |
48 virtual void NetworkServiceChanged(const NetworkState* network); | |
49 | |
50 private: | |
51 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandlerObserver); | |
52 }; | |
53 | |
54 } // namespace chromeos | |
55 | |
56 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_ | |
OLD | NEW |