1 /* |
1 /* |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of the License "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
15 * EAP method QT configuration |
15 * EAP method QT configuration |
16 * |
16 * |
17 */ |
17 */ |
18 |
18 |
19 /* |
19 /* |
20 * %version: 9 % |
20 * %version: 13 % |
21 */ |
21 */ |
22 |
22 |
23 #include "eapqtconfig.h" |
23 // System includes |
|
24 #include <eapqtconfig.h> |
|
25 |
|
26 // User includes |
24 #include "eapqtconfig_p.h" |
27 #include "eapqtconfig_p.h" |
25 |
28 |
26 //---------------------------------------------------------------------------- |
29 /*! |
27 // EapQtConfig |
30 * \class EapQtConfig |
28 //---------------------------------------------------------------------------- |
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 ======== |
29 |
131 |
30 EapQtConfig::EapQtConfig() : |
132 EapQtConfig::EapQtConfig() : |
31 d_ptr(new EapQtConfigPrivate) |
133 d_ptr(new EapQtConfigPrivate) |
32 { |
134 { |
33 } |
135 } |
35 EapQtConfig::~EapQtConfig() |
137 EapQtConfig::~EapQtConfig() |
36 { |
138 { |
37 // scoped pointer deleted automatically |
139 // scoped pointer deleted automatically |
38 } |
140 } |
39 |
141 |
40 QVariant EapQtConfig::value(SettingsId id) |
142 QVariant EapQtConfig::value(const SettingsId id) const |
41 { |
143 { |
42 // check for valid range, otherwise memory is consumed for no reason |
144 // check for valid range, otherwise memory is consumed for no reason |
43 if(id >= SettingsIdLast) { |
145 if (id >= SettingsIdLast) { |
44 qDebug("ERROR: EapQtConfig::value - invalid id!"); |
146 qDebug("ERROR: EapQtConfig::value - invalid id!"); |
45 return QVariant::Invalid; |
147 return QVariant::Invalid; |
46 } |
148 } |
47 return d_ptr->mSettings[id]; |
149 return d_ptr->mSettings[id]; |
48 } |
150 } |
49 |
151 |
50 void EapQtConfig::setValue(SettingsId id, QVariant newValue) |
152 void EapQtConfig::setValue(const SettingsId id, const QVariant &newValue) const |
51 { |
153 { |
52 // check for valid range, otherwise memory is consumed for no reason |
154 // check for valid range, otherwise memory is consumed for no reason |
53 if(id < SettingsIdLast) { |
155 if (id < SettingsIdLast) { |
54 d_ptr->mSettings[id] = newValue; |
156 d_ptr->mSettings[id] = newValue; |
55 } else { |
157 } |
|
158 else { |
56 qDebug("ERROR: EapQtConfig::setValue - invalid id!"); |
159 qDebug("ERROR: EapQtConfig::setValue - invalid id!"); |
57 } |
160 } |
58 return; |
|
59 } |
161 } |
60 |
162 |
61 void EapQtConfig::clear() { |
163 void EapQtConfig::clear() const |
|
164 { |
62 d_ptr->mSettings.clear(); |
165 d_ptr->mSettings.clear(); |
63 return; |
|
64 } |
166 } |
65 |
|
66 QList<EapQtConfig::SettingsId> EapQtConfig::validate( |
|
67 QList<EapQtConfig::SettingsId> ids) |
|
68 { |
|
69 // not supported |
|
70 Q_UNUSED(ids); |
|
71 return QList<EapQtConfig::SettingsId>(); |
|
72 } |
|
73 |
|
74 |
|