homescreenpluginsrv/hspsmanager/src/hspsthemeserver.cpp
branchRCL_3
changeset 9 d0529222e3f0
parent 3 ff572005ac23
child 18 bd874ee5e5e2
equal deleted inserted replaced
4:1a2a00e78665 9:d0529222e3f0
    52 
    52 
    53 // CONSTANTS
    53 // CONSTANTS
    54 
    54 
    55 // Directory for the SISX installation files
    55 // Directory for the SISX installation files
    56 _LIT( KImportDirectoryC, "c:\\private\\200159c0\\import\\" );
    56 _LIT( KImportDirectoryC, "c:\\private\\200159c0\\import\\" );
    57 
       
    58 // Directory for the ROM based installation files
       
    59 
    57 
    60 // Directories for backup folders
    58 // Directories for backup folders
    61 _LIT( KBackupThemesDirectoryC, "c:\\private\\200159c0\\backup\\themes\\" );
    59 _LIT( KBackupThemesDirectoryC, "c:\\private\\200159c0\\backup\\themes\\" );
    62 
    60 
    63 // Name of the installation file
    61 // Name of the installation file
  2578     
  2576     
  2579     return KErrNone;
  2577     return KErrNone;
  2580 	}
  2578 	}
  2581 
  2579 
  2582 // -----------------------------------------------------------------------------
  2580 // -----------------------------------------------------------------------------
       
  2581 // ChspsThemeServer::InstallUDAWidgetsL()
       
  2582 // -----------------------------------------------------------------------------
       
  2583 //
       
  2584 void ChspsThemeServer::InstallUDAWidgetsL()
       
  2585     {
       
  2586     //Get list of uda dir's
       
  2587     TPtrC filter( KFilterAllPluginImportsV1 );
       
  2588     CDir* importDir( NULL );           
       
  2589     TFindFile fileFinder( iFsSession );
       
  2590     fileFinder.FindWildByDir( filter, KImportDirectoryC, importDir );    
       
  2591     CleanupStack::PushL( importDir );
       
  2592     
       
  2593     if ( importDir && importDir->Count() > 0 )
       
  2594         {
       
  2595         CHSPSInstaller* installer = CHSPSInstaller::NewL( *this );
       
  2596         CleanupStack::PushL( installer );
       
  2597         
       
  2598         for ( TInt i = 0; i < importDir->Count(); i++ )
       
  2599             {
       
  2600             TPtrC udaName( (*importDir)[i].iName );
       
  2601             // Get manifest path
       
  2602             HBufC* manifestBuf = GetManifestFromImportLC( 
       
  2603                     udaName, 
       
  2604                     KImportDirectoryC );
       
  2605             
       
  2606             //install
       
  2607             TRAPD( err, installer->InstallConfigurationL( *manifestBuf ) );
       
  2608 #ifdef HSPS_LOG_ACTIVE            
       
  2609             if ( err != KErrNone )
       
  2610                 {
       
  2611                 iLogBus->LogText( _L( "ChspsThemeServer::InstallUDAWidgetsL(): - Installation failed" ) );
       
  2612                 }
       
  2613 #endif
       
  2614             CleanupStack::PopAndDestroy( manifestBuf );
       
  2615             }
       
  2616         CleanupStack::PopAndDestroy( installer );
       
  2617         }
       
  2618     CleanupStack::PopAndDestroy( importDir ); 
       
  2619     }
       
  2620 
       
  2621 // -----------------------------------------------------------------------------
  2583 // ChspsThemeServer::HandleRomInstallationsL()
  2622 // ChspsThemeServer::HandleRomInstallationsL()
  2584 // -----------------------------------------------------------------------------
  2623 // -----------------------------------------------------------------------------
  2585 //
  2624 //
  2586 void ChspsThemeServer::HandleRomInstallationsL()
  2625 void ChspsThemeServer::HandleRomInstallationsL()
  2587     {    
  2626     {    
  2613         ( fwVersion.Length() == 0 ) )
  2652         ( fwVersion.Length() == 0 ) )
  2614         {
  2653         {
  2615         // Install manifest files from ROM
  2654         // Install manifest files from ROM
  2616         InstallManifestsFromRomDriveL();
  2655         InstallManifestsFromRomDriveL();
  2617 
  2656 
       
  2657         // install widgets from UDA image
       
  2658         InstallUDAWidgetsL();
       
  2659         
  2618         // Post RFS installations have been done, prevent re-installations at next startup
  2660         // Post RFS installations have been done, prevent re-installations at next startup
  2619         // by reading firmware version and saving it to cenrep.
  2661         // by reading firmware version and saving it to cenrep.
  2620         GetFWVersion( fwVersion );
  2662         GetFWVersion( fwVersion );
  2621         
  2663         
  2622         errorCode = iCentralRepository->Set( key, fwVersion );
  2664         errorCode = iCentralRepository->Set( key, fwVersion );