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 | * \class NetworkManager::GenericDevice |
20 | * \inheaderfile NetworkManagerQt/GenericDevice |
21 | * \inmodule NetworkManagerQt |
22 | * |
23 | * \brief A generic device interface. |
24 | */ |
25 | class NETWORKMANAGERQT_EXPORT GenericDevice : public Device |
26 | { |
27 | Q_OBJECT |
28 | |
29 | /*! |
30 | * \property NetworkManager::GenericDevice::hardwareAddress |
31 | */ |
32 | Q_PROPERTY(QString hardwareAddress READ hardwareAddress) |
33 | |
34 | /*! |
35 | * \property NetworkManager::GenericDevice::typeDescription |
36 | */ |
37 | Q_PROPERTY(QString typeDescription READ typeDescription) |
38 | |
39 | public: |
40 | /*! |
41 | * \typedef NetworkManager::GenericDevice::Ptr |
42 | */ |
43 | typedef QSharedPointer<GenericDevice> Ptr; |
44 | /*! |
45 | * \typedef NetworkManager::GenericDevice::List |
46 | */ |
47 | typedef QList<Ptr> List; |
48 | /*! |
49 | */ |
50 | explicit GenericDevice(const QString &path, QObject *parent = nullptr); |
51 | ~GenericDevice() override; |
52 | /*! |
53 | * Return the type |
54 | */ |
55 | Type type() const override; |
56 | /*! |
57 | * Active hardware address of the device |
58 | */ |
59 | QString hardwareAddress() const; |
60 | /*! |
61 | * A (non-localized) description of the interface type, if known. |
62 | */ |
63 | QString typeDescription() const; |
64 | |
65 | Q_SIGNALS: |
66 | /*! |
67 | * Emitted when the hardware address of this device has changed |
68 | */ |
69 | void hardwareAddressChanged(const QString &hwAddress); |
70 | /*! |
71 | * Emitted when the type description this device has changed |
72 | */ |
73 | void permanentHardwareAddressChanged(const QString &permHwAddress); |
74 | |
75 | private: |
76 | Q_DECLARE_PRIVATE(GenericDevice) |
77 | }; |
78 | |
79 | } |
80 | |
81 | #endif // NETWORKMANAGERQT_GENERICDEVICE_H |
82 | |