1/*
2 SPDX-FileCopyrightText: 2008, 2011 Will Stephenson <wstephenson@kde.org>
3 SPDX-FileCopyrightText: 2011-2013 Lamarque V. Souza <lamarque@kde.org>
4 SPDX-FileCopyrightText: 2013 Jan Grulich <jgrulich@redhat.com>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#ifndef NETWORKMANAGERQT_WIREDDEVICE_H
10#define NETWORKMANAGERQT_WIREDDEVICE_H
11
12#include <networkmanagerqt/networkmanagerqt_export.h>
13
14#include "device.h"
15
16namespace NetworkManager
17{
18class WiredDevicePrivate;
19
20/*!
21 * \class NetworkManager::WiredDevice
22 * \inheaderfile NetworkManagerQt/WiredDevice
23 * \inmodule NetworkManagerQt
24 *
25 * \brief A wired device interface.
26 */
27class NETWORKMANAGERQT_EXPORT WiredDevice : public Device
28{
29 Q_OBJECT
30
31 /*!
32 * \property NetworkManager::WiredDevice::hardwareAddress
33 */
34 Q_PROPERTY(QString hardwareAddress READ hardwareAddress)
35
36 /*!
37 * \property NetworkManager::WiredDevice::permanentHardwareAddress
38 */
39 Q_PROPERTY(QString permanentHardwareAddress READ permanentHardwareAddress)
40
41 /*!
42 * \property NetworkManager::WiredDevice::carrier
43 */
44 Q_PROPERTY(bool carrier READ carrier NOTIFY carrierChanged)
45
46 /*!
47 * \property NetworkManager::WiredDevice::bitRate
48 */
49 Q_PROPERTY(int bitRate READ bitRate NOTIFY bitRateChanged)
50
51 /*!
52 * \property NetworkManager::WiredDevice::s390SubChannels
53 */
54 Q_PROPERTY(QStringList s390SubChannels READ s390SubChannels NOTIFY s390SubChannelsChanged)
55
56public:
57 /*!
58 * \typedef NetworkManager::WiredDevice::Ptr
59 */
60 typedef QSharedPointer<WiredDevice> Ptr;
61 /*!
62 * \typedef NetworkManager::WiredDevice::List
63 */
64 typedef QList<Ptr> List;
65 /*!
66 */
67 explicit WiredDevice(const QString &path, QObject *parent = nullptr);
68 ~WiredDevice() override;
69 /*!
70 * Return the type
71 */
72 Type type() const override;
73 /*!
74 * Active hardware address of the device
75 */
76 QString hardwareAddress() const;
77 /*!
78 * Permanent hardware address of the device
79 */
80 QString permanentHardwareAddress() const;
81 /*!
82 * Design speed of the device, in megabits/second (Mb/s)
83 */
84 int bitRate() const;
85 /*!
86 * Indicates whether the physical carrier is found (e.g. whether a cable is plugged in or not)
87 */
88 bool carrier() const;
89 /*!
90 * Array of S/390 subchannels for S/390 or z/Architecture devices
91 */
92 QStringList s390SubChannels() const;
93
94Q_SIGNALS:
95 /*!
96 * Emitted when the design speed of the device has changed
97 */
98 void bitRateChanged(int bitRate);
99 /*!
100 * Emitted when the carrier of this device has changed
101 */
102 void carrierChanged(bool plugged);
103 /*!
104 * Emitted when the hardware address of this device has changed
105 */
106 void hardwareAddressChanged(const QString &hwAddress);
107 /*!
108 * Emitted when the permanent hardware address of this device has changed
109 */
110 void permanentHardwareAddressChanged(const QString &permHwAddress);
111 /*!
112 * Emitted when the array of s390SubChannels has changed
113 */
114 void s390SubChannelsChanged(const QStringList &channels);
115
116private:
117 Q_DECLARE_PRIVATE(WiredDevice)
118};
119
120}
121
122#endif // NETWORKMANAGERQT_WIREDDEVICE_H
123

source code of networkmanager-qt/src/wireddevice.h