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_TEAM_PORT_SETTING_H |
8 | #define NETWORKMANAGERQT_TEAM_PORT_SETTING_H |
9 | |
10 | #include "setting.h" |
11 | #include <networkmanagerqt/networkmanagerqt_export.h> |
12 | |
13 | #include <QString> |
14 | |
15 | namespace NetworkManager |
16 | { |
17 | class TeamPortSettingPrivate; |
18 | |
19 | /*! |
20 | * \class NetworkManager::TeamPortSetting |
21 | * \inheaderfile NetworkManagerQt/TeamPortSetting |
22 | * \inmodule NetworkManagerQt |
23 | * |
24 | * \brief Represents TeamPort setting. |
25 | */ |
26 | class NETWORKMANAGERQT_EXPORT TeamPortSetting : public Setting |
27 | { |
28 | public: |
29 | /*! |
30 | * \typedef NetworkManager::TeamPortSetting::Ptr |
31 | */ |
32 | typedef QSharedPointer<TeamPortSetting> Ptr; |
33 | /*! |
34 | * \typedef NetworkManager::TeamPortSetting::List |
35 | */ |
36 | typedef QList<Ptr> List; |
37 | |
38 | /*! |
39 | */ |
40 | TeamPortSetting(); |
41 | /*! |
42 | */ |
43 | explicit TeamPortSetting(const Ptr &other); |
44 | ~TeamPortSetting() override; |
45 | |
46 | QString name() const override; |
47 | |
48 | /*! |
49 | */ |
50 | void config(const QString &config); |
51 | /*! |
52 | */ |
53 | QString config() const; |
54 | |
55 | /*! |
56 | */ |
57 | void lacpKey(qint32 key); |
58 | /*! |
59 | */ |
60 | qint32 lacpKey() const; |
61 | |
62 | /*! |
63 | */ |
64 | void lacpPrio(qint32 priority); |
65 | /*! |
66 | */ |
67 | qint32 lacpPrio() const; |
68 | |
69 | /*! |
70 | */ |
71 | void prio(qint32 prio); |
72 | /*! |
73 | */ |
74 | qint32 prio() const; |
75 | |
76 | /*! |
77 | */ |
78 | void queueId(qint32 id); |
79 | /*! |
80 | */ |
81 | qint32 queueId() const; |
82 | |
83 | /*! |
84 | */ |
85 | void sticky(bool sticky); |
86 | /*! |
87 | */ |
88 | bool sticky() const; |
89 | |
90 | /*! |
91 | */ |
92 | void setLinkWatchers(const NMVariantMapList &linkWatchers); |
93 | /*! |
94 | */ |
95 | NMVariantMapList linkWatchers() const; |
96 | |
97 | void fromMap(const QVariantMap &setting) override; |
98 | |
99 | QVariantMap toMap() const override; |
100 | |
101 | protected: |
102 | TeamPortSettingPrivate *d_ptr; |
103 | |
104 | private: |
105 | Q_DECLARE_PRIVATE(TeamPortSetting) |
106 | }; |
107 | |
108 | NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const TeamPortSetting &setting); |
109 | |
110 | } |
111 | |
112 | #endif // NETWORKMANAGERQT_TEAM_PORT_SETTING_H |
113 | |