File indexing completed on 2024-02-25 16:03:23

0001 /*
0002     SPDX-FileCopyrightText: 2011-2013 Lamarque V. Souza <lamarque@kde.org>
0003     SPDX-FileCopyrightText: 2014 Jan Grulich <jgrulich@redhat.com>
0004 
0005     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0006 */
0007 
0008 #ifndef NETWORKMANAGERQT_DHCP4CONFIG_H
0009 #define NETWORKMANAGERQT_DHCP4CONFIG_H
0010 
0011 #include "generictypes.h"
0012 
0013 #include <networkmanagerqt/networkmanagerqt_export.h>
0014 
0015 #include <QSharedPointer>
0016 
0017 namespace NetworkManager
0018 {
0019 class Dhcp4ConfigPrivate;
0020 
0021 /**
0022  * This class represents dhcp4 configuration
0023  */
0024 class NETWORKMANAGERQT_EXPORT Dhcp4Config : public QObject
0025 {
0026     Q_OBJECT
0027 public:
0028     typedef QSharedPointer<Dhcp4Config> Ptr;
0029     typedef QList<Ptr> List;
0030 
0031     explicit Dhcp4Config(const QString &path, QObject *owner = nullptr);
0032     ~Dhcp4Config() override;
0033 
0034     QString path() const;
0035 
0036     QVariantMap options() const;
0037 
0038     QString optionValue(const QString &key) const;
0039 
0040 Q_SIGNALS:
0041     void optionsChanged(const QVariantMap &);
0042 
0043 private:
0044     Q_DECLARE_PRIVATE(Dhcp4Config)
0045 
0046     Dhcp4ConfigPrivate *const d_ptr;
0047 };
0048 } // namespace NetworkManager
0049 
0050 #endif // NETWORKMANAGERQT_DHCP4CONFIG_H