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_BRIDGEPORT_SETTING_H |
8 | #define NETWORKMANAGERQT_BRIDGEPORT_SETTING_H |
9 | |
10 | #include "setting.h" |
11 | #include <networkmanagerqt/networkmanagerqt_export.h> |
12 | |
13 | #include <QString> |
14 | |
15 | namespace NetworkManager |
16 | { |
17 | class BridgePortSettingPrivate; |
18 | |
19 | /** |
20 | * Represents bridge port setting |
21 | */ |
22 | class NETWORKMANAGERQT_EXPORT BridgePortSetting : public Setting |
23 | { |
24 | public: |
25 | typedef QSharedPointer<BridgePortSetting> Ptr; |
26 | typedef QList<Ptr> List; |
27 | BridgePortSetting(); |
28 | explicit BridgePortSetting(const Ptr &other); |
29 | ~BridgePortSetting() override; |
30 | |
31 | QString name() const override; |
32 | |
33 | void setPriority(quint32 priority); |
34 | quint32 priority() const; |
35 | |
36 | void setPathCost(quint32 cost); |
37 | quint32 pathCost() const; |
38 | |
39 | void setHairpinMode(bool enable); |
40 | bool hairpinMode() const; |
41 | |
42 | void fromMap(const QVariantMap &setting) override; |
43 | |
44 | QVariantMap toMap() const override; |
45 | |
46 | protected: |
47 | BridgePortSettingPrivate *d_ptr; |
48 | |
49 | private: |
50 | Q_DECLARE_PRIVATE(BridgePortSetting) |
51 | }; |
52 | |
53 | NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const BridgePortSetting &setting); |
54 | |
55 | } |
56 | |
57 | #endif // NETWORKMANAGERQT_BRIDGEPORT_SETTING_H |
58 | |