1/*
2 SPDX-FileCopyrightText: 2013 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_INFINIBAND_DEVICE_H
8#define NETWORKMANAGERQT_INFINIBAND_DEVICE_H
9
10#include "device.h"
11#include <networkmanagerqt/networkmanagerqt_export.h>
12
13namespace NetworkManager
14{
15class InfinibandDevicePrivate;
16
17/*!
18 * \class NetworkManager::InfinibandDevice
19 * \inheaderfile NetworkManagerQt/InfinibandDevice
20 * \inmodule NetworkManagerQt
21 *
22 * \brief An infiniband device interface.
23 */
24class NETWORKMANAGERQT_EXPORT InfinibandDevice : public Device
25{
26 Q_OBJECT
27
28 /*!
29 * \property NetworkManager::InfinibandDevice::carrier
30 */
31 Q_PROPERTY(bool carrier READ carrier NOTIFY carrierChanged)
32
33 /*!
34 * \property NetworkManager::InfinibandDevice::hwAddress
35 */
36 Q_PROPERTY(QString hwAddress READ hwAddress NOTIFY hwAddressChanged)
37
38public:
39 /*!
40 * \typedef NetworkManager::InfinibandDevice::Ptr
41 */
42 typedef QSharedPointer<InfinibandDevice> Ptr;
43 /*!
44 * \typedef NetworkManager::InfinibandDevice::List
45 */
46 typedef QList<Ptr> List;
47 /*!
48 */
49 explicit InfinibandDevice(const QString &path, QObject *parent = nullptr);
50 ~InfinibandDevice() override;
51
52 Type type() const override;
53
54 /*!
55 * Indicates whether the physical carrier is found
56 */
57 bool carrier() const;
58 /*!
59 * Hardware address of the device
60 */
61 QString hwAddress() const;
62
63Q_SIGNALS:
64 /*!
65 * Emitted when the carrier of this device has changed
66 */
67 void carrierChanged(bool plugged);
68 /*!
69 * Emitted when the hardware address of this device has changed
70 */
71 void hwAddressChanged(const QString &address);
72
73private:
74 Q_DECLARE_PRIVATE(InfinibandDevice)
75};
76
77}
78
79#endif
80

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