1/*
2 SPDX-FileCopyrightText: 2013 Lukáš Tinkl <ltinkl@redhat.com>
3 SPDX-FileCopyrightText: 2014 Jan Grulich <jgrulich@redhat.com>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8#ifndef NETWORKMANAGERQT_GRE_DEVICE_H
9#define NETWORKMANAGERQT_GRE_DEVICE_H
10
11#include "device.h"
12#include <networkmanagerqt/networkmanagerqt_export.h>
13
14namespace NetworkManager
15{
16class GreDevicePrivate;
17
18/*!
19 * \class NetworkManager::GreDevice
20 * \inheaderfile NetworkManagerQt/GreDevice
21 * \inmodule NetworkManagerQt
22 *
23 * \brief A gre device interface.
24 * \deprecated renamed to IpTunnelDevice
25 */
26class NETWORKMANAGERQT_EXPORT GreDevice : public Device
27{
28 Q_OBJECT
29
30 /*!
31 * \property NetworkManager::GreDevice::inputFlags
32 */
33 Q_PROPERTY(ushort inputFlags READ inputFlags NOTIFY inputFlagsChanged)
34
35 /*!
36 * \property NetworkManager::GreDevice::outputFlags
37 */
38 Q_PROPERTY(ushort outputFlags READ outputFlags NOTIFY outputFlagsChanged)
39
40 /*!
41 * \property NetworkManager::GreDevice::inputKey
42 */
43 Q_PROPERTY(uint inputKey READ inputKey NOTIFY inputKeyChanged)
44
45 /*!
46 * \property NetworkManager::GreDevice::outputKey
47 */
48 Q_PROPERTY(uint outputKey READ outputKey NOTIFY outputKeyChanged)
49
50 /*!
51 * \property NetworkManager::GreDevice::localEnd
52 */
53 Q_PROPERTY(QString localEnd READ localEnd NOTIFY localEndChanged)
54
55 /*!
56 * \property NetworkManager::GreDevice::remoteEnd
57 */
58 Q_PROPERTY(QString remoteEnd READ remoteEnd NOTIFY remoteEndChanged)
59
60 /*!
61 * \property NetworkManager::GreDevice::parent
62 */
63 Q_PROPERTY(QString parent READ parent NOTIFY parentChanged)
64
65 /*!
66 * \property NetworkManager::GreDevice::pathMtuDiscovery
67 */
68 Q_PROPERTY(bool pathMtuDiscovery READ pathMtuDiscovery NOTIFY pathMtuDiscoveryChanged)
69
70 /*!
71 * \property NetworkManager::GreDevice::tos
72 */
73 Q_PROPERTY(uchar tos READ tos NOTIFY tosChanged)
74
75 /*!
76 * \property NetworkManager::GreDevice::ttl
77 */
78 Q_PROPERTY(uchar ttl READ ttl NOTIFY ttlChanged)
79
80public:
81 /*!
82 * \typedef NetworkManager::GreDevice::Ptr
83 */
84 typedef QSharedPointer<GreDevice> Ptr;
85 /*!
86 * \typedef NetworkManager::GreDevice::List
87 */
88 typedef QList<Ptr> List;
89 /*!
90 */
91 explicit GreDevice(const QString &path, QObject *parent = nullptr);
92 ~GreDevice() override;
93
94 /*!
95 */
96 Type type() const override;
97
98 /*!
99 */
100 ushort inputFlags() const;
101 /*!
102 */
103 ushort outputFlags() const;
104 /*!
105 */
106 uint inputKey() const;
107 /*!
108 */
109 uint outputKey() const;
110 /*!
111 */
112 QString localEnd() const;
113 /*!
114 */
115 QString remoteEnd() const;
116 /*!
117 */
118 QString parent() const;
119 /*!
120 */
121 bool pathMtuDiscovery() const;
122 /*!
123 */
124 uchar tos() const;
125 /*!
126 */
127 uchar ttl() const;
128
129Q_SIGNALS:
130 /*!
131 */
132 void inputFlagsChanged(ushort inputflags);
133 /*!
134 */
135 void outputFlagsChanged(ushort outputFlags);
136 /*!
137 */
138 void inputKeyChanged(uint inputKey);
139 /*!
140 */
141 void outputKeyChanged(uint outputKey);
142 /*!
143 */
144 void localEndChanged(const QString &localEnd);
145 /*!
146 */
147 void remoteEndChanged(const QString &remoteEnd);
148 /*!
149 */
150 void parentChanged(const QString &parent);
151 /*!
152 */
153 void pathMtuDiscoveryChanged(bool pathMtuDiscovery);
154 /*!
155 */
156 void tosChanged(uchar tos);
157 /*!
158 */
159 void ttlChanged(uchar ttl);
160
161private:
162 Q_DECLARE_PRIVATE(GreDevice)
163};
164
165}
166
167#endif
168

source code of networkmanager-qt/src/gredevice.h