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 | * \class NetworkManager::BridgePortSetting |
21 | * \inheaderfile NetworkManagerQt/BridgePortSetting |
22 | * \inmodule NetworkManagerQt |
23 | * |
24 | * \brief Represents bridge port setting. |
25 | */ |
26 | class NETWORKMANAGERQT_EXPORT BridgePortSetting : public Setting |
27 | { |
28 | public: |
29 | /*! |
30 | * \typedef NetworkManager::BridgePortSetting::Ptr |
31 | */ |
32 | typedef QSharedPointer<BridgePortSetting> Ptr; |
33 | /*! |
34 | * \typedef NetworkManager::BridgePortSetting::List |
35 | */ |
36 | typedef QList<Ptr> List; |
37 | /*! |
38 | */ |
39 | BridgePortSetting(); |
40 | /*! |
41 | */ |
42 | explicit BridgePortSetting(const Ptr &other); |
43 | ~BridgePortSetting() override; |
44 | |
45 | QString name() const override; |
46 | |
47 | /*! |
48 | */ |
49 | void setPriority(quint32 priority); |
50 | /*! |
51 | */ |
52 | quint32 priority() const; |
53 | |
54 | /*! |
55 | */ |
56 | void setPathCost(quint32 cost); |
57 | /*! |
58 | */ |
59 | quint32 pathCost() const; |
60 | |
61 | /*! |
62 | */ |
63 | void setHairpinMode(bool enable); |
64 | /*! |
65 | */ |
66 | bool hairpinMode() const; |
67 | |
68 | void fromMap(const QVariantMap &setting) override; |
69 | |
70 | QVariantMap toMap() const override; |
71 | |
72 | protected: |
73 | BridgePortSettingPrivate *d_ptr; |
74 | |
75 | private: |
76 | Q_DECLARE_PRIVATE(BridgePortSetting) |
77 | }; |
78 | |
79 | NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const BridgePortSetting &setting); |
80 | |
81 | } |
82 | |
83 | #endif // NETWORKMANAGERQT_BRIDGEPORT_SETTING_H |
84 | |