1/*
2 SPDX-FileCopyrightText: 2016 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_TUN_SETTING_H
8#define NETWORKMANAGERQT_TUN_SETTING_H
9
10#include "setting.h"
11#include <networkmanagerqt/networkmanagerqt_export.h>
12
13#include <QString>
14
15namespace NetworkManager
16{
17class TunSettingPrivate;
18
19/**
20 * Represents generic setting
21 */
22class NETWORKMANAGERQT_EXPORT TunSetting : public Setting
23{
24public:
25 typedef QSharedPointer<TunSetting> Ptr;
26 typedef QList<Ptr> List;
27 enum Mode {
28 Tun,
29 Tap,
30 };
31
32 TunSetting();
33 explicit TunSetting(const Ptr &other);
34 ~TunSetting() override;
35
36 QString name() const override;
37
38 void setGroup(const QString &group);
39 QString group() const;
40
41 void setMode(Mode mode);
42 Mode mode() const;
43
44 void setMultiQueue(bool multiQueue);
45 bool multiQueue() const;
46
47 void setOwner(const QString &owner);
48 QString owner() const;
49
50 void setPi(bool pi);
51 bool pi() const;
52
53 void setVnetHdr(bool vnetHdr);
54 bool vnetHdr() const;
55
56 void fromMap(const QVariantMap &setting) override;
57
58 QVariantMap toMap() const override;
59
60protected:
61 TunSettingPrivate *d_ptr;
62
63private:
64 Q_DECLARE_PRIVATE(TunSetting)
65};
66
67NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const TunSetting &setting);
68
69}
70
71#endif // NETWORKMANAGERQT_TUN_SETTING_H
72

source code of networkmanager-qt/src/settings/tunsetting.h