|
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 |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
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 /* |
|
20 * %version: 8 % |
|
21 */ |
|
22 |
|
23 #include "eapqtconfig.h" |
|
24 #include "eapqtconfig_p.h" |
|
25 |
|
26 //---------------------------------------------------------------------------- |
|
27 // EapQtConfig |
|
28 //---------------------------------------------------------------------------- |
|
29 |
|
30 /*! |
|
31 * TODO: check the list |
|
32 * |
|
33 * EAP-SIM (TypeEapSim), EAP-AKA (TypeEapAka) |
|
34 * - UsernameAutomatic |
|
35 * - Username |
|
36 * - RealmAutomatic |
|
37 * - Realm |
|
38 * - UsePseudonyms |
|
39 * - SessionValidityTime |
|
40 * - Notifications |
|
41 * |
|
42 * EAP-GTC (TypeEapGtc), LEAP (TypeLeap), |
|
43 * EAP-MSCHAPv2 (TypeEapMschapv2), Plain MSCHAPv2 (TypePlainMschapv2), |
|
44 * PAP (TypePap) |
|
45 * - Username |
|
46 * - PasswordPrompt |
|
47 * - Password |
|
48 * - Notifications |
|
49 * |
|
50 * EAP-TLS (TypeEapTls) |
|
51 * - AuthorityCertificateAutomatic |
|
52 * - AuthorityCertificate |
|
53 * - UserCertificate |
|
54 * - UsernameAutomatic |
|
55 * - Username |
|
56 * - RealmAutomatic |
|
57 * - Realm |
|
58 * - TlsPrivacy |
|
59 * - Notifications |
|
60 * - CipherSuites |
|
61 * |
|
62 * EAP-TTLS (TypeEapTtls) |
|
63 * - AuthorityCertificateAutomatic |
|
64 * - AuthorityCertificate |
|
65 * - UserCertificate |
|
66 * - UsernameAutomatic |
|
67 * - Username |
|
68 * - RealmAutomatic |
|
69 * - Realm |
|
70 * - TlsPrivacy |
|
71 * - InnerType |
|
72 * - Notifications |
|
73 * - CipherSuites |
|
74 * |
|
75 * EAP-FAST (TypeEapFast) |
|
76 * - ProvisioningModeAuthenticated |
|
77 * - ProvisioningModeUnAuthenticated |
|
78 * - AuthorityCertificateAutomatic |
|
79 * - AuthorityCertificate |
|
80 * - UserCertificate |
|
81 * - UsernameAutomatic |
|
82 * - Username |
|
83 * - RealmAutomatic |
|
84 * - Realm |
|
85 * - ServerNameVerify |
|
86 * - ServerName |
|
87 * - TlsPrivacy |
|
88 * - InnerType |
|
89 * - PacStorePassword |
|
90 * - PacStoreReset |
|
91 * - CipherSuites |
|
92 * |
|
93 * PEAP (TypePeap) |
|
94 * - AuthorityCertificateAutomatic |
|
95 * - AuthorityCertificate |
|
96 * - UserCertificate |
|
97 * - UsernameAutomatic |
|
98 * - Username |
|
99 * - RealmAutomatic |
|
100 * - Realm |
|
101 * - ServerNameVerify |
|
102 * - ServerName |
|
103 * - TlsPrivacy |
|
104 * - PeapVersion |
|
105 * - InnerType |
|
106 * - Notifications |
|
107 * - CipherSuites |
|
108 */ |
|
109 EapQtConfig::EapQtConfig() : |
|
110 d_ptr(new EapQtConfigPrivate) |
|
111 { |
|
112 } |
|
113 |
|
114 EapQtConfig::~EapQtConfig() |
|
115 { |
|
116 // scoped pointer deleted automatically |
|
117 } |
|
118 |
|
119 QVariant EapQtConfig::value(SettingsId id) |
|
120 { |
|
121 // check for valid range, otherwise memory is consumed for no reason |
|
122 if(id >= SettingsIdLast) { |
|
123 qDebug("ERROR: EapQtConfig::value - invalid id!"); |
|
124 return QVariant::Invalid; |
|
125 } |
|
126 return d_ptr->mSettings[id]; |
|
127 } |
|
128 |
|
129 void EapQtConfig::setValue(SettingsId id, QVariant newValue) |
|
130 { |
|
131 // check for valid range, otherwise memory is consumed for no reason |
|
132 if(id < SettingsIdLast) { |
|
133 d_ptr->mSettings[id] = newValue; |
|
134 } else { |
|
135 qDebug("ERROR: EapQtConfig::setValue - invalid id!"); |
|
136 } |
|
137 return; |
|
138 } |
|
139 |
|
140 void EapQtConfig::clear() { |
|
141 d_ptr->mSettings.clear(); |
|
142 return; |
|
143 } |
|
144 |
|
145 QList<EapQtConfig::SettingsId> EapQtConfig::validate( |
|
146 QList<EapQtConfig::SettingsId> ids) |
|
147 { |
|
148 // TODO: allow validation only for 0 < id < SettingsIdLast |
|
149 Q_UNUSED(ids); |
|
150 return QList<EapQtConfig::SettingsId>(); |
|
151 } |
|
152 |
|
153 |