diff -r 8ab6687fb94c -r 3adadc800673 telephonyserverplugins/simtsy/src/CSimSmsStore.cpp --- a/telephonyserverplugins/simtsy/src/CSimSmsStore.cpp Thu May 27 14:05:07 2010 +0300 +++ b/telephonyserverplugins/simtsy/src/CSimSmsStore.cpp Fri Jun 11 14:49:29 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -19,12 +19,18 @@ @file */ + + +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "CSimSmsStoreTraces.h" +#endif + #include #include #include #include "CSimSmsStore.h" #include "csimsmsmess.h" -#include "Simlog.h" #include "CSimTsyMode.h" const TInt KSmsStoreGranularity=2; @@ -126,7 +132,7 @@ iSmsMaxNumSlots=aMaxNumSlots; iSmsStoreName.Copy(aName); iSmsReadAll=new(ELeave) CArrayPtrFlat(KSmsStoreGranularity); - LOGSMS1("Starting to parse SMS Store config parameters..."); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMSSTORE_CONSTRUCTL_1, "Starting to parse SMS Store config parameters..."); iSmsIndividualPause=CfgFileSection()->ItemValue(KSmsStoreIndividualReqPause,KDefaultSmsStoreIndividualReqPause); iSmsBatchPause=CfgFileSection()->ItemValue(KSmsStoreBatchReqPause,KDefaultSmsStoreBatchReqPause); @@ -138,7 +144,7 @@ TInt ret0=CTestConfig::GetElement(item0->Value(),KStdDelimiter,0,value0); if(ret0!=KErrNone) { - LOGPARSERR("value0",ret0,0,&KSmsPhoneStoreCaps); + OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMSSTORE_CONSTRUCTL_2, "WARNING - CONFIGURATION FILE PARSING - Reading element VALUE0 returned %d (element no. %d) from tag %s.",ret0,0,KSmsPhoneStoreCaps); iSmsStoreCaps=KDefaultSmsPhoneStoreCaps+KDefaultSmsOnlySmsCaps; } else @@ -155,7 +161,7 @@ iSmsStoreCaps=KDefaultSmsPhoneStoreCaps+KDefaultSmsOnlySmsCaps; - LOGSMS1("...Finished parsing SMS Store config parameters"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMSSTORE_CONSTRUCTL_3, "...Finished parsing SMS Store config parameters"); iTimer=CSimTimer::NewL(iSmsMessaging->iPhone); iIncomingTimer=CSimTimer::NewL(iSmsMessaging->iPhone); } @@ -170,7 +176,7 @@ * "SmsStoreEntry = , , , " */ { - LOGSMS1("Starting reading SMS Store entries..."); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMSSTORE_POPULATESTOREFROMCONFIGFILE_1, "Starting reading SMS Store entries..."); TInt count=CfgFileSection()->ItemCount(KSmsStoreEntry); const CTestConfigItem* item=NULL; TInt ret=KErrNone; @@ -185,7 +191,7 @@ ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,storeName); if(ret!=KErrNone) { - LOGPARSERR("storeName",ret,0,&KSmsStoreEntry); + OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMSSTORE_POPULATESTOREFROMCONFIGFILE_2, "WARNING - CONFIGURATION FILE PARSING - Reading element STORENAME returned %d (element no. %d) from tag %s.",ret,0,KSmsStoreEntry); continue; } if(storeName.MatchF(iSmsStoreName)!=0) @@ -196,21 +202,21 @@ ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,index); if((ret!=KErrNone)||(index>=iSmsMaxNumSlots)) { - LOGPARSERR("index",ret,1,&KSmsStoreEntry); + OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMSSTORE_POPULATESTOREFROMCONFIGFILE_3, "WARNING - CONFIGURATION FILE PARSING - Reading element INDEX returned %d (element no. %d) from tag %s.",ret,1,KSmsStoreEntry); continue; } ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,stat); if(ret!=KErrNone) { - LOGPARSERR("stat",ret,2,&KSmsStoreEntry); + OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMSSTORE_POPULATESTOREFROMCONFIGFILE_4, "WARNING - CONFIGURATION FILE PARSING - Reading element STAT returned %d (element no. %d) from tag %s",ret,2,KSmsStoreEntry); continue; } ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,pdu); if(ret!=KErrNone) { - LOGPARSERR("pdu",ret,3,&KSmsStoreEntry); + OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMSSTORE_POPULATESTOREFROMCONFIGFILE_5, "WARNING - CONFIGURATION FILE PARSING - Reading element PDU returned %d (element no. %d) from tag %s.",ret,3,KSmsStoreEntry); continue; } @@ -218,7 +224,7 @@ ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,sca); if(ret!=KErrNone) { - LOGPARSERR("sca",ret,4,&KSmsStoreEntry); + OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMSSTORE_POPULATESTOREFROMCONFIGFILE_6, "WARNING - CONFIGURATION FILE PARSING - Reading element SCA returned %d (element no. %d) from tag %s.",ret,4,KSmsStoreEntry); continue; } iGsmSmsStoreEntries[index].iIndex=index; @@ -227,7 +233,7 @@ RecordSca(sca, index); } - LOGSMS1("...Finished reading SMS Store entries"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMSSTORE_POPULATESTOREFROMCONFIGFILE_7, "...Finished reading SMS Store entries"); } @@ -268,7 +274,7 @@ delete iIncomingTimer; } -#ifdef _DEBUG +#ifdef OST_TRACE_COMPILER_IN_USE void CSimSmsStore::LogRequest(TBool aEntering, TInt aIpc, TInt aError) #else void CSimSmsStore::LogRequest(TBool aEntering, TInt aIpc, TInt /*aError*/) @@ -324,11 +330,11 @@ if (aEntering!=EFalse) { - LOGSMS3(">>%d,CSimSmsStore::%S",aIpc, &ipcBuf ); + OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMSSTORE_LOGREQUEST_1, ">>%d,CSimSmsStore::%s",aIpc, ipcBuf ); } else - { - LOGSMS4("<<%d,CSimSmsStore::%S with error %d",aIpc, &ipcBuf, aError); + { + OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMSSTORE_LOGREQUEST_2, "<<%d,CSimSmsStore::%s with error %d",aIpc, ipcBuf, aError); } } @@ -1177,7 +1183,7 @@ * @return CTestConfigSection a pointer to the configuration file data section */ { - LOGSMS1(">>CSimSmsStore::CfgFileSection"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMSMSSTORE_CFGFILESECTION_1, ">>CSimSmsStore::CfgFileSection"); return iSmsMessaging->CfgFileSection(); }