author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 13 Oct 2010 14:35:46 +0300 | |
branch | RCL_3 |
changeset 55 | 9c2aa05919d9 |
parent 46 | c74b3d9f6b9e |
permissions | -rw-r--r-- |
46 | 1 |
/* |
2 |
* Copyright (c) 2001-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: Implementation of dialog. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
/* |
|
55
9c2aa05919d9
Revision: 201036
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
19 |
* %version: tr1cfwln#31 % |
46 | 20 |
*/ |
21 |
||
22 |
// INCLUDE FILES |
|
23 |
#include "WPASecuritySettingsDlg.h" |
|
24 |
#include "WPASecuritySettingsUiPanic.h" |
|
25 |
||
26 |
#include "WPASecuritySettingsUI.hrh" |
|
27 |
||
28 |
#include "WPASecuritySettingsDefs.h" |
|
29 |
||
30 |
#include <csxhelp/cp.hlp.hrh> |
|
31 |
#include <hlplch.h> |
|
32 |
||
33 |
#include <featmgr.h> |
|
34 |
||
35 |
#include <akntitle.h> |
|
36 |
#include <aknradiobuttonsettingpage.h> |
|
37 |
#include <StringLoader.h> |
|
38 |
#include <aknnotewrappers.h> |
|
39 |
#include <akntextsettingpage.h> |
|
40 |
#include <EAPPluginConfigurationIf.h> |
|
41 |
||
42 |
#include <WPASecuritySettingsUI.rsg> |
|
43 |
||
44 |
||
45 |
// CONSTANT DECLARATIONS |
|
46 |
||
47 |
// Number of fields of main view |
|
48 |
LOCAL_D const TInt KNumOfFieldsMain = 3; |
|
49 |
||
50 |
// Menu List item format |
|
51 |
_LIT( KTxtMenuListItemFormat, " \t%S\t\t" ); |
|
52 |
||
53 |
// Number of spaces and tabs in KTxtMenuListItemFormat string |
|
54 |
LOCAL_D const TInt KSpaceAndTabsLength = 4; |
|
55 |
||
56 |
||
57 |
||
58 |
// ================= MEMBER FUNCTIONS ======================= |
|
59 |
||
60 |
// --------------------------------------------------------- |
|
61 |
// CWPASecuritySettingsDlg::CWPASecuritySettingsDlg |
|
62 |
// --------------------------------------------------------- |
|
63 |
// |
|
64 |
CWPASecuritySettingsDlg::CWPASecuritySettingsDlg( TInt& aEventStore, |
|
65 |
const TUint32 aIapId, |
|
66 |
CEAPPluginConfigurationIf* aPlugin ) |
|
67 |
: iEventStore( &aEventStore ), |
|
68 |
iIapId( aIapId ), |
|
69 |
iPlugin( aPlugin ) |
|
70 |
{ |
|
71 |
} |
|
72 |
||
73 |
||
74 |
// --------------------------------------------------------- |
|
75 |
// CWPASecuritySettingsDlg::~CWPASecuritySettingsDlg |
|
76 |
// --------------------------------------------------------- |
|
77 |
// |
|
78 |
CWPASecuritySettingsDlg::~CWPASecuritySettingsDlg() |
|
79 |
{ |
|
80 |
if ( iTitlePane ) |
|
81 |
{ |
|
82 |
// set old text back, if we have it... |
|
83 |
if ( iOldTitleText ) |
|
84 |
{ |
|
85 |
TRAP_IGNORE( iTitlePane->SetTextL( *iOldTitleText ) ); |
|
86 |
delete iOldTitleText; |
|
87 |
} |
|
88 |
} |
|
89 |
||
90 |
FeatureManager::UnInitializeLib(); |
|
91 |
} |
|
92 |
||
93 |
||
94 |
// --------------------------------------------------------- |
|
95 |
// CWPASecuritySettingsDlg::NewL |
|
96 |
// --------------------------------------------------------- |
|
97 |
// |
|
98 |
CWPASecuritySettingsDlg* CWPASecuritySettingsDlg::NewL( TInt& aEventStore, |
|
99 |
const TUint32 aIapId, |
|
100 |
CEAPPluginConfigurationIf* aPlugin ) |
|
101 |
{ |
|
102 |
CWPASecuritySettingsDlg* secSett = new ( ELeave )CWPASecuritySettingsDlg( |
|
103 |
aEventStore, aIapId, aPlugin ); |
|
104 |
return secSett; |
|
105 |
} |
|
106 |
||
107 |
||
108 |
// --------------------------------------------------------- |
|
109 |
// CWPASecuritySettingsDlg::ConstructAndRunLD |
|
110 |
// --------------------------------------------------------- |
|
111 |
// |
|
112 |
TInt CWPASecuritySettingsDlg::ConstructAndRunLD( |
|
113 |
CWPASecuritySettingsImpl* aSecuritySettings, |
|
114 |
const TDesC& aTitle ) |
|
115 |
{ |
|
116 |
CleanupStack::PushL( this ); |
|
117 |
||
55
9c2aa05919d9
Revision: 201036
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
118 |
const TInt Titles_Wpa_Main[KNumOfFieldsMain+1] = |
46 | 119 |
{ |
120 |
R_WPA_MODE, |
|
121 |
R_WPA_EAP_CONFIG, |
|
122 |
R_WPA_MODE_PRESHARED_KEY, |
|
55
9c2aa05919d9
Revision: 201036
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
123 |
R_WPA_TKIP_CIPHER |
46 | 124 |
}; |
125 |
||
55
9c2aa05919d9
Revision: 201036
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
126 |
const TInt Fields_Wpa_Main[KNumOfFieldsMain+1] = |
46 | 127 |
{ |
128 |
EWpaMode, |
|
129 |
EWpaEapConfig, |
|
130 |
EWpaPreSharedKey, |
|
55
9c2aa05919d9
Revision: 201036
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
131 |
EWpaWpa2Only |
46 | 132 |
}; |
133 |
||
134 |
iSecuritySettings = aSecuritySettings; |
|
135 |
iConnectionName = aTitle; |
|
136 |
||
137 |
iFieldsMain = ( TWpaMember* ) Fields_Wpa_Main; |
|
138 |
iTitlesMain = MUTABLE_CAST( TInt*, Titles_Wpa_Main ); |
|
139 |
||
140 |
if ( !iSecuritySettings->WPAMode() && !iPlugin ) |
|
141 |
{ |
|
142 |
iSecuritySettings->SetWPAMode( ETrue ); |
|
143 |
*iEventStore |= CWPASecuritySettings::EModified; |
|
144 |
} |
|
145 |
||
146 |
FeatureManager::InitializeLibL(); |
|
147 |
||
148 |
ConstructL( R_WPA_SECURITY_SETTINGS_MENUBAR ); |
|
149 |
||
150 |
// ExecuteLD will PushL( this ), so we have to Pop it... |
|
151 |
CleanupStack::Pop( this ); // this |
|
152 |
||
153 |
return ExecuteLD( R_WPASETTINGS_DIALOG ); |
|
154 |
} |
|
155 |
||
156 |
||
157 |
||
158 |
// --------------------------------------------------------- |
|
159 |
// CWPASecuritySettingsDlg::OkToExitL |
|
160 |
// --------------------------------------------------------- |
|
161 |
// |
|
162 |
TBool CWPASecuritySettingsDlg::OkToExitL( TInt aButtonId ) |
|
163 |
{ |
|
164 |
// Translate the button presses into commands for the appui & current |
|
165 |
// view to handle |
|
166 |
TBool retval( EFalse ); |
|
167 |
if ( aButtonId == EAknSoftkeyOptions ) |
|
168 |
{ |
|
169 |
DisplayMenuL(); |
|
170 |
} |
|
171 |
else if ( aButtonId == EEikCmdExit ) // ShutDown requested |
|
172 |
{ |
|
173 |
*iEventStore |= CWPASecuritySettings::EShutDownReq; |
|
174 |
retval = ETrue; |
|
175 |
} |
|
176 |
else if ( aButtonId == EAknSoftkeyBack || aButtonId == EAknCmdExit ) |
|
177 |
{ |
|
178 |
if ( iSecuritySettings->WPAMode() ) |
|
179 |
{ |
|
180 |
if ( iSecuritySettings->IsValid() ) |
|
181 |
{ |
|
182 |
*iEventStore |= CWPASecuritySettings::EValid; |
|
183 |
retval = ETrue; |
|
184 |
} |
|
185 |
else if ( aButtonId == EAknSoftkeyBack ) |
|
186 |
{ |
|
187 |
HBufC* stringHolder = StringLoader::LoadL( |
|
188 |
R_WPA_PRESHARED_KEYDATA_MISSING, iEikonEnv ); |
|
189 |
CleanupStack::PushL( stringHolder ); |
|
190 |
||
191 |
CAknQueryDialog *queryDialog = new (ELeave) CAknQueryDialog(); |
|
192 |
||
193 |
queryDialog->PrepareLC( R_WPA_SEC_SETT_CONF_QUERY ); |
|
194 |
queryDialog->SetPromptL( stringHolder->Des() ); |
|
195 |
retval = queryDialog->RunLD(); |
|
196 |
||
197 |
CleanupStack::PopAndDestroy( stringHolder ); // stringHolder |
|
198 |
} |
|
199 |
else |
|
200 |
{ |
|
201 |
retval = ETrue; |
|
202 |
} |
|
203 |
} |
|
204 |
else |
|
205 |
{ |
|
206 |
*iEventStore |= CWPASecuritySettings::EValid; |
|
207 |
retval = ETrue; |
|
208 |
} |
|
209 |
||
210 |
if ( aButtonId == EAknCmdExit ) |
|
211 |
{ |
|
212 |
*iEventStore |= CWPASecuritySettings::EExitReq; |
|
213 |
} |
|
214 |
} |
|
215 |
||
216 |
else if( aButtonId == EWpaSelCmdChange ) |
|
217 |
{ |
|
218 |
ChangeSettingsL( ETrue ); |
|
219 |
retval = EFalse; // don't exit the dialog |
|
220 |
} |
|
221 |
||
222 |
return retval; |
|
223 |
} |
|
224 |
||
225 |
||
226 |
// --------------------------------------------------------- |
|
227 |
// CWPASecuritySettingsDlg::OfferKeyEventL |
|
228 |
// --------------------------------------------------------- |
|
229 |
// |
|
230 |
TKeyResponse CWPASecuritySettingsDlg::OfferKeyEventL( |
|
231 |
const TKeyEvent& aKeyEvent, TEventCode aType ) |
|
232 |
{ |
|
233 |
TKeyResponse retval( EKeyWasNotConsumed ); |
|
234 |
||
235 |
// Only interested in standard key events |
|
236 |
if ( aType == EEventKey ) |
|
237 |
{ |
|
238 |
// If a menu is showing offer key events to it. |
|
239 |
if ( CAknDialog::MenuShowing() ) |
|
240 |
{ |
|
241 |
retval = CAknDialog::OfferKeyEventL( aKeyEvent, aType ); |
|
242 |
} |
|
243 |
else |
|
244 |
{ |
|
245 |
if ( iList ) |
|
246 |
{ |
|
247 |
// as list IS consuming, must handle because it IS the SHUTDOWN... |
|
248 |
// or, a view switch is shutting us down... |
|
249 |
if ( aKeyEvent.iCode == EKeyEscape ) |
|
250 |
{ |
|
251 |
ProcessCommandL( EEikCmdExit ); |
|
252 |
retval = EKeyWasConsumed; |
|
253 |
} |
|
254 |
else |
|
255 |
{ |
|
256 |
retval = iList->OfferKeyEventL( aKeyEvent, aType ); |
|
257 |
if ( *iEventStore & CWPASecuritySettings::EShutDownReq ) |
|
258 |
{ |
|
259 |
ProcessCommandL( EEikCmdExit ); |
|
260 |
} |
|
261 |
else if ( *iEventStore & CWPASecuritySettings::EExitReq ) |
|
262 |
{ |
|
263 |
ProcessCommandL( EAknCmdExit ); |
|
264 |
} |
|
265 |
} |
|
266 |
} |
|
267 |
else |
|
268 |
{ |
|
269 |
if ( aKeyEvent.iCode == EKeyOK ) |
|
270 |
{ |
|
271 |
ProcessCommandL( EWpaSelCmdChange ); |
|
272 |
retval = EKeyWasConsumed; |
|
273 |
} |
|
274 |
} |
|
275 |
} |
|
276 |
} |
|
277 |
||
278 |
return retval; |
|
279 |
} |
|
280 |
||
281 |
// --------------------------------------------------------- |
|
282 |
// CWPASecuritySettingsDlg::HandleDialogPageEventL |
|
283 |
// --------------------------------------------------------- |
|
284 |
// |
|
285 |
void CWPASecuritySettingsDlg::HandleDialogPageEventL( TInt aEventID ) |
|
286 |
{ |
|
287 |
CAknDialog::HandleDialogPageEventL( aEventID ); |
|
288 |
if( *iEventStore & CWPASecuritySettings::EExitReq ) |
|
289 |
{ |
|
290 |
// Exit requested, exit with EAknCmdExit. |
|
291 |
TryExitL( EAknCmdExit ); |
|
292 |
} |
|
293 |
||
294 |
} |
|
295 |
||
296 |
// --------------------------------------------------------- |
|
297 |
// CWPASecuritySettingsDlg::HandleListboxDataChangeL |
|
298 |
// --------------------------------------------------------- |
|
299 |
// |
|
300 |
void CWPASecuritySettingsDlg::HandleListboxDataChangeL() |
|
301 |
{ |
|
302 |
// fill up our new list with data |
|
303 |
CDesCArrayFlat* itemArray = new ( ELeave ) CDesCArrayFlat( 4 ); |
|
304 |
CleanupStack::PushL( itemArray ); |
|
305 |
||
306 |
FillListWithDataL( *itemArray, *iFieldsMain, iTitlesMain ); |
|
307 |
||
308 |
iList->Model()->SetItemTextArray( itemArray ); |
|
309 |
||
310 |
CleanupStack::Pop( itemArray ); // now it is owned by the LB, so pop it |
|
311 |
iItemArray = itemArray; |
|
312 |
||
313 |
iList->HandleItemAdditionL(); |
|
314 |
} |
|
315 |
||
316 |
||
317 |
// --------------------------------------------------------- |
|
318 |
// CWPASecuritySettingsDlg::ProcessCommandL |
|
319 |
// --------------------------------------------------------- |
|
320 |
// |
|
321 |
void CWPASecuritySettingsDlg::ProcessCommandL( TInt aCommandId ) |
|
322 |
{ |
|
323 |
if ( MenuShowing() ) |
|
324 |
{ |
|
325 |
HideMenu(); |
|
326 |
} |
|
327 |
||
328 |
switch ( aCommandId ) |
|
329 |
{ |
|
330 |
case EWpaSelCmdChange: |
|
331 |
{ |
|
332 |
ChangeSettingsL( EFalse ); |
|
333 |
break; |
|
334 |
} |
|
335 |
||
336 |
case EAknCmdHelp: |
|
337 |
{ |
|
338 |
HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(), |
|
339 |
iEikonEnv->EikAppUi()->AppHelpContextL() ); |
|
340 |
break; |
|
341 |
} |
|
342 |
||
343 |
case EAknSoftkeyBack: |
|
344 |
case EAknCmdExit: |
|
345 |
case EEikCmdExit: |
|
346 |
{ |
|
347 |
TryExitL( aCommandId ); |
|
348 |
break; |
|
349 |
} |
|
350 |
||
351 |
default: |
|
352 |
{ |
|
353 |
// silently ignore it |
|
354 |
break; |
|
355 |
} |
|
356 |
} |
|
357 |
} |
|
358 |
||
359 |
||
360 |
// --------------------------------------------------------- |
|
361 |
// CWPASecuritySettingsDlg::HandleListBoxEventL |
|
362 |
// --------------------------------------------------------- |
|
363 |
// |
|
364 |
void CWPASecuritySettingsDlg::HandleListBoxEventL( CEikListBox* /*aListBox*/, |
|
365 |
TListBoxEvent aEventType ) |
|
366 |
{ |
|
367 |
switch ( aEventType ) |
|
368 |
{ |
|
369 |
case EEventEnterKeyPressed: |
|
370 |
case EEventItemSingleClicked: |
|
371 |
{ |
|
372 |
ChangeSettingsL( ETrue ); |
|
373 |
break; |
|
374 |
} |
|
375 |
||
376 |
case EEventEditingStarted: |
|
377 |
case EEventEditingStopped: |
|
378 |
case EEventPenDownOnItem: |
|
379 |
case EEventItemDraggingActioned: |
|
380 |
{ |
|
381 |
break; |
|
382 |
} |
|
383 |
||
384 |
default: |
|
385 |
{ |
|
55
9c2aa05919d9
Revision: 201036
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
386 |
__ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); |
46 | 387 |
break; |
388 |
}; |
|
389 |
}; |
|
390 |
} |
|
391 |
||
392 |
||
393 |
// --------------------------------------------------------- |
|
394 |
// CWPASecuritySettingsDlg::PreLayoutDynInitL() |
|
395 |
// --------------------------------------------------------- |
|
396 |
// |
|
397 |
void CWPASecuritySettingsDlg::PreLayoutDynInitL() |
|
398 |
{ |
|
399 |
// first get StatusPane |
|
400 |
CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
|
401 |
||
402 |
// then get TitlePane |
|
403 |
iTitlePane = ( CAknTitlePane* ) statusPane->ControlL( TUid::Uid( |
|
404 |
EEikStatusPaneUidTitle ) ); |
|
405 |
// if not already stored, store it for restoring |
|
406 |
if ( !iOldTitleText ) |
|
407 |
{ |
|
408 |
iOldTitleText = iTitlePane->Text()->AllocL(); |
|
409 |
} |
|
410 |
||
411 |
// set new titlepane text |
|
412 |
iTitlePane->SetTextL( iConnectionName ); |
|
413 |
||
414 |
iList = STATIC_CAST( CAknSettingStyleListBox*, |
|
415 |
Control( KWpaMainSettingsListboxId ) ); |
|
416 |
||
417 |
iList->CreateScrollBarFrameL( ETrue ); |
|
418 |
iList->ScrollBarFrame()->SetScrollBarVisibilityL |
|
419 |
( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto ); |
|
420 |
||
421 |
HandleListboxDataChangeL(); |
|
422 |
||
423 |
iList->SetCurrentItemIndex( 0 ); |
|
424 |
iList->SetListBoxObserver( this ); |
|
425 |
} |
|
426 |
||
427 |
||
428 |
||
429 |
// --------------------------------------------------------- |
|
430 |
// CWPASecuritySettingsDlg::DynInitMenuPaneL |
|
431 |
// --------------------------------------------------------- |
|
432 |
// |
|
433 |
void CWPASecuritySettingsDlg::DynInitMenuPaneL( TInt aResourceId, |
|
434 |
CEikMenuPane* aMenuPane ) |
|
435 |
{ |
|
436 |
CAknDialog::DynInitMenuPaneL( aResourceId, aMenuPane ); |
|
437 |
if ( aResourceId == R_WPA_SECURITY_SETTINGS_MENU ) |
|
438 |
{ |
|
439 |
if ( aMenuPane && !FeatureManager::FeatureSupported( KFeatureIdHelp ) ) |
|
440 |
{ |
|
441 |
aMenuPane->DeleteMenuItem( EAknCmdHelp ); |
|
442 |
} |
|
443 |
} |
|
444 |
} |
|
445 |
||
446 |
||
447 |
//---------------------------------------------------------- |
|
448 |
// CWPASecuritySettingsDlg::FillListWithDataL |
|
449 |
//---------------------------------------------------------- |
|
450 |
// |
|
451 |
void CWPASecuritySettingsDlg::FillListWithDataL( CDesCArrayFlat& aItemArray, |
|
452 |
const TWpaMember& arr, |
|
453 |
const TInt* aRes ) |
|
454 |
{ |
|
455 |
TWpaMember* wpaMember = MUTABLE_CAST( TWpaMember*, &arr ); |
|
456 |
||
457 |
TInt numOfFields = iSecuritySettings->SecurityMode() == ESecurityModeWpa ? |
|
458 |
KNumOfFieldsMain : KNumOfFieldsMain-1; |
|
459 |
||
460 |
for( TInt i = 0; i < numOfFields; i++ ) |
|
461 |
{ |
|
462 |
if ( *wpaMember == EWpaEapConfig && iSecuritySettings->WPAMode() ) |
|
463 |
{ |
|
464 |
wpaMember++; |
|
465 |
aRes++; |
|
466 |
} |
|
467 |
||
468 |
if ( *wpaMember == EWpaEapConfig ) |
|
469 |
{ |
|
470 |
// Define a heap descriptor to hold all the item text |
|
471 |
// HBufC is non-modifiable |
|
472 |
HBufC* title = iEikonEnv->AllocReadResourceLC( *aRes ); |
|
473 |
||
474 |
// Define a heap descriptor to hold all the item text |
|
475 |
HBufC* itemText = HBufC::NewLC( title->Length() + |
|
476 |
KSpaceAndTabsLength ); |
|
477 |
||
478 |
// Define a modifiable pointer descriptor to be able to append |
|
479 |
// text to the non-modifiable heap descriptor itemText |
|
480 |
TPtr itemTextPtr = itemText->Des(); |
|
481 |
itemTextPtr.Format( KTxtMenuListItemFormat, title ); |
|
482 |
||
483 |
aItemArray.AppendL( *itemText ); |
|
484 |
||
485 |
CleanupStack::PopAndDestroy( 2, title ); // itemText, title |
|
486 |
||
487 |
wpaMember++; |
|
488 |
aRes++; |
|
489 |
} |
|
55
9c2aa05919d9
Revision: 201036
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
490 |
else // EWpaMode, EWpaPreSharedKey, EWpaWpa2Only: |
46 | 491 |
{ |
55
9c2aa05919d9
Revision: 201036
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
492 |
HBufC* itemText = CreateTextualListBoxItemL( *wpaMember, *aRes ); |
9c2aa05919d9
Revision: 201036
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
493 |
CleanupStack::PushL( itemText ); |
9c2aa05919d9
Revision: 201036
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
494 |
aItemArray.AppendL( itemText->Des() ); |
9c2aa05919d9
Revision: 201036
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
495 |
CleanupStack::PopAndDestroy( itemText ); |
46 | 496 |
} |
497 |
||
498 |
wpaMember++; |
|
499 |
aRes++; |
|
500 |
} |
|
501 |
} |
|
502 |
||
503 |
||
504 |
//---------------------------------------------------------- |
|
505 |
// CWPASecuritySettingsDlg::UpdateTextualListBoxItemL |
|
506 |
//---------------------------------------------------------- |
|
507 |
// |
|
508 |
void CWPASecuritySettingsDlg::UpdateTextualListBoxItemL( TWpaMember aMember, |
|
509 |
TInt aRes, TInt aPos ) |
|
510 |
{ |
|
511 |
HBufC* itemText; |
|
512 |
HBufC* title; |
|
513 |
||
514 |
if ( aMember == EWpaEapConfig ) |
|
515 |
{ |
|
516 |
title = iEikonEnv->AllocReadResourceLC( aRes ); |
|
517 |
||
518 |
// Define a heap descriptor to hold all the item text |
|
519 |
itemText = HBufC::NewLC( title->Length() + KSpaceAndTabsLength ); |
|
520 |
||
521 |
// Define a modifiable pointer descriptor to be able to append |
|
522 |
// text to the non-modifiable heap descriptor itemText |
|
523 |
TPtr itemTextPtr = itemText->Des(); |
|
524 |
itemTextPtr.Format( KTxtMenuListItemFormat, title ); |
|
525 |
} |
|
526 |
else |
|
527 |
{ |
|
528 |
itemText = CreateTextualListBoxItemL( aMember, aRes ); |
|
529 |
CleanupStack::PushL( itemText ); |
|
530 |
} |
|
531 |
||
532 |
// first try to add, if Leaves, list will be untouched |
|
533 |
iItemArray->InsertL( aPos, itemText->Des() ); |
|
534 |
// if successful, previous item is scrolled up with one, |
|
535 |
// so delete that one... |
|
536 |
if ( ++aPos < iItemArray->MdcaCount() ) |
|
537 |
{ |
|
538 |
iItemArray->Delete( aPos ); |
|
539 |
} |
|
540 |
||
541 |
CleanupStack::PopAndDestroy( itemText ); |
|
542 |
||
543 |
if ( aMember == EWpaEapConfig ) |
|
544 |
{ |
|
545 |
CleanupStack::PopAndDestroy( title ); // title |
|
546 |
} |
|
547 |
} |
|
548 |
||
549 |
||
550 |
//---------------------------------------------------------- |
|
551 |
// CWPASecuritySettingsDlg::CreateTextualListBoxItemL |
|
552 |
//---------------------------------------------------------- |
|
553 |
// |
|
554 |
HBufC* CWPASecuritySettingsDlg::CreateTextualListBoxItemL( TWpaMember aMember, |
|
555 |
TInt aRes ) |
|
556 |
{ |
|
557 |
// Define a heap descriptor to hold all the item text |
|
558 |
// HBufC is non-modifiable |
|
559 |
HBufC* title = iEikonEnv->AllocReadResourceLC( aRes ); |
|
560 |
||
561 |
// both variables needed independently of the following conditions so I |
|
562 |
// must declare them here... |
|
563 |
HBufC16* value; |
|
564 |
TUint32 valueResourceID; |
|
565 |
||
566 |
switch ( aMember ) |
|
567 |
{ |
|
568 |
case EWpaMode: |
|
569 |
{ |
|
570 |
valueResourceID = iSecuritySettings->WPAMode() ? |
|
571 |
R_WPA_MODE_PRESHARED_KEY : R_WPA_MODE_EAP; |
|
572 |
break; |
|
573 |
} |
|
574 |
||
575 |
case EWpaWpa2Only: |
|
576 |
{ |
|
577 |
valueResourceID = iSecuritySettings->Wpa2Only() ? |
|
578 |
R_WPA_CIPHER_NOT_ALLOWED : R_WPA_CIPHER_ALLOWED; |
|
579 |
break; |
|
580 |
} |
|
581 |
||
582 |
case EWpaPreSharedKey: |
|
583 |
{ |
|
584 |
valueResourceID = |
|
585 |
iSecuritySettings->WPAPreSharedKey()->Length() == 0 ? |
|
586 |
R_WPA_PRESHARED_KEY_MUST_BE_DEFINED : 0; |
|
587 |
||
588 |
break; |
|
589 |
} |
|
590 |
||
591 |
default: |
|
592 |
{ |
|
593 |
valueResourceID = 0; |
|
594 |
break; |
|
595 |
} |
|
596 |
} |
|
597 |
||
598 |
_LIT( KStars, "****" ); |
|
599 |
_LIT( KTxtListItemFormat, " \t%S\t\t%S" ); |
|
600 |
_LIT( KTxtCompulsory, "\t*" ); |
|
601 |
||
602 |
if ( valueResourceID ) |
|
603 |
{ |
|
604 |
// Read up value text from resource |
|
605 |
value = iEikonEnv->AllocReadResourceLC( valueResourceID ); |
|
606 |
} |
|
607 |
else |
|
608 |
{ |
|
609 |
value = HBufC::NewLC( KStars().Length() ); |
|
610 |
value->Des().Copy( KStars ); |
|
611 |
} |
|
612 |
||
613 |
// Define a heap descriptor to hold all the item text |
|
614 |
// +4 for space and tab characters |
|
615 |
TInt length = title->Length() + value->Length() + KSpaceAndTabsLength; |
|
616 |
if ( aMember == EWpaPreSharedKey ) // Compulsory |
|
617 |
{ |
|
618 |
length += KTxtCompulsory().Length(); |
|
619 |
} |
|
620 |
||
621 |
HBufC* itemText = HBufC::NewLC( length ); |
|
622 |
||
623 |
// Define a modifiable pointer descriptor to be able to append text to the |
|
624 |
// non-modifiable heap descriptor itemText |
|
625 |
TPtr itemTextPtr = itemText->Des(); |
|
626 |
itemTextPtr.Format( KTxtListItemFormat, title, value ); |
|
627 |
if ( aMember == EWpaPreSharedKey ) // Compulsory |
|
628 |
{ |
|
629 |
itemTextPtr.Append( KTxtCompulsory ); |
|
630 |
} |
|
631 |
CleanupStack::Pop( itemText ); // itemtext, |
|
632 |
||
633 |
CleanupStack::PopAndDestroy( 2 ); // title, value |
|
634 |
||
635 |
return itemText; |
|
636 |
} |
|
637 |
||
638 |
||
639 |
||
640 |
//---------------------------------------------------------- |
|
641 |
// CWPASecuritySettingsDlg::ShowPopupSettingPageL |
|
642 |
//---------------------------------------------------------- |
|
643 |
// |
|
644 |
TBool CWPASecuritySettingsDlg::ShowPopupSettingPageL( TWpaMember aData ) |
|
645 |
{ |
|
646 |
TInt currvalue( 0 ); |
|
647 |
TBool retval( EFalse ); |
|
648 |
CDesCArrayFlat* items = FillPopupSettingPageLC( aData, currvalue ); |
|
649 |
||
55
9c2aa05919d9
Revision: 201036
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
650 |
TInt attr_resid = aData == EWpaMode ? R_WPA_MODE : R_WPA_TKIP_CIPHER; |
46 | 651 |
|
652 |
HBufC* titlebuf = iEikonEnv->AllocReadResourceLC( attr_resid ); |
|
653 |
CAknRadioButtonSettingPage* dlg = new ( ELeave )CAknRadioButtonSettingPage( |
|
654 |
R_RADIO_BUTTON_SETTING_PAGE, currvalue, items ); |
|
655 |
CleanupStack::PushL( dlg ); |
|
656 |
TPtrC ptr( titlebuf->Des() ); |
|
657 |
dlg->SetSettingTextL( ptr ); |
|
658 |
CleanupStack::Pop( dlg ); // dlg |
|
659 |
||
660 |
if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted ) ) |
|
661 |
{ |
|
662 |
retval = UpdateFromPopupSettingPage( aData, ( TBool )currvalue ); |
|
663 |
} |
|
664 |
||
665 |
CleanupStack::PopAndDestroy( titlebuf ); |
|
666 |
CleanupStack::PopAndDestroy( items ); // items. It deletes also all |
|
667 |
// elements in the array. |
|
668 |
return retval; |
|
669 |
} |
|
670 |
||
671 |
||
672 |
||
673 |
//---------------------------------------------------------- |
|
674 |
// CWPASecuritySettingsDlg::ShowPopupTextSettingPageL |
|
675 |
//---------------------------------------------------------- |
|
676 |
// |
|
677 |
TBool CWPASecuritySettingsDlg::ShowPopupTextSettingPageL() |
|
678 |
{ |
|
679 |
TBool retval( EFalse ); |
|
680 |
||
681 |
HBufC16* bufKeyData = HBufC16::NewLC( EMaxLengthOfPreSharedKey ); |
|
682 |
TPtr16 ptrKeyData( bufKeyData->Des() ); |
|
683 |
||
684 |
TBool showPage( ETrue ); |
|
685 |
while ( showPage ) |
|
686 |
{ |
|
687 |
CAknTextSettingPage* settingPage = |
|
688 |
new( ELeave )CAknTextSettingPage( R_TEXT_SETTING_PAGE_KEY_DATA, |
|
689 |
ptrKeyData, EAknSettingPageNoOrdinalDisplayed ); |
|
690 |
||
691 |
if ( settingPage->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted ) ) |
|
692 |
{ |
|
693 |
HBufC8* buf8 = HBufC8::NewLC( bufKeyData->Des().Length() ); |
|
694 |
buf8->Des().Copy( bufKeyData->Des() ); |
|
695 |
||
696 |
if ( bufKeyData->Des().Length() < EMinLengthOfPreSharedKeyAscii ) |
|
697 |
{ |
|
698 |
HBufC* stringLabel; |
|
699 |
||
700 |
stringLabel = StringLoader::LoadL( |
|
701 |
R_INFO_PRESHARED_KEY_TOO_SHORT, |
|
702 |
iEikonEnv ); |
|
703 |
||
704 |
CleanupStack::PushL( stringLabel ); |
|
705 |
||
706 |
CAknInformationNote* dialog = new ( ELeave ) |
|
707 |
CAknInformationNote( ETrue ); |
|
708 |
dialog->ExecuteLD( *stringLabel ); |
|
709 |
||
710 |
CleanupStack::PopAndDestroy( stringLabel ); // stringLabel |
|
711 |
||
712 |
ptrKeyData.Zero(); |
|
713 |
} |
|
714 |
else |
|
715 |
{ |
|
716 |
if ( iSecuritySettings->SetWPAPreSharedKey( ptrKeyData ) != |
|
717 |
KErrNone ) |
|
718 |
{ |
|
719 |
HBufC* stringLabel; |
|
720 |
stringLabel = StringLoader::LoadL( |
|
721 |
R_INFO_PRESHARED_KEY_NOT_HEX ); |
|
722 |
CleanupStack::PushL( stringLabel ); |
|
723 |
||
724 |
CAknInformationNote* dialog = new ( ELeave ) |
|
725 |
CAknInformationNote( ETrue ); |
|
726 |
CleanupStack::Pop( stringLabel ); |
|
727 |
||
728 |
dialog->ExecuteLD( *stringLabel ); |
|
729 |
||
730 |
delete stringLabel; |
|
731 |
} |
|
732 |
else |
|
733 |
{ |
|
734 |
retval = ETrue; |
|
735 |
showPage = EFalse; |
|
736 |
} |
|
737 |
||
738 |
} |
|
739 |
||
740 |
CleanupStack::PopAndDestroy( buf8 ); // buf8 |
|
741 |
} |
|
742 |
else |
|
743 |
{ |
|
744 |
showPage = EFalse; |
|
745 |
} |
|
746 |
} |
|
747 |
||
748 |
CleanupStack::PopAndDestroy( bufKeyData ); // bufKeyData |
|
749 |
||
750 |
return retval; |
|
751 |
} |
|
752 |
||
753 |
||
754 |
||
755 |
// --------------------------------------------------------- |
|
756 |
// CWPASecuritySettingsDlg::FillPopupSettingPageLC |
|
757 |
// --------------------------------------------------------- |
|
758 |
// |
|
759 |
CDesCArrayFlat* CWPASecuritySettingsDlg::FillPopupSettingPageLC( |
|
760 |
TWpaMember aData, |
|
761 |
TInt& aCurrvalue ) |
|
762 |
{ |
|
763 |
CDesCArrayFlat* items = new( ELeave)CDesCArrayFlat( 1 ); |
|
764 |
CleanupStack::PushL( items ); |
|
765 |
||
766 |
if ( aData == EWpaMode ) |
|
767 |
{ |
|
768 |
if ( iPlugin ) |
|
769 |
{ |
|
770 |
aCurrvalue = iSecuritySettings->WPAMode(); |
|
771 |
||
772 |
items->AppendL( *iEikonEnv->AllocReadResourceLC( R_WPA_MODE_EAP ) ); |
|
773 |
CleanupStack::PopAndDestroy(); |
|
774 |
} |
|
775 |
else |
|
776 |
{ |
|
777 |
aCurrvalue = 0; |
|
778 |
} |
|
779 |
||
780 |
items->AppendL( *iEikonEnv->AllocReadResourceLC( |
|
781 |
R_WPA_MODE_PRESHARED_KEY ) ); |
|
782 |
CleanupStack::PopAndDestroy(); |
|
783 |
} |
|
55
9c2aa05919d9
Revision: 201036
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
784 |
else // EWpaWpa2Only: |
46 | 785 |
{ |
786 |
items->AppendL( *iEikonEnv->AllocReadResourceLC( |
|
787 |
R_WPA_CIPHER_ALLOWED ) ); |
|
788 |
CleanupStack::PopAndDestroy(); |
|
789 |
items->AppendL( *iEikonEnv->AllocReadResourceLC( |
|
790 |
R_WPA_CIPHER_NOT_ALLOWED ) ); |
|
791 |
CleanupStack::PopAndDestroy(); |
|
792 |
||
793 |
aCurrvalue = iSecuritySettings->Wpa2Only(); |
|
794 |
} |
|
795 |
||
796 |
return items; |
|
797 |
} |
|
798 |
||
799 |
||
800 |
// --------------------------------------------------------- |
|
801 |
// CWPASecuritySettingsDlg::UpdateFromPopupSettingPage |
|
802 |
// --------------------------------------------------------- |
|
803 |
// |
|
804 |
TBool CWPASecuritySettingsDlg::UpdateFromPopupSettingPage( TWpaMember aData, |
|
805 |
TBool aCurrvalue ) |
|
806 |
{ |
|
807 |
TBool retVal( EFalse ); |
|
808 |
||
809 |
if ( aData == EWpaMode ) |
|
810 |
{ |
|
811 |
if ( !iPlugin ) |
|
812 |
{ |
|
813 |
aCurrvalue = ETrue; |
|
814 |
} |
|
815 |
||
816 |
if ( iSecuritySettings->WPAMode() != aCurrvalue ) |
|
817 |
{ |
|
818 |
iSecuritySettings->SetWPAMode( aCurrvalue ); |
|
819 |
retVal = ETrue; |
|
820 |
} |
|
821 |
} |
|
55
9c2aa05919d9
Revision: 201036
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
822 |
else // EWpaWpa2Only: |
46 | 823 |
{ |
824 |
if ( iSecuritySettings->Wpa2Only() != aCurrvalue ) |
|
825 |
{ |
|
826 |
iSecuritySettings->SetWpa2Only( aCurrvalue ); |
|
827 |
retVal = ETrue; |
|
828 |
} |
|
829 |
} |
|
830 |
||
831 |
return retVal; |
|
832 |
} |
|
833 |
||
834 |
||
835 |
||
836 |
||
837 |
//---------------------------------------------------------- |
|
838 |
// CWPASecuritySettingsDlg::ChangeSettingsL |
|
839 |
//---------------------------------------------------------- |
|
840 |
// |
|
841 |
void CWPASecuritySettingsDlg::ResetEapConfigFlag( TAny* aPtr ) |
|
842 |
{ |
|
843 |
CWPASecuritySettingsDlg* self = |
|
844 |
static_cast<CWPASecuritySettingsDlg*>( aPtr ); |
|
845 |
||
846 |
self->iEapConfigActive = EFalse; |
|
847 |
} |
|
848 |
||
849 |
||
850 |
//---------------------------------------------------------- |
|
851 |
// CWPASecuritySettingsDlg::ChangeSettingsL |
|
852 |
//---------------------------------------------------------- |
|
853 |
// |
|
854 |
void CWPASecuritySettingsDlg::ChangeSettingsL( TBool aQuick ) |
|
855 |
{ |
|
856 |
TInt itemIndex; |
|
857 |
TInt shift; |
|
858 |
||
859 |
itemIndex = ( Max( iList->CurrentItemIndex(), 0 ) ); |
|
860 |
||
55
9c2aa05919d9
Revision: 201036
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
861 |
shift = ( itemIndex >= EWpaWpa2Only || |
9c2aa05919d9
Revision: 201036
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
862 |
( itemIndex == EWpaEapConfig && |
9c2aa05919d9
Revision: 201036
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
863 |
iSecuritySettings->WPAMode() ) ) ? 1 : 0; |
9c2aa05919d9
Revision: 201036
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
864 |
|
46 | 865 |
TWpaMember* ptr = iFieldsMain + itemIndex + shift; |
866 |
TInt* titPtr = iTitlesMain + itemIndex + shift; |
|
867 |
||
868 |
switch ( *ptr ) |
|
869 |
{ |
|
870 |
case EWpaMode: |
|
871 |
{ // Pop-up setting item |
|
872 |
TBool changed( ETrue ); |
|
873 |
if ( aQuick ) |
|
874 |
{ |
|
875 |
if ( iPlugin ) |
|
876 |
{ |
|
877 |
iSecuritySettings->SetWPAMode( |
|
878 |
!iSecuritySettings->WPAMode() ); |
|
879 |
} |
|
880 |
else |
|
881 |
{ |
|
882 |
changed = EFalse; |
|
883 |
} |
|
884 |
} |
|
885 |
else |
|
886 |
{ |
|
887 |
changed = ShowPopupSettingPageL( EWpaMode ); |
|
888 |
} |
|
889 |
||
890 |
if ( changed ) |
|
891 |
{ |
|
892 |
UpdateTextualListBoxItemL( *ptr, *titPtr, itemIndex ); |
|
893 |
*iEventStore |= CWPASecuritySettings::EModified; |
|
894 |
||
895 |
TInt shiftItem = iSecuritySettings->WPAMode() ? 2 : 1; |
|
896 |
||
897 |
ptr += shiftItem; |
|
898 |
titPtr += shiftItem; |
|
899 |
||
900 |
UpdateTextualListBoxItemL( *ptr, *titPtr, itemIndex+1 ); |
|
901 |
iList->SetCurrentItemIndexAndDraw( itemIndex+1 ); |
|
902 |
} |
|
903 |
break; |
|
904 |
} |
|
905 |
||
906 |
case EWpaWpa2Only: |
|
907 |
{ // Setting item with two available values |
|
908 |
TBool changed( ETrue ); |
|
909 |
if ( aQuick ) |
|
910 |
{ |
|
911 |
iSecuritySettings->SetWpa2Only( |
|
912 |
!iSecuritySettings->Wpa2Only() ); |
|
913 |
} |
|
914 |
else |
|
915 |
{ |
|
916 |
changed = ShowPopupSettingPageL( EWpaWpa2Only ); |
|
917 |
} |
|
918 |
||
919 |
if ( changed ) |
|
920 |
{ |
|
921 |
UpdateTextualListBoxItemL( *ptr, *titPtr, itemIndex ); |
|
922 |
*iEventStore |= CWPASecuritySettings::EModified; |
|
923 |
} |
|
924 |
break; |
|
925 |
} |
|
926 |
||
927 |
case EWpaPreSharedKey: |
|
928 |
{ // Text setting item |
|
929 |
if ( ShowPopupTextSettingPageL() ) |
|
930 |
{ |
|
931 |
UpdateTextualListBoxItemL( *ptr, *titPtr, itemIndex ); |
|
932 |
*iEventStore |= CWPASecuritySettings::EModified; |
|
933 |
} |
|
934 |
break; |
|
935 |
} |
|
936 |
||
937 |
case EWpaEapConfig: |
|
938 |
{ |
|
939 |
if ( iPlugin && !iEapConfigActive ) |
|
940 |
{ |
|
941 |
iEapConfigActive = ETrue; |
|
942 |
CleanupStack::PushL( TCleanupItem( ResetEapConfigFlag, this ) ); |
|
943 |
||
944 |
||
945 |
// using expanded EAP types |
|
946 |
iEnabledPluginList = ( |
|
947 |
iSecuritySettings->WPAEnabledEAPPlugin()? |
|
948 |
(TDesC8&)*iSecuritySettings->WPAEnabledEAPPlugin(): |
|
949 |
KNullDesC8 ); |
|
950 |
||
951 |
iDisabledPluginList = ( |
|
952 |
iSecuritySettings->WPADisabledEAPPlugin()? |
|
953 |
(TDesC8&)*iSecuritySettings->WPADisabledEAPPlugin(): |
|
954 |
KNullDesC8 ); |
|
955 |
||
956 |
TInt buttonId = iPlugin->EAPPluginConfigurationL( |
|
957 |
iEnabledPluginList, |
|
958 |
iDisabledPluginList, |
|
959 |
iIapId, |
|
960 |
iConnectionName ); |
|
961 |
||
962 |
CleanupStack::PopAndDestroy( 1 ); // ResetEapConfigFlag |
|
963 |
||
964 |
if ( buttonId == EEikCmdExit ) // ShutDown requested |
|
965 |
{ |
|
966 |
*iEventStore |= CWPASecuritySettings::EShutDownReq; |
|
967 |
} |
|
968 |
else if ( buttonId == EAknCmdExit ) |
|
969 |
{ |
|
970 |
*iEventStore |= CWPASecuritySettings::EExitReq; |
|
971 |
} |
|
972 |
||
973 |
if ( !iSecuritySettings->WPAEnabledEAPPlugin() || |
|
974 |
iEnabledPluginList != |
|
975 |
*iSecuritySettings->WPAEnabledEAPPlugin() ) |
|
976 |
{ |
|
977 |
User::LeaveIfError( |
|
978 |
iSecuritySettings->SetWPAEnabledEAPPlugin( |
|
979 |
iEnabledPluginList ) ); |
|
980 |
*iEventStore |= CWPASecuritySettings::EModified; |
|
981 |
} |
|
982 |
||
983 |
if ( !iSecuritySettings->WPADisabledEAPPlugin() || |
|
984 |
iDisabledPluginList != |
|
985 |
*iSecuritySettings->WPADisabledEAPPlugin() ) |
|
986 |
{ |
|
987 |
User::LeaveIfError( |
|
988 |
iSecuritySettings->SetWPADisabledEAPPlugin( |
|
989 |
iDisabledPluginList ) ); |
|
990 |
*iEventStore |= CWPASecuritySettings::EModified; |
|
991 |
} |
|
992 |
||
993 |
// If exiting from the menu, pass it on |
|
994 |
if( buttonId == EAknCmdExit ) |
|
995 |
{ |
|
996 |
if (aQuick == EFalse) |
|
997 |
{ |
|
998 |
TryExitL( buttonId ); |
|
999 |
} |
|
1000 |
// Don't exit here if aQuick==ETrue. |
|
1001 |
// Framework command chain will |
|
1002 |
// cause a KERN-EXEC 3 panic. Handle the exit in |
|
1003 |
// HandleDialogPageEventL(). |
|
1004 |
} |
|
1005 |
} |
|
1006 |
||
1007 |
return; |
|
1008 |
} |
|
1009 |
||
1010 |
||
1011 |
default: |
|
1012 |
{ |
|
1013 |
__ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) ); |
|
1014 |
break; |
|
1015 |
} |
|
1016 |
} |
|
1017 |
||
1018 |
iList->ScrollToMakeItemVisible( itemIndex ); |
|
1019 |
iList->SetCurrentItemIndexAndDraw( itemIndex ); |
|
1020 |
} |
|
1021 |
||
1022 |
||
1023 |
||
1024 |
// --------------------------------------------------------- |
|
1025 |
// CWPASecuritySettingsDlg::GetHelpContext |
|
1026 |
// --------------------------------------------------------- |
|
1027 |
// |
|
1028 |
void CWPASecuritySettingsDlg::GetHelpContext( TCoeHelpContext& aContext ) const |
|
1029 |
{ |
|
1030 |
aContext.iMajor = KWPASecuritySettingsUiHelpMajor; |
|
1031 |
if ( iSecuritySettings->SecurityMode() == ESecurityModeWpa ) |
|
1032 |
{ |
|
1033 |
aContext.iContext = KSET_HLP_WLAN_WPA_MAIN; |
|
1034 |
} |
|
1035 |
else // iSecuritySettings->SecurityMode() == ESecurityMode8021x |
|
1036 |
{ |
|
1037 |
aContext.iContext = KSET_HLP_WLAN_8021X_MAIN; |
|
1038 |
} |
|
1039 |
} |
|
1040 |
||
1041 |
||
1042 |
// End of File |