NetworkManagerQt

wirelesssecuritysetting.h
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_WIRELESSSECURITY_SETTING_H
8#define NETWORKMANAGERQT_WIRELESSSECURITY_SETTING_H
9
10#include "setting.h"
11#include <networkmanagerqt/networkmanagerqt_export.h>
12
13#include <QStringList>
14
15namespace NetworkManager
16{
17class WirelessSecuritySettingPrivate;
18
19/**
20 * Represents wireless security setting
21 */
22class NETWORKMANAGERQT_EXPORT WirelessSecuritySetting : public Setting
23{
24public:
26 typedef QList<Ptr> List;
27 enum KeyMgmt {
28 Unknown = -1,
29 Wep,
30 Ieee8021x,
31 WpaNone,
32 WpaPsk,
33 WpaEap,
34 SAE,
35 WpaEapSuiteB192,
36 OWE,
37 };
38 enum AuthAlg {
39 None,
40 Open,
41 Shared,
42 Leap,
43 };
44 enum WpaProtocolVersion {
45 Wpa,
46 Rsn,
47 };
48 enum WpaEncryptionCapabilities {
49 Wep40,
50 Wep104,
51 Tkip,
52 Ccmp,
53 };
54 enum WepKeyType {
55 NotSpecified,
56 Hex,
57 Passphrase,
58 };
59 enum Pmf {
60 DefaultPmf,
61 DisablePmf,
62 OptionalPmf,
63 RequiredPmf,
64 };
65
67 explicit WirelessSecuritySetting(const Ptr &other);
68 ~WirelessSecuritySetting() override;
69
70 QString name() const override;
71
72 void setKeyMgmt(KeyMgmt mgmt);
73 KeyMgmt keyMgmt() const;
74
75 void setWepTxKeyindex(quint32 index);
76 quint32 wepTxKeyindex() const;
77
78 void setAuthAlg(AuthAlg alg);
79 AuthAlg authAlg() const;
80
81 void setProto(const QList<WpaProtocolVersion> &list);
82 QList<WpaProtocolVersion> proto() const;
83
84 void setPairwise(const QList<WpaEncryptionCapabilities> &list);
85 QList<WpaEncryptionCapabilities> pairwise() const;
86
87 void setGroup(const QList<WpaEncryptionCapabilities> &list);
89
90 void setLeapUsername(const QString &username);
91 QString leapUsername() const;
92
93 void setWepKey0(const QString key);
94 QString wepKey0() const;
95
96 void setWepKey1(const QString key);
97 QString wepKey1() const;
98
99 void setWepKey2(const QString key);
100 QString wepKey2() const;
101
102 void setWepKey3(const QString key);
103 QString wepKey3() const;
104
105 void setWepKeyFlags(SecretFlags type);
106 SecretFlags wepKeyFlags() const;
107
108 void setWepKeyType(WepKeyType type);
109 WepKeyType wepKeyType() const;
110
111 void setPsk(const QString &key);
112 QString psk() const;
113
114 void setPskFlags(SecretFlags type);
115 SecretFlags pskFlags() const;
116
117 void setLeapPassword(const QString &password);
118 QString leapPassword() const;
119
120 void setLeapPasswordFlags(SecretFlags type);
121 SecretFlags leapPasswordFlags() const;
122
123 void setPmf(Pmf pmf);
124 Pmf pmf() const;
125
126 void secretsFromMap(const QVariantMap &secrets) override;
127
128 QVariantMap secretsToMap() const override;
129
130 QStringList needSecrets(bool requestNew = false) const override;
131
132 void fromMap(const QVariantMap &map) override;
133
134 QVariantMap toMap() const override;
135
136protected:
137 WirelessSecuritySettingPrivate *d_ptr;
138
139private:
140 Q_DECLARE_PRIVATE(WirelessSecuritySetting)
141};
142
143NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const WirelessSecuritySetting &setting);
144
145}
146
147#endif // NETWORKMANAGERQT_WIRELESSSECURITY_SETTING_H
Base class for all kinds of setting.
Definition setting.h:30
Represents wireless security setting.
This class allows querying the underlying system to discover the available network interfaces and rea...
Definition accesspoint.h:21
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:19:22 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.