8#include "activeconnection.h"
10#include <QDBusConnection>
11#include <QDBusMetaType>
21 , m_firmwareMissing(false)
22 , m_interfaceFlags(NM_DEVICE_INTERFACE_FLAG_NONE)
30 qDBusRegisterMetaType<DeviceDBusStateReason>();
39 return m_activeConnection;
42bool Device::autoconnect()
const
47void Device::setAutoconnect(
bool autoconnect)
49 m_autoconnect = autoconnect;
54 return m_availableConnections;
57uint Device::capabilities()
const
59 return m_capabilities;
62QString Device::deviceInterface()
const
73QString Device::devicePath()
const
78void Device::setDevicePath(
const QString &devicePath)
80 m_devicePath = devicePath;
83uint Device::deviceType()
const
103QString Device::driverVersion()
const
105 return m_driverVersion;
108bool Device::firmwareMissing()
const
110 return m_firmwareMissing;
113QString Device::firmwareVersion()
const
115 return m_firmwareVersion;
118QString Device::interface()
const
123int Device::ip4Address()
const
138QString Device::ipInterface()
const
140 return m_ipInterface;
143uint Device::interfaceFlags()
const
145 return m_interfaceFlags;
148bool Device::managed()
const
153uint Device::mtu()
const
158uint Device::state()
const
163DeviceDBusStateReason Device::stateReason()
const
165 return m_stateReason;
173void Device::addAvailableConnection(
const QDBusObjectPath &availableConnection)
175 m_availableConnections << availableConnection;
178void Device::removeAvailableConnection(
const QDBusObjectPath &availableConnection)
180 m_availableConnections.
removeAll(availableConnection);
183void Device::setActiveConnection(
const QString &activeConnection)
188void Device::setCapabilities(uint capabilities)
193void Device::setDeviceType(uint deviceType)
195 m_deviceType = deviceType;
198void Device::setDhcp4Config(
const QString &config)
203void Device::setDhcp6Config(
const QString &config)
208void Device::setDriver(
const QString &driver)
213void Device::setDriverVersion(
const QString &driverVersion)
215 m_driverVersion = driverVersion;
218void Device::setFirmwareMissing(
bool firmwareMissing)
220 m_firmwareMissing = firmwareMissing;
223void Device::setFirmwareVersion(
const QString &firmwareVersion)
225 m_firmwareVersion = firmwareVersion;
228void Device::setInterface(
const QString &interface)
230 m_interface = interface;
233void Device::setInterfaceFlags(uint interfaceFlags)
235 m_interfaceFlags = interfaceFlags;
238void Device::setIp4Config(
const QString &config)
243void Device::setIp6Config(
const QString &config)
248void Device::setIpv4Address(
int address)
253void Device::setIpInterface(
const QString &interface)
255 m_ipInterface = interface;
258void Device::setManaged(
bool managed)
263void Device::setMtu(uint mtu)
268void Device::setState(uint state)
270 uint previousState = m_state;
272 m_stateReason.state = state;
275 message << previousState << state << m_stateReason.reason;
279void Device::setStateReason(
const DeviceDBusStateReason &reason)
281 m_stateReason = reason;
284void Device::setUdi(
const QString &udi)
289void Device::Disconnect()
294#include "moc_device.cpp"
@ Wifi
the Ieee80211 family of wireless networks
@ Ethernet
Ieee8023 wired ethernet.
Capabilities capabilities()
PostalAddress address(const QVariant &location)
bool send(const QDBusMessage &message) const const
QDBusConnection sessionBus()
QDBusMessage createSignal(const QString &path, const QString &interface, const QString &name)
qsizetype removeAll(const AT &t)