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 | * Represents OvsPort setting |
19 | */ |
20 | class NETWORKMANAGERQT_EXPORT OvsPortSetting : public Setting |
21 | { |
22 | public: |
23 | typedef QSharedPointer<OvsPortSetting> Ptr; |
24 | typedef QList<Ptr> List; |
25 | |
26 | OvsPortSetting(); |
27 | explicit OvsPortSetting(const Ptr &other); |
28 | ~OvsPortSetting() override; |
29 | |
30 | QString name() const override; |
31 | |
32 | void setBondDowndelay(quint32 delay); |
33 | quint32 bondDowndelay() const; |
34 | |
35 | void setBondUpdelay(quint32 delay); |
36 | quint32 bondUpdelay() const; |
37 | |
38 | void setTag(quint32 tag); |
39 | quint32 tag() const; |
40 | |
41 | void setBondMode(const QString &mode); |
42 | QString bondMode() const; |
43 | |
44 | void setLacp(const QString &lacp); |
45 | QString lacp() const; |
46 | |
47 | void setVlanMode(const QString &mode); |
48 | QString vlanMode() const; |
49 | |
50 | void fromMap(const QVariantMap &setting) override; |
51 | |
52 | QVariantMap toMap() const override; |
53 | |
54 | protected: |
55 | OvsPortSettingPrivate *d_ptr; |
56 | |
57 | private: |
58 | Q_DECLARE_PRIVATE(OvsPortSetting) |
59 | }; |
60 | |
61 | NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const OvsPortSetting &setting); |
62 | |
63 | } |
64 | |
65 | #endif // NETWORKMANAGERQT_OVS_PORT_SETTING_H |
66 | |