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_ADSL_SETTING_H
8#define NETWORKMANAGERQT_ADSL_SETTING_H
9
10#include "setting.h"
11#include <networkmanagerqt/networkmanagerqt_export.h>
12
13#include <QString>
14
15namespace NetworkManager
16{
17class AdslSettingPrivate;
18
19/*!
20 * \class NetworkManager::AdslSetting
21 * \inheaderfile NetworkManagerQt/AdslSetting
22 * \inmodule NetworkManagerQt
23 *
24 * \brief Represents adsl setting.
25 */
26class NETWORKMANAGERQT_EXPORT AdslSetting : public Setting
27{
28public:
29 /*!
30 * \typedef NetworkManager::AdslSetting::Ptr
31 */
32 typedef QSharedPointer<AdslSetting> Ptr;
33 /*!
34 * \typedef NetworkManager::AdslSetting::List
35 */
36 typedef QList<Ptr> List;
37 /*!
38 *
39 * \value UnknownProtocol
40 * \value Pppoa
41 * \value Pppoe
42 * \value Ipoatm
43 */
44 enum Protocol {
45 UnknownProtocol = 0,
46 Pppoa,
47 Pppoe,
48 Ipoatm,
49 };
50 /*!
51 *
52 * \value UnknownEncapsulation
53 * \value Vcmux
54 * \value Llc
55 */
56 enum Encapsulation {
57 UnknownEncapsulation = 0,
58 Vcmux,
59 Llc,
60 };
61
62 /*!
63 */
64 AdslSetting();
65 /*!
66 */
67 explicit AdslSetting(const Ptr &other);
68 ~AdslSetting() override;
69
70 QString name() const override;
71
72 /*!
73 */
74 void setUsername(const QString &username);
75 /*!
76 */
77 QString username() const;
78
79 /*!
80 */
81 void setPassword(const QString &password);
82 /*!
83 */
84 QString password() const;
85
86 /*!
87 */
88 void setPasswordFlags(SecretFlags flags);
89 /*!
90 */
91 SecretFlags passwordFlags() const;
92
93 /*!
94 */
95 void setProtocol(Protocol protocol);
96 /*!
97 */
98 Protocol protocol() const;
99
100 /*!
101 */
102 void setEncapsulation(Encapsulation encapsulation);
103 /*!
104 */
105 Encapsulation encapsulation() const;
106
107 /*!
108 */
109 void setVpi(quint32 vpi);
110 /*!
111 */
112 quint32 vpi() const;
113
114 /*!
115 */
116 void setVci(quint32 vci);
117 /*!
118 */
119 quint32 vci() const;
120
121 QStringList needSecrets(bool requestNew = false) const override;
122
123 void fromMap(const QVariantMap &setting) override;
124
125 QVariantMap toMap() const override;
126
127protected:
128 /*!
129 */
130 AdslSettingPrivate *d_ptr;
131
132private:
133 Q_DECLARE_PRIVATE(AdslSetting)
134};
135
136NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const AdslSetting &setting);
137
138}
139
140#endif // NETWORKMANAGERQT_ADSL_SETTING_H
141

source code of networkmanager-qt/src/settings/adslsetting.h