diff -r 9d7ce34704c8 -r b564fb5fd78b commsfwtools/preparedefaultcommsdatabase/Tools/ced/src/ced.cpp --- a/commsfwtools/preparedefaultcommsdatabase/Tools/ced/src/ced.cpp Tue Aug 31 16:25:36 2010 +0300 +++ b/commsfwtools/preparedefaultcommsdatabase/Tools/ced/src/ced.cpp Wed Sep 01 12:35:48 2010 +0100 @@ -98,9 +98,7 @@ /** flag to indicate whether the execution format is .dll or .exe*/ TBool gIsExeDLL = EFalse; /** flag to indicate whether the configuration file is in XML format */ -TBool gIsXML = ETrue; -/** flag to keep generic records */ -TBool gKeepGenerics = ETrue; +TBool gIsXML = ETrue; #ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS TBool gDeprecatedFields = EFalse; @@ -295,7 +293,6 @@ } // delete everything in the database - TInt keptElements = 0; if (ids.Count()) { for ( TInt i = ids.Count()-1; i >=0 ; i--) @@ -305,18 +302,10 @@ { gMsg->Msg(_L("%d"),i); } - if(!gKeepGenerics || ids[i] < KCDInitialUDefRecordType || ids[i] > KCDLastUDefRecordType) - { - User::LeaveIfError(storage->Delete(ids[i])); - } - else - { - ++keptElements; - } + User::LeaveIfError(storage->Delete(ids[i])); } } - gMsg->Msg(_L("Kept %d elements intact (KeepGenerics option == %d"), keptElements, gKeepGenerics); TUint32 aErrorId; err = storage->CommitTransaction(aErrorId); @@ -701,10 +690,6 @@ return !gProcessingSuccessful; } -TBool MatchArg(const TDesC& aArg, const TDesC& aOpt) - { - return aArg.Left(aOpt.Length()).CompareF(aOpt) == 0; - } TInt ParseCommandLineL(TBool &aDebugOn, TBool &aOverWrite, TBool &aForceXMLProcessing, TDes &aIn, TDes &aOut, TDes &aInPref) /** Parse the command line for any overriding settings from exe command line @@ -749,14 +734,14 @@ // CED will report all the failures on the end, unlike success in all the cases except missing cfg file // Switch introduced because of high impact on test results and to avoid BC break - if ( MatchArg(arg, _L("-V")) ) + if ( arg.FindF(_L("-V")) != KErrNotFound ) { gValidityChecking = ETrue; continue; } //Display help - if ( MatchArg(arg, _L("-H")) ) + if ( arg.FindF(_L("-H")) != KErrNotFound ) { HelpDump(); CleanupStack::Pop(pCmd); @@ -765,50 +750,36 @@ } // Append database switch - if ( MatchArg(arg, _L("-A")) ) + if ( arg.FindF(_L("-A")) != KErrNotFound ) { aOverWrite = EFalse; continue; } // Debug switch - if ( MatchArg(arg, _L("-D")) ) + if ( arg.FindF(_L("-D")) != KErrNotFound ) { aDebugOn = ETrue; continue; } // Debug switch - if ( MatchArg(arg, _L("-M")) ) + if ( arg.FindF(_L("-M")) != KErrNotFound ) { aInPref = pCmd->Arg(++i); continue; } - // Keep generics switch - if ( MatchArg(arg, _L("-KG")) ) - { - gKeepGenerics = ETrue; - continue; - } - - // Zap generics switch - if ( MatchArg(arg, _L("-ZG")) ) - { - gKeepGenerics = EFalse; - continue; - } - // Presence of invalid table entry links // will not cause an error - if ( MatchArg(arg, _L("-F")) ) + if ( arg.FindF(_L("-F")) != KErrNotFound ) { aForceXMLProcessing = ETrue; continue; } // Specification of an input file - if ( MatchArg(arg, _L("-I")) ) + if ( arg.FindF(_L("-I")) != KErrNotFound ) { if( i != pCmd->Count()-1 ) { @@ -829,7 +800,7 @@ } } // Specification of an output file - if ( MatchArg(arg, _L("-O")) ) + if ( arg.FindF(_L("-O")) != KErrNotFound ) { if( i != pCmd->Count()-1 ) { @@ -852,7 +823,7 @@ // This must be specified on the tools2 platform. TBuf<16> databaseVersion; - if ( MatchArg(arg, _L("-B")) ) + if ( arg.FindF(_L("-B")) != KErrNotFound ) { if( i != pCmd->Count()-1 ) { @@ -958,8 +929,6 @@ gConsole->Printf(_L("\n-v Enables validation of the configuration data while writing to the database.")); gConsole->Printf(_L("\n-i Specifies an input file to CED. Must be either *.xml or *.cfg. Defaults to reading '%S' or '%S'."), &CFG_TARGET, &XML_TARGET); gConsole->Printf(_L("\n-o Specifies an output file for CED to log to. Defaults to '%S'."), &LOG_TARGET); - gConsole->Printf(_L("\n-kg Keep existing generic-record elements (default)")); - gConsole->Printf(_L("\n-zg Zap all existing elements including generics (unless appending)")); #ifdef __TOOLS2__ gConsole->Printf(_L("\n-b Specifies the binary output should be compatible with this Symbian OS version.\n")); #endif