diff -r d45095c2f4f3 -r bee149131e4b mmappcomponents/harvester/filehandler/inc/mpxharvesterdb.h --- a/mmappcomponents/harvester/filehandler/inc/mpxharvesterdb.h Tue Feb 02 00:27:58 2010 +0200 +++ b/mmappcomponents/harvester/filehandler/inc/mpxharvesterdb.h Fri Feb 19 23:18:32 2010 +0200 @@ -25,6 +25,17 @@ // FORWARD DECLARATIONS class CMPXHarvesterDatabaseTable; +// ENUMS +#ifdef __RAMDISK_PERF_ENABLE +// enum for database state +enum TDbState + { + EDbClose, + EDbOpen, + EDbInTransaction + }; +#endif // __RAMDISK_PERF_ENABLE + /** * Database class for the Harvester Component * @@ -51,6 +62,8 @@ /** * Open the database + * @return State of the opened database: KErrNone or KErrCorrupt + * Leaves if cannot open the database */ TInt OpenL(); @@ -141,6 +154,27 @@ */ void Rollback(); +#ifdef __RAMDISK_PERF_ENABLE + /** + * Set RAM drive info + */ + void SetRamDriveInfo(TDriveNumber aDrive, TBool aUseRamDrive); + + /** + * Get UseRamDrive + */ + TBool IsUseRamDrive(); + + /** + * Get the state of the database. + */ + TDbState GetDbState(); + + /** + * Set the state of the database. + */ + void SetDbStateL( TDbState aState ); +#endif // __RAMDISK_PERF_ENABLE private: // private functions @@ -151,7 +185,8 @@ /** * Opens a database - * @return error for the operation + * @return State of the opened database: KErrNone or KErrCorrupt + * Leaves if cannot open the database */ TInt OpenDBL(); @@ -163,6 +198,12 @@ void FindAndReplaceSingleQuote(const TDesC& aSrc, TDes& aTrg); + /** + * Generate the database name. + * @return the database file name. + */ + TFileName GenerateDbName(); + private: /** @@ -182,6 +223,10 @@ CFileStore* iStore; RDbStoreDatabase* iDatabase; // Local single client db TBool iDBOpen; // Is the db open and ready +#ifdef __RAMDISK_PERF_ENABLE + TDriveNumber iRamDrive; + TBool iUseRamDrive; +#endif // __RAMDISK_PERF_ENABLE }; #endif // CMPXHARVESTERDB_H