QWlanManager
Loading...
Searching...
No Matches
qwm Namespace Reference

Namespace used for QWlanManager library. More...

Classes

class  CachePolicy
 Class allowing to determine the cache policy to adopt. More...
 
class  Interface
 Class containing interface properties. More...
 
class  Manager
 Use to manage all wlan related operations. More...
 
class  Network
 Class containing network properties. More...
 
class  Permissions
 Use to manage all permissions related operations. More...
 

Typedefs

using ListInterfaces = QList<Interface>
 
using MapInterfaces = QHash<QUuid, Interface>
 
using ListNetworks = QList<Network>
 
using MapNetworks = QHash<QString, Network>
 

Enumerations

enum class  WlanError {
  WERR_NO_ERROR = 0 , WERR_UNKNOWN , WERR_OPERATION_UNSUPPORTED , WERR_OPERATION_CANCEL ,
  WERR_OPERATION_TIMEOUT , WERR_OPERATION_DENIED , WERR_ITEM_INVALID , WERR_IFACE_BUSY ,
  WERR_NET_UNAVAILABLE , WERR_NET_PASSKEY , WERR_API_INTERNAL
}
 List of all WLAN related errors. More...
 
enum class  WlanPerm { WPERM_UNKNOWN = 0 , WPERM_PROMPT_REQUIRED , WPERM_GRANTED , WPERM_DENIED }
 List of permissions status. More...
 
enum  WlanOption { WOPT_NONE = 0 , WOPT_ALLOW_ADMIN_REQUESTS = 1 << 0 , WOPT_DEFAULT = WOPT_ALLOW_ADMIN_REQUESTS }
 Wlan manager options. More...
 
enum class  RequestType { REQ_INVALID = 0 , REQ_SCAN , REQ_CONNECT , REQ_DISCONNECT }
 Type of interface asynchrone request. More...
 
enum class  IfaceState { IFACE_STS_IDLE = 0 , IFACE_STS_SCANNING , IFACE_STS_CONNECTING , IFACE_STS_DISCONNECTING }
 Interface states. More...
 
enum  IfaceOption { IFACE_OPT_NONE = 0 , IFACE_OPT_REQUEST = 1 << 0 , IFACE_OPT_DEFAULT = IFACE_OPT_NONE }
 Available interface options. More...
 
enum class  AuthAlgo {
  AUTH_ALGO_UNKNOWN = 0 , AUTH_ALGO_OPEN , AUTH_ALGO_WPA2_PERSONAL , AUTH_ALGO_WPA2_ENTERPRISE ,
  AUTH_ALGO_WPA3_PERSONAL , AUTH_ALGO_WPA3_ENTERPRISE
}
 Enumeration of supported wireless authentication algorithms. More...
 
enum class  CipherAlgo {
  CIPHER_ALGO_UNKNOWN = 0 , CIPHER_ALGO_NONE , CIPHER_ALGO_TKIP , CIPHER_ALGO_AES ,
  CIPHER_ALGO_GCMP
}
 Enumeration of supported wireless encryption (cipher) algorithms. More...
 

Functions

QWLANMAN_EXPORT QDebug operator<< (QDebug debug, const CachePolicy &policy)
 
QWLANMAN_EXPORT QDebug operator<< (QDebug debug, const Interface &interface)
 
QWLANMAN_EXPORT QDebug operator<< (QDebug debug, const Network &net)
 
QWLANMAN_EXPORT QString wlanErrorToString (WlanError idErr)
 Use to convert wlan errors to string.
 
QWLANMAN_EXPORT QString wlanPermToString (WlanPerm idPerm)
 Use to convert wlan permissions to string.
 
 Q_ENUM_NS (RequestType)
 
QWLANMAN_EXPORT QString requestTypeToString (RequestType idReq)
 Use to convert request type to string.
 
 Q_ENUM_NS (IfaceState)
 
QWLANMAN_EXPORT QString ifaceStateToString (IfaceState idState)
 Use to convert interface states to string.
 
 Q_ENUM_NS (AuthAlgo)
 
QWLANMAN_EXPORT QString authAlgoToString (AuthAlgo idAuth)
 Use to convert authentication algorithms to string.
 
 Q_ENUM_NS (CipherAlgo)
 
QWLANMAN_EXPORT QString cipherAlgoToString (CipherAlgo idCipher)
 Use to convert cipher algorithms to string.
 
QWLANMAN_EXPORT QVersionNumber getLibraryVersion ()
 Used to retrieve QWlanManager library version.
 

Detailed Description

Namespace used for QWlanManager library.

See also
getLibraryVersion()

Typedef Documentation

◆ MapInterfaces

using qwm::MapInterfaces = QHash<QUuid, Interface>

Key is interface UID

◆ MapNetworks

using qwm::MapNetworks = QHash<QString, Network>

Key is network SSID

Enumeration Type Documentation

◆ WlanError

enum class qwm::WlanError
strong

List of all WLAN related errors.

See also
wlanErrorToString()
Enumerator
WERR_NO_ERROR 

No error, operation succeed

WERR_UNKNOWN  

Unknown error

WERR_OPERATION_UNSUPPORTED  

Operation is not supported on this platform version

WERR_OPERATION_CANCEL  

Operation has been cancelled

WERR_OPERATION_TIMEOUT  

Operation failure due to timeout

WERR_OPERATION_DENIED  

Operation failure due to permissions missing

WERR_ITEM_INVALID  

Operation cannot be performed due to an invalid item

WERR_IFACE_BUSY  

Interface is already busy, cannot perform. Setting option IfaceOption::IFACE_OPT_REQUEST will help to get ride of this error

WERR_NET_UNAVAILABLE  

Trying to connect to an unailable network

WERR_NET_PASSKEY  

Provided passkey is invalid

WERR_API_INTERNAL  

Triggered by internal API errors, please refer to logs for more details

◆ WlanPerm

enum class qwm::WlanPerm
strong

List of permissions status.

See also
wlanPermToString()
Permissions
Enumerator
WPERM_UNKNOWN 

Permission unknown, either because not fetched yet or platform doesn't support the operation

WPERM_PROMPT_REQUIRED  

User didn't deny or grant permission yet

WPERM_GRANTED  

Wlan permissions are granted

WPERM_DENIED  

Wlan permissions has been denied

◆ WlanOption

Wlan manager options.

Those options concerns qwm::Manager global available features.
Options are flags, so they can be combined.

See also
IfaceOption
Enumerator
WOPT_NONE 

No option set

WOPT_ALLOW_ADMIN_REQUESTS 1 << 0 

Enable this option to allow administration request (will ask user for a temporary admin access) often needed when managing wifi credentials.
Disable it to be sure that admin access will never be asked.

Note
Currently, only CoreWlan backend is concerned by this feature
WOPT_DEFAULT WOPT_ALLOW_ADMIN_REQUESTS 

Default manager options

◆ RequestType

enum class qwm::RequestType
strong

Type of interface asynchrone request.

See also
requestTypeToString()
Enumerator
REQ_INVALID 

Invalid request

REQ_SCAN  

Scan request

REQ_CONNECT  

Connection request

REQ_DISCONNECT  

Disconnection request

◆ IfaceState

enum class qwm::IfaceState
strong

Interface states.

See also
ifaceStateToString()
Enumerator
IFACE_STS_IDLE 

Interface ready to perform an operation

IFACE_STS_SCANNING  

Interface is performing a network scan

IFACE_STS_CONNECTING  

Interface is trying to connect to a network

IFACE_STS_DISCONNECTING  

Interface is trying to disconnect from a network

◆ IfaceOption

Available interface options.

Options are flags, so they can be combined.

See also
qwm::Interface
WlanOption
Enumerator
IFACE_OPT_NONE 

No option set

IFACE_OPT_REQUEST 1 << 0 

Allow to queue interface operations (wait for the scan to finish before trying to connect for example), which will reduce WlanError::WERR_IFACE_BUSY occurrences.
Note that enabling this will delay operations start.

IFACE_OPT_DEFAULT IFACE_OPT_NONE 

Default interface option, currently no option set

◆ AuthAlgo

enum class qwm::AuthAlgo
strong

Enumeration of supported wireless authentication algorithms.

Represents the authentication mechanism used by a wireless network.
It reflects the mechanism advertised in the RSN (Robust Security Network) Information Element of a beacon or probe response frame, as defined by the IEEE 802.11 standards (802.11i, 802.11r, 802.11ax, etc.).

Note
These enums are focused on client-side support (i.e., supplicant) and align with typical usage scenarios such as connecting to Wi-Fi networks in WPA2/WPA3 Personal or Enterprise modes.
See also
authAlgoToString()
Enumerator
AUTH_ALGO_UNKNOWN 

Authentication algorithm is unknown (thus unsupported)

AUTH_ALGO_OPEN  

Open System authentication, defined in IEEE 802.11-1997).
No authentication is required to join the network

AUTH_ALGO_WPA2_PERSONAL  

WPA2-Personal (also known as WPA2-PSK), defined in IEEE 802.11i-2004.
Uses a pre-shared key (PSK) for authentication

AUTH_ALGO_WPA2_ENTERPRISE  

WPA2-Enterprise, defined in IEEE 802.11i-2004.
Uses IEEE 802.1X/EAP for authentication instead of PSK. Requires a RADIUS server and per-user credentials (e.g., username/password or certificate).
Used in corporate and academic environments.

AUTH_ALGO_WPA3_PERSONAL  

WPA3-Personal (defined in Wi-Fi CERTIFIED WPA3™ standard, based on IEEE 802.11ax and SAE). Uses SAE (Simultaneous Authentication of Equals) for mutual authentication

AUTH_ALGO_WPA3_ENTERPRISE  

WPA3-Enterprise (also part of the WPA3 standard, optional enhancements in IEEE 802.11-2020).
Similar to WPA2-Enterprise but may enforce stronger cryptographic requirements.
Requires an 802.1X/EAP infrastructure.

◆ CipherAlgo

enum class qwm::CipherAlgo
strong

Enumeration of supported wireless encryption (cipher) algorithms.

See also
cipherAlgoToString()
Enumerator
CIPHER_ALGO_UNKNOWN 

Cipher algorithm is unknown (thus unsupported)

CIPHER_ALGO_NONE  

No encryption used, typically used with AuthAlgo::AUTH_ALGO_OPEN networks

CIPHER_ALGO_TKIP  

Temporal Key Integrity Protocol (TKIP), often considered as deprecated

CIPHER_ALGO_AES  

Advanced Encryption Standard (AES) with CCMP mode (Counter Mode CBC-MAC Protocol). Default cipher for WPA2 and WPA3 networks.

CIPHER_ALGO_GCMP  

Galois/Counter Mode Protocol (GCMP), introduced in 802.11ac and required for WPA3-Enterprise 192-bit mode. Typically used with WPA3 networks requiring 256-bit keys (AES-GCMP-256).

Function Documentation

◆ wlanErrorToString()

QString qwm::wlanErrorToString ( WlanError idErr)

Use to convert wlan errors to string.

Parameters
[in]idErrError ID to convert.
If unknown, string "unknown error" will be returned.
Returns
Returns string equivalent.

◆ wlanPermToString()

QString qwm::wlanPermToString ( WlanPerm idPerm)

Use to convert wlan permissions to string.

Parameters
[in]idPermPermission ID to convert.
If unknown, string "unknown" will be returned.
Returns
Returns string equivalent.

◆ requestTypeToString()

QString qwm::requestTypeToString ( RequestType idReq)

Use to convert request type to string.

Parameters
[in]idReqRequest ID to convert.
If unknown or invalid, string "invalid" will be returned.
Returns
Returns string equivalent.

◆ ifaceStateToString()

QString qwm::ifaceStateToString ( IfaceState idState)

Use to convert interface states to string.

Parameters
[in]idStateState ID to convert.
If unknown, string "unknown state" will be returned.
Returns
Returns string equivalent.

◆ authAlgoToString()

QString qwm::authAlgoToString ( AuthAlgo idAuth)

Use to convert authentication algorithms to string.

Parameters
[in]idAuthAuthentication algorithm ID to convert.
If unknown, string "Unknown authentication algorithm" will be returned.
Returns
Returns string equivalent.

◆ cipherAlgoToString()

QString qwm::cipherAlgoToString ( CipherAlgo idCipher)

Use to convert cipher algorithms to string.

Parameters
[in]idCipherCipher algorithm ID to convert.
If unknown, string "Unknown cipher algorithm" will be returned.
Returns
Returns string equivalent.

◆ getLibraryVersion()

QVersionNumber qwm::getLibraryVersion ( )

Used to retrieve QWlanManager library version.

Returns
Returns semantic version of the library.