| 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_OLPCMESH_SETTING_H |
| 8 | #define NETWORKMANAGERQT_OLPCMESH_SETTING_H |
| 9 | |
| 10 | #include "setting.h" |
| 11 | #include <networkmanagerqt/networkmanagerqt_export.h> |
| 12 | |
| 13 | #include <QString> |
| 14 | |
| 15 | namespace NetworkManager |
| 16 | { |
| 17 | class OlpcMeshSettingPrivate; |
| 18 | |
| 19 | /*! |
| 20 | * \class NetworkManager::OlpcMeshSetting |
| 21 | * \inheaderfile NetworkManagerQt/OlpcMeshSetting |
| 22 | * \inmodule NetworkManagerQt |
| 23 | * |
| 24 | * \brief Represents olpc mesh setting. |
| 25 | */ |
| 26 | class NETWORKMANAGERQT_EXPORT OlpcMeshSetting : public Setting |
| 27 | { |
| 28 | public: |
| 29 | /*! |
| 30 | * \typedef NetworkManager::OlpcMeshSetting::Ptr |
| 31 | */ |
| 32 | typedef QSharedPointer<OlpcMeshSetting> Ptr; |
| 33 | /*! |
| 34 | * \typedef NetworkManager::OlpcMeshSetting::List |
| 35 | */ |
| 36 | typedef QList<Ptr> List; |
| 37 | /*! |
| 38 | */ |
| 39 | OlpcMeshSetting(); |
| 40 | /*! |
| 41 | */ |
| 42 | explicit OlpcMeshSetting(const Ptr &other); |
| 43 | ~OlpcMeshSetting() override; |
| 44 | |
| 45 | QString name() const override; |
| 46 | |
| 47 | /*! |
| 48 | */ |
| 49 | void setSsid(const QByteArray &ssid); |
| 50 | /*! |
| 51 | */ |
| 52 | QByteArray ssid() const; |
| 53 | |
| 54 | /*! |
| 55 | */ |
| 56 | void setChannel(quint32 channel); |
| 57 | /*! |
| 58 | */ |
| 59 | quint32 channel() const; |
| 60 | |
| 61 | /*! |
| 62 | */ |
| 63 | void setDhcpAnycastAddress(const QByteArray &address); |
| 64 | /*! |
| 65 | */ |
| 66 | QByteArray dhcpAnycastAddress() const; |
| 67 | |
| 68 | void fromMap(const QVariantMap &setting) override; |
| 69 | |
| 70 | QVariantMap toMap() const override; |
| 71 | |
| 72 | protected: |
| 73 | OlpcMeshSettingPrivate *d_ptr; |
| 74 | |
| 75 | private: |
| 76 | Q_DECLARE_PRIVATE(OlpcMeshSetting) |
| 77 | }; |
| 78 | |
| 79 | NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const OlpcMeshSetting &setting); |
| 80 | |
| 81 | } |
| 82 | |
| 83 | #endif // NETWORKMANAGERQT_OLPCMESH_SETTING_H |
| 84 | |