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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 void GetDeviceListByType(const NetworkTypePattern& type, | 176 void GetDeviceListByType(const NetworkTypePattern& type, |
177 DeviceStateList* list) const; | 177 DeviceStateList* list) const; |
178 | 178 |
179 // Sets |list| to contain the list of favorite (aka "preferred") networks. | 179 // Sets |list| to contain the list of favorite (aka "preferred") networks. |
180 // See GetNetworkList() for usage, and notes for |favorite_list_|. | 180 // See GetNetworkList() for usage, and notes for |favorite_list_|. |
181 // Favorites that are visible have the same path() as the entries in | 181 // Favorites that are visible have the same path() as the entries in |
182 // GetNetworkList(), so GetNetworkState() can be used to determine if a | 182 // GetNetworkList(), so GetNetworkState() can be used to determine if a |
183 // favorite is visible and retrieve the complete properties (and vice-versa). | 183 // favorite is visible and retrieve the complete properties (and vice-versa). |
184 void GetFavoriteList(FavoriteStateList* list) const; | 184 void GetFavoriteList(FavoriteStateList* list) const; |
185 | 185 |
186 // Like GetFavoriteList() but only returns favorites with matching |type|. | 186 // Like GetFavoriteList() but only returns favorites with matching |type| and |
| 187 // and the following properties: |
| 188 // |configured_only| - if true only include networks where IsInProfile is true |
| 189 // |visible_only| - if true only include networks in the visible Services list |
187 void GetFavoriteListByType(const NetworkTypePattern& type, | 190 void GetFavoriteListByType(const NetworkTypePattern& type, |
| 191 bool configured_only, |
| 192 bool visible_only, |
188 FavoriteStateList* list) const; | 193 FavoriteStateList* list) const; |
189 | 194 |
190 // Finds and returns a favorite state by |service_path| or NULL if not found. | 195 // Finds and returns a favorite state by |service_path| or NULL if not found. |
191 const FavoriteState* GetFavoriteState(const std::string& service_path) const; | 196 const FavoriteState* GetFavoriteState(const std::string& service_path) const; |
192 | 197 |
193 // Finds the FavoriteState associated with |guid|. Note: The FavoriteState | 198 // Finds the FavoriteState associated with |guid|. Note: The FavoriteState |
194 // may or may not be in a profile (IsProfile() may be false), and may or may | 199 // may or may not be in a profile (IsProfile() may be false), and may or may |
195 // not be visible. | 200 // not be visible. |
196 const FavoriteState* GetFavoriteStateFromGuid(const std::string& guid) const; | 201 const FavoriteState* GetFavoriteStateFromGuid(const std::string& guid) const; |
197 | 202 |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 | 391 |
387 // Map of network specifiers to guids. | 392 // Map of network specifiers to guids. |
388 SpecifierGuidMap specifier_guid_map_; | 393 SpecifierGuidMap specifier_guid_map_; |
389 | 394 |
390 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler); | 395 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler); |
391 }; | 396 }; |
392 | 397 |
393 } // namespace chromeos | 398 } // namespace chromeos |
394 | 399 |
395 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ | 400 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ |
OLD | NEW |