File indexing completed on 2024-04-21 04:00:00
0001 /* 0002 SPDX-FileCopyrightText: 2012-2013 Jan Grulich <jgrulich@redhat.com> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef NETWORKMANAGERQT_BRIDGE_SETTING_H 0008 #define NETWORKMANAGERQT_BRIDGE_SETTING_H 0009 0010 #include "setting.h" 0011 #include <networkmanagerqt/networkmanagerqt_export.h> 0012 0013 #include <QString> 0014 0015 namespace NetworkManager 0016 { 0017 class BridgeSettingPrivate; 0018 0019 /** 0020 * Represents bridge setting 0021 */ 0022 class NETWORKMANAGERQT_EXPORT BridgeSetting : public Setting 0023 { 0024 public: 0025 typedef QSharedPointer<BridgeSetting> Ptr; 0026 typedef QList<Ptr> List; 0027 BridgeSetting(); 0028 explicit BridgeSetting(const Ptr &other); 0029 ~BridgeSetting() override; 0030 0031 QString name() const override; 0032 0033 // Deprecated in favor of connection.interface-name in NM 1.0.0 0034 void setInterfaceName(const QString &name); 0035 QString interfaceName() const; 0036 0037 void setStp(bool enabled); 0038 bool stp() const; 0039 0040 void setPriority(quint32 priority); 0041 quint32 priority() const; 0042 0043 void setForwardDelay(quint32 delay); 0044 quint32 forwardDelay() const; 0045 0046 void setHelloTime(quint32 time); 0047 quint32 helloTime() const; 0048 0049 void setMaxAge(quint32 age); 0050 quint32 maxAge() const; 0051 0052 void setAgingTime(quint32 time); 0053 quint32 agingTime() const; 0054 0055 void setMulticastSnooping(bool snooping); 0056 bool multicastSnooping() const; 0057 0058 void setMacAddress(const QByteArray &address); 0059 QByteArray macAddress() const; 0060 0061 void fromMap(const QVariantMap &setting) override; 0062 0063 QVariantMap toMap() const override; 0064 0065 protected: 0066 BridgeSettingPrivate *d_ptr; 0067 0068 private: 0069 Q_DECLARE_PRIVATE(BridgeSetting) 0070 }; 0071 0072 NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const BridgeSetting &setting); 0073 0074 } 0075 0076 #endif // NETWORKMANAGERQT_BRIDGE_SETTING_H