NetworkManagerQt

teamdevice.h
1 /*
2  SPDX-FileCopyrightText: 2013 Lukáš Tinkl <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 
7 #ifndef NETWORKMANAGERQT_TEAM_DEVICE_H
8 #define NETWORKMANAGERQT_TEAM_DEVICE_H
9 
10 #include "device.h"
11 #include <networkmanagerqt/networkmanagerqt_export.h>
12 
13 namespace NetworkManager
14 {
15 class TeamDevicePrivate;
16 
17 /**
18  * A team device interface
19  */
20 class NETWORKMANAGERQT_EXPORT TeamDevice : public Device
21 {
22  Q_OBJECT
23  Q_PROPERTY(bool carrier READ carrier NOTIFY carrierChanged)
24  Q_PROPERTY(QString hwAddress READ hwAddress NOTIFY hwAddressChanged)
25  Q_PROPERTY(QStringList slaves READ slaves NOTIFY slavesChanged)
26  Q_PROPERTY(QString config READ config NOTIFY configChanged)
27 
28 public:
30  typedef QList<Ptr> List;
31 
32  explicit TeamDevice(const QString &path, QObject *parent = nullptr);
33  ~TeamDevice() override;
34 
35  Type type() const override;
36 
37  /**
38  * Indicates whether the physical carrier is found
39  */
40  bool carrier() const;
41  /**
42  * Hardware address of the device
43  */
44  QString hwAddress() const;
45 
46  /**
47  * Devices which are currently slaved to this device
48  */
49  QStringList slaves() const;
50 
51  /**
52  * The JSON configuration currently applied on the device.
53  */
54  QString config() const;
55 
56 Q_SIGNALS:
57  /**
58  * Emitted when the carrier of this device has changed
59  */
60  void carrierChanged(bool plugged);
61  /**
62  * Emitted when the hardware address of this device has changed
63  */
64  void hwAddressChanged(const QString &address);
65 
66  /**
67  * Emitted when the list of devices slaved to this device has changed
68  */
69  void slavesChanged(const QStringList &slaves);
70 
71  /**
72  * Emitted when the JSON confugration which is currently applied has changed
73  */
74  void configChanged(const QString &config);
75 
76 private:
77  Q_DECLARE_PRIVATE(TeamDevice)
78 };
79 
80 }
81 
82 #endif
This class represents a common device interface.
Definition: device.h:33
A team device interface.
Definition: teamdevice.h:20
This class allows querying the underlying system to discover the available network interfaces and rea...
Definition: accesspoint.h:20
Type
Device type.
Definition: device.h:177
KSharedConfigPtr config()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 03:59:36 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.