forked from rainmeter/rainmeter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMeasureWifiStatus.h
68 lines (52 loc) · 1.73 KB
/
MeasureWifiStatus.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* Copyright (C) 2021 Rainmeter Project Developers
*
* This Source Code Form is subject to the terms of the GNU General Public
* License; either version 2 of the License, or (at your option) any later
* version. If a copy of the GPL was not distributed with this file, You can
* obtain one at <https://www.gnu.org/licenses/gpl-2.0.html>. */
#ifndef RM_LIBRARY_MEASUREWIFISTATUS_H_
#define RM_LIBRARY_MEASUREWIFISTATUS_H_
#include "Measure.h"
#include <wlanapi.h>
class MeasureWifiStatus : public Measure
{
public:
MeasureWifiStatus(Skin* skin, const WCHAR* name);
virtual ~MeasureWifiStatus();
MeasureWifiStatus(const MeasureWifiStatus& other) = delete;
MeasureWifiStatus& operator=(MeasureWifiStatus other) = delete;
virtual const WCHAR* GetStringValue();
UINT GetTypeID() override { return TypeID<MeasureWifiStatus>(); }
protected:
void ReadOptions(ConfigParser& parser, const WCHAR* section) override;
void UpdateValue() override;
private:
enum class MeasureType : UINT
{
UNINITIALIZED = 0U,
SSID = 100U,
ENCRYPTION,
AUTH,
LIST,
PHY,
QUALITY = 200U,
TXRATE,
RXRATE,
UNKNOWN = 9999U
};
void FinalizeHandle();
const WCHAR* GetCipherAlgorithmString(DOT11_CIPHER_ALGORITHM value);
const WCHAR* GetAuthAlgorithmString(DOT11_AUTH_ALGORITHM value);
const WCHAR* GetInterfaceStateString(WLAN_INTERFACE_STATE value);
const WCHAR* GetPHYString(DOT11_PHY_TYPE value);
const WCHAR* GetErrorString(DWORD value);
MeasureType m_Type;
UINT m_ListStyle;
UINT m_ListMax;
std::wstring m_StatusString;
static UINT s_Instances;
static HANDLE s_Client;
static PWLAN_INTERFACE_INFO s_Interface;
static PWLAN_INTERFACE_INFO_LIST s_InterfaceList;
};
#endif