28 #include "caicpscommandbuffer.h" |
28 #include "caicpscommandbuffer.h" |
29 #include "aipluginfactory.h" |
29 #include "aipluginfactory.h" |
30 |
30 |
31 #include "aistatemanager.h" |
31 #include "aistatemanager.h" |
32 |
32 |
33 #include <homescreen.rsg> |
|
34 |
|
35 _LIT( KResourceDrive, "Z:" ); |
|
36 _LIT( KResourceFile, "homescreen.rsc" ); |
|
37 _LIT( KResourcePath, "\\resource\\apps\\" ); |
|
38 |
|
39 // ======== LOCAL FUNCTIONS ======== |
33 // ======== LOCAL FUNCTIONS ======== |
40 // ---------------------------------------------------------------------------- |
34 // ---------------------------------------------------------------------------- |
41 // StartReason |
35 // StartReason |
42 // |
36 // |
43 // ---------------------------------------------------------------------------- |
37 // ---------------------------------------------------------------------------- |
118 // C++ default destructor. |
112 // C++ default destructor. |
119 // ---------------------------------------------------------------------------- |
113 // ---------------------------------------------------------------------------- |
120 // |
114 // |
121 CAiStateManager::~CAiStateManager() |
115 CAiStateManager::~CAiStateManager() |
122 { |
116 { |
123 if( iWaitDialog ) |
|
124 { |
|
125 delete iWaitDialog; |
|
126 } |
|
127 delete iCommandBuffer; |
117 delete iCommandBuffer; |
128 iReloadPlugins.Close(); |
118 iReloadPlugins.Close(); |
129 } |
119 } |
130 |
120 |
131 // ---------------------------------------------------------------------------- |
121 // ---------------------------------------------------------------------------- |
440 __PRINTS( "CAiStateManager::ProcessBackupRestore" ); |
430 __PRINTS( "CAiStateManager::ProcessBackupRestore" ); |
441 __TIME_MARK( time ); |
431 __TIME_MARK( time ); |
442 |
432 |
443 iHalt = aStart; |
433 iHalt = aStart; |
444 |
434 |
445 if ( aStart ) |
|
446 { |
|
447 TRAP_IGNORE( StartWaitDialogL() ); |
|
448 } |
|
449 else |
|
450 { |
|
451 TRAP_IGNORE( StopWaitDialogL() ); |
|
452 } |
|
453 |
|
454 RPointerArray< CHsContentPublisher >& plugins( iFactory.Publishers() ); |
435 RPointerArray< CHsContentPublisher >& plugins( iFactory.Publishers() ); |
455 |
436 |
456 for( TInt i = 0; i < plugins.Count(); i++ ) |
437 for( TInt i = 0; i < plugins.Count(); i++ ) |
457 { |
438 { |
458 CHsContentPublisher* plugin( plugins[i] ); |
439 CHsContentPublisher* plugin( plugins[i] ); |
647 } |
628 } |
648 } |
629 } |
649 __PRINTS( "CAiStateManager::NotifyReleasePlugins: return void" ); |
630 __PRINTS( "CAiStateManager::NotifyReleasePlugins: return void" ); |
650 } |
631 } |
651 |
632 |
652 // ---------------------------------------------------------------------------- |
|
653 // CAiStateManager::StartWaitDialogL() |
|
654 // |
|
655 // ---------------------------------------------------------------------------- |
|
656 // |
|
657 void CAiStateManager::StartWaitDialogL() |
|
658 { |
|
659 RConeResourceLoader resourceLoader( *CCoeEnv::Static() ); |
|
660 TFullName fileName( KResourceDrive ); |
|
661 fileName.Append( KResourcePath ); |
|
662 fileName.Append( KResourceFile ); |
|
663 |
|
664 // Get language of resource file. |
|
665 BaflUtils::NearestLanguageFile( CCoeEnv::Static()->FsSession(), fileName ); |
|
666 |
|
667 // Open resource file. |
|
668 resourceLoader.OpenL( fileName ); |
|
669 |
|
670 if( iWaitDialog ) |
|
671 { |
|
672 delete iWaitDialog; |
|
673 iWaitDialog = NULL; |
|
674 } |
|
675 |
|
676 // For the wait dialog |
|
677 iWaitDialog = new (ELeave) CAknWaitDialog( |
|
678 REINTERPRET_CAST( CEikDialog**, &iWaitDialog ) ); |
|
679 iWaitDialog->SetCallback( this ); |
|
680 iWaitDialog->ExecuteLD( R_HOMESCREEN_WAIT_DIALOG ); |
|
681 resourceLoader.Close(); |
|
682 } |
|
683 |
|
684 // ---------------------------------------------------------------------------- |
|
685 // CAiStateManager::StopWaitDialogL() |
|
686 // |
|
687 // ---------------------------------------------------------------------------- |
|
688 // |
|
689 void CAiStateManager::StopWaitDialogL() |
|
690 { |
|
691 if( iWaitDialog ) |
|
692 { |
|
693 iWaitDialog->ProcessFinishedL(); |
|
694 } |
|
695 } |
|
696 |
|
697 // ---------------------------------------------------------------------------- |
|
698 // CAiStateManager::DialogDismissedL() |
|
699 // |
|
700 // ---------------------------------------------------------------------------- |
|
701 // |
|
702 void CAiStateManager::DialogDismissedL(TInt /*aButtonId*/) |
|
703 { |
|
704 // No implementation required. |
|
705 } |
|
706 |
|
707 // End of file |
633 // End of file |