1/*
2 SPDX-FileCopyrightText: 2012-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_SETTING_H
8#define NETWORKMANAGERQT_INFINIBAND_SETTING_H
9
10#include "setting.h"
11#include <networkmanagerqt/networkmanagerqt_export.h>
12
13#include <QString>
14
15namespace NetworkManager
16{
17class InfinibandSettingPrivate;
18
19/**
20 * Represents infiniband setting
21 */
22class NETWORKMANAGERQT_EXPORT InfinibandSetting : public Setting
23{
24public:
25 typedef QSharedPointer<InfinibandSetting> Ptr;
26 typedef QList<Ptr> List;
27 enum TransportMode {
28 Unknown = 0,
29 Datagram,
30 Connected,
31 };
32
33 InfinibandSetting();
34 explicit InfinibandSetting(const Ptr &other);
35 ~InfinibandSetting() override;
36
37 QString name() const override;
38
39 void setMacAddress(const QByteArray &address);
40 QByteArray macAddress() const;
41
42 void setMtu(quint32 mtu);
43 quint32 mtu() const;
44
45 void setTransportMode(TransportMode mode);
46 TransportMode transportMode() const;
47
48 void setPKey(qint32 key);
49 qint32 pKey() const;
50
51 void setParent(const QString &parent);
52 QString parent() const;
53
54 void fromMap(const QVariantMap &setting) override;
55
56 QVariantMap toMap() const override;
57
58protected:
59 InfinibandSettingPrivate *d_ptr;
60
61private:
62 Q_DECLARE_PRIVATE(InfinibandSetting)
63};
64
65NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const InfinibandSetting &setting);
66
67}
68
69#endif // NETWORKMANAGERQT_INFINIBAND_SETTING_H
70

source code of networkmanager-qt/src/settings/infinibandsetting.h