1 | /* |
2 | SPDX-FileCopyrightText: 2014 Jan Grulich <jgrulich@redhat.com> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
5 | */ |
6 | |
7 | #ifndef NETWORKMANAGERQT_GENERICDEVICE_H |
8 | #define NETWORKMANAGERQT_GENERICDEVICE_H |
9 | |
10 | #include <networkmanagerqt/networkmanagerqt_export.h> |
11 | |
12 | #include "device.h" |
13 | |
14 | namespace NetworkManager |
15 | { |
16 | class GenericDevicePrivate; |
17 | |
18 | /** |
19 | * A generic device interface |
20 | */ |
21 | class NETWORKMANAGERQT_EXPORT GenericDevice : public Device |
22 | { |
23 | Q_OBJECT |
24 | Q_PROPERTY(QString hardwareAddress READ hardwareAddress) |
25 | Q_PROPERTY(QString typeDescription READ typeDescription) |
26 | |
27 | public: |
28 | typedef QSharedPointer<GenericDevice> Ptr; |
29 | typedef QList<Ptr> List; |
30 | explicit GenericDevice(const QString &path, QObject *parent = nullptr); |
31 | ~GenericDevice() override; |
32 | /** |
33 | * Return the type |
34 | */ |
35 | Type type() const override; |
36 | /** |
37 | * Active hardware address of the device |
38 | */ |
39 | QString hardwareAddress() const; |
40 | /** |
41 | * A (non-localized) description of the interface type, if known. |
42 | */ |
43 | QString typeDescription() const; |
44 | |
45 | Q_SIGNALS: |
46 | /** |
47 | * Emitted when the hardware address of this device has changed |
48 | */ |
49 | void hardwareAddressChanged(const QString &hwAddress); |
50 | /** |
51 | * Emitted when the type description this device has changed |
52 | */ |
53 | void permanentHardwareAddressChanged(const QString &permHwAddress); |
54 | |
55 | private: |
56 | Q_DECLARE_PRIVATE(GenericDevice) |
57 | }; |
58 | |
59 | } |
60 | |
61 | #endif // NETWORKMANAGERQT_GENERICDEVICE_H |
62 | |