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_TC_SETTING_H |
8 | #define NETWORKMANAGERQT_TC_SETTING_H |
9 | |
10 | #include "setting.h" |
11 | #include <networkmanagerqt/networkmanagerqt_export.h> |
12 | |
13 | namespace NetworkManager |
14 | { |
15 | class TcSettingPrivate; |
16 | |
17 | /** |
18 | * Represents Tc setting |
19 | */ |
20 | class NETWORKMANAGERQT_EXPORT TcSetting : public Setting |
21 | { |
22 | public: |
23 | typedef QSharedPointer<TcSetting> Ptr; |
24 | typedef QList<Ptr> List; |
25 | |
26 | TcSetting(); |
27 | explicit TcSetting(const Ptr &other); |
28 | ~TcSetting() override; |
29 | |
30 | QString name() const override; |
31 | |
32 | void setQdiscs(const NMVariantMapList &qdiscs); |
33 | NMVariantMapList qdiscs() const; |
34 | |
35 | void setTfilters(const NMVariantMapList &tfilters); |
36 | NMVariantMapList tfilters() const; |
37 | |
38 | void fromMap(const QVariantMap &setting) override; |
39 | |
40 | QVariantMap toMap() const override; |
41 | |
42 | protected: |
43 | TcSettingPrivate *d_ptr; |
44 | |
45 | private: |
46 | Q_DECLARE_PRIVATE(TcSetting) |
47 | }; |
48 | |
49 | NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const TcSetting &setting); |
50 | |
51 | } |
52 | |
53 | #endif // NETWORKMANAGERQT_TC_SETTING_H |
54 | |