26
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
34
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
26
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
* EAP method QT configuration
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
/*
|
34
|
20 |
* %version: 13 %
|
26
|
21 |
*/
|
|
22 |
|
34
|
23 |
// System includes
|
|
24 |
#include <eapqtconfig.h>
|
|
25 |
|
|
26 |
// User includes
|
26
|
27 |
#include "eapqtconfig_p.h"
|
|
28 |
|
34
|
29 |
/*!
|
|
30 |
* \class EapQtConfig
|
|
31 |
* \brief Public implementation of EAP method QT configuration data
|
|
32 |
* structure for EAP QT configuration interface
|
|
33 |
*
|
|
34 |
* Following lists the applicable settings per EAP method:
|
|
35 |
*
|
|
36 |
* EAP-SIM, EAP-AKA
|
|
37 |
* - UsernameAutomatic
|
|
38 |
* - Username
|
|
39 |
* - RealmAutomatic
|
|
40 |
* - Realm
|
|
41 |
* - UsePseudonyms
|
|
42 |
* - SessionValidityTime
|
|
43 |
* - OuterType
|
|
44 |
*
|
|
45 |
* EAP-GTC, LEAP, EAP-MSCHAPv2, Plain-MSCHAPv2, PAP
|
|
46 |
* - Username
|
|
47 |
* - PasswordPrompt
|
|
48 |
* - Password
|
|
49 |
* - PasswordStored
|
|
50 |
* - PasswordClear
|
|
51 |
* - SessionValidityTime
|
|
52 |
* - OuterType
|
|
53 |
*
|
|
54 |
* EAP-TLS
|
|
55 |
* - UsernameAutomatic
|
|
56 |
* - Username
|
|
57 |
* - RealmAutomatic
|
|
58 |
* - Realm
|
|
59 |
* - VerifyServerRealm
|
|
60 |
* - ClientAuthenticationRequired
|
|
61 |
* - SessionValidityTime
|
|
62 |
* - CipherSuites
|
|
63 |
* - AuthorityCertificateAutomatic
|
|
64 |
* - AuthorityCertificate
|
|
65 |
* - UserCertificate
|
|
66 |
* - OuterType
|
|
67 |
* - UseIdentityPrivacy
|
|
68 |
*
|
|
69 |
* EAP-TTLS
|
|
70 |
* - UsernameAutomatic
|
|
71 |
* - Username
|
|
72 |
* - RealmAutomatic
|
|
73 |
* - Realm
|
|
74 |
* - VerifyServerRealm
|
|
75 |
* - ClientAuthenticationRequired
|
|
76 |
* - SessionValidityTime
|
|
77 |
* - CipherSuites
|
|
78 |
* - AuthorityCertificateAutomatic
|
|
79 |
* - AuthorityCertificate
|
|
80 |
* - UserCertificate
|
|
81 |
* - InnerType
|
|
82 |
* - UseIdentityPrivacy
|
|
83 |
*
|
|
84 |
* EAP-FAST
|
|
85 |
* - UsernameAutomatic
|
|
86 |
* - Username
|
|
87 |
* - RealmAutomatic
|
|
88 |
* - Realm
|
|
89 |
* - VerifyServerRealm
|
|
90 |
* - ClientAuthenticationRequired
|
|
91 |
* - SessionValidityTime
|
|
92 |
* - CipherSuites
|
|
93 |
* - AuthorityCertificateAutomatic
|
|
94 |
* - AuthorityCertificate
|
|
95 |
* - UserCertificate
|
|
96 |
* - InnerType
|
|
97 |
* - ProvisioningModeAuthenticated
|
|
98 |
* - ProvisioningModeUnauthenticated
|
|
99 |
* - PACGroupReference
|
|
100 |
* - WarnADHPNoPAC
|
|
101 |
* - WarnADHPNoMatchingPAC
|
|
102 |
* - WarnNotDefaultServer
|
|
103 |
* - UseIdentityPrivacy
|
|
104 |
*
|
|
105 |
* PEAP
|
|
106 |
* - UsernameAutomatic
|
|
107 |
* - Username
|
|
108 |
* - RealmAutomatic
|
|
109 |
* - Realm
|
|
110 |
* - VerifyServerRealm
|
|
111 |
* - ClientAuthenticationRequired
|
|
112 |
* - SessionValidityTime
|
|
113 |
* - CipherSuites
|
|
114 |
* - PeapVersion0Allowed
|
|
115 |
* - PeapVersion1Allowed
|
|
116 |
* - PeapVersion2Allowed
|
|
117 |
* - AuthorityCertificateAutomatic
|
|
118 |
* - AuthorityCertificate
|
|
119 |
* - UserCertificate
|
|
120 |
* - InnerType
|
|
121 |
* - UseIdentityPrivacy
|
|
122 |
*/
|
|
123 |
|
|
124 |
// External function prototypes
|
|
125 |
|
|
126 |
// Local constants
|
|
127 |
|
|
128 |
// ======== LOCAL FUNCTIONS ========
|
|
129 |
|
|
130 |
// ======== MEMBER FUNCTIONS ========
|
26
|
131 |
|
|
132 |
EapQtConfig::EapQtConfig() :
|
|
133 |
d_ptr(new EapQtConfigPrivate)
|
|
134 |
{
|
|
135 |
}
|
|
136 |
|
|
137 |
EapQtConfig::~EapQtConfig()
|
|
138 |
{
|
|
139 |
// scoped pointer deleted automatically
|
|
140 |
}
|
|
141 |
|
34
|
142 |
QVariant EapQtConfig::value(const SettingsId id) const
|
26
|
143 |
{
|
|
144 |
// check for valid range, otherwise memory is consumed for no reason
|
34
|
145 |
if (id >= SettingsIdLast) {
|
26
|
146 |
qDebug("ERROR: EapQtConfig::value - invalid id!");
|
|
147 |
return QVariant::Invalid;
|
|
148 |
}
|
|
149 |
return d_ptr->mSettings[id];
|
|
150 |
}
|
|
151 |
|
34
|
152 |
void EapQtConfig::setValue(const SettingsId id, const QVariant &newValue) const
|
26
|
153 |
{
|
|
154 |
// check for valid range, otherwise memory is consumed for no reason
|
34
|
155 |
if (id < SettingsIdLast) {
|
26
|
156 |
d_ptr->mSettings[id] = newValue;
|
34
|
157 |
}
|
|
158 |
else {
|
26
|
159 |
qDebug("ERROR: EapQtConfig::setValue - invalid id!");
|
|
160 |
}
|
|
161 |
}
|
|
162 |
|
34
|
163 |
void EapQtConfig::clear() const
|
|
164 |
{
|
26
|
165 |
d_ptr->mSettings.clear();
|
|
166 |
}
|