| 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 | |
| 15 | namespace NetworkManager |
| 16 | { |
| 17 | class InfinibandSettingPrivate; |
| 18 | |
| 19 | /*! |
| 20 | * \class NetworkManager::InfinibandSetting |
| 21 | * \inheaderfile NetworkManagerQt/InfinibandSetting |
| 22 | * \inmodule NetworkManagerQt |
| 23 | * |
| 24 | * \brief Represents infiniband setting. |
| 25 | */ |
| 26 | class NETWORKMANAGERQT_EXPORT InfinibandSetting : public Setting |
| 27 | { |
| 28 | public: |
| 29 | /*! |
| 30 | * \typedef NetworkManager::InfinibandSetting::Ptr |
| 31 | */ |
| 32 | typedef QSharedPointer<InfinibandSetting> Ptr; |
| 33 | /*! |
| 34 | * \typedef NetworkManager::InfinibandSetting::List |
| 35 | */ |
| 36 | typedef QList<Ptr> List; |
| 37 | /*! |
| 38 | * |
| 39 | * \value Unknown |
| 40 | * \value Datagram |
| 41 | * \value Connected |
| 42 | */ |
| 43 | enum TransportMode { |
| 44 | Unknown = 0, |
| 45 | Datagram, |
| 46 | Connected, |
| 47 | }; |
| 48 | |
| 49 | /*! |
| 50 | */ |
| 51 | InfinibandSetting(); |
| 52 | /*! |
| 53 | */ |
| 54 | explicit InfinibandSetting(const Ptr &other); |
| 55 | ~InfinibandSetting() override; |
| 56 | |
| 57 | QString name() const override; |
| 58 | |
| 59 | /*! |
| 60 | */ |
| 61 | void setMacAddress(const QByteArray &address); |
| 62 | /*! |
| 63 | */ |
| 64 | QByteArray macAddress() const; |
| 65 | |
| 66 | /*! |
| 67 | */ |
| 68 | void setMtu(quint32 mtu); |
| 69 | /*! |
| 70 | */ |
| 71 | quint32 mtu() const; |
| 72 | |
| 73 | /*! |
| 74 | */ |
| 75 | void setTransportMode(TransportMode mode); |
| 76 | /*! |
| 77 | */ |
| 78 | TransportMode transportMode() const; |
| 79 | |
| 80 | /*! |
| 81 | */ |
| 82 | void setPKey(qint32 key); |
| 83 | /*! |
| 84 | */ |
| 85 | qint32 pKey() const; |
| 86 | |
| 87 | /*! |
| 88 | */ |
| 89 | void setParent(const QString &parent); |
| 90 | /*! |
| 91 | */ |
| 92 | QString parent() const; |
| 93 | |
| 94 | void fromMap(const QVariantMap &setting) override; |
| 95 | |
| 96 | QVariantMap toMap() const override; |
| 97 | |
| 98 | protected: |
| 99 | InfinibandSettingPrivate *d_ptr; |
| 100 | |
| 101 | private: |
| 102 | Q_DECLARE_PRIVATE(InfinibandSetting) |
| 103 | }; |
| 104 | |
| 105 | NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const InfinibandSetting &setting); |
| 106 | |
| 107 | } |
| 108 | |
| 109 | #endif // NETWORKMANAGERQT_INFINIBAND_SETTING_H |
| 110 | |