equal
deleted
inserted
replaced
14 * Description: EAP and WLAN authentication protocols. |
14 * Description: EAP and WLAN authentication protocols. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 /* |
18 /* |
19 * %version: 15.1.3 % |
19 * %version: 23 % |
20 */ |
20 */ |
21 |
21 |
22 // This is enumeration of EAPOL source code. |
22 // This is enumeration of EAPOL source code. |
23 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
23 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
24 #undef EAP_FILE_NUMBER_ENUM |
24 #undef EAP_FILE_NUMBER_ENUM |
35 #include "eap_type_aka.h" |
35 #include "eap_type_aka.h" |
36 #include "EapAkaGlobal.h" |
36 #include "EapAkaGlobal.h" |
37 #include <EapTypeInfo.h> |
37 #include <EapTypeInfo.h> |
38 #include "eap_am_type_aka_symbian.h" |
38 #include "eap_am_type_aka_symbian.h" |
39 #include "EapAkaDbUtils.h" |
39 #include "EapAkaDbUtils.h" |
40 |
40 #include "EapConversion.h" |
41 |
|
42 |
|
43 |
41 |
44 #include "eap_am_tools_symbian.h" |
42 #include "eap_am_tools_symbian.h" |
|
43 #include "EapTraceSymbian.h" |
|
44 |
45 |
45 |
46 // LOCAL CONSTANTS |
46 // LOCAL CONSTANTS |
47 |
47 |
48 // The version number of this interface. |
48 // The version number of this interface. |
49 const TUint KInterfaceVersion = 1; |
49 const TUint KInterfaceVersion = 1; |
135 } |
135 } |
136 return type; |
136 return type; |
137 } |
137 } |
138 |
138 |
139 // ---------------------------------------------------------- |
139 // ---------------------------------------------------------- |
140 TInt CEapAka::InvokeUiL() |
140 |
141 { |
141 CEapTypeInfo* CEapAka::GetInfoL() |
142 TInt buttonId(0); |
|
143 |
|
144 return buttonId; |
|
145 } |
|
146 |
|
147 // ---------------------------------------------------------- |
|
148 CEapTypeInfo* CEapAka::GetInfoLC() |
|
149 { |
142 { |
150 CEapTypeInfo* info = new(ELeave) CEapTypeInfo( |
143 CEapTypeInfo* info = new(ELeave) CEapTypeInfo( |
151 (TDesC&)KReleaseDate, |
144 (TDesC&)KReleaseDate, |
152 (TDesC&)KEapTypeVersion, |
145 (TDesC&)KEapTypeVersion, |
153 (TDesC&)KManufacturer); |
146 (TDesC&)KManufacturer); |
154 |
147 |
155 CleanupStack::PushL(info); |
|
156 return info; |
148 return info; |
157 } |
149 } |
158 |
150 |
159 // ---------------------------------------------------------- |
151 // ---------------------------------------------------------- |
|
152 |
160 void CEapAka::DeleteConfigurationL() |
153 void CEapAka::DeleteConfigurationL() |
161 { |
154 { |
162 EapAkaDbUtils::DeleteConfigurationL(iIndexType, iIndex, iTunnelingType); |
155 EapAkaDbUtils::DeleteConfigurationL(iIndexType, iIndex, iTunnelingType); |
163 } |
156 } |
164 |
157 |
169 return KInterfaceVersion; |
162 return KInterfaceVersion; |
170 } |
163 } |
171 |
164 |
172 // ---------------------------------------------------------- |
165 // ---------------------------------------------------------- |
173 |
166 |
174 void CEapAka::SetTunnelingType(const TInt aTunnelingType) |
167 void CEapAka::SetTunnelingType(const TEapExpandedType aTunnelingType) |
175 { |
168 { |
176 #ifdef USE_EAP_EXPANDED_TYPES |
169 EAP_TRACE_DATA_DEBUG_SYMBIAN( |
177 |
170 (EAPL("CEapAka::SetTunnelingType - tunneling type"), |
178 // Vendor id is eap_type_vendor_id_ietf always in this plugin. |
171 aTunnelingType.GetValue().Ptr(), aTunnelingType.GetValue().Length())); |
179 iTunnelingType.set_eap_type_values(eap_type_vendor_id_ietf, aTunnelingType); |
172 |
180 |
173 eap_type_value_e aInternalType; |
181 #else |
174 |
182 |
175 TInt err = CEapConversion::ConvertExpandedEAPTypeToInternalType( |
183 iTunnelingType = static_cast<eap_type_value_e>(aTunnelingType); |
176 &aTunnelingType, |
184 |
177 &aInternalType); |
185 #endif //#ifdef USE_EAP_EXPANDED_TYPES |
178 |
186 } |
179 iTunnelingType = aInternalType; |
|
180 |
|
181 |
|
182 } |
187 |
183 |
188 |
184 |
189 // ---------------------------------------------------------- |
185 // ---------------------------------------------------------- |
190 void CEapAka::SetIndexL( |
186 void CEapAka::SetIndexL( |
191 const TIndexType aIndexType, |
187 const TIndexType aIndexType, |
206 iIndexType = tmpIndexType; |
202 iIndexType = tmpIndexType; |
207 iIndex = tmpIndex; |
203 iIndex = tmpIndex; |
208 |
204 |
209 RDbNamedDatabase db; |
205 RDbNamedDatabase db; |
210 |
206 |
211 RDbs session; |
207 RFs session; |
212 |
208 |
213 EapAkaDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType); |
209 EapAkaDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType); |
214 |
210 |
215 CleanupClosePushL(session); |
211 CleanupClosePushL(session); |
216 CleanupClosePushL(db); |
212 CleanupClosePushL(db); |
225 iTunnelingType); |
221 iTunnelingType); |
226 |
222 |
227 iIndexType = aIndexType; |
223 iIndexType = aIndexType; |
228 iIndex = aIndex; |
224 iIndex = aIndex; |
229 |
225 |
230 CleanupStack::PopAndDestroy(2); // db |
226 CleanupStack::PopAndDestroy(&db); |
|
227 CleanupStack::PopAndDestroy(&session); |
231 } |
228 } |
232 |
229 |
233 // ---------------------------------------------------------- |
230 // ---------------------------------------------------------- |
234 |
231 |
235 void CEapAka::SetConfigurationL(const EAPSettings& aSettings) |
232 void CEapAka::SetConfigurationL(const EAPSettings& aSettings) |
236 { |
233 { |
237 RDbNamedDatabase db; |
234 RDbNamedDatabase db; |
238 |
235 |
239 RDbs session; |
236 RFs session; |
240 |
237 |
241 // This also creates the IAP entry if it doesn't exist |
238 // This also creates the IAP entry if it doesn't exist |
242 EapAkaDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType); |
239 EapAkaDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType); |
243 |
240 |
244 CleanupClosePushL(session); |
241 CleanupClosePushL(session); |
245 CleanupClosePushL(db); |
242 CleanupClosePushL(db); |
248 db, |
245 db, |
249 aSettings, |
246 aSettings, |
250 iIndexType, |
247 iIndexType, |
251 iIndex, |
248 iIndex, |
252 iTunnelingType); |
249 iTunnelingType); |
253 |
250 |
254 CleanupStack::PopAndDestroy(2); // db, session |
251 CleanupStack::PopAndDestroy(&db); |
|
252 CleanupStack::PopAndDestroy(&session); |
255 } |
253 } |
256 |
254 |
257 // ---------------------------------------------------------- |
255 // ---------------------------------------------------------- |
258 |
256 |
259 void CEapAka::GetConfigurationL(EAPSettings& aSettings) |
257 void CEapAka::GetConfigurationL(EAPSettings& aSettings) |
260 { |
258 { |
261 RDbNamedDatabase db; |
259 RDbNamedDatabase db; |
262 |
260 |
263 RDbs session; |
261 RFs session; |
264 |
262 |
265 // This also creates the IAP entry if it doesn't exist |
263 // This also creates the IAP entry if it doesn't exist |
266 EapAkaDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType); |
264 EapAkaDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType); |
267 |
265 |
268 CleanupClosePushL(session); |
266 CleanupClosePushL(session); |
269 CleanupClosePushL(db); |
267 CleanupClosePushL(db); |
272 db, |
270 db, |
273 aSettings, |
271 aSettings, |
274 iIndexType, |
272 iIndexType, |
275 iIndex, |
273 iIndex, |
276 iTunnelingType); |
274 iTunnelingType); |
277 |
275 |
278 CleanupStack::PopAndDestroy(2); // db, session |
276 CleanupStack::PopAndDestroy(&db); |
|
277 CleanupStack::PopAndDestroy(&session); |
279 } |
278 } |
280 |
279 |
281 // ---------------------------------------------------------- |
280 // ---------------------------------------------------------- |
282 |
281 |
283 void CEapAka::CopySettingsL( |
282 void CEapAka::CopySettingsL( |
299 iIndexType = tmpIndexType; |
298 iIndexType = tmpIndexType; |
300 iIndex = tmpIndex; |
299 iIndex = tmpIndex; |
301 |
300 |
302 RDbNamedDatabase db; |
301 RDbNamedDatabase db; |
303 |
302 |
304 RDbs session; |
303 RFs session; |
305 |
304 |
306 EapAkaDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType); |
305 EapAkaDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType); |
307 |
306 |
308 CleanupClosePushL(session); |
307 CleanupClosePushL(session); |
309 CleanupClosePushL(db); |
308 CleanupClosePushL(db); |
310 |
309 |
314 iIndex, |
313 iIndex, |
315 iTunnelingType, |
314 iTunnelingType, |
316 aDestinationIndexType, |
315 aDestinationIndexType, |
317 aDestinationIndex, |
316 aDestinationIndex, |
318 iTunnelingType); |
317 iTunnelingType); |
319 |
318 |
320 CleanupStack::PopAndDestroy(2); // db |
319 CleanupStack::PopAndDestroy(&db); |
321 |
320 CleanupStack::PopAndDestroy(&session); |
322 } |
321 } |
|
322 |
323 // End of file |
323 // End of file |