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 #include "base/basictypes.h" | |
gauravsh
2012/10/25 23:41:05
NIT: new line before this.
stevenjb
2012/10/26 21:36:39
Done.
| |
11 #include "chromeos/chromeos_export.h" | |
12 | |
13 namespace chromeos { | |
14 | |
15 class NetworkState; | |
16 | |
17 // Observer class for all network state changes, including changes to | |
18 // active (connecting or connected) services. | |
19 class CHROMEOS_EXPORT NetworkStateHandlerObserver { | |
20 public: | |
21 typedef std::vector<NetworkState*> NetworkStateList; | |
22 | |
23 NetworkStateHandlerObserver(); | |
24 virtual ~NetworkStateHandlerObserver(); | |
25 | |
26 // If |property| is non empty than that property has changed. Otherwise | |
gauravsh
2012/10/25 23:41:05
empty than -> empty, then
stevenjb
2012/10/26 21:36:39
Done.
| |
27 // we received a complete update so multiple properties may have changed. | |
28 virtual void NetworkManagerChanged(const std::string& property); | |
29 // The list of networks changed. | |
30 virtual void NetworkListChanged(const NetworkStateList& networks); | |
gauravsh
2012/10/25 23:41:05
Suggest adding new lines to split declarations - e
stevenjb
2012/10/26 21:36:39
Done.
| |
31 // The active network changed. |network| will be NULL if there is no longer | |
32 // an active network. | |
33 virtual void ActiveNetworkChanged(const NetworkState* network); | |
34 // The state of the active network changed. | |
35 virtual void ActiveNetworkStateChanged(const NetworkState* network); | |
36 // A network service property changed. |property| is the name of the changed | |
37 // property (from service_constants.h). Note: for the active network, | |
38 // this will be called in *addition* to ActiveNetworkStateChanged() if | |
39 // property == flimflam::kStateProperty. | |
40 virtual void NetworkServicePropertyChanged(const NetworkState* network, | |
41 const std::string& property); | |
42 | |
43 private: | |
44 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandlerObserver); | |
45 }; | |
46 | |
47 } // namespace chromeos | |
48 | |
49 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_OBSERVER_H_ | |
OLD | NEW |