NetworkManager::WirelessDevice Class
A wireless network interface. More...
- Header:
#include <NetworkManagerQt/WirelessDevice> - CMake:
find_package(KF6 REQUIRED COMPONENTS NetworkManagerQt)
target_link_libraries(mytarget PRIVATE KF6::NetworkManagerQt) - Inherits: NetworkManager::Device
List of all members, including inherited members
Public Types
- enum WirelessDevice::Capability
- WirelessDevice::List
- enum WirelessDevice::OperationMode
- WirelessDevice::Ptr
Public Functions
- WirelessDevice(const QString &path, QObject *parent = nullptr)
- ~WirelessDevice()
- QStringList accessPoints() const
- AccessPoint::Ptr activeAccessPoint() const
- int bitRate() const
- AccessPoint::Ptr findAccessPoint(const QString &uni)
- WirelessNetwork::Ptr findNetwork(const QString &ssid) const
- QString hardwareAddress() const
- QDateTime lastRequestScan() const
- QDateTime lastScan() const
- NetworkManager::WirelessDevice::OperationMode mode() const
- WirelessNetwork::List networks() const
- QString permanentHardwareAddress() const
- QDBusPendingReply<> requestScan(const QVariantMap &options = QVariantMap())
- NetworkManager::Device::Type type() const
- WirelessDevice::Capabilities wirelessCapabilities() const
Signals
- void accessPointAppeared(const QString &uni)
- void accessPointDisappeared(const QString &uni)
- void activeAccessPointChanged(const QString &)
- void bitRateChanged(int bitrate)
- void hardwareAddressChanged(const QString &)
- void lastScanChanged(const QDateTime &dateTime)
- void modeChanged(NetworkManager::WirelessDevice::OperationMode)
- void networkAppeared(const QString &ssid)
- void networkDisappeared(const QString &ssid)
- void permanentHardwareAddressChanged(const QString &)
- void wirelessCapabilitiesChanged(NetworkManager::WirelessDevice::Capabilities)
- void wirelessPropertiesChanged(uint)
Static Public Members
- WirelessDevice::Capabilities convertCapabilities(uint)
- NetworkManager::WirelessDevice::OperationMode convertOperationMode(uint)
Detailed Description
Member Type Documentation
enum WirelessDevice::Capability
flags WirelessDevice::Capabilities
Capabilities (currently all encryption/authentication related) of the device
Note: FreqValid, Freq2Ghz, Freq5Ghz are available in runtime NM >= 1.0.2
The device's current operating mode
| Constant | Value | Description |
|---|---|---|
NetworkManager::WirelessDevice::NoCapability |
0x0 |
Null capability |
NetworkManager::WirelessDevice::Wep40 |
0x1 |
40 bit WEP cipher |
NetworkManager::WirelessDevice::Wep104 |
0x2 |
104 bit WEP cipher |
NetworkManager::WirelessDevice::Tkip |
0x4 |
TKIP encryption cipher |
NetworkManager::WirelessDevice::Ccmp |
0x8 |
CCMP encryption cipher |
NetworkManager::WirelessDevice::WpaWpa |
? | WPA authentication protocol |
NetworkManager::WirelessDevice::Rsn |
0x20 |
RSN authethication protocol |
NetworkManager::WirelessDevice::ApCap |
0x40 |
The device supports Access Point mode. |
NetworkManager::WirelessDevice::AdhocCap |
0x80 |
The device supports Ad-Hoc mode. |
NetworkManager::WirelessDevice::FreqValid |
0x100 |
The device properly reports information about supported frequencies |
NetworkManager::WirelessDevice::Freq2Ghz |
0x200 |
The device supports 2.4Ghz frequencies |
NetworkManager::WirelessDevice::Freq5Ghz |
0x400 |
The device supports 5Ghz frequencies |
NetworkManager::WirelessDevice::Mesh |
0x1000 |
The device supports acting as a mesh point |
NetworkManager::WirelessDevice::IBSSRsn |
0x2000 |
device supports WPA2/RSN in an IBSS network |
The Capabilities type is a typedef for QFlags<Capability>. It stores an OR combination of Capability values.
WirelessDevice::List
enum WirelessDevice::OperationMode
The device's current operating mode
| Constant | Value | Description |
|---|---|---|
NetworkManager::WirelessDevice::Unknown |
0 |
not associated with a network |
NetworkManager::WirelessDevice::Adhoc |
1 |
part of an adhoc network |
NetworkManager::WirelessDevice::Infra |
2 |
a station in an infrastructure wireless network |
NetworkManager::WirelessDevice::ApMode |
3 |
access point in an infrastructure network |
WirelessDevice::Ptr
Member Function Documentation
[explicit] WirelessDevice::WirelessDevice(const QString &path, QObject *parent = nullptr)
Creates a new WirelessDevice object.
path the DBus path of the devise
[override virtual noexcept] WirelessDevice::~WirelessDevice()
Destroys a WirelessDevice object.
[signal] void WirelessDevice::accessPointAppeared(const QString &uni)
A new wireless access point appeared
[signal] void WirelessDevice::accessPointDisappeared(const QString &uni)
A wireless access point disappeared
QStringList WirelessDevice::accessPoints() const
List of wireless networks currently visible to the hardware
AccessPoint::Ptr WirelessDevice::activeAccessPoint() const
AccessPoint pointer this interface is currently associated with
[signal] void WirelessDevice::activeAccessPointChanged(const QString &)
The active network changed.
int WirelessDevice::bitRate() const
Retrieves the effective bit rate currently attainable by this device.
Returns the bitrate in Kbit/s
[signal] void WirelessDevice::bitRateChanged(int bitrate)
This signal is emitted when the bitrate of this network has changed.
bitrate the new bitrate value for this network
[static] WirelessDevice::Capabilities WirelessDevice::convertCapabilities(uint)
Helper method to convert wire representation of capabilities to enum
[static] NetworkManager::WirelessDevice::OperationMode WirelessDevice::convertOperationMode(uint)
Helper method to convert wire representation of operation mode to enum
AccessPoint::Ptr WirelessDevice::findAccessPoint(const QString &uni)
Finds access point object given its Unique Network Identifier.
uni the identifier of the AP to find from this network interface Returns a valid AccessPoint object if a network having the given UNI for this device is known to the system, 0 otherwise
WirelessNetwork::Ptr WirelessDevice::findNetwork(const QString &ssid) const
Find a network with the given ssid, a Null object is returned if it can not be found
QString WirelessDevice::hardwareAddress() const
The hardware address currently used by the network interface
[signal] void WirelessDevice::hardwareAddressChanged(const QString &)
The device changed its hardware address
QDateTime WirelessDevice::lastRequestScan() const
The time the last RequestScan function was called Returns
QDateTime WirelessDevice::lastScan() const
The LastScan property value, converted to QDateTime
Note: will always return invalid QDateTime when runtime NM < 1.12 Returns
[signal] void WirelessDevice::lastScanChanged(const QDateTime &dateTime)
* The LastScan property has changed, meaning a scan has just finished * * ote will never be emitted when runtime NM < 1.12 *
See also lastScanTime
NetworkManager::WirelessDevice::OperationMode WirelessDevice::mode() const
Retrieves the operation mode of this network.
Returns the current mode
See also OperationMode
[signal] void WirelessDevice::modeChanged(NetworkManager::WirelessDevice::OperationMode)
The device switched operating mode.
[signal] void WirelessDevice::networkAppeared(const QString &ssid)
A wireless network appeared
[signal] void WirelessDevice::networkDisappeared(const QString &ssid)
A wireless network disappeared
WirelessNetwork::List WirelessDevice::networks() const
Return the current list of networks
QString WirelessDevice::permanentHardwareAddress() const
The permanent hardware address of the network interface
[signal] void WirelessDevice::permanentHardwareAddressChanged(const QString &)
The device changed its permanent hardware address
QDBusPendingReply<> WirelessDevice::requestScan(const QVariantMap &options = QVariantMap())
Asks the device for a new scan of available wireless networks
options Options of scan
No documentation for options yet, see https://projects.gnome.org/NetworkManager/developers/api/09/spec.html#org.freedesktop.NetworkManager.Device.Wireless
[override virtual] NetworkManager::Device::Type WirelessDevice::type() const
Reimplements: Device::type() const.
Return the type
WirelessDevice::Capabilities WirelessDevice::wirelessCapabilities() const
Retrieves the capabilities of this wifi network.
Returns the flag set describing the capabilities
See also Capabilities
[signal] void WirelessDevice::wirelessCapabilitiesChanged(NetworkManager::WirelessDevice::Capabilities)
The device changed its capabilities
[signal] void WirelessDevice::wirelessPropertiesChanged(uint)
The device changed its properties