File indexing completed on 2024-04-21 03:59:59
0001 /* 0002 SPDX-FileCopyrightText: 2014 Jan Grulich <jgrulich@redhat.com> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #include "wireddevice.h" 0008 0009 WiredDevice::WiredDevice(QObject *parent) 0010 : Device(parent) 0011 { 0012 } 0013 0014 WiredDevice::~WiredDevice() 0015 { 0016 QVariantMap map; 0017 map.insert(QLatin1String("AvailableConnections"), QVariant::fromValue<QList<QDBusObjectPath>>(QList<QDBusObjectPath>())); 0018 Q_EMIT PropertiesChanged(map); 0019 } 0020 0021 bool WiredDevice::carrier() const 0022 { 0023 return m_carrier; 0024 } 0025 0026 QString WiredDevice::hwAddress() const 0027 { 0028 return m_hwAddress; 0029 } 0030 0031 QString WiredDevice::permHwAddress() const 0032 { 0033 return m_permHwAddress; 0034 } 0035 0036 uint WiredDevice::speed() const 0037 { 0038 return m_speed; 0039 } 0040 0041 void WiredDevice::setCarrier(bool carrier) 0042 { 0043 m_carrier = carrier; 0044 } 0045 0046 void WiredDevice::setHwAddress(const QString &hwAddress) 0047 { 0048 m_hwAddress = hwAddress; 0049 } 0050 0051 void WiredDevice::setPermanentHwAddress(const QString &permanentHwAddress) 0052 { 0053 m_permHwAddress = permanentHwAddress; 0054 } 0055 0056 void WiredDevice::setSpeed(uint speed) 0057 { 0058 m_speed = speed; 0059 } 0060 0061 void WiredDevice::setState(uint state) 0062 { 0063 Device::setState(state); 0064 // set speed 0065 } 0066 0067 #include "moc_wireddevice.cpp"