QWlanManager
Loading...
Searching...
No Matches
qwlantypes.h
1#ifndef QWLANMAN_QWLANTYPES_H
2#define QWLANMAN_QWLANTYPES_H
3
4#include "qwlanman_global.h"
5
6#include <QObject>
7#include <QVersionNumber>
8
9/*****************************/
10/* Namespace instructions */
11/*****************************/
12
13namespace qwm
14{
15 Q_NAMESPACE_EXPORT(QWLANMAN_EXPORT)
16
17/*****************************/
18/* Library types */
19/*****************************/
20
21
41 Q_ENUM_NS(WlanError)
42
43 QWLANMAN_EXPORT QString wlanErrorToString(WlanError idErr);
44
60 Q_ENUM_NS(WlanPerm)
61
62 QWLANMAN_EXPORT QString wlanPermToString(WlanPerm idPerm);
63
88
92 Q_DECLARE_FLAGS(WlanOptions, WlanOption)
93 Q_FLAG_NS(WlanOptions)
94
95
100 enum class RequestType
101 {
102 REQ_INVALID = 0,
104 REQ_SCAN,
107 };
108 Q_ENUM_NS(RequestType);
109
110 QWLANMAN_EXPORT QString requestTypeToString(RequestType idReq);
111
124 Q_ENUM_NS(IfaceState);
125
126 QWLANMAN_EXPORT QString ifaceStateToString(IfaceState idState);
127
149
153 Q_DECLARE_FLAGS(IfaceOptions, IfaceOption)
154 Q_FLAG_NS(IfaceOptions)
155
156
189 Q_ENUM_NS(AuthAlgo);
190
191 QWLANMAN_EXPORT QString authAlgoToString(AuthAlgo idAuth);
192
207 Q_ENUM_NS(CipherAlgo);
208
209 QWLANMAN_EXPORT QString cipherAlgoToString(CipherAlgo idCipher);
210
211/*****************************/
212/* Library methods */
213/*****************************/
214
215 QWLANMAN_EXPORT QVersionNumber getLibraryVersion();
216
217/*****************************/
218/* Qt related methods */
219/*****************************/
220
221#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
222
223inline uint qHash(qwm::WlanError key, uint seed = 0)
224{
225 return ::qHash(static_cast<std::underlying_type<qwm::WlanError>::type>(key), seed);
226}
227
228inline uint qHash(qwm::WlanPerm key, uint seed = 0)
229{
230 return ::qHash(static_cast<std::underlying_type<qwm::WlanPerm>::type>(key), seed);
231}
232
233inline uint qHash(qwm::RequestType key, uint seed = 0)
234{
235 return ::qHash(static_cast<std::underlying_type<qwm::RequestType>::type>(key), seed);
236}
237
238inline uint qHash(qwm::IfaceState key, uint seed = 0)
239{
240 return ::qHash(static_cast<std::underlying_type<qwm::IfaceState>::type>(key), seed);
241}
242
243inline uint qHash(qwm::AuthAlgo key, uint seed = 0)
244{
245 return ::qHash(static_cast<std::underlying_type<qwm::AuthAlgo>::type>(key), seed);
246}
247
248inline uint qHash(qwm::CipherAlgo key, uint seed = 0)
249{
250 return ::qHash(static_cast<std::underlying_type<qwm::CipherAlgo>::type>(key), seed);
251}
252
253#endif
254
255/*****************************/
256/* End namespaces */
257/*****************************/
258
259} // namespace qwm
260
261/*****************************/
262/* Qt specific meta-system */
263/*****************************/
264
265Q_DECLARE_OPERATORS_FOR_FLAGS(qwm::IfaceOptions)
266Q_DECLARE_OPERATORS_FOR_FLAGS(qwm::WlanOptions)
267
268#endif // QWLANMAN_QWLANTYPES_H
Namespace used for QWlanManager library.
Definition cachepolicy.h:13
IfaceState
Interface states.
Definition qwlantypes.h:118
IfaceOptions
QFlags type for qwm::IfaceOption enum
Definition qwlantypes.h:153
RequestType
Type of interface asynchrone request.
Definition qwlantypes.h:101
QWLANMAN_EXPORT QString authAlgoToString(AuthAlgo idAuth)
Use to convert authentication algorithms to string.
Definition qwlantypes.cpp:136
WlanOption
Wlan manager options.
Definition qwlantypes.h:76
@ WOPT_DEFAULT
Definition qwlantypes.h:86
@ WOPT_NONE
Definition qwlantypes.h:77
@ WOPT_ALLOW_ADMIN_REQUESTS
Definition qwlantypes.h:79
QWLANMAN_EXPORT QVersionNumber getLibraryVersion()
Used to retrieve QWlanManager library version.
Definition qwlantypes.cpp:180
QWLANMAN_EXPORT QString cipherAlgoToString(CipherAlgo idCipher)
Use to convert cipher algorithms to string.
Definition qwlantypes.cpp:160
QWLANMAN_EXPORT QString requestTypeToString(RequestType idReq)
Use to convert request type to string.
Definition qwlantypes.cpp:92
WlanOptions
QFlags type for qwm::WlanOption enum
Definition qwlantypes.h:92
IfaceOption
Available interface options.
Definition qwlantypes.h:139
@ IFACE_OPT_DEFAULT
Definition qwlantypes.h:147
@ IFACE_OPT_NONE
Definition qwlantypes.h:140
@ IFACE_OPT_REQUEST
Definition qwlantypes.h:142
QWLANMAN_EXPORT QString wlanPermToString(WlanPerm idPerm)
Use to convert wlan permissions to string.
Definition qwlantypes.cpp:70
WlanError
List of all WLAN related errors.
Definition qwlantypes.h:27
@ WERR_OPERATION_UNSUPPORTED
WlanPerm
List of permissions status.
Definition qwlantypes.h:52
CipherAlgo
Enumeration of supported wireless encryption (cipher) algorithms.
Definition qwlantypes.h:199
AuthAlgo
Enumeration of supported wireless authentication algorithms.
Definition qwlantypes.h:170
@ AUTH_ALGO_WPA2_ENTERPRISE
@ AUTH_ALGO_WPA3_ENTERPRISE
QWLANMAN_EXPORT QString wlanErrorToString(WlanError idErr)
Use to convert wlan errors to string.
Definition qwlantypes.cpp:41
QWLANMAN_EXPORT QString ifaceStateToString(IfaceState idState)
Use to convert interface states to string.
Definition qwlantypes.cpp:114