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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_WIFI_NETWORK_PROPERTIES_H_
6 #define COMPONENTS_WIFI_NETWORK_PROPERTIES_H_
12 #include "base/values.h"
13 #include "components/wifi/wifi_export.h"
17 typedef int32 Frequency
;
21 kFrequencyUnknown
= 0,
22 kFrequency2400
= 2400,
26 typedef std::set
<Frequency
> FrequencySet
;
28 // Network Properties, can be used to parse the result of |GetProperties| and
29 // |GetVisibleNetworks|.
30 struct WIFI_EXPORT NetworkProperties
{
34 std::string connection_state
;
41 // |password| field is used to pass wifi password for network creation via
42 // |CreateNetwork| or connection via |StartConnect|. It does not persist
43 // once operation is completed.
45 // WiFi Signal Strength. 0..100
46 uint32 signal_strength
;
49 FrequencySet frequency_set
;
51 scoped_ptr
<base::DictionaryValue
> ToValue(bool network_list
) const;
52 // Updates only properties set in |value|.
53 bool UpdateFromValue(const base::DictionaryValue
& value
);
54 static std::string
MacAddressAsString(const uint8 mac_as_int
[6]);
55 static bool OrderByType(const NetworkProperties
& l
,
56 const NetworkProperties
& r
);
59 typedef std::list
<NetworkProperties
> NetworkList
;
63 #endif // COMPONENTS_WIFI_NETWORK_PROPERTIES_H_