mpxplugins/serviceplugins/collectionplugins/inc/mpxdbmanager.h
branchRCL_3
changeset 18 c54d95799c80
parent 11 13afc0e517bd
child 21 a1247965635c
--- a/mpxplugins/serviceplugins/collectionplugins/inc/mpxdbmanager.h	Wed Mar 31 21:26:33 2010 +0300
+++ b/mpxplugins/serviceplugins/collectionplugins/inc/mpxdbmanager.h	Wed Apr 14 15:54:18 2010 +0300
@@ -340,21 +340,22 @@
         *
         * @return ETrue if the dummy file is created successfully, EFalse otherwise
         */
-        TBool BlockDiskSpace( TDriveUnit aDrive, TInt aOrigDbSize, TBool aIsMTPInUse = EFalse );
+        TBool BlockDiskSpace( TInt aIndex, TBool aIsMTPInUse = EFalse );
         
         /**
         * To copy db from regular drive to RAM
         *
         * @return ETrue if succeed 
-        * @leave KErrDiskFull if there is any difficulty copying files
+        * 
+        * No-operation if fails
         */
-        TBool DoCopyDBToRamL( TDriveUnit aDrive, TBool aIsMTPInUse );
+        TBool DoCopyDBToRam( TInt aIndex, TBool aIsMTPInUse );
 
         /**
         * To copy db back regular drive from RAM
         *
         */
-        void DoCopyDBFromRamL( TInt aIndex );
+        void DoCopyDBFromRam( TInt aIndex );
     
         /**
         * To replace dummy file with new content
@@ -399,9 +400,7 @@
         */
         void RemoveDummyFile( TInt index );
 
-        
-
-/**
+        /**
         * Check if disksapce is enough to operatte. If not, it leaves with KErrDiskFull
         *
         */
@@ -417,6 +416,12 @@
          */
         void DoCommitL();
 
+        /**
+        * Create full path and filename on a specified drive unit.
+        * @param aDrive identifies the drive unit
+        */
+        HBufC* CreateFullFilenameL(TDriveUnit aDrive);
+
     protected:  // Types
 
         typedef struct
@@ -449,10 +454,9 @@
         void CreateTablesL(RSqlDatabase& aDatabase, TBool aCorrupt);
 
         /**
-        * Opens a specified database.
-        * @param aDrive identifies the drive unit of the database to open
+        * Opens root database at C-drive.
         */
-        void OpenDatabaseL(TDriveUnit aDrive);
+        void OpenRootDatabaseL();
 
         /**
         * Creates a specified database.
@@ -462,15 +466,27 @@
 
         /**
         * Attached a specified database.
-        * @param aDrive identifies the drive unit of the database to attach
+        * @param aIndex  Index to iDatabaseHandles
         */
-        void AttachDatabaseL(TDriveUnit aDrive);
+        void AttachDatabaseL(TInt aIndex);
 
         /**
         * Detach a specified database.
-        * @param aDrive identifies the drive unit of the database to detach
+        * @param aIndex  Index to iDatabaseHandles
+        */
+        void DetachDatabaseL(TInt aIndex);
+
+        /**
+        * Open database
+        * @param aIndex Index to iDatabaseHandles
         */
-        void DetachDatabaseL(TDriveUnit aDrive);
+        void OpenDatabaseAtIndexL( TInt aIndex );
+        
+        /**
+        * Close database
+        * @param aIndex Index to iDatabaseHandles
+        */
+        void CloseDatabaseAtIndexL(TInt aIndex);
 
         /**
         * Create filename on a specified drive unit.