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_BOND_SETTING_H |
8 | #define NETWORKMANAGERQT_BOND_SETTING_H |
9 | |
10 | #include "setting.h" |
11 | #include <networkmanagerqt/networkmanagerqt_export.h> |
12 | |
13 | #include <QString> |
14 | |
15 | namespace NetworkManager |
16 | { |
17 | class BondSettingPrivate; |
18 | |
19 | /*! |
20 | * \class NetworkManager::BondSetting |
21 | * \inheaderfile NetworkManagerQt/BondSetting |
22 | * \inmodule NetworkManagerQt |
23 | * |
24 | * \brief Represents bond setting. |
25 | */ |
26 | class NETWORKMANAGERQT_EXPORT BondSetting : public Setting |
27 | { |
28 | public: |
29 | /*! |
30 | * \typedef NetworkManager::BondSetting::Ptr |
31 | */ |
32 | typedef QSharedPointer<BondSetting> Ptr; |
33 | /*! |
34 | * \typedef NetworkManager::BondSetting::List |
35 | */ |
36 | typedef QList<Ptr> List; |
37 | /*! |
38 | */ |
39 | BondSetting(); |
40 | /*! |
41 | */ |
42 | explicit BondSetting(const Ptr &other); |
43 | ~BondSetting() override; |
44 | |
45 | QString name() const override; |
46 | |
47 | /*! |
48 | * \deprecated |
49 | * Deprecated in favor of connection.interface-name in NM 1.0.0 |
50 | */ |
51 | void setInterfaceName(const QString &name); |
52 | /*! |
53 | */ |
54 | QString interfaceName() const; |
55 | |
56 | /*! |
57 | */ |
58 | void addOption(const QString &option, const QString &value); |
59 | /*! |
60 | */ |
61 | void setOptions(const NMStringMap &options); |
62 | /*! |
63 | */ |
64 | NMStringMap options() const; |
65 | |
66 | void fromMap(const QVariantMap &setting) override; |
67 | |
68 | QVariantMap toMap() const override; |
69 | |
70 | protected: |
71 | BondSettingPrivate *d_ptr; |
72 | |
73 | private: |
74 | Q_DECLARE_PRIVATE(BondSetting) |
75 | }; |
76 | |
77 | NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const BondSetting &setting); |
78 | |
79 | } |
80 | |
81 | #endif // NETWORKMANAGERQT_BOND_SETTING_H |
82 | |