appinstaller/AppinstUi/Plugin/CommonUI/Src/CUIDialogs.cpp
branchRCL_3
changeset 25 7333d7932ef7
parent 0 ba25891c3a9e
child 26 8b7f4e561641
equal deleted inserted replaced
24:5cc91383ab1e 25:7333d7932ef7
    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     
   316     TInt result( KErrNone );
   317     TInt result( KErrNone );
   317 
   318 /*
   318     // Sanity check
   319     // Sanity check
   319     if ( aSize <= 0 )
   320     if ( aSize <= 0 )
   320         {
   321         {
   321         aSize = 1;        
   322         aSize = 1;        
   322         }    
   323         }    
   437             CleanupStack::PopAndDestroy( string );                   
   438             CleanupStack::PopAndDestroy( string );                   
   438             }
   439             }
   439         }    
   440         }    
   440     
   441     
   441     CleanupStack::PopAndDestroy( driveUtils );
   442     CleanupStack::PopAndDestroy( driveUtils );
   442 
   443 */
   443     return result;
   444     return result;
   444     }
   445     }
   445 
   446 
   446 // -----------------------------------------------------------------------------
   447 // -----------------------------------------------------------------------------
   447 // CCUIDialogs::ShowSecurityWarningDialogL
   448 // CCUIDialogs::ShowSecurityWarningDialogL
   448 // Show a security warning dialog.
   449 // Show a security warning dialog.
   449 // (other items were commented in a header).
   450 // (other items were commented in a header).
   450 // -----------------------------------------------------------------------------
   451 // -----------------------------------------------------------------------------
   451 //
   452 //
   452 EXPORT_C TBool CCUIDialogs::ShowSecurityWarningDialogL()
   453 EXPORT_C TBool CCUIDialogs::ShowSecurityWarningDialogL()
   453     {   
   454     { 
       
   455     
   454     TBool result( EFalse );
   456     TBool result( EFalse );
   455     
   457     /*
   456     // Load resources
   458     // Load resources
   457     HBufC* text = StringLoader::LoadLC( R_SWCOMMON_SECURITY_WARNING );
   459     HBufC* text = StringLoader::LoadLC( R_SWCOMMON_SECURITY_WARNING );
   458     HBufC* linkText = NULL;
   460     HBufC* linkText = NULL;
   459     if ( FeatureManager::FeatureSupported( KFeatureIdHelp ) )
   461     if ( FeatureManager::FeatureSupported( KFeatureIdHelp ) )
   460         {        
   462         {        
   488         {
   490         {
   489         result = ETrue;        
   491         result = ETrue;        
   490         }    
   492         }    
   491     
   493     
   492     CleanupStack::PopAndDestroy( 3, text ); // message, linkText, text
   494     CleanupStack::PopAndDestroy( 3, text ); // message, linkText, text
   493 
   495      */
   494     return result;    
   496     return result;    
   495     }
   497     }
   496  
   498  
   497 // -----------------------------------------------------------------------------
   499 // -----------------------------------------------------------------------------
   498 // CCUIDialogs::ShowErrorNoteL
   500 // CCUIDialogs::ShowErrorNoteL
   513 // (other items were commented in a header).
   515 // (other items were commented in a header).
   514 // -----------------------------------------------------------------------------
   516 // -----------------------------------------------------------------------------
   515 //
   517 //
   516 EXPORT_C void CCUIDialogs::ShowErrorNoteL( const TDesC& aErrorText ) const
   518 EXPORT_C void CCUIDialogs::ShowErrorNoteL( const TDesC& aErrorText ) const
   517     {
   519     {
       
   520     /*
   518     CAknErrorNote* note = new (ELeave) CAknErrorNote( ETrue );
   521     CAknErrorNote* note = new (ELeave) CAknErrorNote( ETrue );
   519     note->ExecuteLD( aErrorText );
   522     note->ExecuteLD( aErrorText );
       
   523     */
   520     }
   524     }
   521 
   525 
   522 // -----------------------------------------------------------------------------
   526 // -----------------------------------------------------------------------------
   523 // CCUIDialogs::ResetProgressDialogL
   527 // CCUIDialogs::ResetProgressDialogL
   524 // Resets the progress bar in the progress dialog.
   528 // Resets the progress bar in the progress dialog.
   595                                         const MDesCArray& aInstalledFolderArray,
   599                                         const MDesCArray& aInstalledFolderArray,
   596                                         const CAknIconArray& aIconArray,
   600                                         const CAknIconArray& aIconArray,
   597                                         TInt& aIndexOfAppToBeStarted ) const
   601                                         TInt& aIndexOfAppToBeStarted ) const
   598            
   602            
   599     {
   603     {
       
   604     /*
   600     aIndexOfAppToBeStarted = KErrNotFound;
   605     aIndexOfAppToBeStarted = KErrNotFound;
   601     
   606     
   602     // Prepare for showing the installation complete query
   607     // Prepare for showing the installation complete query
   603     CDesCArray *itemArray = new( ELeave ) CDesCArrayFlat( 1 );
   608     CDesCArray *itemArray = new( ELeave ) CDesCArrayFlat( 1 );
   604     CleanupStack::PushL( itemArray );
   609     CleanupStack::PushL( itemArray );
   673     else
   678     else
   674     	{
   679     	{
   675     	aIndexOfAppToBeStarted = KErrNotFound;	
   680     	aIndexOfAppToBeStarted = KErrNotFound;	
   676     	}    
   681     	}    
   677 
   682 
   678     return appIsStarted;	
   683     return appIsStarted;
       
   684     */
       
   685     return EFalse;
   679     }   
   686     }   
   680     
   687     
   681 // -----------------------------------------------------------------------------
   688 // -----------------------------------------------------------------------------
   682 // CCUIDialogs::ShowUninstallConfirmationForSeveralAppsL
   689 // CCUIDialogs::ShowUninstallConfirmationForSeveralAppsL
   683 // Show an installation complete query.
   690 // Show an installation complete query.
   687 EXPORT_C TBool CCUIDialogs::ShowUninstallConfirmationForSeveralAppsL(
   694 EXPORT_C TBool CCUIDialogs::ShowUninstallConfirmationForSeveralAppsL(
   688                                 const TDesC& aApplicationGroup,
   695                                 const TDesC& aApplicationGroup,
   689                                 const MDesCArray& aApplicationArray,
   696                                 const MDesCArray& aApplicationArray,
   690                                 TInt aSoftkeyResourceId ) const
   697                                 TInt aSoftkeyResourceId ) const
   691 	{
   698 	{
       
   699     /*
   692     HBufC* appList = HBufC::NewLC( 0 ); 
   700     HBufC* appList = HBufC::NewLC( 0 ); 
   693     TInt count = aApplicationArray.MdcaCount();   
   701     TInt count = aApplicationArray.MdcaCount();   
   694     for ( TInt i = 0; i < count; i++ )
   702     for ( TInt i = 0; i < count; i++ )
   695     	{
   703     	{
   696     	HBufC* tmp = appList;
   704     	HBufC* tmp = appList;
   729         {
   737         {
   730         response = ETrue; 
   738         response = ETrue; 
   731         }
   739         }
   732     CleanupStack::PopAndDestroy( message );
   740     CleanupStack::PopAndDestroy( message );
   733     return response; 
   741     return response; 
       
   742     */
       
   743     return EFalse;
   734 	}                                
   744 	}                                
   735                                      
   745                                      
   736 
   746 
   737 //    
   747 //    
   738 // -----------------------------------------------------------------------------                                                
   748 // -----------------------------------------------------------------------------                                                
   770 // (other items were commented in a header).
   780 // (other items were commented in a header).
   771 // -----------------------------------------------------------------------------
   781 // -----------------------------------------------------------------------------
   772 //
   782 //
   773 TInt CCUIDialogs::ShowSecurityWarningHelp( TAny* aPtr )
   783 TInt CCUIDialogs::ShowSecurityWarningHelp( TAny* aPtr )
   774     {
   784     {
   775     TRAP_IGNORE( reinterpret_cast<CCUIDialogs*>(aPtr)->LaunchHelpL( KAM_HLP_INSTALL_UNTRUSTED ) );    
   785     //TRAP_IGNORE( reinterpret_cast<CCUIDialogs*>(aPtr)->LaunchHelpL( KAM_HLP_INSTALL_UNTRUSTED ) );    
   776 
   786 
   777     return KErrNone;    
   787     return KErrNone;    
   778     }
   788     }
   779 
   789 
   780 
   790