equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
24 #include <StringLoader.h> |
24 #include <StringLoader.h> |
25 #include <aknnotewrappers.h> |
25 #include <aknnotewrappers.h> |
26 #include <cenrepnotifyhandler.h> |
26 #include <cenrepnotifyhandler.h> |
27 #include <ctsydomainpskeys.h> |
27 #include <ctsydomainpskeys.h> |
28 #include <crcseprofileregistry.h> |
28 #include <crcseprofileregistry.h> |
|
29 #include <AknNotiferAppServerApplication.h> // Application Key enable/disable |
29 |
30 |
30 #include "cchuilogger.h" |
31 #include "cchuilogger.h" |
31 #include "cchuicommon.hrh" |
32 #include "cchuicommon.hrh" |
32 #include "cchuinotifierimpl.h" |
33 #include "cchuinotifierimpl.h" |
33 #include "cchuipluginbrandinghandler.h" |
34 #include "cchuipluginbrandinghandler.h" |
57 } |
58 } |
58 |
59 |
59 CCCHUiNotifierImpl::~CCCHUiNotifierImpl() |
60 CCCHUiNotifierImpl::~CCCHUiNotifierImpl() |
60 { |
61 { |
61 CCHUIDEBUG( "CCCHUiNotifierImpl::~CCCHUiNotifierImpl - IN" ); |
62 CCHUIDEBUG( "CCCHUiNotifierImpl::~CCCHUiNotifierImpl - IN" ); |
|
63 |
|
64 if ( iAppKeyBlocked ) |
|
65 { |
|
66 // Remove application key blocking |
|
67 (void) ((CAknNotifierAppServerAppUi*) |
|
68 iEikEnv->EikAppUi())->SuppressAppSwitching(EFalse); |
|
69 iAppKeyBlocked = EFalse; |
|
70 } |
62 |
71 |
63 CCCHUiNotifierBase::Cancel(); |
72 CCCHUiNotifierBase::Cancel(); |
64 iListQueryDialog = NULL; |
73 iListQueryDialog = NULL; |
65 delete iBrandingHandler; |
74 delete iBrandingHandler; |
66 delete iCallStateListener; |
75 delete iCallStateListener; |
144 |
153 |
145 CCHUIDEBUG( "ShowUsernamePasswordQueryL - create query"); |
154 CCHUIDEBUG( "ShowUsernamePasswordQueryL - create query"); |
146 |
155 |
147 CAknMultiLineDataQueryDialog* dlg = CAknMultiLineDataQueryDialog::NewL( |
156 CAknMultiLineDataQueryDialog* dlg = CAknMultiLineDataQueryDialog::NewL( |
148 ptrUserName, ptrPassWord ); |
157 ptrUserName, ptrPassWord ); |
|
158 |
|
159 // Block application key while showing query |
|
160 (void) ((CAknNotifierAppServerAppUi*) |
|
161 iEikEnv->EikAppUi())->SuppressAppSwitching(ETrue); |
|
162 iAppKeyBlocked = ETrue; |
149 |
163 |
150 if ( dlg->ExecuteLD( R_CCHUINOTIF_USERNAME_PWD_DIALOG ) ) |
164 if ( dlg->ExecuteLD( R_CCHUINOTIF_USERNAME_PWD_DIALOG ) ) |
151 { |
165 { |
152 iResultParams.iDialogMode = |
166 iResultParams.iDialogMode = |
153 MCchUiObserver::ECchUiDialogTypeAuthenticationFailed; |
167 MCchUiObserver::ECchUiDialogTypeAuthenticationFailed; |
161 else |
175 else |
162 { |
176 { |
163 CCHUIDEBUG( "ShowUsernamePasswordQueryL - cancelled" ); |
177 CCHUIDEBUG( "ShowUsernamePasswordQueryL - cancelled" ); |
164 CompleteMessage( KErrCancel ); |
178 CompleteMessage( KErrCancel ); |
165 } |
179 } |
|
180 |
|
181 // Remove application key blocking |
|
182 (void) ((CAknNotifierAppServerAppUi*) |
|
183 iEikEnv->EikAppUi())->SuppressAppSwitching(EFalse); |
|
184 iAppKeyBlocked = EFalse; |
|
185 |
166 CleanupStack::PopAndDestroy( passWord ); |
186 CleanupStack::PopAndDestroy( passWord ); |
167 CleanupStack::PopAndDestroy( userName ); |
187 CleanupStack::PopAndDestroy( userName ); |
168 |
188 |
169 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowUsernamePasswordQueryL - OUT" ); |
189 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowUsernamePasswordQueryL - OUT" ); |
170 } |
190 } |
261 } |
281 } |
262 else |
282 else |
263 { |
283 { |
264 // Error occurred in RetrieveServiceIconL. Nothing to do. |
284 // Error occurred in RetrieveServiceIconL. Nothing to do. |
265 } |
285 } |
266 |
286 |
|
287 // Block application key while showing query |
|
288 (void) ((CAknNotifierAppServerAppUi*) |
|
289 iEikEnv->EikAppUi())->SuppressAppSwitching(ETrue); |
|
290 iAppKeyBlocked = ETrue; |
|
291 |
267 CCHUIDEBUG( "ShowNoConnectionsQueryL - run dialog" ); |
292 CCHUIDEBUG( "ShowNoConnectionsQueryL - run dialog" ); |
268 iListQueryDialog->RunLD(); |
293 iListQueryDialog->RunLD(); |
269 CCHUIDEBUG( "ShowNoConnectionsQueryL - run dialog done" ); |
294 CCHUIDEBUG( "ShowNoConnectionsQueryL - run dialog done" ); |
270 |
295 |
271 // write result, result now holds the item number |
296 // write result, result now holds the item number |
287 else |
312 else |
288 { |
313 { |
289 CCHUIDEBUG( "ShowNoConnectionsQueryL - complete with cancel" ); |
314 CCHUIDEBUG( "ShowNoConnectionsQueryL - complete with cancel" ); |
290 CompleteMessage( KErrCancel ); |
315 CompleteMessage( KErrCancel ); |
291 } |
316 } |
|
317 |
|
318 // Remove application key blocking |
|
319 (void) ((CAknNotifierAppServerAppUi*) |
|
320 iEikEnv->EikAppUi())->SuppressAppSwitching(EFalse); |
|
321 iAppKeyBlocked = EFalse; |
|
322 |
292 CleanupStack::PopAndDestroy( string ); |
323 CleanupStack::PopAndDestroy( string ); |
293 CleanupStack::PopAndDestroy( &commandArray ); |
324 CleanupStack::PopAndDestroy( &commandArray ); |
294 CleanupStack::PopAndDestroy( arrayforDialog ); |
325 CleanupStack::PopAndDestroy( arrayforDialog ); |
295 |
326 |
296 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowNoConnectionsQueryL - OUT" ); |
327 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowNoConnectionsQueryL - OUT" ); |
397 } |
428 } |
398 else |
429 else |
399 { |
430 { |
400 // Error occurred in RetrieveServiceIconL. Nothing to do. |
431 // Error occurred in RetrieveServiceIconL. Nothing to do. |
401 } |
432 } |
402 |
433 |
|
434 // Block application key while showing query |
|
435 (void) ((CAknNotifierAppServerAppUi*) |
|
436 iEikEnv->EikAppUi())->SuppressAppSwitching(ETrue); |
|
437 iAppKeyBlocked = ETrue; |
|
438 |
403 CCHUIDEBUG( "ShowChangeConnectionQueryL - run dialog" ); |
439 CCHUIDEBUG( "ShowChangeConnectionQueryL - run dialog" ); |
404 |
440 |
405 // List query dialog is deleted via RunLD except if there is |
441 // List query dialog is deleted via RunLD except if there is |
406 // incoming call at the same time the dialog is shown on screen. |
442 // incoming call at the same time the dialog is shown on screen. |
407 // In case of incoming call CallStateChanged() method handles |
443 // In case of incoming call CallStateChanged() method handles |
433 } |
469 } |
434 |
470 |
435 iListQueryDialog = NULL; |
471 iListQueryDialog = NULL; |
436 } |
472 } |
437 |
473 |
|
474 // Remove application key blocking |
|
475 (void) ((CAknNotifierAppServerAppUi*) |
|
476 iEikEnv->EikAppUi())->SuppressAppSwitching(EFalse); |
|
477 iAppKeyBlocked = EFalse; |
|
478 |
438 CleanupStack::PopAndDestroy( string ); |
479 CleanupStack::PopAndDestroy( string ); |
439 CleanupStack::PopAndDestroy( &iapName ); |
480 CleanupStack::PopAndDestroy( &iapName ); |
440 CleanupStack::PopAndDestroy( &commandArray ); |
481 CleanupStack::PopAndDestroy( &commandArray ); |
441 CleanupStack::PopAndDestroy( arrayforDialog ); |
482 CleanupStack::PopAndDestroy( arrayforDialog ); |
442 |
483 |
620 CCHUIDEBUG( "ShowConfirmChangeConnectionL - set prompt" ); |
661 CCHUIDEBUG( "ShowConfirmChangeConnectionL - set prompt" ); |
621 |
662 |
622 query->SetPromptL( *textForQuery ); |
663 query->SetPromptL( *textForQuery ); |
623 CleanupStack::PopAndDestroy( textForQuery ); |
664 CleanupStack::PopAndDestroy( textForQuery ); |
624 CleanupStack::Pop( query ); |
665 CleanupStack::Pop( query ); |
|
666 |
|
667 // Block application key while showing query |
|
668 (void) ((CAknNotifierAppServerAppUi*) |
|
669 iEikEnv->EikAppUi())->SuppressAppSwitching(ETrue); |
|
670 iAppKeyBlocked = ETrue; |
625 |
671 |
626 // Run query |
672 // Run query |
627 if( query->RunLD() ) |
673 if( query->RunLD() ) |
628 { |
674 { |
629 iResultParams.iDialogMode = |
675 iResultParams.iDialogMode = |
655 CCHUIDEBUG( "ShowConfirmChangeConnectionL - canceled" ); |
701 CCHUIDEBUG( "ShowConfirmChangeConnectionL - canceled" ); |
656 |
702 |
657 CompleteMessage( KErrCancel ); |
703 CompleteMessage( KErrCancel ); |
658 } |
704 } |
659 |
705 |
|
706 // Remove application key blocking |
|
707 (void) ((CAknNotifierAppServerAppUi*) |
|
708 iEikEnv->EikAppUi())->SuppressAppSwitching(EFalse); |
|
709 iAppKeyBlocked = EFalse; |
|
710 |
660 CleanupStack::PopAndDestroy( &iapName ); |
711 CleanupStack::PopAndDestroy( &iapName ); |
661 |
712 |
662 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowConfirmChangeConnectionL - OUT" ); |
713 CCHUIDEBUG( "CCCHUiNotifierImpl::ShowConfirmChangeConnectionL - OUT" ); |
663 } |
714 } |
664 |
715 |
697 CleanupStack::PopAndDestroy( connHandler ); |
748 CleanupStack::PopAndDestroy( connHandler ); |
698 |
749 |
699 CCHUIDEBUG( "ShowGprsSelectionL - set item array" ); |
750 CCHUIDEBUG( "ShowGprsSelectionL - set item array" ); |
700 dialog->SetItemTextArray( arrayforDialog ); |
751 dialog->SetItemTextArray( arrayforDialog ); |
701 dialog->SetOwnershipType( ELbmDoesNotOwnItemArray ); |
752 dialog->SetOwnershipType( ELbmDoesNotOwnItemArray ); |
|
753 |
|
754 // Block application key while showing query |
|
755 (void) ((CAknNotifierAppServerAppUi*) |
|
756 iEikEnv->EikAppUi())->SuppressAppSwitching(ETrue); |
|
757 iAppKeyBlocked = ETrue; |
702 |
758 |
703 CCHUIDEBUG( "ShowGprsSelectionL - run dialog" ); |
759 CCHUIDEBUG( "ShowGprsSelectionL - run dialog" ); |
704 dialog->RunLD(); |
760 dialog->RunLD(); |
705 |
761 |
706 // write result, result now holds the item number |
762 // write result, result now holds the item number |
712 } |
768 } |
713 else |
769 else |
714 { |
770 { |
715 User::Leave( KErrCancel ); |
771 User::Leave( KErrCancel ); |
716 } |
772 } |
|
773 |
|
774 // Remove application key blocking |
|
775 (void) ((CAknNotifierAppServerAppUi*) |
|
776 iEikEnv->EikAppUi())->SuppressAppSwitching(EFalse); |
|
777 iAppKeyBlocked = EFalse; |
717 |
778 |
718 CleanupStack::PopAndDestroy( string ); |
779 CleanupStack::PopAndDestroy( string ); |
719 CleanupStack::PopAndDestroy( arrayforDialog ); |
780 CleanupStack::PopAndDestroy( arrayforDialog ); |
720 CleanupStack::PopAndDestroy( &iapIds ); |
781 CleanupStack::PopAndDestroy( &iapIds ); |
721 |
782 |