mmappcomponents/harvester/filehandler/src/mpxharvesterfilehandlerimp.cpp
branchRCL_3
changeset 20 4aca42fa4eb1
parent 17 6f9f6e99a23e
child 24 6c1dfe4da5dd
--- a/mmappcomponents/harvester/filehandler/src/mpxharvesterfilehandlerimp.cpp	Wed Jun 09 10:13:45 2010 +0300
+++ b/mmappcomponents/harvester/filehandler/src/mpxharvesterfilehandlerimp.cpp	Mon Jun 21 16:13:35 2010 +0300
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:  Handles all file related activities
-*  Version     : %version: da1mmcf#72.1.14.2.4.1.4.1.2.1.7 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: da1mmcf#72.1.14.2.4.1.4.1.2.1.9 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -61,8 +61,8 @@
 #include "mpxbrokenlinkcleanup.h"
 
 // ============ CONSTANTS ==========
-_LIT( KDefaultScanPath, "C:\\DATA\\|E:\\" );
-_LIT( KDefaultBlockPath, "\\SYS\\|\\PRIVATE\\|\\SYSTEM\\|\\CITIES\\");
+_LIT( KDefaultScanPath, "C:\\DATA\\|E:\\|F:\\" );
+_LIT( KDefaultBlockPath, "\\SYS\\|\\PRIVATE\\|\\SYSTEM\\|\\CITIES\\|\\SOUNDS\\SIMPLE\\|\\GAMES\\|\\RESOURCE\\|\\IMAGES\\"); 
 _LIT( KDefaultContainers, ".odf|.dcf|.asf|.m4a|.mp4" );
 _LIT( KDefaultAutoScanFolder, "C:\\data\\sounds\\digital\\|E:\\sounds\\digital\\");
 const TUid KCRUIDHarvesterFeatures  = { 0x101FFCD2 };
@@ -343,12 +343,11 @@
                 // Remove current drive from the scanned drives list
                 TParse fileNameParser;
                 User::LeaveIfError(fileNameParser.Set(iFilteredDrivesToScan[index],NULL,NULL));
-                TFileName driveName(fileNameParser.Drive());
+                TPtrC driveName(fileNameParser.Drive());
                 TInt driveNumber = TDriveUnit( driveName );
                 if (currentDriveNumber == driveNumber)
                     {
                     iFilteredDrivesToScan.Remove(index);
-                    iFilteredOutOfDisk = ETrue;
                     count--;
                     }
                 else
@@ -357,6 +356,7 @@
                     }
                 }
             iDBManager->CloseDatabase(static_cast<TDriveNumber>(currentDriveNumber));
+            iFilteredOutOfDisk = ETrue;
             }
         }
 
@@ -1737,15 +1737,8 @@
     //
     TBuf<255> scanPath;
     TBuf<255> blockPath;
-    CRepository* cenrep(NULL);
-    TRAPD( err, cenrep = CRepository::NewL( KCRUIDHarvesterFeatures ) );
-    if( err == KErrNone )
-        {
-        cenrep->Get( KHarvesterScanPathKey, scanPath );
-        cenrep->Get( KHarvesterBlockPathKey, blockPath );
-        delete cenrep;
-        }
-    else
+    TRAPD( err, FetchPathsFromCenrepL(scanPath,blockPath) );
+    if( err )
         {
         scanPath = KDefaultScanPath;
         blockPath = KDefaultBlockPath;
@@ -1758,6 +1751,20 @@
     }
 
 // ---------------------------------------------------------------------------
+// Fetches scan - and block - paths from cenrep 
+// ---------------------------------------------------------------------------
+//
+void CMPXHarvesterFileHandlerImp::FetchPathsFromCenrepL( TDes16& aScanPath, 
+                                                         TDes16& aBlockPath )
+    {
+    MPX_FUNC("CMPXHarvesterFileHandlerImp::FetchPathsFromCenrepL");
+    CRepository* cenrep( CRepository::NewLC( KCRUIDHarvesterFeatures ) );
+    User::LeaveIfError( cenrep->Get( KHarvesterScanPathKey, aScanPath ) );
+    User::LeaveIfError( cenrep->Get( KHarvesterBlockPathKey, aBlockPath ) );
+    CleanupStack::PopAndDestroy(cenrep);
+    }
+
+// ---------------------------------------------------------------------------
 // Parses cenrep setting for container file types
 // ---------------------------------------------------------------------------
 //