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 NETWORKMANAGERQT_OVS_BRIDGE_SETTING_H |
8 | #define NETWORKMANAGERQT_OVS_BRIDGE_SETTING_H |
9 | |
10 | #include "setting.h" |
11 | #include <networkmanagerqt/networkmanagerqt_export.h> |
12 | |
13 | #include <QString> |
14 | |
15 | namespace NetworkManager |
16 | { |
17 | class OvsBridgeSettingPrivate; |
18 | |
19 | /*! |
20 | * \class NetworkManager::OvsBridgeSetting |
21 | * \inheaderfile NetworkManagerQt/OvsBridgeSetting |
22 | * \inmodule NetworkManagerQt |
23 | * |
24 | * \brief Represents ovs-bridge setting. |
25 | */ |
26 | class NETWORKMANAGERQT_EXPORT OvsBridgeSetting : public Setting |
27 | { |
28 | public: |
29 | /*! |
30 | * \typedef NetworkManager::OvsBridgeSetting::Ptr |
31 | */ |
32 | typedef QSharedPointer<OvsBridgeSetting> Ptr; |
33 | /*! |
34 | * \typedef NetworkManager::OvsBridgeSetting::List |
35 | */ |
36 | typedef QList<Ptr> List; |
37 | |
38 | /*! |
39 | */ |
40 | OvsBridgeSetting(); |
41 | /*! |
42 | */ |
43 | explicit OvsBridgeSetting(const Ptr &other); |
44 | ~OvsBridgeSetting() override; |
45 | |
46 | QString name() const override; |
47 | |
48 | /*! |
49 | */ |
50 | void setMcastSnoopingEnable(bool mcastSnoopingEnable); |
51 | /*! |
52 | */ |
53 | bool mcastSnoopingEnable() const; |
54 | |
55 | /*! |
56 | */ |
57 | void setRstpEnable(bool rstpEnable); |
58 | /*! |
59 | */ |
60 | bool rstpEnable() const; |
61 | |
62 | /*! |
63 | */ |
64 | void setStpEnable(bool stpEnable); |
65 | /*! |
66 | */ |
67 | bool stpEnable() const; |
68 | |
69 | /*! |
70 | */ |
71 | void setFailMode(const QString &mode); |
72 | /*! |
73 | */ |
74 | QString failMode() const; |
75 | |
76 | void fromMap(const QVariantMap &setting) override; |
77 | |
78 | QVariantMap toMap() const override; |
79 | |
80 | protected: |
81 | OvsBridgeSettingPrivate *d_ptr; |
82 | |
83 | private: |
84 | Q_DECLARE_PRIVATE(OvsBridgeSetting) |
85 | }; |
86 | |
87 | NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const OvsBridgeSetting &setting); |
88 | |
89 | } |
90 | |
91 | #endif // NETWORKMANAGERQT_OVS_BRIDGE_SETTING_H |
92 | |