NetworkManagerQt

wireddevice.h
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 * A wired device interface
22 */
23class NETWORKMANAGERQT_EXPORT WiredDevice : public Device
24{
25 Q_OBJECT
26 Q_PROPERTY(QString hardwareAddress READ hardwareAddress)
27 Q_PROPERTY(QString permanentHardwareAddress READ permanentHardwareAddress)
28 Q_PROPERTY(bool carrier READ carrier NOTIFY carrierChanged)
29 Q_PROPERTY(int bitRate READ bitRate NOTIFY bitRateChanged)
30 Q_PROPERTY(QStringList s390SubChannels READ s390SubChannels NOTIFY s390SubChannelsChanged)
31
32public:
34 typedef QList<Ptr> List;
35 explicit WiredDevice(const QString &path, QObject *parent = nullptr);
36 ~WiredDevice() override;
37 /**
38 * Return the type
39 */
40 Type type() const override;
41 /**
42 * Active hardware address of the device
43 */
44 QString hardwareAddress() const;
45 /**
46 * Permanent hardware address of the device
47 */
48 QString permanentHardwareAddress() const;
49 /**
50 * Design speed of the device, in megabits/second (Mb/s)
51 */
52 int bitRate() const;
53 /**
54 * Indicates whether the physical carrier is found (e.g. whether a cable is plugged in or not)
55 */
56 bool carrier() const;
57 /**
58 * Array of S/390 subchannels for S/390 or z/Architecture devices
59 */
60 QStringList s390SubChannels() const;
61
62Q_SIGNALS:
63 /**
64 * Emitted when the design speed of the device has changed
65 */
66 void bitRateChanged(int bitRate);
67 /**
68 * Emitted when the carrier of this device has changed
69 */
70 void carrierChanged(bool plugged);
71 /**
72 * Emitted when the hardware address of this device has changed
73 */
74 void hardwareAddressChanged(const QString &hwAddress);
75 /**
76 * Emitted when the permanent hardware address of this device has changed
77 */
78 void permanentHardwareAddressChanged(const QString &permHwAddress);
79 /*
80 * Emitted when the array of s390SubChannels has changed
81 */
82 void s390SubChannelsChanged(const QStringList &channels);
83
84private:
85 Q_DECLARE_PRIVATE(WiredDevice)
86};
87
88}
89
90#endif // NETWORKMANAGERQT_WIREDDEVICE_H
This class represents a common device interface.
Definition device.h:34
Type
Device type.
Definition device.h:191
A wired device interface.
Definition wireddevice.h:24
void bitRateChanged(int bitRate)
Emitted when the design speed of the device has changed.
void permanentHardwareAddressChanged(const QString &permHwAddress)
Emitted when the permanent hardware address of this device has changed.
void hardwareAddressChanged(const QString &hwAddress)
Emitted when the hardware address of this device has changed.
void carrierChanged(bool plugged)
Emitted when the carrier of this device has changed.
This class allows querying the underlying system to discover the available network interfaces and rea...
Definition accesspoint.h:21
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.