| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_WIFI_NETWORK_PROPERTIES_H_ | 5 #ifndef COMPONENTS_WIFI_NETWORK_PROPERTIES_H_ |
| 6 #define COMPONENTS_WIFI_NETWORK_PROPERTIES_H_ | 6 #define COMPONENTS_WIFI_NETWORK_PROPERTIES_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| 11 #include <memory> |
| 11 #include <set> | 12 #include <set> |
| 12 #include <string> | 13 #include <string> |
| 13 | 14 |
| 14 #include "base/memory/scoped_ptr.h" | |
| 15 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "components/wifi/wifi_export.h" | 16 #include "components/wifi/wifi_export.h" |
| 17 | 17 |
| 18 namespace wifi { | 18 namespace wifi { |
| 19 | 19 |
| 20 typedef int32_t Frequency; | 20 typedef int32_t Frequency; |
| 21 | 21 |
| 22 enum FrequencyEnum { | 22 enum FrequencyEnum { |
| 23 kFrequencyAny = 0, | 23 kFrequencyAny = 0, |
| 24 kFrequencyUnknown = 0, | 24 kFrequencyUnknown = 0, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 45 // |password| field is used to pass wifi password for network creation via | 45 // |password| field is used to pass wifi password for network creation via |
| 46 // |CreateNetwork| or connection via |StartConnect|. It does not persist | 46 // |CreateNetwork| or connection via |StartConnect|. It does not persist |
| 47 // once operation is completed. | 47 // once operation is completed. |
| 48 std::string password; | 48 std::string password; |
| 49 // WiFi Signal Strength. 0..100 | 49 // WiFi Signal Strength. 0..100 |
| 50 uint32_t signal_strength; | 50 uint32_t signal_strength; |
| 51 bool auto_connect; | 51 bool auto_connect; |
| 52 Frequency frequency; | 52 Frequency frequency; |
| 53 FrequencySet frequency_set; | 53 FrequencySet frequency_set; |
| 54 | 54 |
| 55 scoped_ptr<base::DictionaryValue> ToValue(bool network_list) const; | 55 std::unique_ptr<base::DictionaryValue> ToValue(bool network_list) const; |
| 56 // Updates only properties set in |value|. | 56 // Updates only properties set in |value|. |
| 57 bool UpdateFromValue(const base::DictionaryValue& value); | 57 bool UpdateFromValue(const base::DictionaryValue& value); |
| 58 static std::string MacAddressAsString(const uint8_t mac_as_int[6]); | 58 static std::string MacAddressAsString(const uint8_t mac_as_int[6]); |
| 59 static bool OrderByType(const NetworkProperties& l, | 59 static bool OrderByType(const NetworkProperties& l, |
| 60 const NetworkProperties& r); | 60 const NetworkProperties& r); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 typedef std::list<NetworkProperties> NetworkList; | 63 typedef std::list<NetworkProperties> NetworkList; |
| 64 | 64 |
| 65 } // namespace wifi | 65 } // namespace wifi |
| 66 | 66 |
| 67 #endif // COMPONENTS_WIFI_NETWORK_PROPERTIES_H_ | 67 #endif // COMPONENTS_WIFI_NETWORK_PROPERTIES_H_ |
| OLD | NEW |