author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 14 Sep 2010 22:06:05 +0300 | |
branch | RCL_3 |
changeset 62 | bb1f80fb7db2 |
parent 58 | 83ca720e2b9a |
child 69 | cf1b3ddbe9a1 |
permissions | -rw-r--r-- |
58 | 1 |
/* |
2 |
* Copyright (c) 2008 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 "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: Handles displaying wlan dialogs |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#include <wlanmgmtcommon.h> |
|
20 |
#include <e32std.h> |
|
21 |
#include <utf.h> |
|
22 |
#include <cmpluginwlandef.h> |
|
23 |
#include <ctsydomainpskeys.h> |
|
24 |
||
25 |
#include "mpmwlanquerydialog.h" |
|
26 |
#include "mpmiapselection.h" |
|
27 |
#include "mpmconnmonevents.h" |
|
28 |
#include "mpmlogger.h" |
|
29 |
||
30 |
// valid Wep key lengths, to check wep key format |
|
31 |
// (wep key format depends on key length) |
|
32 |
const TInt KConnUiUtilsWepLengthASCII5 = 5; |
|
33 |
const TInt KConnUiUtilsWepLengthASCII13 = 13; |
|
34 |
const TInt KConnUiUtilsWepLengthASCII29 = 29; |
|
35 |
const TInt KConnUiUtilsWepLengthHEX10 = 10; |
|
36 |
const TInt KConnUiUtilsWepLengthHEX26 = 26; |
|
37 |
const TInt KConnUiUtilsWepLengthHEX58 = 58; |
|
38 |
||
39 |
// Retry count and delay for storing Easy WLAN data |
|
40 |
const TInt KStoreRetryCount = 10; |
|
41 |
const TInt KStoreRetryDelay = 100000; |
|
42 |
||
43 |
// ======== MEMBER FUNCTIONS ======== |
|
44 |
||
45 |
// --------------------------------------------------------------------------- |
|
46 |
// CMPMWlanQueryDialog::CMPMWlanQueryDialog |
|
47 |
// --------------------------------------------------------------------------- |
|
48 |
// |
|
49 |
CMPMWlanQueryDialog::CMPMWlanQueryDialog( CMPMIapSelection& aSession, |
|
50 |
TUint32 aWlanIapId ) |
|
51 |
: CActive( CActive::EPriorityStandard ), |
|
52 |
iIapSelection( aSession ), |
|
53 |
iNetworkPrefs(), |
|
54 |
iNotifWep(), |
|
55 |
iWlanQueryState( EWlanNetwork ), |
|
56 |
iWlanIapId( aWlanIapId ), |
|
57 |
iEasyWlanSelected( EFalse ), |
|
58 |
iOverrideStatus( KErrNone ), |
|
59 |
iConnUiUtils( NULL ), |
|
60 |
iWps( NULL ), |
|
61 |
iWpsReturn( WiFiProt::EWiFiOK ), |
|
62 |
iWpsCompleted( EFalse ), |
|
63 |
iRetryCount( 0 ) |
|
64 |
{ |
|
65 |
||
66 |
} |
|
67 |
||
68 |
// --------------------------------------------------------------------------- |
|
69 |
// CMPMWlanQueryDialog::ConstructL |
|
70 |
// --------------------------------------------------------------------------- |
|
71 |
// |
|
72 |
void CMPMWlanQueryDialog::ConstructL() |
|
73 |
{ |
|
74 |
User::LeaveIfError(iNotifier.Connect()); |
|
75 |
CActiveScheduler::Add( this ); |
|
76 |
iConnUiUtils = CConnectionUiUtilities::NewL(); |
|
77 |
User::LeaveIfError( iTimer.CreateLocal() ); |
|
78 |
} |
|
79 |
||
80 |
// --------------------------------------------------------------------------- |
|
81 |
// CMPMWlanQueryDialog::NewL |
|
82 |
// --------------------------------------------------------------------------- |
|
83 |
// |
|
84 |
CMPMWlanQueryDialog* CMPMWlanQueryDialog::NewL( CMPMIapSelection& aSession, |
|
85 |
TUint32 aWlanIapElementId ) |
|
86 |
{ |
|
87 |
CMPMWlanQueryDialog* self = new( ELeave ) CMPMWlanQueryDialog( aSession, |
|
88 |
aWlanIapElementId ); |
|
89 |
CleanupStack::PushL( self ); |
|
90 |
self->ConstructL(); |
|
91 |
CleanupStack::Pop( self ); |
|
92 |
return self; |
|
93 |
} |
|
94 |
||
95 |
||
96 |
// --------------------------------------------------------------------------- |
|
97 |
// CMPMWlanQueryDialog::~CMPMWlanQueryDialog |
|
98 |
// --------------------------------------------------------------------------- |
|
99 |
// |
|
100 |
CMPMWlanQueryDialog::~CMPMWlanQueryDialog() |
|
101 |
{ |
|
102 |
MPMLOGSTRING( "CMPMWlanQueryDialog::~CMPMWlanQueryDialog enters" ) |
|
103 |
// Check if this dialog instance was not started but only added to the queue |
|
104 |
if ( iIapSelection.Session()->MyServer().FirstInWlanQueryQueue() != this ) |
|
105 |
{ |
|
106 |
MPMLOGSTRING( "CMPMWlanQueryDialog::~CMPMWlanQueryDialog, not a active delete" ) |
|
107 |
||
108 |
// Close notifier and timer |
|
109 |
iNotifier.Close(); |
|
110 |
iTimer.Close(); |
|
111 |
||
112 |
// We're not first in the queue, thus we can just delete. |
|
113 |
// But remember the pointer in the array. |
|
114 |
iIapSelection.Session()->MyServer().RemoveFromWlanQueryQueue( this ); |
|
115 |
MPMLOGSTRING( "CMPMWlanQueryDialog::~CMPMWlanQueryDialog exits (break)" ) |
|
116 |
return; |
|
117 |
} |
|
118 |
||
119 |
// Cancel previous dialogs if any. |
|
120 |
Cancel(); |
|
121 |
||
122 |
// Close notifier and timer |
|
123 |
iNotifier.Close(); |
|
124 |
iTimer.Close(); |
|
125 |
||
126 |
delete iConnUiUtils; |
|
127 |
||
128 |
delete iWps; |
|
129 |
// Remove self from the queue |
|
130 |
iIapSelection.Session()->MyServer().RemoveFromWlanQueryQueue( this ); |
|
131 |
||
132 |
// Start the next query |
|
133 |
CMPMWlanQueryDialog* dlg = iIapSelection.Session()->MyServer().FirstInWlanQueryQueue(); |
|
134 |
if ( dlg ) |
|
135 |
{ |
|
136 |
MPMLOGSTRING( "CMPMWlanQueryDialog::~CMPMWlanQueryDialog starts new dialog" ) |
|
137 |
dlg->OfferInformation( iWlanIapId, |
|
138 |
iStatus.Int() ); |
|
139 |
// In destructor we cannot let the query leave |
|
140 |
TRAPD( err, dlg->StartWlanQueryL(); ) |
|
141 |
if ( err != KErrNone ) |
|
142 |
{ |
|
143 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::~CMPMWlanQueryDialog caught Leave %d, executing RunError()", err ) |
|
144 |
dlg->RunError( err ); |
|
145 |
} |
|
146 |
} |
|
147 |
||
148 |
MPMLOGSTRING( "CMPMWlanQueryDialog::~CMPMWlanQueryDialog exits" ) |
|
149 |
} |
|
150 |
||
151 |
// --------------------------------------------------------------------------- |
|
152 |
// CMPMWlanQueryDialog::DoCancel |
|
153 |
// --------------------------------------------------------------------------- |
|
154 |
// |
|
155 |
void CMPMWlanQueryDialog::DoCancel() |
|
156 |
{ |
|
157 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::DoCancel state %d", iWlanQueryState ) |
|
158 |
if ( iWlanQueryState == EOffline ) |
|
159 |
{ |
|
160 |
iNotifier.CancelNotifier( KUidCOfflineWlanNoteDlg ); |
|
161 |
} |
|
162 |
else if ( iWlanQueryState == EWlanNetwork ) |
|
163 |
{ |
|
164 |
iConnUiUtils->CancelSearchWLANNetwork(); |
|
165 |
} |
|
166 |
else if ( iWlanQueryState == EWepSettings ) |
|
167 |
{ |
|
168 |
iNotifier.CancelNotifier( KUidEasyWepDlg ); |
|
169 |
} |
|
170 |
else if( iWlanQueryState == EWPS ) |
|
171 |
{ |
|
172 |
iWps->CancelWiFiProt(); |
|
173 |
} |
|
174 |
else if ( iWlanQueryState == EWpaSettings ) |
|
175 |
{ |
|
176 |
iNotifier.CancelNotifier( KUidEasyWpaDlg ); |
|
177 |
} |
|
178 |
else // ERetrySettingsStorage |
|
179 |
{ |
|
180 |
iTimer.Cancel(); |
|
181 |
} |
|
182 |
} |
|
183 |
||
184 |
// --------------------------------------------------------------------------- |
|
185 |
// CMPMWlanQueryDialog::RunL |
|
186 |
// --------------------------------------------------------------------------- |
|
187 |
// |
|
188 |
void CMPMWlanQueryDialog::RunL() |
|
189 |
{ |
|
190 |
MPMLOGSTRING3( "CMPMWlanQueryDialog::RunL status %d state %d", |
|
191 |
iStatus.Int(), |
|
192 |
iWlanQueryState ) |
|
193 |
if( iWlanQueryState == EOffline ) |
|
194 |
{ |
|
195 |
if( iStatus.Int() == KErrNone ) |
|
196 |
{ |
|
197 |
iIapSelection.Session()->MyServer().SetOfflineWlanQueryResponse( |
|
198 |
EOfflineResponseYes ); |
|
199 |
if( iIapSelection.Session()->MyServer().CommsDatAccess()->CheckEasyWLanL( iWlanIapId ) ) |
|
200 |
{ |
|
201 |
MPMLOGSTRING( "CMPMWlanQueryDialog::RunL starting wlan network query" ) |
|
202 |
GetNetworkPrefs(); |
|
203 |
return; |
|
204 |
} |
|
205 |
} |
|
206 |
else if ( iStatus.Int() == KErrCancel ) |
|
207 |
{ |
|
208 |
iIapSelection.Session()->MyServer().SetOfflineWlanQueryResponse( |
|
209 |
EOfflineResponseNo ); |
|
62
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
210 |
iIapSelection.Session()->MyServer().StartOfflineQueryTimer(); |
58 | 211 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL offline query returned %d", |
212 |
iStatus.Int() ) |
|
213 |
} |
|
214 |
else |
|
215 |
{ |
|
216 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL offline query returned %d", |
|
217 |
iStatus.Int() ) |
|
218 |
} |
|
219 |
} |
|
220 |
else if( iWlanQueryState == EWlanNetwork ) |
|
221 |
{ |
|
222 |
if( iStatus.Int() == KErrNone ) |
|
223 |
{ |
|
224 |
||
225 |
TUint secMode( 0 ); |
|
226 |
TWlanNetMode connMode( EInfra ); |
|
227 |
TInt err = ConnSecModeToCommsDatSecMode( iNetworkPrefs().iSecMode, |
|
228 |
secMode ); |
|
229 |
if( err != KErrNone ) |
|
230 |
{ |
|
231 |
MPMLOGSTRING( "CMPMWlanQueryDialog::RunL, Unknown security mode" ) |
|
232 |
iWlanIapId = 0; |
|
233 |
iWlanQueryState = EWlanNetwork; |
|
234 |
iIapSelection.UserWlanSelectionDoneL( KErrCouldNotConnect, iWlanIapId ); |
|
235 |
return; |
|
236 |
} |
|
237 |
||
238 |
TUint32 configuredIap = iIapSelection.Session()->MyServer(). |
|
239 |
CommsDatAccess()->CheckWLANIapWithSsidL( iNetworkPrefs().iSsId, |
|
240 |
secMode, |
|
241 |
connMode ); |
|
242 |
// If previously unknown IAP, query wep/wpa parameters |
|
243 |
// |
|
244 |
if( !configuredIap ) |
|
245 |
{ |
|
246 |
iEasyWlanSelected = ETrue; |
|
247 |
if ( iNetworkPrefs().iProtectedSetupSupported && |
|
248 |
iNetworkPrefs().iNetworkMode != EWlanConnectionModeAdhoc ) |
|
249 |
{ |
|
250 |
StartWpsDlgL(); |
|
251 |
return; |
|
252 |
} |
|
253 |
// WEP |
|
254 |
// |
|
255 |
if( iNetworkPrefs().iSecMode == EWlanConnectionSecurityWep ) |
|
256 |
{ |
|
257 |
MPMLOGSTRING( "CMPMWlanQueryDialog::RunL unknown wep network" ) |
|
258 |
iWlanQueryState = EWepSettings; |
|
259 |
iNotifier.StartNotifierAndGetResponse( iStatus, |
|
260 |
KUidEasyWepDlg, |
|
261 |
iNotifWep, |
|
262 |
iNotifWep ); |
|
263 |
SetActive(); |
|
264 |
return; |
|
265 |
} |
|
266 |
// WPA |
|
267 |
// |
|
268 |
else if ( iNetworkPrefs().iSecMode == EWlanConnectionSecurityWpaPsk ) |
|
269 |
{ |
|
270 |
MPMLOGSTRING( "CMPMWlanQueryDialog::RunL unknown wpa network" ) |
|
271 |
iWlanQueryState = EWpaSettings; |
|
272 |
iNotifier.StartNotifierAndGetResponse( iStatus, |
|
273 |
KUidEasyWpaDlg, |
|
274 |
iNotifWpaKey, |
|
275 |
iNotifWpaKey ); |
|
276 |
SetActive(); |
|
277 |
return; |
|
278 |
||
279 |
} |
|
280 |
else |
|
281 |
{ |
|
282 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL security mode %d", |
|
283 |
iNetworkPrefs().iSecMode ) |
|
284 |
} |
|
285 |
} |
|
286 |
||
287 |
else |
|
288 |
{ |
|
289 |
iWlanIapId = configuredIap; |
|
290 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL found configured iap matching ssid, id %d", |
|
291 |
iWlanIapId ) |
|
292 |
||
293 |
} |
|
294 |
} |
|
295 |
else if( iStatus.Int() == KErrCancel ) |
|
296 |
{ |
|
297 |
iEasyWlanSelected = EFalse; |
|
298 |
MPMLOGSTRING( "CMPMWlanQueryDialog::RunL easy wlan dialog cancelled, \ |
|
299 |
setting easy wlan as not selected" ) |
|
300 |
} |
|
301 |
else |
|
302 |
{ |
|
303 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL EWlanNetwork error %d", |
|
304 |
iStatus.Int() ) |
|
305 |
} |
|
306 |
||
307 |
} |
|
308 |
else if( iWlanQueryState == EWepSettings || iWlanQueryState == EWpaSettings ) |
|
309 |
{ |
|
310 |
if( iStatus.Int() == KErrCancel ) |
|
311 |
{ |
|
312 |
MPMLOGSTRING( "CMPMWlanQueryDialog::Key dialog cancelled,back to easy wlan" ) |
|
313 |
iNetworkPrefs().iSsId.FillZ(); |
|
314 |
iNetworkPrefs().iNetworkMode = EWlanConnectionModeNotConnected; |
|
315 |
iNetworkPrefs().iSecMode = EWlanConnectionSecurityOpen; |
|
316 |
GetNetworkPrefs(); |
|
317 |
return; |
|
318 |
} |
|
319 |
} |
|
320 |
else if( iWlanQueryState == EWPS ) |
|
321 |
{ |
|
322 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL WPS, status %d", iStatus.Int() ) |
|
323 |
if( iStatus.Int() == KErrNone ) |
|
324 |
{ |
|
325 |
if( iWpsReturn == WiFiProt::EWiFiOK) |
|
326 |
{ |
|
327 |
MPMLOGSTRING( "CMPMWlanQueryDialog::RunL WPS ok" ) |
|
328 |
iWpsCompleted = ETrue; |
|
329 |
} |
|
330 |
else if ( iWpsReturn == WiFiProt::EWiFiCancel ) |
|
331 |
{ |
|
332 |
MPMLOGSTRING( "CMPMWlanQueryDialog::RunL WPS cancelled" ) |
|
333 |
iStatus = KErrCancel; |
|
334 |
} |
|
335 |
else // WiFiProt::EWiFiNoAuto |
|
336 |
{ |
|
337 |
if( iNetworkPrefs().iSecMode == EWlanConnectionSecurityWep ) |
|
338 |
{ |
|
339 |
MPMLOGSTRING( "CMPMWlanQueryDialog::RunL: No WPS, starting WEP key query" ); |
|
340 |
iWlanQueryState = EWepSettings; |
|
341 |
iNotifier.StartNotifierAndGetResponse( iStatus, |
|
342 |
KUidEasyWepDlg, |
|
343 |
iNotifWep, |
|
344 |
iNotifWep ); |
|
345 |
SetActive(); |
|
346 |
return; |
|
347 |
} |
|
348 |
else if ( iNetworkPrefs().iSecMode == EWlanConnectionSecurityWpaPsk ) |
|
349 |
{ |
|
350 |
MPMLOGSTRING( "CMPMWlanQueryDialog::RunL: No WPS, starting WPA key query" ); |
|
351 |
iWlanQueryState = EWpaSettings; |
|
352 |
iNotifier.StartNotifierAndGetResponse( iStatus, |
|
353 |
KUidEasyWpaDlg, |
|
354 |
iNotifWpaKey, |
|
355 |
iNotifWpaKey ); |
|
356 |
SetActive(); |
|
357 |
return; |
|
358 |
} |
|
359 |
else if ( iNetworkPrefs().iSecMode == EWlanConnectionSecurityOpen ) |
|
360 |
{ |
|
361 |
MPMLOGSTRING( "CMPMWlanQueryDialog::RunL: No WPS, sec mode open" ); |
|
362 |
iStatus = KErrNone; |
|
363 |
} |
|
364 |
else |
|
365 |
{ |
|
366 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL: No WPS, unsupported sec mode %d", |
|
367 |
iNetworkPrefs().iSecMode ); |
|
368 |
iStatus = KErrNotSupported; |
|
369 |
} |
|
370 |
} |
|
371 |
} |
|
372 |
} |
|
373 |
else if ( iWlanQueryState == ERetrySettingsStorage ) |
|
374 |
{ |
|
375 |
// Retry settings storage |
|
376 |
MPMLOGSTRING( "CMPMWlanQueryDialog::RunL Retry settings storage" ) |
|
377 |
} |
|
378 |
else |
|
379 |
{ |
|
380 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL, unknown state: %d", iWlanQueryState ) |
|
381 |
User::Leave( KErrCancel ); |
|
382 |
} |
|
383 |
||
384 |
TRAPD( leaveCode, iIapSelection.UserWlanSelectionDoneL( iStatus.Int(), iWlanIapId ) ); |
|
385 |
if( leaveCode != KErrNone ) |
|
386 |
{ |
|
387 |
// Something caused method to leave, if CommsDat was locked we should retry |
|
388 |
if ( iStatus.Int() == KErrNone && |
|
389 |
leaveCode == KErrLocked && |
|
390 |
iRetryCount > 0 ) |
|
391 |
{ |
|
392 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL Start retry timer, retry count %d", iRetryCount ) |
|
393 |
iWlanQueryState = ERetrySettingsStorage; |
|
394 |
iRetryCount--; |
|
395 |
iTimer.After( iStatus, KStoreRetryDelay ); |
|
396 |
SetActive(); |
|
397 |
return; |
|
398 |
} |
|
399 |
else |
|
400 |
{ |
|
401 |
User::Leave( leaveCode ); |
|
402 |
} |
|
403 |
} |
|
404 |
||
405 |
iWlanIapId = 0; |
|
406 |
iWlanQueryState = EWlanNetwork; |
|
407 |
} |
|
408 |
||
409 |
// --------------------------------------------------------------------------- |
|
410 |
// CMPMWlanQueryDialog::RunError |
|
411 |
// --------------------------------------------------------------------------- |
|
412 |
// |
|
413 |
TInt CMPMWlanQueryDialog::RunError( TInt aError ) |
|
414 |
{ |
|
415 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::RunError failed with %d", aError ) |
|
416 |
iEasyWlanSelected = EFalse; |
|
417 |
iIapSelection.ChooseIapComplete( aError, NULL ); |
|
418 |
return KErrNone; |
|
419 |
} |
|
420 |
||
421 |
// ----------------------------------------------------------------------------- |
|
422 |
// CMPMWlanQueryDialog::StartWlanQueryL |
|
423 |
// ----------------------------------------------------------------------------- |
|
424 |
// |
|
425 |
void CMPMWlanQueryDialog::StartWlanQueryL() |
|
426 |
{ |
|
427 |
MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery" ) |
|
428 |
||
429 |
iRetryCount = KStoreRetryCount; |
|
430 |
||
431 |
// if first dialog user, add it to the array and continue. |
|
432 |
// |
|
433 |
if ( iIapSelection.Session()->MyServer().WlanQueryQueue()->Count() == 0 ) |
|
434 |
{ |
|
435 |
MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery First one, start immediately" ) |
|
436 |
iIapSelection.Session()->MyServer().AppendWlanQueryQueueL( this ); |
|
437 |
} |
|
438 |
// if another dialog should be processed before this, just add and return. |
|
439 |
// |
|
440 |
else if ( iIapSelection.Session()->MyServer().FirstInWlanQueryQueue() != this ) |
|
441 |
{ |
|
442 |
MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery Latter, process later" ) |
|
443 |
iIapSelection.Session()->MyServer().AppendWlanQueryQueueL( this ); |
|
444 |
return; |
|
445 |
} |
|
446 |
// else Continue to process the first dialog.(this one) |
|
447 |
// FirstInWlanQueryQueue() == this && Count() > 0 |
|
448 |
||
449 |
TUint32 activeWlanIap = iIapSelection.Session()->MyServer().IsWlanConnectionStartedL( |
|
450 |
iIapSelection.Session()->MyServer().CommsDatAccess() ); |
|
451 |
||
452 |
// Get EmergencyCallInfo via Publish & Subscribe |
|
453 |
// |
|
454 |
TInt emergencyCallEstablished( 0 ); |
|
455 |
RProperty::Get( KPSUidCtsyEmergencyCallInfo, |
|
456 |
KCTSYEmergencyCallInfo, |
|
457 |
emergencyCallEstablished ); |
|
458 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::StartWlanQuery KCTSYEmergencyCallInfo = %d", |
|
459 |
emergencyCallEstablished ) |
|
460 |
||
461 |
// Get note behaviour setting |
|
462 |
TUint32 noteBehaviour( 0 ); |
|
463 |
noteBehaviour = iIapSelection.MpmConnPref().NoteBehaviour(); |
|
464 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::StartWlanQuery noteBehaviour = %d", noteBehaviour ) |
|
465 |
||
466 |
if( !emergencyCallEstablished && |
|
467 |
iIapSelection.Session()->MyServer().IsPhoneOffline() && |
|
468 |
!activeWlanIap && |
|
469 |
iIapSelection.Session()->MyServer().OfflineWlanQueryResponse() != EOfflineResponseYes && |
|
470 |
iOverrideStatus == KErrNone ) |
|
471 |
{ |
|
472 |
if ( noteBehaviour & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) |
|
473 |
{ |
|
474 |
MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery offline note query not shown due to disabled queries" ) |
|
475 |
iIapSelection.UserWlanSelectionDoneL( KErrPermissionDenied, iWlanIapId ); |
|
476 |
} |
|
477 |
else |
|
62
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
478 |
{ |
58 | 479 |
iWlanQueryState = EOffline; |
62
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
480 |
if ( !iIapSelection.Session()->MyServer().IsOfflineQueryTimerOn() ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
481 |
{ |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
482 |
MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery, starting offline query" ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
483 |
iNotifier.StartNotifierAndGetResponse( iStatus, |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
484 |
KUidCOfflineWlanNoteDlg, |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
485 |
KNullDesC8(), |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
486 |
iOfflineReply ); |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
487 |
SetActive(); |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
488 |
} |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
489 |
else |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
490 |
{ |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
491 |
MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery, offline note not shown as OfflineQueryTimer is active" ) |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
492 |
iIapSelection.UserWlanSelectionDoneL( KErrPermissionDenied, iWlanIapId ); |
bb1f80fb7db2
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
493 |
} |
58 | 494 |
} |
495 |
} |
|
496 |
// if easy wlan iap and some wlan iap started, use existing connection |
|
497 |
// |
|
498 |
else if( iIapSelection.Session()->MyServer().CommsDatAccess()->CheckEasyWLanL( iWlanIapId ) && |
|
499 |
activeWlanIap ) |
|
500 |
{ |
|
501 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::StartWlanQuery using active WLAN IAP %d", |
|
502 |
activeWlanIap ) |
|
503 |
iIapSelection.UserWlanSelectionDoneL( KErrNone, activeWlanIap ); |
|
504 |
} |
|
505 |
// if easy wlan iap and easy wlan is not already started |
|
506 |
// |
|
507 |
else if( iIapSelection.Session()->MyServer().CommsDatAccess()->CheckEasyWLanL( iWlanIapId ) && |
|
508 |
iIapSelection.Session()->MyServer().CheckUsageOfIap( |
|
509 |
iWlanIapId, iIapSelection.Session()->ConnectionId() ) != EStarted && |
|
510 |
iNetworkPrefs().iSsId.Length() == 0 && |
|
511 |
iOverrideStatus == KErrNone ) |
|
512 |
{ |
|
513 |
MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery starting network query" ) |
|
514 |
GetNetworkPrefs(); |
|
515 |
} |
|
516 |
// if an error was given through OfferInformation() -call we abort the execution. |
|
517 |
// |
|
518 |
else if ( iOverrideStatus != KErrNone ) |
|
519 |
{ |
|
520 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::StartWlanQuery inherited error %d", iOverrideStatus ) |
|
521 |
iIapSelection.UserWlanSelectionDoneL( iOverrideStatus, iWlanIapId ); |
|
522 |
} |
|
523 |
else |
|
524 |
{ |
|
525 |
MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery no wlan dialog to show" ) |
|
526 |
iIapSelection.UserWlanSelectionDoneL( KErrNone, iWlanIapId ); |
|
527 |
} |
|
528 |
} |
|
529 |
||
530 |
||
531 |
// ----------------------------------------------------------------------------- |
|
532 |
// CMPMWlanQueryDialog::OfferInformation |
|
533 |
// ----------------------------------------------------------------------------- |
|
534 |
// |
|
535 |
void CMPMWlanQueryDialog::OfferInformation( |
|
536 |
TUint32 aWlanIapId, |
|
537 |
TInt aDialogStatus ) |
|
538 |
{ |
|
539 |
TBool isEasyWlan( EFalse ); |
|
540 |
// Take information from earlier note into use |
|
541 |
// if the selected IAP is EasyWLAN or Offline note response was No. |
|
542 |
// |
|
543 |
TRAP_IGNORE( isEasyWlan = |
|
544 |
iIapSelection.Session()->MyServer().CommsDatAccess()->CheckEasyWLanL( iWlanIapId ); ) |
|
545 |
if ( isEasyWlan ) |
|
546 |
{ |
|
547 |
// iEasyWlanSelected is not passed as only the first connection |
|
548 |
// should write the easy wlan settings to commsdat if easy wlan is used. |
|
549 |
// |
|
550 |
MPMLOGSTRING3( "CMPMWlanQueryDialog<0x%x>::OfferInformation: EasyWLAN, iap %d", |
|
551 |
iIapSelection.Session()->ConnectionId(), |
|
552 |
aWlanIapId ) |
|
553 |
||
554 |
iWlanIapId = aWlanIapId; |
|
555 |
iOverrideStatus = aDialogStatus; |
|
556 |
} |
|
557 |
TOfflineWlanQueryResponse offlineResponse = |
|
558 |
iIapSelection.Session()->MyServer().OfflineWlanQueryResponse(); |
|
559 |
if ( offlineResponse != EOfflineResponseUndefined ) |
|
560 |
{ |
|
561 |
MPMLOGSTRING3( "CMPMWlanQueryDialog<0x%x>::OfferInformation: offline response %d", |
|
562 |
iIapSelection.Session()->ConnectionId(), |
|
563 |
offlineResponse ) |
|
564 |
iOverrideStatus = aDialogStatus; |
|
565 |
} |
|
566 |
||
567 |
#ifdef _LOG |
|
568 |
else |
|
569 |
{ |
|
570 |
MPMLOGSTRING( "CMPMWlanQueryDialog::OfferInformation, information not taken." ) |
|
571 |
} |
|
572 |
#endif |
|
573 |
} |
|
574 |
||
575 |
||
576 |
// ----------------------------------------------------------------------------- |
|
577 |
// CMPMWlanQueryDialog::StoreEasyWlanSelectionL |
|
578 |
// ----------------------------------------------------------------------------- |
|
579 |
// |
|
580 |
void CMPMWlanQueryDialog::StoreEasyWlanSelectionL() |
|
581 |
{ |
|
582 |
if( iEasyWlanSelected ) |
|
583 |
{ |
|
584 |
TWlanSsid ssid; |
|
585 |
TWepKeyData wepData; |
|
586 |
TUint wpaPskEnabled( 0 ); |
|
587 |
TUint wpaPskLen( 0 ); |
|
588 |
TBuf8<KWLMMaxWpaPskLength> wpa; |
|
589 |
TUint secMode( 0 ); |
|
590 |
TWlanNetMode connMode( EInfra ); |
|
591 |
||
592 |
if( iWpsCompleted ) |
|
593 |
{ |
|
594 |
GetEasyWlanDataForWpsL( ssid, |
|
595 |
secMode, |
|
596 |
connMode, |
|
597 |
wepData, |
|
598 |
wpaPskEnabled, |
|
599 |
wpa, |
|
600 |
wpaPskLen ); |
|
601 |
MPMLOGSTRING3( "CMPMWlanQueryDialog::StoreEasyWlanSelection: \ |
|
602 |
wps used, connection iap %d, ssid %S", iWlanIapId, &iWpsAttribute.iSsid ) |
|
603 |
iIapSelection.Session()->MyServer().Events()-> |
|
604 |
SetConnInfoIapSsid( iWlanIapId, |
|
605 |
iWpsAttribute.iSsid ); |
|
606 |
iIapSelection.Session()->MyServer().CommsDatAccess()->SetEasyWlanDataL( ssid, |
|
607 |
secMode, |
|
608 |
connMode, |
|
609 |
wepData, |
|
610 |
wpaPskEnabled, |
|
611 |
wpa, |
|
612 |
wpaPskLen ); |
|
613 |
return; |
|
614 |
} |
|
615 |
||
616 |
MPMLOGSTRING( "CMPMWlanQueryDialog::StoreEasyWlanSelection: setting easy wlan data" ) |
|
617 |
GetEasyWlanDataL( ssid, |
|
618 |
secMode, |
|
619 |
connMode, |
|
620 |
wepData, |
|
621 |
wpaPskEnabled, |
|
622 |
wpa, |
|
623 |
wpaPskLen ); |
|
624 |
||
625 |
MPMLOGSTRING3( "CMPMWlanQueryDialog::StoreEasyWlanSelection: \ |
|
626 |
setting easy wlan iap %d ssid %S in connmon events", iWlanIapId, &iNetworkPrefs().iSsId ) |
|
627 |
iIapSelection.Session()->MyServer().Events()->SetConnInfoIapSsid( iWlanIapId, |
|
628 |
iNetworkPrefs().iSsId ); |
|
629 |
iIapSelection.Session()->MyServer().CommsDatAccess()->SetEasyWlanDataL( ssid, |
|
630 |
secMode, |
|
631 |
connMode, |
|
632 |
wepData, |
|
633 |
wpaPskEnabled, |
|
634 |
wpa, |
|
635 |
wpaPskLen ); |
|
636 |
||
637 |
} |
|
638 |
else |
|
639 |
{ |
|
640 |
MPMLOGSTRING( "CMPMWlanQueryDialog::StoreEasyWlanSelection: no easy wlan selected by user" ) |
|
641 |
} |
|
642 |
} |
|
643 |
||
644 |
||
645 |
// ----------------------------------------------------------------------------- |
|
646 |
// CMPMWlanQueryDialog::GetEasyWlanDataL |
|
647 |
// ----------------------------------------------------------------------------- |
|
648 |
// |
|
649 |
void CMPMWlanQueryDialog::GetEasyWlanDataL( TWlanSsid& aSsid, |
|
650 |
TUint& aSecMode, |
|
651 |
TWlanNetMode& aConnMode, |
|
652 |
TWepKeyData& aWepData, |
|
653 |
TUint& aEnableWpaPsk, |
|
654 |
TDes8& aWpaPsk, |
|
655 |
TUint& aWpaKeyLen ) |
|
656 |
{ |
|
657 |
aSsid.Copy( iNetworkPrefs().iSsId ); |
|
658 |
if ( iNetworkPrefs().iNetworkMode == EWlanConnectionModeAdhoc ) |
|
659 |
{ |
|
660 |
aConnMode = EAdhoc; |
|
661 |
} |
|
662 |
||
663 |
// Set security mode |
|
664 |
TInt err = ConnSecModeToCommsDatSecMode( iNetworkPrefs().iSecMode, |
|
665 |
aSecMode ); |
|
666 |
||
667 |
if( err != KErrNone ) |
|
668 |
{ |
|
669 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::StoreEasyWlanSelection: \ |
|
670 |
unsupported sec mode %d. leaving", iNetworkPrefs().iSecMode ) |
|
671 |
User::Leave( KErrNotSupported ); |
|
672 |
} |
|
673 |
||
674 |
if( iNetworkPrefs().iSecMode == EWlanConnectionSecurityWep ) |
|
675 |
{ |
|
676 |
CnvUtfConverter::ConvertFromUnicodeToUtf8( aWepData.iWep1, iNotifWep().iKey ); |
|
677 |
//MPMLOG8STRING2( "CMPMWlanQueryDialog::StoreEasyWlanSelection:wep-key8:%S ", &aWepData.iWep1 ) |
|
678 |
if( iNotifWep().iHex ) |
|
679 |
{ |
|
680 |
aWepData.iWepFormat1 = 1; |
|
681 |
MPMLOGSTRING( "CMPMWlanQueryDialog::StoreEasyWlanSelection: wep format is 1 (hex)") |
|
682 |
} |
|
683 |
aWepData.iDefaultWep = EWlanDefaultWepKey1; |
|
684 |
} |
|
685 |
else if( iNetworkPrefs().iSecMode == EWlanConnectionSecurityWpaPsk ) |
|
686 |
{ |
|
687 |
CnvUtfConverter::ConvertFromUnicodeToUtf8( aWpaPsk, iNotifWpaKey() ); |
|
688 |
aEnableWpaPsk = 1; |
|
689 |
aWpaKeyLen = aWpaPsk.Length(); |
|
690 |
MPMLOGSTRING3( "CMPMWlanQueryDialog::StoreEasyWlanSelection:wpapsk-key:%s, len:%d", |
|
691 |
&iNotifWpaKey(), |
|
692 |
aWpaKeyLen ) |
|
693 |
} |
|
694 |
else |
|
695 |
{ |
|
696 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::StoreEasyWlanSelection: \ |
|
697 |
no key handling needed for sec mode %d", iNetworkPrefs().iSecMode ) |
|
698 |
} |
|
699 |
} |
|
700 |
||
701 |
// --------------------------------------------------------------------------- |
|
702 |
// CMPMWlanQueryDialog::ConnSecModeToCommsDatSecMode |
|
703 |
// --------------------------------------------------------------------------- |
|
704 |
// |
|
705 |
TInt CMPMWlanQueryDialog::ConnSecModeToCommsDatSecMode( TWlanConnectionSecurityMode aConnSecmode, |
|
706 |
TUint& aCommsdatSecMode ) const |
|
707 |
{ |
|
708 |
||
709 |
if ( aConnSecmode == EWlanConnectionSecurityOpen ) |
|
710 |
{ |
|
711 |
aCommsdatSecMode = EWlanSecModeOpen; |
|
712 |
} |
|
713 |
else if ( aConnSecmode == EWlanConnectionSecurityWep ) |
|
714 |
{ |
|
715 |
aCommsdatSecMode = EWlanSecModeWep; |
|
716 |
} |
|
717 |
else if ( aConnSecmode == EWlanConnectionSecurityWpaPsk ) |
|
718 |
{ |
|
719 |
aCommsdatSecMode = EWlanSecModeWpa2; |
|
720 |
} |
|
721 |
else if ( aConnSecmode == EWlanConnectionSecurityWpa ) |
|
722 |
{ |
|
723 |
aCommsdatSecMode = EWlanSecModeWpa; |
|
724 |
} |
|
725 |
else |
|
726 |
{ |
|
727 |
MPMLOGSTRING( "CMPMWlanQueryDialog::RunL, Unknown security mode" ) |
|
728 |
return KErrCouldNotConnect; |
|
729 |
} |
|
730 |
return KErrNone; |
|
731 |
} |
|
732 |
||
733 |
||
734 |
// --------------------------------------------------------------------------- |
|
735 |
// CMPMWlanQueryDialog::IapSecModeToCommsDatSecMode |
|
736 |
// --------------------------------------------------------------------------- |
|
737 |
// |
|
738 |
TInt CMPMWlanQueryDialog::IapSecModeToCommsDatSecMode( TWlanIapSecurityMode aIapSecmode, |
|
739 |
TUint& aCommsdatSecMode ) const |
|
740 |
{ |
|
741 |
switch( aIapSecmode ) |
|
742 |
{ |
|
743 |
case EWlanIapSecurityModeAllowUnsecure: |
|
744 |
aCommsdatSecMode |= EWlanSecModeOpen; |
|
745 |
break; |
|
746 |
case EWlanIapSecurityModeWep: |
|
747 |
aCommsdatSecMode |= EWlanSecModeWep; |
|
748 |
break; |
|
749 |
case EWlanIapSecurityModeWpa: |
|
750 |
aCommsdatSecMode |= EWlanSecModeWpa; |
|
751 |
break; |
|
752 |
case EWlanIapSecurityModeWpa2Only: |
|
753 |
aCommsdatSecMode |= EWlanSecModeWpa2; |
|
754 |
break; |
|
755 |
default: |
|
756 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::IapSecModeToCommsDatSecMode: \ |
|
757 |
unsupported sec mode %d ", aIapSecmode ) |
|
758 |
return KErrNotSupported; |
|
759 |
} |
|
760 |
return KErrNone; |
|
761 |
} |
|
762 |
||
763 |
// ----------------------------------------------------------------------------- |
|
764 |
// CMPMWlanQueryDialog::GetEasyWlanDataForWpsL |
|
765 |
// ----------------------------------------------------------------------------- |
|
766 |
// |
|
767 |
void CMPMWlanQueryDialog::GetEasyWlanDataForWpsL( TWlanSsid& aSsid, |
|
768 |
TUint& aSecMode, |
|
769 |
TWlanNetMode& aConnMode, |
|
770 |
TWepKeyData& aWepKeyData, |
|
771 |
TUint& aEnableWpaPsk, |
|
772 |
TDes8& aWpaPsk, |
|
773 |
TUint& aWpaKeyLen ) |
|
774 |
{ |
|
775 |
aSsid.Copy( iWpsAttribute.iSsid ); |
|
776 |
if ( iWpsAttribute.iOperatingMode == EWlanOperatingModeAdhoc ) |
|
777 |
{ |
|
778 |
aConnMode = EAdhoc; |
|
779 |
} |
|
780 |
TInt err = IapSecModeToCommsDatSecMode( iWpsAttribute.iSecurityMode, |
|
781 |
aSecMode ); |
|
782 |
if( err != KErrNone ) |
|
783 |
{ |
|
784 |
MPMLOGSTRING( "CMPMWlanQueryDialog::GetEasyWlanDataForWpsL: \ |
|
785 |
unsupported wps sec mode leaving" ) |
|
786 |
User::Leave( KErrNotSupported ); |
|
787 |
} |
|
788 |
||
789 |
if( iWpsAttribute.iSecurityMode == EWlanIapSecurityModeWep ) |
|
790 |
{ |
|
791 |
if( iWpsAttribute.iWepKey1.Length() && |
|
792 |
IsWepFormatHexL( iWpsAttribute.iWepKey1.Length() ) ) |
|
793 |
{ |
|
794 |
aWepKeyData.iWepFormat1 = 1; |
|
795 |
} |
|
796 |
if( iWpsAttribute.iWepKey2.Length() && |
|
797 |
IsWepFormatHexL( iWpsAttribute.iWepKey2.Length() ) ) |
|
798 |
{ |
|
799 |
aWepKeyData.iWepFormat2 = 1; |
|
800 |
} |
|
801 |
if( iWpsAttribute.iWepKey3.Length() && |
|
802 |
IsWepFormatHexL( iWpsAttribute.iWepKey3.Length() ) ) |
|
803 |
{ |
|
804 |
aWepKeyData.iWepFormat3 = 1; |
|
805 |
} |
|
806 |
if( iWpsAttribute.iWepKey4.Length() && |
|
807 |
IsWepFormatHexL( iWpsAttribute.iWepKey4.Length() ) ) |
|
808 |
{ |
|
809 |
aWepKeyData.iWepFormat4 = 1; |
|
810 |
} |
|
811 |
aWepKeyData.iWep1.Copy( iWpsAttribute.iWepKey1 ); |
|
812 |
aWepKeyData.iWep2.Copy( iWpsAttribute.iWepKey2 ); |
|
813 |
aWepKeyData.iWep3.Copy( iWpsAttribute.iWepKey3 ); |
|
814 |
aWepKeyData.iWep4.Copy( iWpsAttribute.iWepKey4 ); |
|
815 |
aWepKeyData.iDefaultWep = iWpsAttribute.iWepDefaultKey; |
|
816 |
} |
|
817 |
if( iWpsAttribute.iWpaPreSharedKey.Length() ) |
|
818 |
{ |
|
819 |
aEnableWpaPsk = 1; |
|
820 |
aWpaPsk.Copy( iWpsAttribute.iWpaPreSharedKey ); |
|
821 |
aWpaKeyLen = aWpaPsk.Length(); |
|
822 |
} |
|
823 |
||
824 |
} |
|
825 |
||
826 |
// --------------------------------------------------------------------------- |
|
827 |
// CMPMWlanQueryDialog::StartWpsDlgL |
|
828 |
// --------------------------------------------------------------------------- |
|
829 |
// |
|
830 |
void CMPMWlanQueryDialog::StartWpsDlgL() |
|
831 |
{ |
|
832 |
MPMLOGSTRING( "CMPMWlanQueryDialog::StartWpsDlgL, Starting WPS" ) |
|
833 |
iWlanQueryState = EWPS; |
|
834 |
iWps = CWiFiProtUiClient::NewL(); |
|
835 |
iWps->StartWiFiProtConnL( iNetworkPrefs().iSsId, // TWlanSsid&, |
|
836 |
iWpsAttribute, |
|
837 |
iWpsReturn, |
|
838 |
iStatus ); |
|
839 |
SetActive(); |
|
840 |
} |
|
841 |
||
842 |
// --------------------------------------------------------------------------- |
|
843 |
// CMPMWlanQueryDialog::IsWepFormatHexL |
|
844 |
// --------------------------------------------------------------------------- |
|
845 |
// |
|
846 |
TBool CMPMWlanQueryDialog::IsWepFormatHexL( TInt aLength ) const |
|
847 |
{ |
|
848 |
MPMLOGSTRING2( "CMPMWlanQueryDialog::IsWepFormatHexL length %d", aLength ) |
|
849 |
||
850 |
if ( ( aLength == KConnUiUtilsWepLengthASCII5 ) || |
|
851 |
( aLength == KConnUiUtilsWepLengthASCII13 ) || |
|
852 |
( aLength == KConnUiUtilsWepLengthASCII29 ) ) |
|
853 |
{ |
|
854 |
return EFalse; |
|
855 |
} |
|
856 |
else if ( ( aLength == KConnUiUtilsWepLengthHEX10 ) || |
|
857 |
( aLength == KConnUiUtilsWepLengthHEX26 ) || |
|
858 |
( aLength == KConnUiUtilsWepLengthHEX58 ) ) |
|
859 |
{ |
|
860 |
return ETrue; |
|
861 |
} |
|
862 |
else |
|
863 |
{ |
|
864 |
User::Leave( KErrNotSupported ); |
|
865 |
} |
|
866 |
return EFalse; |
|
867 |
} |
|
868 |
||
869 |
// --------------------------------------------------------------------------- |
|
870 |
// CMPMWlanQueryDialog::GetNetworkPrefs |
|
871 |
// --------------------------------------------------------------------------- |
|
872 |
// |
|
873 |
void CMPMWlanQueryDialog::GetNetworkPrefs() |
|
874 |
{ |
|
875 |
iWlanQueryState = EWlanNetwork; |
|
876 |
iConnUiUtils->SearchWLANNetworkAsync( iStatus, |
|
877 |
iNetworkPrefs().iSsId, |
|
878 |
iNetworkPrefs().iNetworkMode, |
|
879 |
iNetworkPrefs().iSecMode, |
|
880 |
iNetworkPrefs().iProtectedSetupSupported |
|
881 |
); |
|
882 |
SetActive(); |
|
883 |
} |
|
884 |