1/*
2 SPDX-FileCopyrightText: 2012-2013 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_BRIDGE_SETTING_H
8#define NETWORKMANAGERQT_BRIDGE_SETTING_H
9
10#include "setting.h"
11#include <networkmanagerqt/networkmanagerqt_export.h>
12
13#include <QString>
14
15namespace NetworkManager
16{
17class BridgeSettingPrivate;
18
19/*!
20 * \class NetworkManager::BridgeSetting
21 * \inheaderfile NetworkManagerQt/BridgeSetting
22 * \inmodule NetworkManagerQt
23 *
24 * \brief Represents bridge setting.
25 */
26class NETWORKMANAGERQT_EXPORT BridgeSetting : public Setting
27{
28public:
29 /*!
30 * \typedef NetworkManager::BridgeSetting::Ptr
31 */
32 typedef QSharedPointer<BridgeSetting> Ptr;
33 /*!
34 * \typedef NetworkManager::BridgeSetting::List
35 */
36 typedef QList<Ptr> List;
37 /*!
38 */
39 BridgeSetting();
40 /*!
41 */
42 explicit BridgeSetting(const Ptr &other);
43 ~BridgeSetting() override;
44
45 QString name() const override;
46
47 // Deprecated in favor of connection.interface-name in NM 1.0.0
48 /*!
49 */
50 void setInterfaceName(const QString &name);
51 /*!
52 */
53 QString interfaceName() const;
54
55 /*!
56 */
57 void setStp(bool enabled);
58 /*!
59 */
60 bool stp() const;
61
62 /*!
63 */
64 void setPriority(quint32 priority);
65 /*!
66 */
67 quint32 priority() const;
68
69 /*!
70 */
71 void setForwardDelay(quint32 delay);
72 /*!
73 */
74 quint32 forwardDelay() const;
75
76 /*!
77 */
78 void setHelloTime(quint32 time);
79 /*!
80 */
81 quint32 helloTime() const;
82
83 /*!
84 */
85 void setMaxAge(quint32 age);
86 /*!
87 */
88 quint32 maxAge() const;
89
90 /*!
91 */
92 void setAgingTime(quint32 time);
93 /*!
94 */
95 quint32 agingTime() const;
96
97 /*!
98 */
99 void setMulticastSnooping(bool snooping);
100 /*!
101 */
102 bool multicastSnooping() const;
103
104 /*!
105 */
106 void setMacAddress(const QByteArray &address);
107 /*!
108 */
109 QByteArray macAddress() const;
110
111 void fromMap(const QVariantMap &setting) override;
112
113 QVariantMap toMap() const override;
114
115protected:
116 BridgeSettingPrivate *d_ptr;
117
118private:
119 Q_DECLARE_PRIVATE(BridgeSetting)
120};
121
122NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const BridgeSetting &setting);
123
124}
125
126#endif // NETWORKMANAGERQT_BRIDGE_SETTING_H
127

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