Changeset View
Changeset View
Standalone View
Standalone View
src/settings/teamportsetting.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | Copyright 2018 Pranav Gade <pranavgade20@gmail.com> | ||||
3 | | ||||
4 | This library is free software; you can redistribute it and/or | ||||
5 | modify it under the terms of the GNU Lesser General Public | ||||
6 | License as published by the Free Software Foundation; either | ||||
7 | version 2.1 of the License, or (at your option) version 3, or any | ||||
8 | later version accepted by the membership of KDE e.V. (or its | ||||
9 | successor approved by the membership of KDE e.V.), which shall | ||||
10 | act as a proxy defined in Section 6 of version 3 of the license. | ||||
11 | | ||||
12 | This library is distributed in the hope that it will be useful, | ||||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
15 | Lesser General Public License for more details. | ||||
16 | | ||||
17 | You should have received a copy of the GNU Lesser General Public | ||||
18 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||||
19 | */ | ||||
20 | | ||||
21 | #ifndef NETWORKMANAGERQT_TEAM_PORT_SETTING_H | ||||
22 | #define NETWORKMANAGERQT_TEAM_PORT_SETTING_H | ||||
23 | | ||||
24 | #include <networkmanagerqt/networkmanagerqt_export.h> | ||||
25 | #include "setting.h" | ||||
26 | | ||||
27 | #include <QString> | ||||
28 | | ||||
29 | namespace NetworkManager | ||||
30 | { | ||||
31 | | ||||
32 | class TeamPortSettingPrivate; | ||||
33 | | ||||
34 | /** | ||||
35 | * Represents TeamPort setting | ||||
36 | */ | ||||
37 | class NETWORKMANAGERQT_EXPORT TeamPortSetting : public Setting | ||||
38 | { | ||||
39 | public: | ||||
40 | typedef QSharedPointer<TeamPortSetting> Ptr; | ||||
41 | typedef QList<Ptr> List; | ||||
42 | | ||||
43 | TeamPortSetting(); | ||||
44 | explicit TeamPortSetting(const Ptr &other); | ||||
45 | ~TeamPortSetting() override; | ||||
46 | | ||||
47 | QString name() const override; | ||||
48 | | ||||
49 | void config(QString config); | ||||
50 | QString config() const; | ||||
51 | | ||||
52 | void lacpKey(qint32 key); | ||||
53 | qint32 lacpKey() const; | ||||
54 | | ||||
55 | void lacpPrio(qint32 priority); | ||||
56 | qint32 lacpPrio() const; | ||||
57 | | ||||
58 | void prio(qint32 prio); | ||||
59 | qint32 prio() const; | ||||
60 | | ||||
61 | void queueId(qint32 id); | ||||
62 | qint32 queueId() const; | ||||
63 | | ||||
64 | void sticky(bool sticky); | ||||
65 | bool sticky() const; | ||||
66 | | ||||
67 | void setLinkWatchers(const NMVariantMapList &linkWatchers); | ||||
68 | NMVariantMapList linkWatchers() const; | ||||
69 | | ||||
70 | void fromMap(const QVariantMap &setting) override; | ||||
71 | | ||||
72 | QVariantMap toMap() const override; | ||||
73 | | ||||
74 | protected: | ||||
75 | TeamPortSettingPrivate *d_ptr; | ||||
76 | | ||||
77 | private: | ||||
78 | Q_DECLARE_PRIVATE(TeamPortSetting) | ||||
79 | }; | ||||
80 | | ||||
81 | NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const TeamPortSetting &setting); | ||||
82 | | ||||
83 | } | ||||
84 | | ||||
85 | #endif // NETWORKMANAGERQT_TEAM_PORT_SETTING_H | ||||
86 | |