NetworkManagerQt
device.cpp
44NetworkManager::DeviceStateReason::DeviceStateReason(Device::State state, Device::StateChangeReason reason)
49NetworkManager::DeviceStateReason::DeviceStateReason(const NetworkManager::DeviceStateReason &other)
71NetworkManager::DeviceStateReason &NetworkManager::DeviceStateReason::operator=(const NetworkManager::DeviceStateReason &other)
116 QObject::connect(&deviceIface, &OrgFreedesktopNetworkManagerDeviceInterface::StateChanged, this, &DevicePrivate::deviceStateChanged);
122 deviceStatistics = DeviceStatistics::Ptr(new NetworkManager::DeviceStatistics(uni), &QObject::deleteLater);
125 QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(deviceIface.staticInterfaceName(), uni);
132NetworkManager::Device::MeteredStatus NetworkManager::DevicePrivate::convertMeteredStatus(uint metered)
134 NetworkManager::Device::MeteredStatus ourMeteredStatus = (NetworkManager::Device::MeteredStatus)metered;
138NetworkManager::Device::Capabilities NetworkManager::DevicePrivate::convertCapabilities(uint theirCaps)
144NetworkManager::Device::Interfaceflags NetworkManager::DevicePrivate::convertInterfaceflags(uint flags)
146 NetworkManager::Device::Interfaceflags ourFlags = static_cast<NetworkManager::Device::Interfaceflags>(flags);
152 NetworkManager::Device::State ourState = static_cast<NetworkManager::Device::State>(theirState);
156NetworkManager::Device::StateChangeReason NetworkManager::DevicePrivate::convertReason(uint theirReason)
158 NetworkManager::Device::StateChangeReason ourReason = (NetworkManager::Device::StateChangeReason)theirReason;
244void NetworkManager::DevicePrivate::propertyChanged(const QString &property, const QVariant &value)
257 const QList<QDBusObjectPath> availableConnectionsTmp = qdbus_cast<QList<QDBusObjectPath>>(value);
324 if (ip4ConfigObjectPathTmp.path().isNull() || ip4ConfigObjectPathTmp.path() == QLatin1String("/")) {
333 if (ip6ConfigObjectPathTmp.path().isNull() || ip6ConfigObjectPathTmp.path() == QLatin1String("/")) {
351 if (connectionState == NetworkManager::Device::Disconnected && activeConnection != QLatin1String("/")) {
357 reason = NetworkManager::DevicePrivate::convertReason(qdbus_cast<DeviceDBusStateReason>(value).reason);
433 NetworkManager::Connection::Ptr connection = NetworkManager::findConnection(availableConnection);
506 d->dhcp4Config = NetworkManager::Dhcp4Config::Ptr(new Dhcp4Config(d->dhcp4ConfigPath), &QObject::deleteLater);
515 d->dhcp6Config = NetworkManager::Dhcp6Config::Ptr(new Dhcp6Config(d->dhcp6ConfigPath), &QObject::deleteLater);
567QDBusPendingReply<> NetworkManager::Device::reapplyConnection(const NMVariantMapMap &connection, qulonglong version_id, uint flags)
619void NetworkManager::DevicePrivate::deviceStateChanged(uint newState, uint oldState, uint reason)
625 Q_EMIT q->stateChanged(connectionState, NetworkManager::DevicePrivate::convertState(oldState), NetworkManager::DevicePrivate::convertReason(reason));
628void NetworkManager::DevicePrivate::dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties)
650 if (properties.contains(QLatin1String("State")) && connectionState == NetworkManager::Device::Activated) {
651 propertyChanged(QLatin1String("Ip4Config"), QVariant::fromValue<QDBusObjectPath>(deviceIface.ip4Config()));
652 propertyChanged(QLatin1String("Ip6Config"), QVariant::fromValue<QDBusObjectPath>(deviceIface.ip6Config()));
Represents device statistics interface.
Definition devicestatistics.h:25
void ipV4ConfigChanged()
Emitted when the IPv4 configuration of this network has changed.
Dhcp4Config::Ptr dhcp4Config() const
Get the DHCP options returned by the DHCP server or a null pointer if the device is not Activated or ...
Definition device.cpp:502
void interfaceFlagsChanged()
Emitted when the up or down state of the device.
bool isActive() const
Retrieves the activation status of this network interface.
Definition device.cpp:520
State
Device connection states describe the possible states of a network connection from the user's point o...
Definition device.h:66
void meteredChanged(MeteredStatus metered)
Emitted when metered property has changed.
void firmwareMissingChanged()
Emitted when the firmware missing state of this network has changed.
void physicalPortIdChanged()
Emitted when the physical port ID changes.
void stateReasonChanged()
Emitted when the state reason of this network has changed.
void activeConnectionChanged()
Emitted when the autoconnect of this network has changed.
void stateChanged(NetworkManager::Device::State newstate, NetworkManager::Device::State oldstate, NetworkManager::Device::StateChangeReason reason)
This signal is emitted when the device's link status changed.
Capabilities capabilities() const
Retrieves the capabilities supported by this device.
Definition device.cpp:601
void udiChanged()
Emitted when the Unique Device Identifier of this device has changed.
void connectionStateChanged()
Emitted when the connection state of this network has changed.
void driverVersionChanged()
Emitted when the driver version of this network has changed.
int designSpeed() const
Retrieves the maximum speed as reported by the device.
Definition device.cpp:595
QDBusPendingReply reapplyConnection(const NMVariantMapMap &connection, qulonglong version_id, uint flags)
Reapplies connection settings on the interface.
Definition device.cpp:567
void ipInterfaceChanged()
Emitted when the ip interface name of this network has changed.
void ipV6ConfigChanged()
Emitted when the IPv6 configuration of this network has changed.
void dhcp4ConfigChanged()
Emitted when the DHCP configuration for IPv4 of this network has changed.
void availableConnectionAppeared(const QString &connection)
Emitted when a new connection is available.
NetworkManager::ActiveConnection::Ptr activeConnection() const
The current active connection for this device.
Definition device.cpp:421
void interfaceNameChanged()
Emitted when the interface name of this network has changed.
Connection::List availableConnections()
Returns available connections for this device.
Definition device.cpp:427
void setAutoconnect(bool autoconnect)
If true, indicates the device is allowed to autoconnect.
Definition device.cpp:454
void dhcp6ConfigChanged()
Emitted when the DHCP configuration for IPv6 of this network has changed.
void mtuChanged()
Emitted when the maximum transmission unit has changed.
void driverChanged()
Emitted when the driver of this network has changed.
void firmwareVersionChanged()
Emitted when the firmware version of this network has changed.
Dhcp6Config::Ptr dhcp6Config() const
Get the DHCP options returned by the DHCP server or a null pointer if the device is not Activated or ...
Definition device.cpp:511
QDBusPendingReply disconnectInterface()
Disconnects a device and prevents the device from automatically activating further connections withou...
Definition device.cpp:573
void availableConnectionDisappeared(const QString &connection)
Emitted when the connection is no longer available.
QDBusPendingReply deleteInterface()
Deletes a software device from NetworkManager and removes the interface from the system.
Definition device.cpp:579
void nmPluginMissingChanged(bool nmPluginMissing)
Emitted when NmPluginMissing property has changed.
void availableConnectionChanged()
Emitted when the list of avaiable connections of this network has changed.
void autoconnectChanged()
Emitted when the autoconnect of this network has changed.
Device(const QString &path, QObject *parent=nullptr)
Creates a new device object.
Definition device.cpp:226
IpConfig ipV4Config() const
Get the current IPv4 configuration of this device.
Definition device.cpp:484
void capabilitiesChanged()
Emitted when the capabilities of this network has changed.
void managedChanged()
Emitted when the managed state of this network has changed.
IpConfig ipV6Config() const
Get the current IPv6 configuration of this device.
Definition device.cpp:493
void ipV4AddressChanged()
Emitted when the IPv4 address of this network has changed.
Type type(const QSqlDatabase &db)
Capabilities capabilities()
KGuiItem properties()
This class allows querying the underlying system to discover the available network interfaces and rea...
Definition accesspoint.h:21
NETWORKMANAGERQT_EXPORT ActiveConnection::Ptr findActiveConnection(const QString &uni)
Find an ActiveConnection object for an active connection id.
Definition manager.cpp:1001
NETWORKMANAGERQT_EXPORT NetworkManager::Device::MeteredStatus metered()
Definition manager.cpp:1160
NETWORKMANAGERQT_EXPORT NetworkManager::Connection::Ptr findConnection(const QString &path)
Retrieves the connection for the given path, returns null if not found.
Definition settings.cpp:225
NETWORKMANAGERQT_EXPORT bool checkVersion(const int x, const int y, const int z)
Checks if NetworkManager version is at least x.y.z.
Definition manager.cpp:239
bool connect(const QString &service, const QString &path, const QString &interface, const QString &name, QObject *receiver, const char *slot)
QDBusConnection sessionBus()
QDBusConnection systemBus()
QString path() const const
iterator begin()
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void deleteLater()
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
bool isNull() const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
QVariant fromValue(T &&value)
bool toBool() const const
QString toString() const const
uint toUInt(bool *ok) const const
T value() const const
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.