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_BOND_SETTING_H 0008 #define NETWORKMANAGERQT_BOND_SETTING_H 0009 0010 #include "setting.h" 0011 #include <networkmanagerqt/networkmanagerqt_export.h> 0012 0013 #include <QString> 0014 0015 namespace NetworkManager 0016 { 0017 class BondSettingPrivate; 0018 0019 /** 0020 * Represents bond setting 0021 */ 0022 class NETWORKMANAGERQT_EXPORT BondSetting : public Setting 0023 { 0024 public: 0025 typedef QSharedPointer<BondSetting> Ptr; 0026 typedef QList<Ptr> List; 0027 BondSetting(); 0028 explicit BondSetting(const Ptr &other); 0029 ~BondSetting() 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 addOption(const QString &option, const QString &value); 0038 void setOptions(const NMStringMap &options); 0039 NMStringMap options() const; 0040 0041 void fromMap(const QVariantMap &setting) override; 0042 0043 QVariantMap toMap() const override; 0044 0045 protected: 0046 BondSettingPrivate *d_ptr; 0047 0048 private: 0049 Q_DECLARE_PRIVATE(BondSetting) 0050 }; 0051 0052 NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const BondSetting &setting); 0053 0054 } 0055 0056 #endif // NETWORKMANAGERQT_BOND_SETTING_H