OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SHILL_PROPERTY_UTIL_H_ | 5 #ifndef CHROMEOS_NETWORK_SHILL_PROPERTY_UTIL_H_ |
6 #define CHROMEOS_NETWORK_SHILL_PROPERTY_UTIL_H_ | 6 #define CHROMEOS_NETWORK_SHILL_PROPERTY_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // Sets the |ssid| in |properties|. | 24 // Sets the |ssid| in |properties|. |
25 CHROMEOS_EXPORT void SetSSID(const std::string ssid, | 25 CHROMEOS_EXPORT void SetSSID(const std::string ssid, |
26 base::DictionaryValue* properties); | 26 base::DictionaryValue* properties); |
27 | 27 |
28 // Returns the SSID from |properties| in UTF-8 encoding. If |unknown_encoding| | 28 // Returns the SSID from |properties| in UTF-8 encoding. If |unknown_encoding| |
29 // is not NULL, it is set to whether the SSID is of unknown encoding. | 29 // is not NULL, it is set to whether the SSID is of unknown encoding. |
30 CHROMEOS_EXPORT std::string GetSSIDFromProperties( | 30 CHROMEOS_EXPORT std::string GetSSIDFromProperties( |
31 const base::DictionaryValue& properties, | 31 const base::DictionaryValue& properties, |
32 bool* unknown_encoding); | 32 bool* unknown_encoding); |
33 | 33 |
34 // Returns the name for the network represented by the Shill |properties|. For | 34 // Returns the GUID (if available), SSID, or Name from |properties|. Only used |
| 35 // for logging and debugging. |
| 36 CHROMEOS_EXPORT std::string GetNetworkIdFromProperties( |
| 37 const base::DictionaryValue& properties); |
| 38 |
| 39 // Returns the name for the network represented by the Shill |properties|. For |
35 // WiFi it refers to the HexSSID. | 40 // WiFi it refers to the HexSSID. |
36 CHROMEOS_EXPORT std::string GetNameFromProperties( | 41 CHROMEOS_EXPORT std::string GetNameFromProperties( |
37 const std::string& service_path, | 42 const std::string& service_path, |
38 const base::DictionaryValue& properties); | 43 const base::DictionaryValue& properties); |
39 | 44 |
40 // Returns the UIData specified by |value|. Returns NULL if the value cannot be | 45 // Returns the UIData specified by |value|. Returns NULL if the value cannot be |
41 // parsed. | 46 // parsed. |
42 scoped_ptr<NetworkUIData> GetUIDataFromValue(const base::Value& value); | 47 scoped_ptr<NetworkUIData> GetUIDataFromValue(const base::Value& value); |
43 | 48 |
44 // Returns the NetworkUIData parsed from the UIData property of | 49 // Returns the NetworkUIData parsed from the UIData property of |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 121 |
117 // The bit array of the matching network types. | 122 // The bit array of the matching network types. |
118 int pattern_; | 123 int pattern_; |
119 | 124 |
120 DISALLOW_ASSIGN(NetworkTypePattern); | 125 DISALLOW_ASSIGN(NetworkTypePattern); |
121 }; | 126 }; |
122 | 127 |
123 } // namespace chromeos | 128 } // namespace chromeos |
124 | 129 |
125 #endif // CHROMEOS_NETWORK_SHILL_PROPERTY_UTIL_H_ | 130 #endif // CHROMEOS_NETWORK_SHILL_PROPERTY_UTIL_H_ |
OLD | NEW |