| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2018 Pranav Gade <pranavgade20@gmail.com> |
| 3 | |
| 4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 5 | */ |
| 6 | |
| 7 | #ifndef NETWORKMANAGERQTOVS_PORT_SETTING_H |
| 8 | #define NETWORKMANAGERQTOVS_PORT_SETTING_H |
| 9 | |
| 10 | #include "setting.h" |
| 11 | #include <networkmanagerqt/networkmanagerqt_export.h> |
| 12 | |
| 13 | namespace NetworkManager |
| 14 | { |
| 15 | class OvsPortSettingPrivate; |
| 16 | |
| 17 | /*! |
| 18 | * \class NetworkManager::OvsPortSetting |
| 19 | * \inheaderfile NetworkManagerQt/OvsPortSetting |
| 20 | * \inmodule NetworkManagerQt |
| 21 | * |
| 22 | * \brief Represents o setting. |
| 23 | */ |
| 24 | class NETWORKMANAGERQT_EXPORT OvsPortSetting : public Setting |
| 25 | { |
| 26 | public: |
| 27 | /*! |
| 28 | * \typedef NetworkManager::OvsPortSetting::Ptr |
| 29 | */ |
| 30 | typedef QSharedPointer<OvsPortSetting> Ptr; |
| 31 | /*! |
| 32 | * \typedef NetworkManager::OvsPortSetting::List |
| 33 | */ |
| 34 | typedef QList<Ptr> List; |
| 35 | |
| 36 | /*! |
| 37 | */ |
| 38 | OvsPortSetting(); |
| 39 | /*! |
| 40 | */ |
| 41 | explicit OvsPortSetting(const Ptr &other); |
| 42 | ~OvsPortSetting() override; |
| 43 | |
| 44 | QString name() const override; |
| 45 | |
| 46 | /*! |
| 47 | */ |
| 48 | void setBondDowndelay(quint32 delay); |
| 49 | /*! |
| 50 | */ |
| 51 | quint32 bondDowndelay() const; |
| 52 | |
| 53 | /*! |
| 54 | */ |
| 55 | void setBondUpdelay(quint32 delay); |
| 56 | /*! |
| 57 | */ |
| 58 | quint32 bondUpdelay() const; |
| 59 | |
| 60 | /*! |
| 61 | */ |
| 62 | void setTag(quint32 tag); |
| 63 | /*! |
| 64 | */ |
| 65 | quint32 tag() const; |
| 66 | |
| 67 | /*! |
| 68 | */ |
| 69 | void setBondMode(const QString &mode); |
| 70 | /*! |
| 71 | */ |
| 72 | QString bondMode() const; |
| 73 | |
| 74 | /*! |
| 75 | */ |
| 76 | void setLacp(const QString &lacp); |
| 77 | /*! |
| 78 | */ |
| 79 | QString lacp() const; |
| 80 | |
| 81 | /*! |
| 82 | */ |
| 83 | void setVlanMode(const QString &mode); |
| 84 | /*! |
| 85 | */ |
| 86 | QString vlanMode() const; |
| 87 | |
| 88 | void fromMap(const QVariantMap &setting) override; |
| 89 | |
| 90 | QVariantMap toMap() const override; |
| 91 | |
| 92 | protected: |
| 93 | OvsPortSettingPrivate *d_ptr; |
| 94 | |
| 95 | private: |
| 96 | Q_DECLARE_PRIVATE(OvsPortSetting) |
| 97 | }; |
| 98 | |
| 99 | NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const OvsPortSetting &setting); |
| 100 | |
| 101 | } |
| 102 | |
| 103 | #endif // NETWORKMANAGERQT_OVS_PORT_SETTING_H |
| 104 | |