appinstaller/AppinstUi/sisxsifplugin/src/sisxsifpluginuihandler.cpp
changeset 67 3a625661d1ce
parent 60 245df5276b97
child 72 a0dc14075813
equal deleted inserted replaced
60:245df5276b97 67:3a625661d1ce
    25 #include <sifuicertificateinfo.h>       // CSifUiCertificateInfo
    25 #include <sifuicertificateinfo.h>       // CSifUiCertificateInfo
    26 #include <sifuierrorinfo.h>             // CSifUiErrorInfo
    26 #include <sifuierrorinfo.h>             // CSifUiErrorInfo
    27 #include <bautils.h>                    // BaflUtils
    27 #include <bautils.h>                    // BaflUtils
    28 #include <driveinfo.h>                  // DriveInfo
    28 #include <driveinfo.h>                  // DriveInfo
    29 #include <featmgr.h>                    // FeatureManager
    29 #include <featmgr.h>                    // FeatureManager
    30 //#include <csxhelp/am.hlp.hrh>           // Help IDs
       
    31 
    30 
    32 using namespace Usif;
    31 using namespace Usif;
    33 
    32 
    34 const TInt KFreeSpaceTreshold = 128*1024;   // bytes
    33 const TInt KFreeSpaceTreshold = 128*1024;   // bytes
    35 
    34 
   187 TBool CSisxSifPluginUiHandler::DisplayInstallL( const Swi::CAppInfo& /*aAppInfo*/,
   186 TBool CSisxSifPluginUiHandler::DisplayInstallL( const Swi::CAppInfo& /*aAppInfo*/,
   188         const CApaMaskedBitmap* /*aLogo*/,
   187         const CApaMaskedBitmap* /*aLogo*/,
   189         const RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/ )
   188         const RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/ )
   190     {
   189     {
   191     FLOG( _L("CSisxSifPluginUiHandler::DisplayInstallL") );
   190     FLOG( _L("CSisxSifPluginUiHandler::DisplayInstallL") );
   192 
       
   193     iOperationPhase = EInstalling;
   191     iOperationPhase = EInstalling;
   194     return ETrue;
   192     return ETrue;
   195     }
   193     }
   196 
   194 
   197 // ---------------------------------------------------------------------------
   195 // ---------------------------------------------------------------------------
   200 //
   198 //
   201 TBool CSisxSifPluginUiHandler::DisplayGrantCapabilitiesL( const Swi::CAppInfo& /*aAppInfo*/,
   199 TBool CSisxSifPluginUiHandler::DisplayGrantCapabilitiesL( const Swi::CAppInfo& /*aAppInfo*/,
   202         const TCapabilitySet& aCapabilitySet )
   200         const TCapabilitySet& aCapabilitySet )
   203     {
   201     {
   204     FLOG( _L("CSisxSifPluginUiHandler::DisplayGrantCapabilitiesL") );
   202     FLOG( _L("CSisxSifPluginUiHandler::DisplayGrantCapabilitiesL") );
   205     TBool okToContinue = EFalse;
   203     TBool okToContinue = iSifUi->ShowGrantCapabilitiesL( aCapabilitySet );
   206 
       
   207     okToContinue = iSifUi->ShowGrantCapabilitiesL( aCapabilitySet );
       
   208 
       
   209     return okToContinue;
   204     return okToContinue;
   210     }
   205     }
   211 
   206 
   212 // ---------------------------------------------------------------------------
   207 // ---------------------------------------------------------------------------
   213 // CSisxSifPluginUiHandler::DisplayLanguageL()
   208 // CSisxSifPluginUiHandler::DisplayLanguageL()
   214 // ---------------------------------------------------------------------------
   209 // ---------------------------------------------------------------------------
   215 //
   210 //
   216 TInt CSisxSifPluginUiHandler::DisplayLanguageL( const Swi::CAppInfo& /*aAppInfo*/,
   211 TInt CSisxSifPluginUiHandler::DisplayLanguageL( const Swi::CAppInfo& /*aAppInfo*/,
   217         const RArray<TLanguage>& /*aLanguages*/ )
   212         const RArray<TLanguage>& aLanguages )
   218     {
   213     {
   219     FLOG( _L("CSisxSifPluginUiHandler::DisplayLanguageL") );
   214     FLOG( _L("CSisxSifPluginUiHandler::DisplayLanguageL") );
   220 
   215     TInt langIndex = iSifUi->ShowSelectLanguageL( aLanguages );
   221     return 0;
   216     return langIndex;
   222     }
   217     }
   223 
   218 
   224 // ---------------------------------------------------------------------------
   219 // ---------------------------------------------------------------------------
   225 // CSisxSifPluginUiHandler::DisplayDriveL()
   220 // CSisxSifPluginUiHandler::DisplayDriveL()
   226 // ---------------------------------------------------------------------------
   221 // ---------------------------------------------------------------------------
   272 // ---------------------------------------------------------------------------
   267 // ---------------------------------------------------------------------------
   273 // CSisxSifPluginUiHandler::DisplayOptionsL()
   268 // CSisxSifPluginUiHandler::DisplayOptionsL()
   274 // ---------------------------------------------------------------------------
   269 // ---------------------------------------------------------------------------
   275 //
   270 //
   276 TBool CSisxSifPluginUiHandler::DisplayOptionsL( const Swi::CAppInfo& /*aAppInfo*/,
   271 TBool CSisxSifPluginUiHandler::DisplayOptionsL( const Swi::CAppInfo& /*aAppInfo*/,
   277         const RPointerArray<TDesC>& /*aOptions*/, RArray<TBool>& /*aSelections*/ )
   272         const RPointerArray<TDesC>& aOptions, RArray<TBool>& aSelections )
   278     {
   273     {
   279     FLOG( _L("CSisxSifPluginUiHandler::DisplayOptionsL") );
   274     FLOG( _L("CSisxSifPluginUiHandler::DisplayOptionsL") );
   280 
   275     TInt optionCount = aOptions.Count();
   281     return ETrue;
   276     CPtrCArray* selectableItems = new( ELeave ) CPtrC16Array( optionCount );
       
   277     CleanupStack::PushL( selectableItems );
       
   278     for( TInt index = 0; index < optionCount; index++ )
       
   279         {
       
   280         selectableItems->AppendL( *aOptions[ index ] );
       
   281         }
       
   282 
       
   283     RArray<TInt> selectedIndexes;
       
   284     TBool isSelected = iSifUi->ShowSelectOptionsL( *selectableItems, selectedIndexes );
       
   285     if( isSelected && selectedIndexes.Count() )
       
   286         {
       
   287         TInt selectionsCount = aSelections.Count();
       
   288         __ASSERT_DEBUG( selectionsCount == optionCount, User::Invariant() );
       
   289         for( TInt index = 0; index < selectionsCount; index++ )
       
   290             {
       
   291             aSelections[ index ] = ( selectedIndexes.Find( index ) != KErrNotFound );
       
   292             }
       
   293         }
       
   294     return isSelected;
   282     }
   295     }
   283 
   296 
   284 // ---------------------------------------------------------------------------
   297 // ---------------------------------------------------------------------------
   285 // CSisxSifPluginUiHandler::HandleInstallEventL()
   298 // CSisxSifPluginUiHandler::HandleInstallEventL()
   286 // ---------------------------------------------------------------------------
   299 // ---------------------------------------------------------------------------