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_METRICS_NET_WIFI_ACCESS_POINT_INFO_PROVIDER_H_
6 #define COMPONENTS_METRICS_NET_WIFI_ACCESS_POINT_INFO_PROVIDER_H_
9 #include "base/basictypes.h"
13 // Interface for accessing connected wireless access point information.
14 class WifiAccessPointInfoProvider
{
16 // Wifi access point security mode definitions.
17 enum WifiSecurityMode
{
18 WIFI_SECURITY_UNKNOWN
= 0,
19 WIFI_SECURITY_WPA
= 1,
20 WIFI_SECURITY_WEP
= 2,
21 WIFI_SECURITY_RSN
= 3,
22 WIFI_SECURITY_802_1X
= 4,
23 WIFI_SECURITY_PSK
= 5,
27 // Information of the currently connected wifi access point.
28 struct WifiAccessPointInfo
{
29 WifiAccessPointInfo();
30 ~WifiAccessPointInfo();
31 WifiSecurityMode security
;
33 std::string model_number
;
34 std::string model_name
;
35 std::string device_name
;
39 WifiAccessPointInfoProvider();
40 virtual ~WifiAccessPointInfoProvider();
42 // Fill in the wifi access point info if device is currently connected to a
43 // wifi access point. Return true if device is connected to a wifi access
44 // point, false otherwise.
45 virtual bool GetInfo(WifiAccessPointInfo
*info
);
48 DISALLOW_COPY_AND_ASSIGN(WifiAccessPointInfoProvider
);
51 } // namespace metrics
53 #endif // COMPONENTS_METRICS_NET_WIFI_ACCESS_POINT_INFO_PROVIDER_H_