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_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_H_ |
6 #define CHROMEOS_NETWORK_NETWORK_STATE_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_STATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 const base::DictionaryValue& properties) override; | 45 const base::DictionaryValue& properties) override; |
46 void GetStateProperties(base::DictionaryValue* dictionary) const override; | 46 void GetStateProperties(base::DictionaryValue* dictionary) const override; |
47 | 47 |
48 void IPConfigPropertiesChanged(const base::DictionaryValue& properties); | 48 void IPConfigPropertiesChanged(const base::DictionaryValue& properties); |
49 | 49 |
50 // Returns true, if the network requires a service activation. | 50 // Returns true, if the network requires a service activation. |
51 bool RequiresActivation() const; | 51 bool RequiresActivation() const; |
52 | 52 |
53 // Accessors | 53 // Accessors |
54 bool visible() const { return visible_; } | 54 bool visible() const { return visible_; } |
55 const std::string& security() const { return security_; } | 55 const std::string& security_class() const { return security_class_; } |
56 const std::string& device_path() const { return device_path_; } | 56 const std::string& device_path() const { return device_path_; } |
57 const std::string& guid() const { return guid_; } | 57 const std::string& guid() const { return guid_; } |
58 const std::string& profile_path() const { return profile_path_; } | 58 const std::string& profile_path() const { return profile_path_; } |
59 const std::string& error() const { return error_; } | 59 const std::string& error() const { return error_; } |
60 const std::string& last_error() const { return last_error_; } | 60 const std::string& last_error() const { return last_error_; } |
61 void clear_last_error() { last_error_.clear(); } | 61 void clear_last_error() { last_error_.clear(); } |
62 | 62 |
63 // Returns |connection_state_| if visible, kStateDisconnect otherwise. | 63 // Returns |connection_state_| if visible, kStateDisconnect otherwise. |
64 std::string connection_state() const; | 64 std::string connection_state() const; |
65 | 65 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // Updates |name_| from WiFi.HexSSID if provided, and validates |name_|. | 129 // Updates |name_| from WiFi.HexSSID if provided, and validates |name_|. |
130 // Returns true if |name_| changes. | 130 // Returns true if |name_| changes. |
131 bool UpdateName(const base::DictionaryValue& properties); | 131 bool UpdateName(const base::DictionaryValue& properties); |
132 | 132 |
133 // Set to true if the network is a member of Manager.Services. | 133 // Set to true if the network is a member of Manager.Services. |
134 bool visible_; | 134 bool visible_; |
135 | 135 |
136 // Network Service properties. Avoid adding any additional properties here. | 136 // Network Service properties. Avoid adding any additional properties here. |
137 // Instead use NetworkConfigurationHandler::GetProperties() to asynchronously | 137 // Instead use NetworkConfigurationHandler::GetProperties() to asynchronously |
138 // request properties from Shill. | 138 // request properties from Shill. |
139 std::string security_; | 139 std::string security_class_; |
140 std::string eap_method_; // Needed for WiFi EAP networks | 140 std::string eap_method_; // Needed for WiFi EAP networks |
141 std::string device_path_; | 141 std::string device_path_; |
142 std::string guid_; | 142 std::string guid_; |
143 std::string connection_state_; | 143 std::string connection_state_; |
144 std::string profile_path_; | 144 std::string profile_path_; |
145 std::vector<uint8_t> raw_ssid_; // Unknown encoding. Not necessarily UTF-8. | 145 std::vector<uint8_t> raw_ssid_; // Unknown encoding. Not necessarily UTF-8. |
146 bool connectable_; | 146 bool connectable_; |
147 | 147 |
148 // Reflects the current Shill Service.Error property. This might get cleared | 148 // Reflects the current Shill Service.Error property. This might get cleared |
149 // by Shill shortly after a failure. | 149 // by Shill shortly after a failure. |
(...skipping 26 matching lines...) Expand all Loading... |
176 // TODO(pneubeck): Remove this once (Managed)NetworkConfigurationHandler | 176 // TODO(pneubeck): Remove this once (Managed)NetworkConfigurationHandler |
177 // provides proxy configuration. crbug.com/241775 | 177 // provides proxy configuration. crbug.com/241775 |
178 base::DictionaryValue proxy_config_; | 178 base::DictionaryValue proxy_config_; |
179 | 179 |
180 DISALLOW_COPY_AND_ASSIGN(NetworkState); | 180 DISALLOW_COPY_AND_ASSIGN(NetworkState); |
181 }; | 181 }; |
182 | 182 |
183 } // namespace chromeos | 183 } // namespace chromeos |
184 | 184 |
185 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ | 185 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ |
OLD | NEW |