appinstaller/AppinstUi/Daemon/Src/daemonbehaviour.cpp
changeset 29 26b6f0522fd8
parent 25 98b66e4fb0be
child 42 d17dc5398051
equal deleted inserted replaced
25:98b66e4fb0be 29:26b6f0522fd8
   171             TInt count = iDriveArray.Count();
   171             TInt count = iDriveArray.Count();
   172                     
   172                     
   173             if ( count )            
   173             if ( count )            
   174                 {                             
   174                 {                             
   175                 for(index = 0; index < count; index++ )
   175                 for(index = 0; index < count; index++ )
   176                     {                                        
   176                     {                   
   177                     ProcessPreinstalledFilesL(iDriveArray[index]);
   177                     ProcessPreinstalledFilesL(iDriveArray[index]);
       
   178                     
       
   179                     FLOG_1( _L("Daemon: StartInstallingL for drive: %d"), index);
   178                     iSisInstaller->StartInstallingL();                
   180                     iSisInstaller->StartInstallingL();                
   179                     }
   181                     }
   180                 }                
   182                 }                
   181             }                      
   183             }                      
   182         }
   184         }
   188 // CDaemonBehaviour::ProcessPreinstalledFilesL
   190 // CDaemonBehaviour::ProcessPreinstalledFilesL
   189 // -----------------------------------------------------------------------
   191 // -----------------------------------------------------------------------
   190 //          
   192 //          
   191 void CDaemonBehaviour::ProcessPreinstalledFilesL(TInt aDrive)
   193 void CDaemonBehaviour::ProcessPreinstalledFilesL(TInt aDrive)
   192     {
   194     {
   193 //    _LIT( KDaemonPrivatePath,":\\private\\10202dce\\" );
   195      _LIT( KDaemonPrivatePath,":\\private\\10202dce\\" );
   194     
       
   195     // NOTE this is only for testing since we can not use
       
   196     // Daemon's private folder. Sifserver do not have allfiles
       
   197     // capability currently.
       
   198     _LIT( KDaemonPrivatePath,":\\installs\\swidaemon\\" );
       
   199     
   196     
   200 #ifndef RD_MULTIPLE_DRIVE
   197 #ifndef RD_MULTIPLE_DRIVE
   201     iSisInstaller->Cancel();
   198     iSisInstaller->Cancel();
   202 #endif      
   199 #endif      
   203     // For uninstaller
   200     // For uninstaller
   216 // CDaemonBehaviour::ProcessPreinstalledFilesL
   213 // CDaemonBehaviour::ProcessPreinstalledFilesL
   217 // -----------------------------------------------------------------------
   214 // -----------------------------------------------------------------------
   218 //        
   215 //        
   219 void CDaemonBehaviour::ProcessPreinstalledFilesL(TInt aDrive, const TDesC& aDirectory)
   216 void CDaemonBehaviour::ProcessPreinstalledFilesL(TInt aDrive, const TDesC& aDirectory)
   220     {
   217     {
   221     FLOG( _L("Daemon: ProcessPreInstalledFilesL") );
   218     FLOG_1( _L("Daemon: ProcessPreInstalledFilesL: Drive index: %d"), aDrive );
   222     TPath preInstalledPath;
   219     TPath preInstalledPath;
   223     TChar drive;
   220     TChar drive;
   224     RFs::DriveToChar(aDrive, drive);
   221     RFs::DriveToChar(aDrive, drive);
   225     preInstalledPath.Append(drive);
   222     preInstalledPath.Append(drive);
   226     preInstalledPath.Append(aDirectory);
   223     preInstalledPath.Append(aDirectory);
   227     
   224     
   228     FLOG_1( _L("Daemon: ProcessPreInstalledFilesL Getting dir %S"), &preInstalledPath );
   225     FLOG_1( _L("Daemon: ProcessPreInstalledFilesL Getting dir %S"), &preInstalledPath );
   229     CDir* dir = NULL;
   226     CDir* dir = NULL;
   230     TInt err = iFs.GetDir(preInstalledPath, KEntryAttNormal, ESortNone, dir); 
   227     TInt err = iFs.GetDir( preInstalledPath, KEntryAttNormal, ESortNone, dir ); 
   231     if (err != KErrNone && err != KErrPathNotFound)
   228     if ( err != KErrNone && err != KErrPathNotFound )
   232         {
   229         {
   233         FLOG_1( _L("Daemon: ProcessPreInstalledFilesL GetDir with error %d"), err );
   230         FLOG_1( _L("Daemon: ProcessPreInstalledFilesL GetDir with error %d"), err );
   234         User::Leave(err);
   231         User::Leave(err);
   235         }
   232         }
   236     if(dir)
   233     if(dir)