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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // NULL. | 51 // NULL. |
52 scoped_ptr<NetworkUIData> GetUIDataFromProperties( | 52 scoped_ptr<NetworkUIData> GetUIDataFromProperties( |
53 const base::DictionaryValue& shill_dictionary); | 53 const base::DictionaryValue& shill_dictionary); |
54 | 54 |
55 // Sets the UIData property in |shill_dictionary| to the serialization of | 55 // Sets the UIData property in |shill_dictionary| to the serialization of |
56 // |ui_data|. | 56 // |ui_data|. |
57 void SetUIData(const NetworkUIData& ui_data, | 57 void SetUIData(const NetworkUIData& ui_data, |
58 base::DictionaryValue* shill_dictionary); | 58 base::DictionaryValue* shill_dictionary); |
59 | 59 |
60 // Copy configuration properties required by Shill to identify a network. | 60 // Copy configuration properties required by Shill to identify a network. |
61 // Only WiFi, VPN, Ethernet and EthernetEAP are supported. WiMax and Cellular | 61 // Only WiFi, VPN, Ethernet and EthernetEAP are supported. Wimax and Cellular |
62 // are not supported. Returns true only if all required properties could be | 62 // are not supported. Returns true only if all required properties could be |
63 // copied. | 63 // copied. |
64 bool CopyIdentifyingProperties(const base::DictionaryValue& service_properties, | 64 bool CopyIdentifyingProperties(const base::DictionaryValue& service_properties, |
65 base::DictionaryValue* dest); | 65 base::DictionaryValue* dest); |
66 | 66 |
67 // Compares the identifying configuration properties of |properties_a| and | 67 // Compares the identifying configuration properties of |properties_a| and |
68 // |properties_b|, returns true if they are identical. See also | 68 // |properties_b|, returns true if they are identical. See also |
69 // CopyIdentifyingProperties. Only WiFi, VPN, Ethernet and EthernetEAP are | 69 // CopyIdentifyingProperties. Only WiFi, VPN, Ethernet and EthernetEAP are |
70 // supported. WiMax and Cellular are not supported. | 70 // supported. Wimax and Cellular are not supported. |
71 bool DoIdentifyingPropertiesMatch(const base::DictionaryValue& properties_a, | 71 bool DoIdentifyingPropertiesMatch(const base::DictionaryValue& properties_a, |
72 const base::DictionaryValue& properties_b); | 72 const base::DictionaryValue& properties_b); |
73 | 73 |
74 // Returns true if |key| corresponds to a passphrase property. | 74 // Returns true if |key| corresponds to a passphrase property. |
75 bool IsPassphraseKey(const std::string& key); | 75 bool IsPassphraseKey(const std::string& key); |
76 | 76 |
77 } // namespace shill_property_util | 77 } // namespace shill_property_util |
78 | 78 |
79 class CHROMEOS_EXPORT NetworkTypePattern { | 79 class CHROMEOS_EXPORT NetworkTypePattern { |
80 public: | 80 public: |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 // The bit array of the matching network types. | 122 // The bit array of the matching network types. |
123 int pattern_; | 123 int pattern_; |
124 | 124 |
125 DISALLOW_ASSIGN(NetworkTypePattern); | 125 DISALLOW_ASSIGN(NetworkTypePattern); |
126 }; | 126 }; |
127 | 127 |
128 } // namespace chromeos | 128 } // namespace chromeos |
129 | 129 |
130 #endif // CHROMEOS_NETWORK_SHILL_PROPERTY_UTIL_H_ | 130 #endif // CHROMEOS_NETWORK_SHILL_PROPERTY_UTIL_H_ |
OLD | NEW |