|
1 /* |
|
2 * Copyright (c) 2006 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: Dialog for setting WLAN plugin advanced settings |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <StringLoader.h> |
|
19 #include <akntextsettingpage.h> |
|
20 #include <aknmfnesettingpage.h> // for IP dialog |
|
21 #include <cmcommonui.h> |
|
22 #include <cmwlanui.rsg> |
|
23 #include <AknQueryDialog.h> |
|
24 #include <cmpluginbaseeng.h> |
|
25 #include <cmmanager.rsg> |
|
26 #include <csxhelp/cp.hlp.hrh> |
|
27 |
|
28 #include "cmpluginwlan.h" |
|
29 #include <cmpluginwlandef.h> |
|
30 #include "cmpwlansettingsdlgadv.h" |
|
31 #include "cmpwlansettingsdlgipv4.h" |
|
32 #include "cmpwlansettingsdlgipv6.h" |
|
33 #include "cmwlancommonconstants.h" |
|
34 #include <cmpbasesettingsdlg.h> |
|
35 #include "cmpluginmenucommands.hrh" |
|
36 #include <cmcommonconstants.h> |
|
37 #include <cmpsettingsconsts.h> |
|
38 #include "cmmanagerimpl.h" |
|
39 |
|
40 using namespace CMManager; |
|
41 |
|
42 const TUint32 KAdhocChannelSelectionItems[] = |
|
43 { |
|
44 R_QTN_WLAN_SETT_ADHOC_CHANNEL_AUTOMATIC, |
|
45 R_QTN_WLAN_SETT_ADHOC_CHANNEL_USER_DEFINED, |
|
46 0 |
|
47 }; |
|
48 |
|
49 // ================= MEMBER FUNCTIONS ========================================= |
|
50 |
|
51 // -------------------------------------------------------------------------- |
|
52 // CmPluginWlanSettingsDlgAdv::NewL() |
|
53 // Two-phase dconstructor, second phase is ConstructAndRunLD |
|
54 // -------------------------------------------------------------------------- |
|
55 // |
|
56 CmPluginWlanSettingsDlgAdv* CmPluginWlanSettingsDlgAdv::NewL( |
|
57 CCmPluginBaseEng& aCmPluginBase ) |
|
58 { |
|
59 CmPluginWlanSettingsDlgAdv* self = |
|
60 new (ELeave) CmPluginWlanSettingsDlgAdv( aCmPluginBase ); |
|
61 return self; |
|
62 } |
|
63 |
|
64 |
|
65 // -------------------------------------------------------------------------- |
|
66 // CmPluginWlanSettingsDlgAdv::ConstructAndRunLD |
|
67 // Constructs the dialog and runs it. |
|
68 // -------------------------------------------------------------------------- |
|
69 // |
|
70 TInt CmPluginWlanSettingsDlgAdv::ConstructAndRunLD( ) |
|
71 { |
|
72 // Set this flag to allow edit continue |
|
73 iCanEditingContinue = ETrue; |
|
74 |
|
75 CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); |
|
76 cmMgr.WatcherRegisterL( this ); |
|
77 |
|
78 return CmPluginBaseSettingsDlgAdv::ConstructAndRunLD(); |
|
79 } |
|
80 |
|
81 // -------------------------------------------------------------------------- |
|
82 // CmPluginWlanSettingsDlgAdv::CmPluginWlanSettingsDlgAdv() |
|
83 // -------------------------------------------------------------------------- |
|
84 // |
|
85 CmPluginWlanSettingsDlgAdv::CmPluginWlanSettingsDlgAdv( |
|
86 CCmPluginBaseEng& aCmPluginBase ) : |
|
87 CmPluginBaseSettingsDlgAdv( aCmPluginBase ), |
|
88 iIpv6Supported( aCmPluginBase.FeatureSupported( KFeatureIdIPv6 ) ), |
|
89 iParent( NULL ) |
|
90 { |
|
91 iHelpContext = KSET_HLP_AP_SETTING_WLAN_AS; |
|
92 } |
|
93 |
|
94 // -------------------------------------------------------------------------- |
|
95 // CmPluginWlanSettingsDlgAdv::~CmPluginWlanSettingsDlgAdv |
|
96 // Destructor |
|
97 // -------------------------------------------------------------------------- |
|
98 // |
|
99 CmPluginWlanSettingsDlgAdv::~CmPluginWlanSettingsDlgAdv() |
|
100 { |
|
101 } |
|
102 |
|
103 // -------------------------------------------------------------------------- |
|
104 // CmPluginWlanSettingsDlgAdv::UpdateListBoxContentBearerSpecificL |
|
105 // -------------------------------------------------------------------------- |
|
106 // |
|
107 void CmPluginWlanSettingsDlgAdv::UpdateListBoxContentBearerSpecificL( |
|
108 CDesCArray& aItemArray ) |
|
109 { |
|
110 if ( iIpv6Supported ) |
|
111 { |
|
112 // IPV4 SETTINGS |
|
113 AppendSettingTextsL( aItemArray, |
|
114 ESettingPageCmdIpv4, |
|
115 R_QTN_SET_IPV4_SETTINGS, |
|
116 0 ); |
|
117 // IPV6 SETTINGS |
|
118 AppendSettingTextsL( aItemArray, |
|
119 ESettingPageCmdIpv6, |
|
120 R_QTN_SET_IPV6_SETTINGS, |
|
121 0 ); |
|
122 } |
|
123 else |
|
124 { |
|
125 // PHONE IP ADDRESS |
|
126 AppendSettingTextsL( aItemArray, EWlanIpAddr ); |
|
127 HBufC* ipAddr = iCmPluginBaseEng.GetStringAttributeL( EWlanIpAddr ); |
|
128 TBool isUnspec = IsUnspecifiedIPv4Address( *ipAddr ); |
|
129 delete ipAddr; ipAddr = NULL; |
|
130 |
|
131 if ( !isUnspec ) |
|
132 { |
|
133 // SUBNET MASK |
|
134 AppendSettingTextsL( aItemArray, EWlanIpNetMask ); |
|
135 // DEFAULT GATEWAY |
|
136 AppendSettingTextsL( aItemArray, EWlanIpGateway ); |
|
137 } |
|
138 |
|
139 // PRIMARY NAME SERVER |
|
140 AppendSettingTextsL( aItemArray, EWlanIpNameServer1 ); |
|
141 // SECONDARY NAME SERVER |
|
142 AppendSettingTextsL( aItemArray, EWlanIpNameServer2 ); |
|
143 } |
|
144 |
|
145 // AD-HOC CHANNEL |
|
146 if ( iCmPluginBaseEng.GetIntAttributeL( EWlanConnectionMode ) == EAdhoc ) |
|
147 { |
|
148 AppendSettingTextsL( aItemArray, EWlanChannelID ); |
|
149 } |
|
150 |
|
151 // PROXY SERVER ADDRESS |
|
152 AppendSettingTextsL( aItemArray, ECmProxyServerName ); |
|
153 // PROXY PORT NUMBER |
|
154 AppendSettingTextsL( aItemArray, ECmProxyPortNumber ); |
|
155 /* |
|
156 TInt valResId(0); |
|
157 // Allow SSID Roaming? |
|
158 |
|
159 TBool res = iCmPluginBaseEng.GetBoolAttributeL( EWlanAllowSSIDRoaming ); |
|
160 if ( res ) |
|
161 { |
|
162 valResId = R_QTN_WLAN_SETT_SSID_ROAMING_ENABLED; |
|
163 } |
|
164 else |
|
165 { |
|
166 valResId = R_QTN_WLAN_SETT_SSID_ROAMING_DISABLED; |
|
167 } |
|
168 |
|
169 AppendSettingTextsL( aItemArray, EWlanAllowSSIDRoaming, valResId ); |
|
170 */ |
|
171 } |
|
172 |
|
173 // -------------------------------------------------------------------------- |
|
174 // CmPluginWlanSettingsDlgAdv::ShowPopupSettingPageL |
|
175 // -------------------------------------------------------------------------- |
|
176 // |
|
177 TBool CmPluginWlanSettingsDlgAdv::ShowPopupSettingPageL( TUint32 aAttribute, |
|
178 TInt aCommandId ) |
|
179 { |
|
180 TBool retval = EFalse; |
|
181 switch ( aAttribute ) |
|
182 { |
|
183 case EWlanIpAddr: |
|
184 case EWlanIpNetMask: |
|
185 case EWlanIpGateway: |
|
186 case EWlanIpNameServer1: |
|
187 case EWlanIpNameServer2: |
|
188 { |
|
189 ShowPopupIpSettingPageL( aAttribute ); |
|
190 break; |
|
191 } |
|
192 case ESettingPageCmdIpv4: |
|
193 { |
|
194 ShowIpv4SettingPageL(); |
|
195 break; |
|
196 } |
|
197 case ESettingPageCmdIpv6: |
|
198 { |
|
199 ShowIpv6SettingPageL(); |
|
200 break; |
|
201 } |
|
202 case ECmProxyServerName: |
|
203 { |
|
204 retval = ShowPopupTextSettingPageL( aAttribute ); |
|
205 break; |
|
206 } |
|
207 case ECmProxyPortNumber: |
|
208 { |
|
209 retval = ShowPopupPortNumSettingPageL( aAttribute ); |
|
210 break; |
|
211 } |
|
212 case EWlanChannelID: // may not be correct |
|
213 { |
|
214 retval = ShowAdhocChannelSettingPageL(); |
|
215 break; |
|
216 } |
|
217 case EWlanAllowSSIDRoaming: |
|
218 { |
|
219 // retval = ShowAdhocChannelSettingPageL(); |
|
220 break; |
|
221 } |
|
222 default: |
|
223 { |
|
224 CmPluginBaseSettingsDlgAdv::ShowPopupSettingPageL( aAttribute, aCommandId ); |
|
225 break; |
|
226 } |
|
227 } |
|
228 return retval; |
|
229 } |
|
230 |
|
231 // -------------------------------------------------------------------------- |
|
232 // CmPluginWlanSettingsDlgAdv::ShowIpv4SettingPageL |
|
233 // -------------------------------------------------------------------------- |
|
234 // |
|
235 TBool CmPluginWlanSettingsDlgAdv::ShowIpv4SettingPageL() |
|
236 { |
|
237 TInt retVal( EFalse ); |
|
238 CmPluginWlanSettingsDlgIpv4* ipv4Dlg = |
|
239 CmPluginWlanSettingsDlgIpv4::NewL( iCmPluginBaseEng ); |
|
240 |
|
241 // This view may have to un-register as watcher here |
|
242 CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); |
|
243 cmMgr.WatcherUnRegister(); |
|
244 |
|
245 ipv4Dlg->RegisterParentView( this ); |
|
246 TInt ret = ipv4Dlg->ConstructAndRunLD(); |
|
247 |
|
248 if( iNotifyFromIp == KCmNotifiedNone ) |
|
249 { |
|
250 if ( ret == KDialogUserExit ) |
|
251 { |
|
252 retVal = ETrue; |
|
253 TryExitL( KDialogUserExit ); |
|
254 } |
|
255 else |
|
256 { |
|
257 // Re-register as watcher if advanced view comes back or exists normally |
|
258 cmMgr.WatcherRegisterL( this ); |
|
259 } |
|
260 } |
|
261 else |
|
262 { |
|
263 HandleCommsDatChangeL(); |
|
264 } |
|
265 |
|
266 return retVal; |
|
267 } |
|
268 |
|
269 // -------------------------------------------------------------------------- |
|
270 // CmPluginWlanSettingsDlgAdv::ShowIpv6SettingPageL |
|
271 // -------------------------------------------------------------------------- |
|
272 // |
|
273 TBool CmPluginWlanSettingsDlgAdv::ShowIpv6SettingPageL() |
|
274 { |
|
275 TInt retVal( EFalse ); |
|
276 CmPluginWlanSettingsDlgIpv6* ipv6Dlg = |
|
277 CmPluginWlanSettingsDlgIpv6::NewL( iCmPluginBaseEng ); |
|
278 |
|
279 // This view may have to un-register as watcher here |
|
280 CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); |
|
281 cmMgr.WatcherUnRegister(); |
|
282 |
|
283 ipv6Dlg->RegisterParentView( this ); |
|
284 TInt ret = ipv6Dlg->ConstructAndRunLD(); |
|
285 |
|
286 if( iNotifyFromIp == KCmNotifiedNone ) |
|
287 { |
|
288 if ( ret == KDialogUserExit ) |
|
289 { |
|
290 retVal = ETrue; |
|
291 TryExitL( KDialogUserExit ); |
|
292 } |
|
293 else |
|
294 { |
|
295 // Re-register as watcher if advanced view comes back or exists normally |
|
296 cmMgr.WatcherRegisterL( this ); |
|
297 } |
|
298 } |
|
299 else |
|
300 { |
|
301 HandleCommsDatChangeL(); |
|
302 } |
|
303 |
|
304 return retVal; |
|
305 } |
|
306 |
|
307 |
|
308 // -------------------------------------------------------------------------- |
|
309 // CmPluginWlanSettingsDlgAdv::ShowAdhocChannelSettingPageL |
|
310 // -------------------------------------------------------------------------- |
|
311 // |
|
312 TBool CmPluginWlanSettingsDlgAdv::ShowAdhocChannelSettingPageL() |
|
313 { |
|
314 TInt retVal( EFalse ); |
|
315 const TCmAttribConvTable* convItem = |
|
316 iCmPluginBaseEng.ConvTableItem( EWlanChannelID ); |
|
317 const TUint32* items = KAdhocChannelSelectionItems; |
|
318 TInt value = iCmPluginBaseEng.GetIntAttributeL( EWlanChannelID ); |
|
319 |
|
320 TInt selected = value ? EAdhocUserDefined : EAdhocAutomatic; |
|
321 |
|
322 // Show the dialog |
|
323 if ( ShowRadioButtonSettingPageL( items, |
|
324 selected, |
|
325 R_QTN_WLAN_SETT_ADHOC_CHANNEL ) ) |
|
326 { |
|
327 // 'User defined' selected |
|
328 if ( selected == EAdhocUserDefined ) |
|
329 { |
|
330 // if EWlanChannelID doesn't have a valid number, use the defaul |
|
331 if ( value < KCmAdhocChannelMinValue || value > KCmAdhocChannelMaxValue ) |
|
332 { |
|
333 value = KCmAdhocChannelDefaultValue; |
|
334 } |
|
335 |
|
336 TBool loop ( ETrue ); |
|
337 |
|
338 do |
|
339 { |
|
340 HBufC* buf = HBufC::NewLC( convItem->iMaxLength ); |
|
341 TPtr ptr ( buf->Des() ); |
|
342 ptr.AppendNum( value ); |
|
343 |
|
344 // Display a numeric query dialog |
|
345 CAknTextQueryDialog* dlg = CAknTextQueryDialog::NewL( ptr ); |
|
346 |
|
347 dlg->PrepareLC( R_NUMERIC_QUERY ); |
|
348 dlg->SetMaxLength( convItem->iMaxLength ); |
|
349 dlg->SetDefaultInputMode( EAknEditorNumericInputMode ); |
|
350 dlg->MakeLeftSoftkeyVisible( EFalse ); |
|
351 |
|
352 HBufC* prompt = StringLoader::LoadLC( |
|
353 R_QTN_WLAN_PRMPT_ADHOC_CHANNEL ); |
|
354 dlg->SetPromptL( *prompt ); |
|
355 CleanupStack::PopAndDestroy( prompt ); |
|
356 |
|
357 // Show the popup |
|
358 if ( dlg->RunLD() ) |
|
359 { |
|
360 TLex lex ( ptr ); |
|
361 lex.Val( value ); |
|
362 |
|
363 // Check valid limits |
|
364 if ( value >= KCmAdhocChannelMinValue && |
|
365 value <= KCmAdhocChannelMaxValue ) |
|
366 { |
|
367 // set result |
|
368 iCmPluginBaseEng.SetIntAttributeL( EWlanChannelID, value ); |
|
369 loop = EFalse; |
|
370 UpdateListBoxContentL(); |
|
371 retVal = ETrue; |
|
372 } |
|
373 else |
|
374 { |
|
375 value = value < KCmAdhocChannelMinValue ? |
|
376 KCmAdhocChannelMinValue : |
|
377 KCmAdhocChannelMaxValue; |
|
378 } |
|
379 } |
|
380 else |
|
381 { |
|
382 loop = EFalse; |
|
383 } |
|
384 CleanupStack::PopAndDestroy( buf ); |
|
385 } while ( loop ); |
|
386 } |
|
387 else |
|
388 { |
|
389 iCmPluginBaseEng.SetIntAttributeL( EWlanChannelID, EAdhocAutomatic ); |
|
390 UpdateListBoxContentL(); |
|
391 retVal = ETrue; |
|
392 } |
|
393 } |
|
394 |
|
395 return retVal; |
|
396 } |
|
397 |
|
398 // -------------------------------------------------------------------------- |
|
399 // CmPluginWlanSettingsDlgAdv::ProcessCommandL |
|
400 // -------------------------------------------------------------------------- |
|
401 // |
|
402 void CmPluginWlanSettingsDlgAdv:: ProcessCommandL( TInt aCommandId ) |
|
403 { |
|
404 if ( !iCanEditingContinue ) |
|
405 { |
|
406 // We have to block all editing activity if database changed by |
|
407 // other application |
|
408 return; |
|
409 } |
|
410 |
|
411 if ( MenuShowing() ) |
|
412 { |
|
413 HideMenu(); |
|
414 } |
|
415 |
|
416 switch ( aCommandId ) |
|
417 { |
|
418 case EPluginBaseCmdExit: |
|
419 { |
|
420 iExitReason = KDialogUserExit; |
|
421 } |
|
422 case EAknSoftkeyBack: |
|
423 { |
|
424 CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); |
|
425 cmMgr.WatcherUnRegister(); |
|
426 |
|
427 HBufC* ipAddr = iCmPluginBaseEng.GetStringAttributeL( EWlanIpAddr ); |
|
428 TBool isUnspec = IsUnspecifiedIPv4Address( *ipAddr ); |
|
429 delete ipAddr; ipAddr = NULL; |
|
430 |
|
431 if ( !isUnspec ) |
|
432 { |
|
433 ipAddr = iCmPluginBaseEng.GetStringAttributeL( EWlanIpNetMask ); |
|
434 TBool isUnspec1 = IsUnspecifiedIPv4Address( *ipAddr ); |
|
435 delete ipAddr; |
|
436 ipAddr = iCmPluginBaseEng.GetStringAttributeL( EWlanIpGateway ); |
|
437 TBool isUnspec2 = IsUnspecifiedIPv4Address( *ipAddr ); |
|
438 delete ipAddr; |
|
439 |
|
440 if ( isUnspec1 || isUnspec2 ) |
|
441 { |
|
442 if ( TCmCommonUi::ShowConfirmationQueryL( |
|
443 R_QTN_NETW_QUEST_IAP_INCOMPLETE_DELETE ) ) |
|
444 { |
|
445 iCmPluginBaseEng.RestoreAttributeL( EWlanIpAddr ); |
|
446 iCmPluginBaseEng.RestoreAttributeL( EWlanIpNetMask ); |
|
447 iCmPluginBaseEng.RestoreAttributeL( EWlanIpGateway ); |
|
448 iCmPluginBaseEng.RestoreAttributeL( EWlanIpDNSAddrFromServer ); |
|
449 TryExitL( iExitReason ); |
|
450 } |
|
451 } |
|
452 else |
|
453 { |
|
454 TryExitL( iExitReason ); |
|
455 } |
|
456 } |
|
457 else |
|
458 { |
|
459 TryExitL( iExitReason ); |
|
460 } |
|
461 break; |
|
462 } |
|
463 case EAknSoftkeyOk: |
|
464 case EPluginBaseCmdChange: |
|
465 { |
|
466 ShowPopupSettingPageL( |
|
467 iSettingIndex->At( iListbox->CurrentItemIndex() ), |
|
468 aCommandId ); |
|
469 break; |
|
470 } |
|
471 default: |
|
472 { |
|
473 CmPluginBaseSettingsDlgAdv::ProcessCommandL( aCommandId ); |
|
474 break; |
|
475 } |
|
476 } |
|
477 } |
|
478 |
|
479 // -------------------------------------------------------------------------- |
|
480 // CmPluginWlanSettingsDlgAdv::OkToExitL |
|
481 // Good to know : EAknSoftkeyCancel is never called, because |
|
482 // EEikDialogFlagNotifyEsc flag is not set in the resource. |
|
483 // -------------------------------------------------------------------------- |
|
484 // |
|
485 TBool CmPluginWlanSettingsDlgAdv::OkToExitL( TInt aButtonId ) |
|
486 { |
|
487 // Database has been changed by other application so exit from this view |
|
488 // without update editings to database |
|
489 if ( !iCanEditingContinue ) |
|
490 { |
|
491 if ( iExitReason == KDialogUserExit ) |
|
492 { |
|
493 iCmPluginBaseEng.CmMgr().WatcherUnRegister(); |
|
494 |
|
495 // Set iExitReason back to KDialogUserBack so as to exit from this view through else in the next call |
|
496 TInt exitValue = KDialogUserExit; |
|
497 iExitReason = KDialogUserBack; |
|
498 // If destination has been deleted by other application |
|
499 // then we may have to exit from Cmmgr |
|
500 TryExitL( exitValue ); |
|
501 return EFalse; |
|
502 } |
|
503 else |
|
504 { |
|
505 // Exit from this view here to avoid possible update to databse |
|
506 return ETrue; |
|
507 } |
|
508 } |
|
509 |
|
510 // Translate the button presses into commands for the appui & current |
|
511 // view to handle |
|
512 TBool retval( EFalse ); |
|
513 |
|
514 switch ( aButtonId ) |
|
515 { |
|
516 case EAknSoftkeyOk: |
|
517 case EAknSoftkeyChange: |
|
518 { |
|
519 ProcessCommandL( aButtonId ); |
|
520 break; |
|
521 } |
|
522 case EAknSoftkeyBack: |
|
523 { |
|
524 ProcessCommandL( aButtonId ); |
|
525 break; |
|
526 } |
|
527 case EAknSoftkeyOptions: |
|
528 { |
|
529 DisplayMenuL(); |
|
530 break; |
|
531 } |
|
532 default: |
|
533 { |
|
534 retval = ETrue; |
|
535 break; |
|
536 } |
|
537 } |
|
538 |
|
539 return retval; |
|
540 } |
|
541 |
|
542 // -------------------------------------------------------------------------- |
|
543 // CmPluginWlanSettingsDlgAdv::RegisterParentView |
|
544 // -------------------------------------------------------------------------- |
|
545 // |
|
546 void CmPluginWlanSettingsDlgAdv::RegisterParentView( CCmParentViewNotifier* aParent ) |
|
547 { |
|
548 iParent = aParent; |
|
549 } |
|
550 |
|
551 // -------------------------------------------------------------------------- |
|
552 // CmPluginWlanSettingsDlgAdv::CommsDatChangesL |
|
553 // -------------------------------------------------------------------------- |
|
554 // |
|
555 void CmPluginWlanSettingsDlgAdv::CommsDatChangesL() |
|
556 { |
|
557 if ( !iCanEditingContinue ) |
|
558 { |
|
559 return; |
|
560 } |
|
561 |
|
562 CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); |
|
563 CCmDestinationImpl* parentDest = iCmPluginBaseEng.ParentDestination(); |
|
564 |
|
565 if ( parentDest ) |
|
566 { |
|
567 if( !cmMgr.DestinationStillExistedL( parentDest ) ) |
|
568 { |
|
569 if( iParent ) |
|
570 { |
|
571 iParent->NotifyParentView( KCmNotifiedDestinationDisappear ); |
|
572 } |
|
573 |
|
574 // If parent destination is deleted by somebody then the dialog must exit back to main view |
|
575 iExitReason = KDialogUserExit; |
|
576 iCanEditingContinue = EFalse; |
|
577 |
|
578 cmMgr.RemoveDestFromPool( parentDest ); |
|
579 delete parentDest; |
|
580 return; |
|
581 } |
|
582 |
|
583 // We may have to go back to parent view if database is changed by other application |
|
584 if( iParent ) |
|
585 { |
|
586 iParent->NotifyParentView( KCmNotifiedIapDisappear ); |
|
587 } |
|
588 iCanEditingContinue = EFalse; |
|
589 |
|
590 cmMgr.RemoveDestFromPool( parentDest ); |
|
591 delete parentDest; |
|
592 } |
|
593 else // Legacy |
|
594 { |
|
595 // We may have to go back to parent view if database is changed by other application |
|
596 if( iParent ) |
|
597 { |
|
598 iParent->NotifyParentView( KCmNotifiedIapDisappear ); |
|
599 } |
|
600 iCanEditingContinue = EFalse; |
|
601 } |
|
602 } |
|
603 |
|
604 // -------------------------------------------------------------------------- |
|
605 // CmPluginWlanSettingsDlgAdv::NotifyParentView |
|
606 // -------------------------------------------------------------------------- |
|
607 // |
|
608 void CmPluginWlanSettingsDlgAdv::NotifyParentView( TInt aValue ) |
|
609 { |
|
610 iNotifyFromIp = aValue; |
|
611 |
|
612 if( iParent ) |
|
613 { |
|
614 iParent->NotifyParentView( aValue ); |
|
615 } |
|
616 } |
|
617 |
|
618 // -------------------------------------------------------------------------- |
|
619 // CmPluginWlanSettingsDlgAdv::HandleCommsDatChangeL |
|
620 // -------------------------------------------------------------------------- |
|
621 // |
|
622 void CmPluginWlanSettingsDlgAdv::HandleCommsDatChangeL() |
|
623 { |
|
624 if ( iCanEditingContinue ) |
|
625 { |
|
626 // Set iCanEditingContinue to False so that exit fromn this view without update editings |
|
627 iCanEditingContinue = EFalse; |
|
628 } |
|
629 |
|
630 if( iNotifyFromIp == KCmNotifiedIapIsNotInThisDestination || |
|
631 iNotifyFromIp == KCmNotifiedIapDisappear ) |
|
632 { |
|
633 TryExitL( iExitReason ); |
|
634 } |
|
635 else if( iNotifyFromIp == KCmNotifiedDestinationDisappear ) |
|
636 { |
|
637 iExitReason = KDialogUserExit; |
|
638 TryExitL( iExitReason ); |
|
639 } |
|
640 } |