File indexing completed on 2025-03-16 12:58:24
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 #ifndef NETWORKMANAGERQT_GENERICDEVICE_H 0008 #define NETWORKMANAGERQT_GENERICDEVICE_H 0009 0010 #include <networkmanagerqt/networkmanagerqt_export.h> 0011 0012 #include "device.h" 0013 0014 namespace NetworkManager 0015 { 0016 class GenericDevicePrivate; 0017 0018 /** 0019 * A generic device interface 0020 */ 0021 class NETWORKMANAGERQT_EXPORT GenericDevice : public Device 0022 { 0023 Q_OBJECT 0024 Q_PROPERTY(QString hardwareAddress READ hardwareAddress) 0025 Q_PROPERTY(QString typeDescription READ typeDescription) 0026 0027 public: 0028 typedef QSharedPointer<GenericDevice> Ptr; 0029 typedef QList<Ptr> List; 0030 explicit GenericDevice(const QString &path, QObject *parent = nullptr); 0031 ~GenericDevice() override; 0032 /** 0033 * Return the type 0034 */ 0035 Type type() const override; 0036 /** 0037 * Active hardware address of the device 0038 */ 0039 QString hardwareAddress() const; 0040 /** 0041 * A (non-localized) description of the interface type, if known. 0042 */ 0043 QString typeDescription() const; 0044 0045 Q_SIGNALS: 0046 /** 0047 * Emitted when the hardware address of this device has changed 0048 */ 0049 void hardwareAddressChanged(const QString &hwAddress); 0050 /** 0051 * Emitted when the type description this device has changed 0052 */ 0053 void permanentHardwareAddressChanged(const QString &permHwAddress); 0054 0055 private: 0056 Q_DECLARE_PRIVATE(GenericDevice) 0057 }; 0058 0059 } 0060 0061 #endif // NETWORKMANAGERQT_GENERICDEVICE_H