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_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ |
6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 std::string HardwareAddressForType(const std::string& type) const; | 143 std::string HardwareAddressForType(const std::string& type) const; |
144 // Same as above but in aa:bb format. | 144 // Same as above but in aa:bb format. |
145 std::string FormattedHardwareAddressForType(const std::string& type) const; | 145 std::string FormattedHardwareAddressForType(const std::string& type) const; |
146 | 146 |
147 // Sets |list| to contain the list of networks. The returned list contains | 147 // Sets |list| to contain the list of networks. The returned list contains |
148 // a copy of NetworkState pointers which should not be stored or used beyond | 148 // a copy of NetworkState pointers which should not be stored or used beyond |
149 // the scope of the calling function (i.e. they may later become invalid, but | 149 // the scope of the calling function (i.e. they may later become invalid, but |
150 // only on the UI thread). | 150 // only on the UI thread). |
151 void GetNetworkList(NetworkStateList* list) const; | 151 void GetNetworkList(NetworkStateList* list) const; |
152 | 152 |
| 153 // Like GetNetworkList() but only returns networks with matching |type|. |
| 154 void GetNetworkListByType(const std::string& type, |
| 155 NetworkStateList* list) const; |
| 156 |
153 // Sets |list| to contain the list of devices. The returned list contains | 157 // Sets |list| to contain the list of devices. The returned list contains |
154 // a copy of DeviceState pointers which should not be stored or used beyond | 158 // a copy of DeviceState pointers which should not be stored or used beyond |
155 // the scope of the calling function (i.e. they may later become invalid, but | 159 // the scope of the calling function (i.e. they may later become invalid, but |
156 // only on the UI thread). | 160 // only on the UI thread). |
157 void GetDeviceList(DeviceStateList* list) const; | 161 void GetDeviceList(DeviceStateList* list) const; |
158 | 162 |
159 // Sets |list| to contain the list of favorite (aka "preferred") networks. | 163 // Sets |list| to contain the list of favorite (aka "preferred") networks. |
160 // See GetNetworkList() for usage, and notes for |favorite_list_|. | 164 // See GetNetworkList() for usage, and notes for |favorite_list_|. |
161 // Favorites that are visible have the same path() as the entries in | 165 // Favorites that are visible have the same path() as the entries in |
162 // GetNetworkList(), so GetNetworkState() can be used to determine if a | 166 // GetNetworkList(), so GetNetworkState() can be used to determine if a |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 | 338 |
335 // Callbacks to run when a scan for the technology type completes. | 339 // Callbacks to run when a scan for the technology type completes. |
336 ScanCompleteCallbackMap scan_complete_callbacks_; | 340 ScanCompleteCallbackMap scan_complete_callbacks_; |
337 | 341 |
338 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler); | 342 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler); |
339 }; | 343 }; |
340 | 344 |
341 } // namespace chromeos | 345 } // namespace chromeos |
342 | 346 |
343 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ | 347 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ |
OLD | NEW |