1/*
2 SPDX-FileCopyrightText: 2018 Pranav Gade <pranavgade20@gmail.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_PROXY_SETTING_H
8#define NETWORKMANAGERQT_PROXY_SETTING_H
9
10#include "setting.h"
11#include <networkmanagerqt/networkmanagerqt_export.h>
12
13#include <QString>
14
15namespace NetworkManager
16{
17class ProxySettingPrivate;
18
19/**
20 * Represents proxy setting
21 */
22class NETWORKMANAGERQT_EXPORT ProxySetting : public Setting
23{
24public:
25 typedef QSharedPointer<ProxySetting> Ptr;
26 typedef QList<Ptr> List;
27 enum Mode {
28 None = 0,
29 Auto = 1,
30 };
31
32 ProxySetting();
33 explicit ProxySetting(const Ptr &other);
34 ~ProxySetting() override;
35
36 QString name() const override;
37
38 void setBrowserOnly(bool browserOnly);
39 bool browserOnly() const;
40
41 void setMethod(Mode method);
42 Mode method() const;
43
44 void setPacScript(const QString &script);
45 QString pacScript() const;
46
47 void setPacUrl(const QString &url);
48 QString pacUrl() const;
49
50 void fromMap(const QVariantMap &setting) override;
51
52 QVariantMap toMap() const override;
53
54protected:
55 ProxySettingPrivate *d_ptr;
56
57private:
58 Q_DECLARE_PRIVATE(ProxySetting)
59};
60
61NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const ProxySetting &setting);
62
63}
64
65#endif // NETWORKMANAGERQT_PROXY_SETTING_H
66

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