appinstaller/AppinstUi/Plugin/CommonUI/Src/CUIDialogs.cpp
branchRCL_3
changeset 26 8b7f4e561641
parent 25 7333d7932ef7
equal deleted inserted replaced
25:7333d7932ef7 26:8b7f4e561641
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
    21 #include <bautils.h>
    21 #include <bautils.h>
    22 #include <eikenv.h>
    22 #include <eikenv.h>
    23 #include <StringLoader.h>
    23 #include <StringLoader.h>
    24 //#include <AknQueryDialog.h> 
    24 #include <AknQueryDialog.h>
    25 #include <eikprogi.h>
    25 #include <eikprogi.h>
    26 //#include <aknnotewrappers.h>
    26 #include <aknnotewrappers.h>
    27 #include <data_caging_path_literals.hrh>
    27 #include <data_caging_path_literals.hrh>
    28 #include <SWInstCommonUI.rsg>
    28 #include <SWInstCommonUI.rsg>
    29 //#include <aknmessagequerydialog.h>
    29 #include <aknmessagequerydialog.h>
    30 #include <hlplch.h>
    30 #include <hlplch.h>
    31 //#include <csxhelp/am.hlp.hrh>
    31 #include <csxhelp/am.hlp.hrh>
    32 #include <coehelp.h>
    32 #include <coehelp.h>
    33 #include <featmgr.h>
    33 #include <featmgr.h>
    34 #include <sysutil.h>
    34 #include <sysutil.h>
    35 #ifdef RD_MULTIPLE_DRIVE
    35 #ifdef RD_MULTIPLE_DRIVE
    36 #include <driveinfo.h>
    36 #include <driveinfo.h>
    37 #endif //RD_MULTIPLE_DRIVE
    37 #endif //RD_MULTIPLE_DRIVE
    38 //#include <akninputblock.h>
    38 #include <akninputblock.h>
    39  
    39  
    40 #include "CUIDialogs.h"
    40 #include "CUIDialogs.h"
    41 #include "CUIDriveUtils.h"
    41 #include "CUIDriveUtils.h"
    42 #include "CUIWaitDialog.h"
    42 #include "CUIWaitDialog.h"
    43 #include "CUIProgressDialog.h"
    43 #include "CUIProgressDialog.h"
    78     TFileName fileName;
    78     TFileName fileName;
    79     fileName.Append( KDC_RESOURCE_FILES_DIR );
    79     fileName.Append( KDC_RESOURCE_FILES_DIR );
    80     fileName.Append( KCUIResourceFileName );
    80     fileName.Append( KCUIResourceFileName );
    81     iResourceFileOffset = CUIUtils::LoadResourceFileL( fileName, iCoeEnv );    
    81     iResourceFileOffset = CUIUtils::LoadResourceFileL( fileName, iCoeEnv );    
    82 
    82 
    83 //    iAbsorber = CAknInputBlock::NewLC();
    83     iAbsorber = CAknInputBlock::NewLC();
    84 //    CleanupStack::Pop( iAbsorber );
    84     CleanupStack::Pop( iAbsorber );
    85     
    85     
    86     FeatureManager::InitializeLibL(); 
    86     FeatureManager::InitializeLibL(); 
    87     }
    87     }
    88 
    88 
    89 // -----------------------------------------------------------------------------
    89 // -----------------------------------------------------------------------------
   110     if( iResourceFileOffset )
   110     if( iResourceFileOffset )
   111         {
   111         {
   112         iCoeEnv->DeleteResourceFile( iResourceFileOffset );
   112         iCoeEnv->DeleteResourceFile( iResourceFileOffset );
   113         }
   113         }
   114 
   114 
   115 //    delete iAbsorber;
   115     delete iAbsorber;
   116 
   116 
   117     FeatureManager::UnInitializeLib();
   117     FeatureManager::UnInitializeLib();
   118     }
   118     }
   119 
   119 
   120 // -----------------------------------------------------------------------------
   120 // -----------------------------------------------------------------------------
   283 //
   283 //
   284 EXPORT_C TBool CCUIDialogs::ShowConfirmationQueryL( const TDesC& aDisplayString,
   284 EXPORT_C TBool CCUIDialogs::ShowConfirmationQueryL( const TDesC& aDisplayString,
   285                                                     TInt aSoftkeyResourceId ) const
   285                                                     TInt aSoftkeyResourceId ) const
   286     {
   286     {
   287     TBool response( EFalse );
   287     TBool response( EFalse );
   288 /*
   288 
   289     CAknQueryDialog* note = 
   289     CAknQueryDialog* note = 
   290         CAknQueryDialog::NewL( CAknQueryDialog::EConfirmationTone );
   290         CAknQueryDialog::NewL( CAknQueryDialog::EConfirmationTone );
   291 
   291 
   292     note->PrepareLC( R_SWCOMMON_GENERAL_CONFIRMATION_QUERY );
   292     note->PrepareLC( R_SWCOMMON_GENERAL_CONFIRMATION_QUERY );
   293     note->SetPromptL( aDisplayString );
   293     note->SetPromptL( aDisplayString );
   295 
   295 
   296     if ( note->RunLD() )    
   296     if ( note->RunLD() )    
   297         {
   297         {
   298         response = ETrue;
   298         response = ETrue;
   299         }   
   299         }   
   300 */
   300 
   301     return response;    
   301     return response;    
   302     }
   302     }
   303 
   303 
   304 // -----------------------------------------------------------------------------
   304 // -----------------------------------------------------------------------------
   305 // CCUIDialogs::ShowDriveSelectionDialogL
   305 // CCUIDialogs::ShowDriveSelectionDialogL
   310 EXPORT_C TInt CCUIDialogs::ShowDriveSelectionDialogL( 
   310 EXPORT_C TInt CCUIDialogs::ShowDriveSelectionDialogL( 
   311     TInt64 aSize,
   311     TInt64 aSize,
   312     const RArray<TDriveUnit>& aDriveUnits,
   312     const RArray<TDriveUnit>& aDriveUnits,
   313     const RArray<TInt64>& aDriveSpaces,
   313     const RArray<TInt64>& aDriveSpaces,
   314     TInt& aSelectionResult )
   314     TInt& aSelectionResult )
   315     {  
   315     {   
   316     
       
   317     TInt result( KErrNone );
   316     TInt result( KErrNone );
   318 /*
   317 
   319     // Sanity check
   318     // Sanity check
   320     if ( aSize <= 0 )
   319     if ( aSize <= 0 )
   321         {
   320         {
   322         aSize = 1;        
   321         aSize = 1;        
   323         }    
   322         }    
   438             CleanupStack::PopAndDestroy( string );                   
   437             CleanupStack::PopAndDestroy( string );                   
   439             }
   438             }
   440         }    
   439         }    
   441     
   440     
   442     CleanupStack::PopAndDestroy( driveUtils );
   441     CleanupStack::PopAndDestroy( driveUtils );
   443 */
   442 
   444     return result;
   443     return result;
   445     }
   444     }
   446 
   445 
   447 // -----------------------------------------------------------------------------
   446 // -----------------------------------------------------------------------------
   448 // CCUIDialogs::ShowSecurityWarningDialogL
   447 // CCUIDialogs::ShowSecurityWarningDialogL
   449 // Show a security warning dialog.
   448 // Show a security warning dialog.
   450 // (other items were commented in a header).
   449 // (other items were commented in a header).
   451 // -----------------------------------------------------------------------------
   450 // -----------------------------------------------------------------------------
   452 //
   451 //
   453 EXPORT_C TBool CCUIDialogs::ShowSecurityWarningDialogL()
   452 EXPORT_C TBool CCUIDialogs::ShowSecurityWarningDialogL()
   454     { 
   453     {   
   455     
       
   456     TBool result( EFalse );
   454     TBool result( EFalse );
   457     /*
   455     
   458     // Load resources
   456     // Load resources
   459     HBufC* text = StringLoader::LoadLC( R_SWCOMMON_SECURITY_WARNING );
   457     HBufC* text = StringLoader::LoadLC( R_SWCOMMON_SECURITY_WARNING );
   460     HBufC* linkText = NULL;
   458     HBufC* linkText = NULL;
   461     if ( FeatureManager::FeatureSupported( KFeatureIdHelp ) )
   459     if ( FeatureManager::FeatureSupported( KFeatureIdHelp ) )
   462         {        
   460         {        
   490         {
   488         {
   491         result = ETrue;        
   489         result = ETrue;        
   492         }    
   490         }    
   493     
   491     
   494     CleanupStack::PopAndDestroy( 3, text ); // message, linkText, text
   492     CleanupStack::PopAndDestroy( 3, text ); // message, linkText, text
   495      */
   493 
   496     return result;    
   494     return result;    
   497     }
   495     }
   498  
   496  
   499 // -----------------------------------------------------------------------------
   497 // -----------------------------------------------------------------------------
   500 // CCUIDialogs::ShowErrorNoteL
   498 // CCUIDialogs::ShowErrorNoteL
   515 // (other items were commented in a header).
   513 // (other items were commented in a header).
   516 // -----------------------------------------------------------------------------
   514 // -----------------------------------------------------------------------------
   517 //
   515 //
   518 EXPORT_C void CCUIDialogs::ShowErrorNoteL( const TDesC& aErrorText ) const
   516 EXPORT_C void CCUIDialogs::ShowErrorNoteL( const TDesC& aErrorText ) const
   519     {
   517     {
   520     /*
       
   521     CAknErrorNote* note = new (ELeave) CAknErrorNote( ETrue );
   518     CAknErrorNote* note = new (ELeave) CAknErrorNote( ETrue );
   522     note->ExecuteLD( aErrorText );
   519     note->ExecuteLD( aErrorText );
   523     */
       
   524     }
   520     }
   525 
   521 
   526 // -----------------------------------------------------------------------------
   522 // -----------------------------------------------------------------------------
   527 // CCUIDialogs::ResetProgressDialogL
   523 // CCUIDialogs::ResetProgressDialogL
   528 // Resets the progress bar in the progress dialog.
   524 // Resets the progress bar in the progress dialog.
   599                                         const MDesCArray& aInstalledFolderArray,
   595                                         const MDesCArray& aInstalledFolderArray,
   600                                         const CAknIconArray& aIconArray,
   596                                         const CAknIconArray& aIconArray,
   601                                         TInt& aIndexOfAppToBeStarted ) const
   597                                         TInt& aIndexOfAppToBeStarted ) const
   602            
   598            
   603     {
   599     {
   604     /*
       
   605     aIndexOfAppToBeStarted = KErrNotFound;
   600     aIndexOfAppToBeStarted = KErrNotFound;
   606     
   601     
   607     // Prepare for showing the installation complete query
   602     // Prepare for showing the installation complete query
   608     CDesCArray *itemArray = new( ELeave ) CDesCArrayFlat( 1 );
   603     CDesCArray *itemArray = new( ELeave ) CDesCArrayFlat( 1 );
   609     CleanupStack::PushL( itemArray );
   604     CleanupStack::PushL( itemArray );
   678     else
   673     else
   679     	{
   674     	{
   680     	aIndexOfAppToBeStarted = KErrNotFound;	
   675     	aIndexOfAppToBeStarted = KErrNotFound;	
   681     	}    
   676     	}    
   682 
   677 
   683     return appIsStarted;
   678     return appIsStarted;	
   684     */
       
   685     return EFalse;
       
   686     }   
   679     }   
   687     
   680     
   688 // -----------------------------------------------------------------------------
   681 // -----------------------------------------------------------------------------
   689 // CCUIDialogs::ShowUninstallConfirmationForSeveralAppsL
   682 // CCUIDialogs::ShowUninstallConfirmationForSeveralAppsL
   690 // Show an installation complete query.
   683 // Show an installation complete query.
   694 EXPORT_C TBool CCUIDialogs::ShowUninstallConfirmationForSeveralAppsL(
   687 EXPORT_C TBool CCUIDialogs::ShowUninstallConfirmationForSeveralAppsL(
   695                                 const TDesC& aApplicationGroup,
   688                                 const TDesC& aApplicationGroup,
   696                                 const MDesCArray& aApplicationArray,
   689                                 const MDesCArray& aApplicationArray,
   697                                 TInt aSoftkeyResourceId ) const
   690                                 TInt aSoftkeyResourceId ) const
   698 	{
   691 	{
   699     /*
       
   700     HBufC* appList = HBufC::NewLC( 0 ); 
   692     HBufC* appList = HBufC::NewLC( 0 ); 
   701     TInt count = aApplicationArray.MdcaCount();   
   693     TInt count = aApplicationArray.MdcaCount();   
   702     for ( TInt i = 0; i < count; i++ )
   694     for ( TInt i = 0; i < count; i++ )
   703     	{
   695     	{
   704     	HBufC* tmp = appList;
   696     	HBufC* tmp = appList;
   737         {
   729         {
   738         response = ETrue; 
   730         response = ETrue; 
   739         }
   731         }
   740     CleanupStack::PopAndDestroy( message );
   732     CleanupStack::PopAndDestroy( message );
   741     return response; 
   733     return response; 
   742     */
       
   743     return EFalse;
       
   744 	}                                
   734 	}                                
   745                                      
   735                                      
   746 
   736 
   747 //    
   737 //    
   748 // -----------------------------------------------------------------------------                                                
   738 // -----------------------------------------------------------------------------                                                
   780 // (other items were commented in a header).
   770 // (other items were commented in a header).
   781 // -----------------------------------------------------------------------------
   771 // -----------------------------------------------------------------------------
   782 //
   772 //
   783 TInt CCUIDialogs::ShowSecurityWarningHelp( TAny* aPtr )
   773 TInt CCUIDialogs::ShowSecurityWarningHelp( TAny* aPtr )
   784     {
   774     {
   785     //TRAP_IGNORE( reinterpret_cast<CCUIDialogs*>(aPtr)->LaunchHelpL( KAM_HLP_INSTALL_UNTRUSTED ) );    
   775     TRAP_IGNORE( reinterpret_cast<CCUIDialogs*>(aPtr)->LaunchHelpL( KAM_HLP_INSTALL_UNTRUSTED ) );    
   786 
   776 
   787     return KErrNone;    
   777     return KErrNone;    
   788     }
   778     }
   789 
   779 
   790 
   780