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 QWLANMAN_EXPORT QString wlanOptionsToString(WlanOptions opts);
96
102 enum class RequestType
103 {
104 REQ_INVALID = 0,
106 REQ_SCAN,
109 };
110 Q_ENUM_NS(RequestType);
111
112 QWLANMAN_EXPORT QString requestTypeToString(RequestType idReq);
113
126 Q_ENUM_NS(IfaceState);
127
128 QWLANMAN_EXPORT QString ifaceStateToString(IfaceState idState);
129
151
155 Q_DECLARE_FLAGS(IfaceOptions, IfaceOption)
156 Q_FLAG_NS(IfaceOptions)
157
158 QWLANMAN_EXPORT QString ifaceOptionsToString(IfaceOptions opts);
159
193 Q_ENUM_NS(AuthAlgo);
194
195 QWLANMAN_EXPORT QString authAlgoToString(AuthAlgo idAuth);
196
211 Q_ENUM_NS(CipherAlgo);
212
213 QWLANMAN_EXPORT QString cipherAlgoToString(CipherAlgo idCipher);
214
215/*****************************/
216/* Library methods */
217/*****************************/
218
219 QWLANMAN_EXPORT QVersionNumber getLibraryVersion();
220
221/*****************************/
222/* Qt related methods */
223/*****************************/
224
225#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
226
227inline uint qHash(qwm::WlanError key, uint seed = 0)
228{
229 return ::qHash(static_cast<std::underlying_type<qwm::WlanError>::type>(key), seed);
230}
231
232inline uint qHash(qwm::WlanPerm key, uint seed = 0)
233{
234 return ::qHash(static_cast<std::underlying_type<qwm::WlanPerm>::type>(key), seed);
235}
236
237inline uint qHash(qwm::RequestType key, uint seed = 0)
238{
239 return ::qHash(static_cast<std::underlying_type<qwm::RequestType>::type>(key), seed);
240}
241
242inline uint qHash(qwm::IfaceState key, uint seed = 0)
243{
244 return ::qHash(static_cast<std::underlying_type<qwm::IfaceState>::type>(key), seed);
245}
246
247inline uint qHash(qwm::AuthAlgo key, uint seed = 0)
248{
249 return ::qHash(static_cast<std::underlying_type<qwm::AuthAlgo>::type>(key), seed);
250}
251
252inline uint qHash(qwm::CipherAlgo key, uint seed = 0)
253{
254 return ::qHash(static_cast<std::underlying_type<qwm::CipherAlgo>::type>(key), seed);
255}
256
257#endif
258
259/*****************************/
260/* End namespaces */
261/*****************************/
262
263} // namespace qwm
264
265/*****************************/
266/* Qt specific meta-system */
267/*****************************/
268
269Q_DECLARE_OPERATORS_FOR_FLAGS(qwm::IfaceOptions)
270Q_DECLARE_OPERATORS_FOR_FLAGS(qwm::WlanOptions)
271
272#endif // QWLANMAN_QWLANTYPES_H
Namespace used for QWlanManager library.
Definition cachepolicy.h:13
IfaceState
Interface states.
Definition qwlantypes.h:120
IfaceOptions
QFlags type for qwm::IfaceOption enum
Definition qwlantypes.h:155
RequestType
Type of interface asynchrone request.
Definition qwlantypes.h:103
QWLANMAN_EXPORT QString authAlgoToString(AuthAlgo idAuth)
Use to convert authentication algorithms to string.
Definition qwlantypes.cpp:166
QWLANMAN_EXPORT QString wlanOptionsToString(WlanOptions opts)
Use to convert wlan options to string.
Definition qwlantypes.cpp:93
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 QString ifaceOptionsToString(IfaceOptions opts)
Use to convert interface options to string.
Definition qwlantypes.cpp:151
QWLANMAN_EXPORT QVersionNumber getLibraryVersion()
Used to retrieve QWlanManager library version.
Definition qwlantypes.cpp:210
QWLANMAN_EXPORT QString cipherAlgoToString(CipherAlgo idCipher)
Use to convert cipher algorithms to string.
Definition qwlantypes.cpp:190
QWLANMAN_EXPORT QString requestTypeToString(RequestType idReq)
Use to convert request type to string.
Definition qwlantypes.cpp:108
WlanOptions
QFlags type for qwm::WlanOption enum
Definition qwlantypes.h:92
IfaceOption
Available interface options.
Definition qwlantypes.h:141
@ IFACE_OPT_DEFAULT
Definition qwlantypes.h:149
@ IFACE_OPT_NONE
Definition qwlantypes.h:142
@ IFACE_OPT_REQUEST
Definition qwlantypes.h:144
QWLANMAN_EXPORT QString wlanPermToString(WlanPerm idPerm)
Use to convert wlan permissions to string.
Definition qwlantypes.cpp:72
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:203
AuthAlgo
Enumeration of supported wireless authentication algorithms.
Definition qwlantypes.h:174
@ AUTH_ALGO_WPA2_ENTERPRISE
@ AUTH_ALGO_WPA3_ENTERPRISE
QWLANMAN_EXPORT QString wlanErrorToString(WlanError idErr)
Use to convert wlan errors to string.
Definition qwlantypes.cpp:43
QWLANMAN_EXPORT QString ifaceStateToString(IfaceState idState)
Use to convert interface states to string.
Definition qwlantypes.cpp:130