File indexing completed on 2024-04-14 03:57:36

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_PPPOE_SETTING_H
0008 #define NETWORKMANAGERQT_PPPOE_SETTING_H
0009 
0010 #include "setting.h"
0011 #include <networkmanagerqt/networkmanagerqt_export.h>
0012 
0013 #include <QString>
0014 
0015 namespace NetworkManager
0016 {
0017 class PppoeSettingPrivate;
0018 
0019 /**
0020  * Represents pppoe setting
0021  */
0022 class NETWORKMANAGERQT_EXPORT PppoeSetting : public Setting
0023 {
0024 public:
0025     typedef QSharedPointer<PppoeSetting> Ptr;
0026     typedef QList<Ptr> List;
0027     PppoeSetting();
0028     explicit PppoeSetting(const Ptr &other);
0029     ~PppoeSetting() override;
0030 
0031     QString name() const override;
0032 
0033     void setService(const QString &service);
0034     QString service() const;
0035 
0036     void setParent(const QString &parent);
0037     QString parent() const;
0038 
0039     void setUsername(const QString &username);
0040     QString username() const;
0041 
0042     void setPassword(const QString &password);
0043     QString password() const;
0044 
0045     void setPasswordFlags(Setting::SecretFlags flags);
0046     Setting::SecretFlags passwordFlags() const;
0047 
0048     QStringList needSecrets(bool requestNew = false) const override;
0049 
0050     void secretsFromMap(const QVariantMap &secrets) override;
0051 
0052     QVariantMap secretsToMap() const override;
0053 
0054     void fromMap(const QVariantMap &setting) override;
0055 
0056     QVariantMap toMap() const override;
0057 
0058 protected:
0059     PppoeSettingPrivate *d_ptr;
0060 
0061 private:
0062     Q_DECLARE_PRIVATE(PppoeSetting)
0063 };
0064 
0065 NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const PppoeSetting &setting);
0066 
0067 }
0068 
0069 #endif // NETWORKMANAGERQT_PPPOE_SETTING_H