QWlanManager
|
Use to manage all wlan related operations. More...
Signals | |
void | sInterfaceAdded (qwm::Interface interface) |
Emitted when a new interface has been added. | |
void | sInterfaceRemoved (qwm::Interface interface) |
Emitted when an interface has been removed. | |
void | sScanStarted (const QUuid &idInterface) |
Emitted when a network scan has been started on an interface. | |
void | sScanSucceed (const QUuid &idInterface, qwm::ListNetworks listNets) |
Emitted when a network scan succeeded. | |
void | sScanFailed (const QUuid &idInterface, qwm::WlanError idErr) |
Emitted when a network scan failed. | |
void | sConnectionStarted (const QUuid &idInterface, const QString &ssid) |
Emitted when trying to connect to a network. | |
void | sConnectionSucceed (const QUuid &idInterface, const QString &ssid) |
Emitted when network connection succeed. | |
void | sConnectionFailed (const QUuid &idInterface, const QString &ssid, qwm::WlanError idErr) |
Emitted when network connection failed. | |
void | sDisconnectionStarted (const QUuid &idInterface) |
Emitted when interface is trying to disconnect from network. | |
void | sDisconnectionSucceed (const QUuid &idInterface) |
Emitted when interface disconnection succeeded. | |
void | sDisconnectionFailed (const QUuid &idInterface, qwm::WlanError idErr) |
Emitted when interface disconnection failed. | |
void | sForgetStarted (const QUuid &idInterface, const QString &ssid) |
Emitted when trying to forget a network. | |
void | sForgetSucceed (const QUuid &idInterface, const QString &ssid) |
Emitted when network has been forgotten. | |
void | sForgetFailed (const QUuid &idInterface, const QString &ssid, qwm::WlanError idErr) |
Emitted when network forget request failed. | |
void | sSignalQualityChanged (const QUuid &idInterface, uint percent) |
Emitted when signal quality of current network changes. | |
Public Member Functions | |
Manager (QObject *parent=nullptr) | |
Construct a wlan manager. | |
void | setOptions (WlanOptions opts) |
Allow to set options of the manager. | |
WlanOptions | getOptions () const |
Retrieve current manager options. | |
ListInterfaces | getInterfaces () const |
Allow to retrieve list of interfaces. | |
Interface | getInterface (const QUuid &idInterface) const |
Allow to retrieve an interface via its ID. | |
void | doScan (const QUuid &idInterface) |
Allow to perform a scan. | |
void | doConnect (const QUuid &idInterface, const QString &ssid, const QString &password="") |
Allow to connect to a network. | |
void | doDisconnect (const QUuid &idInterface) |
Allow to disconnect from a network. | |
void | doForget (const QUuid &idInterface, const QString &ssid) |
Allow to remove network internal credentials. | |
Use to manage all wlan related operations.
This class control all interfaces operations: interface added/removed, scan, connection, etc...
wlan
operations, see qwm::Permissions for more details.
|
explicit |
Construct a wlan manager.
Allow to perform needed backend initialization and retrieve list of available interfaces.
[out] | parent | The parent argument is passed to QObject's constructor |
void qwm::Manager::setOptions | ( | WlanOptions | opts | ) |
WlanOptions qwm::Manager::getOptions | ( | ) | const |
ListInterfaces qwm::Manager::getInterfaces | ( | ) | const |
Allow to retrieve list of interfaces.
Interface qwm::Manager::getInterface | ( | const QUuid & | idInterface | ) | const |
Allow to retrieve an interface via its ID.
[in] | idInterface | Interface ID to use. If ID is unknown, returned interface will be invalid. |
void qwm::Manager::doScan | ( | const QUuid & | idInterface | ) |
Allow to perform a scan.
This request is asynchronous, use associated signals to manage status.
[in] | idInterface | Interface ID to use. |
void qwm::Manager::doConnect | ( | const QUuid & | idInterface, |
const QString & | ssid, | ||
const QString & | password = "" ) |
Allow to connect to a network.
This request is asynchronous, use associated signals to manage status.
[in] | idInterface | Interface ID to use. |
[in] | ssid | Network SSID to connect. Nothing is performed if already connected. |
[in] | password | Password to use for connection. This value can be empty, in this case, internal credentials will be used. If the password isn't registered internally or is wrong, signal sConnectionFailed() will be emitted with error code WlanError::WERR_NET_PASSKEY: in this case password has to be provided. |
WlanError::WERR_NET_PASSKEY
error is received.WlanOption::WOPT_ALLOW_ADMIN_REQUESTS
can be disabled, if so, caller will always have to provide network password.void qwm::Manager::doDisconnect | ( | const QUuid & | idInterface | ) |
Allow to disconnect from a network.
This request is asynchronous, use associated signals to manage status.
[in] | idInterface | Interface ID to use. Nothing is performed if already disconnected. |
void qwm::Manager::doForget | ( | const QUuid & | idInterface, |
const QString & | ssid ) |
Allow to remove network internal credentials.
This request is asynchronous, use associated signals to manage status.
|
signal |
Emitted when a new interface has been added.
[in] | interface | Interface that has been added |
|
signal |
Emitted when an interface has been removed.
[in] | interface | Interface that has been removed |
|
signal |
Emitted when a network scan has been started on an interface.
[in] | idInterface | Interface ID for which the scan has been started. |
|
signal |
Emitted when a network scan succeeded.
[in] | idInterface | Interface ID for which the scan succeeded. |
[in] | listNets | List of networks found. |
|
signal |
Emitted when a network scan failed.
[in] | idInterface | Interface ID for which the scan failed. |
[in] | idErr | Error ID explaining why scan has failed. |
|
signal |
|
signal |
|
signal |
|
signal |
Emitted when interface is trying to disconnect from network.
[in] | idInterface | Interface ID used. |
|
signal |
Emitted when interface disconnection succeeded.
[in] | idInterface | Interface ID used. |
|
signal |
Emitted when interface disconnection failed.
[in] | idInterface | Interface ID used. |
[in] | idErr | Error ID explaining why disconnection has failed. |
|
signal |
Emitted when trying to forget a network.
|
signal |
Emitted when network has been forgotten.
|
signal |
|
signal |
Emitted when signal quality of current network changes.
[in] | idInterface | Interface ID for which the quality signal has changed. |
[in] | percent | Signal quality in percentage. |
doScan()