diff -r 1a2a00e78665 -r f62f87b200ec contentpublishingsrv/contentharvester/factorysettingsplugin/src/chfactorysettingsplugin.cpp --- a/contentpublishingsrv/contentharvester/factorysettingsplugin/src/chfactorysettingsplugin.cpp Tue Feb 02 00:23:10 2010 +0200 +++ b/contentpublishingsrv/contentharvester/factorysettingsplugin/src/chfactorysettingsplugin.cpp Fri Mar 19 09:35:23 2010 +0200 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: +* Description: * */ @@ -20,11 +20,11 @@ #include #include -#include "chfactorysettingsplugin.h" -#include "chfactorysettingsparser.h" #include "chfactorysettingsinstallnotifier.h" #include "cpdebug.h" #include "chdbstatehandler.h" +#include "chfactorysettingsdomparser.h" +#include "chfactorysettingsplugin.h" // LOCAL CONSTANTS AND MACROS const TInt KADatFactorySettingsServerPluginUid( 0x102830EF); @@ -90,7 +90,7 @@ iInstallNotifier = CCHFactorySettingsInstallNotifier::NewL( this, KUidSystemCategory, KSAUidSoftwareInstallKeyValue ); - iParser = CCHFactorySettingsParser::NewL( iCPSInterface ); + iParser = CCHFactorySettingsDOMParser::NewL( iCPSInterface, iFs ); // mw iFileMan = CFileMan::NewL( iFs ); iFilePath.CreateL( KMaxPath ); @@ -153,16 +153,16 @@ // ---------------------------------------------------------------------------- // CCHFactorySettings::UpdateL -// +// // ---------------------------------------------------------------------------- -// +// void CCHFactorySettings::UpdateL() { CP_DEBUG(_L8("CCHFactorySettings::UpdateL" )); CheckDrivesL( ); // fill in list with file names from all drives AddNewL( ); // if any of them isn't added to db then add - UnInstallL( ); // if any of files from any drive was removed remove data - // from DB + UnInstallL( ); // if any of files from any drive was removed remove data + // from DB } @@ -170,7 +170,7 @@ // CCHFactorySettings::AddNewL // Add new entries after sis intallation. // ---------------------------------------------------------------------------- -// +// void CCHFactorySettings::AddNewL() { CP_DEBUG(_L8("CCHFactorySettings::AddNewL" )); @@ -188,7 +188,7 @@ for ( TInt i(0); iCount( ); i++ ) { TBool parse(ETrue); - TPtrC fileNewName = + TPtrC fileNewName = (*iFileNewList)[i].Mid( (*iFileNewList)[i].LocateReverse( '\\' ) + 1 ); TInt count = fileListInstalled->Count( ); for ( TInt j(0); j< count; j++ ) @@ -206,14 +206,14 @@ } if ( parse ) { - //file wasn't found in afterinstallation dir - //so should be copied and entries install + //file wasn't found in afterinstallation dir + //so should be copied and entries install TBool fileOpened(ETrue); iFs.IsFileOpen( (*iFileNewList)[i], fileOpened ); if ( !fileOpened ) { - TInt error = iParser->RestoreL( (*iFileNewList)[i], EFalse ); + TInt error = iParser->Restore( (*iFileNewList)[i], EFalse ); if ( error == KErrNone ) { iFileMan->Copy( (*iFileNewList)[i], filePath ); @@ -230,7 +230,7 @@ // CCHFactorySettings::UnInstallL // Removes entries after uninstallation. // ---------------------------------------------------------------------------- -// +// void CCHFactorySettings::UnInstallL() { CP_DEBUG(_L8("CCHFactorySettings::UnInstallL" )); @@ -253,7 +253,7 @@ for ( TInt j(0); jCount( ); j++ ) { TPtrC fileNewPath = (*iFileNewList)[j]; - TPtrC fileNewName = + TPtrC fileNewName = (*iFileNewList)[j].Mid( (*iFileNewList)[j].LocateReverse( '\\' ) + 1 ); if ( fileInstalledName.Compare( fileNewName )==0 ) { @@ -264,7 +264,7 @@ } } } - if ( !found ) //this file should be removed also entries from database + if ( !found ) //this file should be removed also entries from database { filePath.Zero( ); filePath.Append( KDriveC ); @@ -272,7 +272,7 @@ filePath.Append( KParsedDir ); filePath.Append( fileInstalledName ); - iParser->RestoreL( filePath, ETrue ); + iParser->Restore( filePath, ETrue ); iFileMan->Delete( filePath ); } } @@ -282,9 +282,9 @@ // ---------------------------------------------------------------------------- // CCHFactorySettings::CheckDrivesL -// +// // ---------------------------------------------------------------------------- -// +// void CCHFactorySettings::CheckDrivesL() { CP_DEBUG(_L8("CCHFactorySettings::CheckDrivesL" ));