diff -r 8ab6687fb94c -r 3adadc800673 smsprotocols/smsstack/smsprot/Src/smspstor.cpp --- a/smsprotocols/smsstack/smsprot/Src/smspstor.cpp Thu May 27 14:05:07 2010 +0300 +++ b/smsprotocols/smsstack/smsprot/Src/smspstor.cpp Fri Jun 11 14:49:29 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1999-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,6 +19,12 @@ @file */ + +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "smspstorTraces.h" +#endif + #include #include #include "smspstor.h" @@ -26,7 +32,6 @@ #include "smsuaddr.H" #include "Gsmumsg.h" #include "gsmubuf.h" -#include #include #include "Gsmuelem.h" #include "gsmuieoperations.h" @@ -34,7 +39,7 @@ LOCAL_C TPtrC TrimLeadingZeros(const TDesC& aString) { - LOGSMSPROT1("CSARStore::ExternalizeEntryArrayL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TRIMLEADINGZEROS_1, "CSARStore::ExternalizeEntryArrayL()"); const TInt len = aString.Length(); @@ -59,7 +64,7 @@ */ CSmsReassemblyStore* CSmsReassemblyStore::NewL(RFs& aFs) { - LOGSMSPROT1("CSmsReassemblyStore::NewL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_NEWL_1, "CSmsReassemblyStore::NewL()"); CSmsReassemblyStore* self = new (ELeave) CSmsReassemblyStore(aFs); CleanupStack::PushL(self); @@ -75,7 +80,7 @@ */ void CSmsReassemblyStore::ConstructL() { - LOGSMSPROT1("CSmsReassemblyStore::ConstructL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_CONSTRUCTL_1, "CSmsReassemblyStore::ConstructL()"); // // Generate the full path to the reassembly store. @@ -99,7 +104,7 @@ void CSmsReassemblyStore::UpdateLogServerIdL(TInt aIndex, TLogId aLogServerId) { - LOGSMSPROT1("CSmsReassemblyStore::UpdateLogServerIdL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_UPDATELOGSERVERIDL_1, "CSmsReassemblyStore::UpdateLogServerIdL()"); TSmsReassemblyEntry entry(reinterpret_cast(Entries()[aIndex])); @@ -127,7 +132,7 @@ TBool aPassed, TInt& aIndex) { - LOGSMSPROT1("CSmsReassemblyStore::FindMessageL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_FINDMESSAGEL_1, "CSmsReassemblyStore::FindMessageL()"); // // Parse the GSM data from the SMS message... @@ -153,7 +158,7 @@ // // Found! // - LOGSMSPROT2("CSmsReassemblyStore::FindMessage(): Found! index=%d", index); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_FINDMESSAGEL_2, "CSmsReassemblyStore::FindMessage(): Found! index=%d", index); aIndex = index; @@ -164,7 +169,7 @@ // // Not found... // - LOGSMSPROT1("CSmsReassemblyStore::FindMessage(): Not found!"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_FINDMESSAGEL_3, "CSmsReassemblyStore::FindMessage(): Not found!"); return EFalse; } // CSmsReassemblyStore::FindMessageL @@ -182,7 +187,7 @@ void CSmsReassemblyStore::MatchPDUToExistingMessage(const CSmsMessage& aSmsMessage, TInt& aIndex) { - LOGSMSPROT1("CSmsReassemblyStore::MatchPDUToExistingMessage()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_MATCHPDUTOEXISTINGMESSAGE_1, "CSmsReassemblyStore::MatchPDUToExistingMessage()"); __ASSERT_ALWAYS(!aSmsMessage.IsDecoded(), SmspPanic(KSmspPanicMessageConcatenated)); @@ -222,7 +227,7 @@ } } - LOGSMSPROT3("CSmsReassemblyStore::MatchPDUToExistingMessage(): reassemblyCount=%d, aIndex=%d", reassemblyCount, aIndex); + OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_MATCHPDUTOEXISTINGMESSAGE_2, "CSmsReassemblyStore::MatchPDUToExistingMessage(): reassemblyCount=%d, aIndex=%d", reassemblyCount, aIndex); } // CSmsReassemblyStore::MatchPDUToExistingMessage @@ -232,7 +237,7 @@ TBool& aDuplicateMsgRef, TBool& aDuplicateSlot) { - LOGSMSPROT1("CSmsReassemblyStore::UpdateExistingMessageL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_UPDATEEXISTINGMESSAGEL_1, "CSmsReassemblyStore::UpdateExistingMessageL()"); aComplete = EFalse; aDuplicateMsgRef = EFalse; @@ -276,7 +281,7 @@ if (slot.iIndex == newSlot.iIndex && slot.iStore == newSlot.iStore) { - LOGSMSPROT1("CSmsReassemblyStore::UpdateExistingMessageL(): Duplicate enumerated PDU."); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_UPDATEEXISTINGMESSAGEL_2, "CSmsReassemblyStore::UpdateExistingMessageL(): Duplicate enumerated PDU."); // It is a duplicate that was already stored on the SIM... aDuplicateSlot = ETrue; @@ -291,7 +296,7 @@ { if (indexArray->At(index) == concatPDUIndex) { - LOGSMSPROT1("CSmsReassemblyStore::UpdateExistingMessageL(): Duplicate concatenated PDU."); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_UPDATEEXISTINGMESSAGEL_3, "CSmsReassemblyStore::UpdateExistingMessageL(): Duplicate concatenated PDU."); // The PDU is already stored in the reassembly store. aDuplicateMsgRef = ETrue; @@ -360,7 +365,7 @@ void CSmsReassemblyStore::NewMessagePDUL(TInt& aIndex,CSmsMessage& aSmsMessage,const TGsmSms& aGsmSms) { - LOGSMSPROT1("CSmsReassemblyStore::NewMessagePDUL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_NEWMESSAGEPDUL_1, "CSmsReassemblyStore::NewMessagePDUL"); CArrayFix* indexarray=new(ELeave) CArrayFixFlat(8); CleanupStack::PushL(indexarray); @@ -377,7 +382,7 @@ void CSmsReassemblyStore::GetMessageL(TInt aIndex,CSmsMessage& aSmsMessage) { - LOGSMSPROT2("CSmsReassemblyStore::GetMessageL [aIndex=%d]", aIndex); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_GETMESSAGEL_1, "CSmsReassemblyStore::GetMessageL [aIndex=%d]", aIndex); CArrayFix* indexarray=new(ELeave) CArrayFixFlat(8); CleanupStack::PushL(indexarray); @@ -398,7 +403,7 @@ */ void CSmsReassemblyStore::InternalizeEntryL(const TStreamId& aStreamId,CSmsMessage& aSmsMessage,CArrayFix& aIndexArray,CArrayFix& aSmsArray) { - LOGSMSPROT2("CSmsReassemblyStore::InternalizeEntryL Start [sid=%d]", aStreamId.Value()); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_INTERNALIZEENTRYL_1, "CSmsReassemblyStore::InternalizeEntryL Start [sid=%d]", aStreamId.Value()); RStoreReadStream readstream; readstream.OpenLC(FileStore(),aStreamId); readstream >> aSmsMessage; @@ -423,7 +428,7 @@ aSmsArray.AppendL(sms); } CleanupStack::PopAndDestroy(); - LOGSMSPROT2("CSmsReassemblyStore::InternalizeEntryL End [count=%d]", count); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_INTERNALIZEENTRYL_2, "CSmsReassemblyStore::InternalizeEntryL End [count=%d]", count); } // CSARStore::OpenFileLC @@ -434,7 +439,7 @@ */ void CSmsReassemblyStore::ExternalizeEntryL(TStreamId& aStreamId,const CSmsMessage& aSmsMessage,const CArrayFix& aIndexArray,const CArrayFix& aSmsArray) { - LOGSMSPROT2("CSmsReassemblyStore::ExternalizeEntryL Start [sid=%d]", aStreamId.Value()); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_EXTERNALIZEENTRYL_1, "CSmsReassemblyStore::ExternalizeEntryL Start [sid=%d]", aStreamId.Value()); RStoreWriteStream writestream; if (aStreamId==KNullStreamId) @@ -459,13 +464,13 @@ writestream.CommitL(); CleanupStack::PopAndDestroy(); - LOGSMSPROT2("CSmsReassemblyStore::ExternalizeEntryL End [count=%d]", count); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_EXTERNALIZEENTRYL_2, "CSmsReassemblyStore::ExternalizeEntryL End [count=%d]", count); } // CSARStore::OpenFileLC void CSmsReassemblyStore::PopulateEntry(TSmsReassemblyEntry& aEntry,const CSmsMessage& aSmsMessage,TInt aNumSmss) { - LOGSMSPROT1("CSmsReassemblyStore::PopulateEntry"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_POPULATEENTRY_1, "CSmsReassemblyStore::PopulateEntry"); aEntry.SetReference(0); aEntry.SetTotal(1); aEntry.SetCount(1); @@ -523,7 +528,7 @@ void CSmsReassemblyStore::CreateEntryL(CSmsMessage& aSmsMessage,const CArrayFix& aIndexArray,const CArrayFix& aSmsArray) { - LOGSMSPROT1("CSmsReassemblyStore::CreateEntryL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_CREATEENTRYL_1, "CSmsReassemblyStore::CreateEntryL"); TStreamId streamid=KNullStreamId; if (aSmsMessage.Time() >= iLastRealTime) { @@ -551,7 +556,7 @@ TBool CSmsReassemblyStore::PassedToClient( TInt aIndex ) const { - LOGSMSPROT1("CSmsReassemblyStore::PassedToClient()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_PASSEDTOCLIENT_1, "CSmsReassemblyStore::PassedToClient()"); const TSmsReassemblyEntry& entry = reinterpret_cast(Entries()[ aIndex ]); return entry.PassedToClient(); @@ -560,7 +565,7 @@ void CSmsReassemblyStore::SetPassedToClientL(TInt aIndex, TBool aPassed) { - LOGSMSPROT1("CSmsReassemblyStore::SetPassedToClientL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_SETPASSEDTOCLIENTL_1, "CSmsReassemblyStore::SetPassedToClientL()"); TSmsReassemblyEntry entry(reinterpret_cast(Entries()[aIndex])); @@ -579,7 +584,7 @@ */ void CSmsReassemblyStore::OpenStoreL() { - LOGSMSPROT1("CSmsReassemblyStore::OpenStoreL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSREASSEMBLYSTORE_OPENSTOREL_1, "CSmsReassemblyStore::OpenStoreL()"); this->OpenL(iFullPathBuf,KReassemblyStoreUid); } // CSmsReassemblyStore::OpenStoreL @@ -599,7 +604,7 @@ CSmsSegmentationStore* CSmsSegmentationStore::NewL(RFs& aFs) { - LOGSMSPROT1("CSmsSegmentationStore::NewL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_NEWL_1, "CSmsSegmentationStore::NewL()"); CSmsSegmentationStore* segmentationStore = new(ELeave) CSmsSegmentationStore(aFs); CleanupStack::PushL( segmentationStore ); @@ -611,7 +616,7 @@ void CSmsSegmentationStore::ConstructL() { - LOGSMSPROT1("CSmsSegmentationStore::ConstructL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_CONSTRUCTL_1, "CSmsSegmentationStore::ConstructL()"); //generate fullpath of segmentation store. PrivatePath(iFullPathBuf); @@ -652,7 +657,7 @@ TInt CSmsSegmentationStore::Next8BitReferenceL() { - LOGSMSPROT1("CSmsSegmentationStore::Next8BitReferenceL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_NEXT8BITREFERENCEL_1, "CSmsSegmentationStore::Next8BitReferenceL"); TInt reference8bit=0; TInt reference16bit=0; @@ -669,7 +674,7 @@ { // We have to leave on any error; otherwise a duplicate reference number will be generated // The transaction will revert - LOGSMSPROT2("WARNING! CSmsSegmentationStore::InternalizeConcatenationReferencesL left with %d", ret); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_NEXT8BITREFERENCEL_2, "WARNING! CSmsSegmentationStore::InternalizeConcatenationReferencesL left with %d", ret); User::Leave(ret); // stream not corrupted } reference8bit=(reference8bit+1)%0x100; @@ -679,7 +684,7 @@ { // We have to leave on any error; otherwise a duplicate reference number will be generated // The transaction will revert - LOGSMSPROT2("WARNING! CSmsSegmentationStore::ExternalizeConcatenationReferencesL left with %d", ret); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_NEXT8BITREFERENCEL_3, "WARNING! CSmsSegmentationStore::ExternalizeConcatenationReferencesL left with %d", ret); User::Leave(ret); // stream not corrupted } SetExtraStreamIdL(streamid); @@ -690,7 +695,7 @@ TInt CSmsSegmentationStore::Next16BitReferenceL() { - LOGSMSPROT1("CSmsSegmentationStore::Next16BitReferenceL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_NEXT16BITREFERENCEL_1, "CSmsSegmentationStore::Next16BitReferenceL"); TInt reference8bit=0; TInt reference16bit=0x100; TStreamId streamid=ExtraStreamId(); @@ -705,7 +710,7 @@ { // We have to leave on any error; otherwise a duplicate reference number will be generated // The transaction will revert - LOGSMSPROT2("WARNING! CSmsSegmentationStore::InternalizeConcatenationReferencesL left with %d", ret); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_NEXT16BITREFERENCEL_2, "WARNING! CSmsSegmentationStore::InternalizeConcatenationReferencesL left with %d", ret); User::Leave(ret); // stream not corrupted } reference16bit=((reference16bit+1)%0xFF00)+0x100; @@ -715,7 +720,7 @@ { // We have to leave on any error; otherwise a duplicate reference number will be generated // The transaction will revert - LOGSMSPROT2("WARNING! CSmsSegmentationStore::ExternalizeConcatenationReferencesL left with %d", ret); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_NEXT16BITREFERENCEL_3, "WARNING! CSmsSegmentationStore::ExternalizeConcatenationReferencesL left with %d", ret); User::Leave(ret); // stream not corrupted } SetExtraStreamIdL(streamid); @@ -735,7 +740,7 @@ */ void CSmsSegmentationStore::AddSubmitL(const TSmsAddr& aSmsAddr,CSmsMessage& aSubmit) { - LOGSMSPROT1("CSmsSegmentationStore::AddSubmitL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_ADDSUBMITL_1, "CSmsSegmentationStore::AddSubmitL"); __ASSERT_ALWAYS(aSubmit.Type()==CSmsPDU::ESmsSubmit,SmspPanic(KSmspPanicNotSubmit)); @@ -766,7 +771,7 @@ TBool CSmsSegmentationStore::AddCommandL(const TSmsAddr& aSmsAddr,const CSmsMessage& aCommand, CSmsSegmentationStore::RSmsSegmentationStoreRefStatusArray& aRefStatus) { - LOGSMSPROT1("CSmsSegmentationStore::AddCommandL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_ADDCOMMANDL_1, "CSmsSegmentationStore::AddCommandL"); __ASSERT_ALWAYS(aCommand.Type()==CSmsPDU::ESmsCommand,SmspPanic(KSmspPanicNotCommand)); const TInt count=Entries().Count(); const TLogId logid=(TLogId) aCommand.LogServerId(); @@ -842,7 +847,7 @@ TBool CSmsSegmentationStore::AddReferenceL(const CSmsMessage& aSmsMessage,TInt aReference) { const TInt count=Entries().Count(); - LOGSMSPROT3("CSmsSegmentationStore::AddReferenceL [count=%d, ref=%d]", count, aReference); + OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_ADDREFERENCEL_1, "CSmsSegmentationStore::AddReferenceL [count=%d, ref=%d]", count, aReference); TInt i=0; TInt logserverid=aSmsMessage.LogServerId(); if (logserverid!=KLogNullId) @@ -870,7 +875,7 @@ } if(i>=count) { - LOGSMSPROT3("WARNING! KSmspPanicEntryWithLogServerIdNotFound [i=%d, count=%d]", i, count); + OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_ADDREFERENCEL_2, "WARNING! KSmspPanicEntryWithLogServerIdNotFound [i=%d, count=%d]", i, count); return EFalse; } @@ -922,7 +927,7 @@ TBool CSmsSegmentationStore::AddReferenceStatusPairL(const CSmsMessage& aSmsMessage,TInt aReference, TUint aSegmentSequenceNumber) { const TInt count=Entries().Count(); - LOGSMSPROT3("CSmsSegmentationStore::AddReferenceStatusPairL [count=%d, ref=%d]", count, aReference); + OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_ADDREFERENCESTATUSPAIRL_1, "CSmsSegmentationStore::AddReferenceStatusPairL [count=%d, ref=%d]", count, aReference); TInt i=0; TInt logserverid=aSmsMessage.LogServerId(); if (logserverid!=KLogNullId) @@ -950,7 +955,7 @@ } if(i>=count) { - LOGSMSPROT3("WARNING! KSmspPanicEntryWithLogServerIdNotFound [i=%d, count=%d]", i, count); + OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_ADDREFERENCESTATUSPAIRL_2, "WARNING! KSmspPanicEntryWithLogServerIdNotFound [i=%d, count=%d]", i, count); return EFalse; } @@ -1028,7 +1033,7 @@ TBool CSmsSegmentationStore::AddStatusReportL(TInt& aIndex,TBool& aComplete,const CSmsMessage& aStatusReport) { - LOGSMSPROT1("CSmsSegmentationStore::AddStatusReportL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_ADDSTATUSREPORTL_1, "CSmsSegmentationStore::AddStatusReportL"); __ASSERT_DEBUG(aStatusReport.Type()==CSmsPDU::ESmsStatusReport,SmspPanic(KSmspPanicNotStatusReport)); @@ -1040,7 +1045,7 @@ TBool found=EFalse; aComplete=EFalse; - LOGSMSPROT4("CSmsSegmentationStore::AddStatusReportL [ref=%d status=%d IsPerm=%d]", reference, status, isPerm); + OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_ADDSTATUSREPORTL_2, "CSmsSegmentationStore::AddStatusReportL [ref=%d status=%d IsPerm=%d]", reference, status, isPerm); if(!isPerm) { @@ -1083,11 +1088,11 @@ if (sameTelNumbers) { - LOGSMSPROT1("CSmsSegmentationStore::AddStatusReportL telNumber from submit report matches that from SMS message"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_ADDSTATUSREPORTL_3, "CSmsSegmentationStore::AddStatusReportL telNumber from submit report matches that from SMS message"); } else { - LOGSMSPROT1("CSmsSegmentationStore::AddStatusReportL telNumber from submit report does NOT match that from SMS message"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_ADDSTATUSREPORTL_4, "CSmsSegmentationStore::AddStatusReportL telNumber from submit report does NOT match that from SMS message"); } if (sameTelNumbers && @@ -1114,21 +1119,21 @@ } else { - LOGSMSPROT4("CSmsSegmentationStore::AddStatusReportL WARNING: Status already perm [status=%d refStatusPos=%d count=%d]", refStatusArray[refStatusPos].Status(), refStatusPos, refStatusArrayCount); + OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_ADDSTATUSREPORTL_5, "CSmsSegmentationStore::AddStatusReportL WARNING: Status already perm [status=%d refStatusPos=%d count=%d]", refStatusArray[refStatusPos].Status(), refStatusPos, refStatusArrayCount); refStatusPos++; } } if (found) { - LOGSMSPROT2("CSmsSegmentationStore::AddStatusReportL Found [refStatusPos=%d]", refStatusPos); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_ADDSTATUSREPORTL_6, "CSmsSegmentationStore::AddStatusReportL Found [refStatusPos=%d]", refStatusPos); refStatusArray[refStatusPos].SetStatus(status); TStreamId streamid=entry.DataStreamId(); ExternalizeEntryL(streamid,smsaddr,*smsmessage, refStatusArray); PopulateEntry(entry,*smsmessage, refStatusArray); ChangeEntryL(aIndex,entry); aComplete=StatusArrayComplete(refStatusArray, entry); - LOGSMSPROT2("CSmsSegmentationStore::AddStatusReportL StatusArrayComplete %d", aComplete); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_ADDSTATUSREPORTL_7, "CSmsSegmentationStore::AddStatusReportL StatusArrayComplete %d", aComplete); } } } @@ -1188,7 +1193,7 @@ PopulateEntry(entry,/*smsaddr,*/*smsmessage, refStatusArray2); ChangeEntryL(aIndex,entry); aComplete=StatusArrayComplete(refStatusArray2, entry); - LOGSMSPROT3("CSmsSegmentationStore::StatusArrayComplete [aStatus=%d, ret=%d]", status, aComplete); + OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_ADDSTATUSREPORTL_8, "CSmsSegmentationStore::StatusArrayComplete [aStatus=%d, ret=%d]", status, aComplete); break; } } @@ -1199,14 +1204,14 @@ CommitTransactionL(); CleanupStack::PopAndDestroy(2); // smsmessage, refStatusArray - LOGSMSPROT2("CSmsSegmentationStore::AddStatusReportL Exit [found=%d]", found); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_ADDSTATUSREPORTL_9, "CSmsSegmentationStore::AddStatusReportL Exit [found=%d]", found); return found; } // CSmsSegmentationStore::AddStatusReportL void CSmsSegmentationStore::GetMessageL(TInt aIndex,TSmsAddr& aSmsAddr,CSmsMessage& aSmsMessage, RSmsSegmentationStoreRefStatusArray& aRefStatusArray) { - LOGSMSPROT2("CSmsSegmentationStore::GetMessageL [aIndex=%d]", aIndex); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_GETMESSAGEL_1, "CSmsSegmentationStore::GetMessageL [aIndex=%d]", aIndex); InternalizeEntryL(Entries()[aIndex].DataStreamId(),aSmsAddr,aSmsMessage, aRefStatusArray); } // CSmsSegmentationStore::GetMessageL @@ -1220,13 +1225,13 @@ */ void CSmsSegmentationStore::InternalizeConcatenationReferencesL(const TStreamId& aStreamId,TInt& aReference8bit,TInt& aReference16bit) { - LOGSMSPROT1("CSmsSegmentationStore::InternalizeConcatenationReferencesL Start"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_INTERNALIZECONCATENATIONREFERENCESL_1, "CSmsSegmentationStore::InternalizeConcatenationReferencesL Start"); RStoreReadStream readstream; readstream.OpenLC(FileStore(),aStreamId); aReference8bit=readstream.ReadInt32L(); aReference16bit=readstream.ReadInt32L(); CleanupStack::PopAndDestroy(); - LOGSMSPROT1("CSmsSegmentationStore::InternalizeConcatenationReferencesL End"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_INTERNALIZECONCATENATIONREFERENCESL_2, "CSmsSegmentationStore::InternalizeConcatenationReferencesL End"); } // CSmsSegmentationStore::InternalizeConcatenationReferencesL @@ -1238,7 +1243,7 @@ */ void CSmsSegmentationStore::ExternalizeConcatenationReferencesL(TStreamId& aStreamId,TInt aReference8bit,TInt aReference16bit) { - LOGSMSPROT1("CSmsSegmentationStore::ExternalizeConcatenationReferencesL Start"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_EXTERNALIZECONCATENATIONREFERENCESL_1, "CSmsSegmentationStore::ExternalizeConcatenationReferencesL Start"); RStoreWriteStream writestream; if (aStreamId==KNullStreamId) aStreamId=writestream.CreateLC(FileStore()); @@ -1248,7 +1253,7 @@ writestream.WriteInt32L(aReference16bit); writestream.CommitL(); CleanupStack::PopAndDestroy(); - LOGSMSPROT1("CSmsSegmentationStore::ExternalizeConcatenationReferencesL End"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_EXTERNALIZECONCATENATIONREFERENCESL_2, "CSmsSegmentationStore::ExternalizeConcatenationReferencesL End"); } // CSmsSegmentationStore::ExternalizeConcatenationReferencesL @@ -1260,7 +1265,7 @@ */ void CSmsSegmentationStore::InternalizeEntryL(const TStreamId& aStreamId,TSmsAddr& aSmsAddr,CSmsMessage& aSmsMessage, RSmsSegmentationStoreRefStatusArray& aRefStatusArray) { - LOGSMSPROT1("CSmsSegmentationStore::InternalizeEntryL Start"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_INTERNALIZEENTRYL_1, "CSmsSegmentationStore::InternalizeEntryL Start"); aRefStatusArray.Reset(); @@ -1271,7 +1276,7 @@ readstream >> aRefStatusArray; CleanupStack::PopAndDestroy(&readstream); - LOGSMSPROT2("CSmsSegmentationStore::InternalizeEntryL End [count=%d]", aRefStatusArray.Count()); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_INTERNALIZEENTRYL_2, "CSmsSegmentationStore::InternalizeEntryL End [count=%d]", aRefStatusArray.Count()); } // CSmsSegmentationStore::InternalizeEntryL @@ -1280,7 +1285,7 @@ */ void CSmsSegmentationStore::ExternalizeEntryL(TStreamId& aStreamId,const TSmsAddr& aSmsAddr,const CSmsMessage& aSmsMessage, const RSmsSegmentationStoreRefStatusArray& aRefStatusArray) { - LOGSMSPROT1("CSmsSegmentationStore::ExternalizeEntryL Start"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_EXTERNALIZEENTRYL_1, "CSmsSegmentationStore::ExternalizeEntryL Start"); RStoreWriteStream writestream; @@ -1295,7 +1300,7 @@ writestream.CommitL(); CleanupStack::PopAndDestroy(&writestream); - LOGSMSPROT2("CSmsSegmentationStore::ExternalizeEntryL End [count=%d]", aRefStatusArray.Count()); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_EXTERNALIZEENTRYL_2, "CSmsSegmentationStore::ExternalizeEntryL End [count=%d]", aRefStatusArray.Count()); } // CSmsSegmentationStore::ExternalizeEntryL @@ -1313,7 +1318,7 @@ const CSmsMessage& aSmsMessage, const RSmsSegmentationStoreRefStatusArray& aRefStatusArray) { - LOGSMSPROT1("CSmsSegmentationStore::PopulateEntry"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_POPULATEENTRY_1, "CSmsSegmentationStore::PopulateEntry"); TBool statusreportrequest=EFalse; if (aSmsMessage.Type()==CSmsPDU::ESmsSubmit) { @@ -1421,7 +1426,7 @@ for (TInt i=0; i order(TSmsSegmentationStoreRefStatus::Compare); User::LeaveIfError(InsertInOrderAllowRepeats(aRefStatus, order)); @@ -1477,7 +1482,7 @@ TInt CSmsSegmentationStore::RSmsSegmentationStoreRefStatusArray::Find(const TSmsSegmentationStoreRefStatus& aRefStatus) const { - LOGSMSPROT1("CSmsSegmentationStore::RSmsSegmentationStoreRefStatusArray::Find()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_RSMSSEGMENTATIONSTOREREFSTATUSARRAY_FIND_1, "CSmsSegmentationStore::RSmsSegmentationStoreRefStatusArray::Find()"); TLinearOrder order(TSmsSegmentationStoreRefStatus::Compare); TInt index = FindInOrder(aRefStatus, order); @@ -1497,7 +1502,7 @@ void CSmsSegmentationStore::RSmsSegmentationStoreRefStatusArray::CopyL(const RSmsSegmentationStoreRefStatusArray& aOther) { - LOGSMSPROT1("CSmsSegmentationStore::RSmsSegmentationStoreRefStatusArray::CopyL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_RSMSSEGMENTATIONSTOREREFSTATUSARRAY_COPYL_1, "CSmsSegmentationStore::RSmsSegmentationStoreRefStatusArray::CopyL()"); Reset(); @@ -1511,7 +1516,7 @@ void CSmsSegmentationStore::RSmsSegmentationStoreRefStatusArray::ResetAllStatus(TInt aStatus) { - LOGSMSPROT1("CSmsSegmentationStore::RSmsSegmentationStoreRefStatusArray::ResetAllStatus()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_RSMSSEGMENTATIONSTOREREFSTATUSARRAY_RESETALLSTATUS_1, "CSmsSegmentationStore::RSmsSegmentationStoreRefStatusArray::ResetAllStatus()"); TInt count = Count(); while (count--) @@ -1523,7 +1528,7 @@ void CSmsSegmentationStore::RSmsSegmentationStoreRefStatusArray::InternalizeL(RReadStream& aStream) { - LOGSMSPROT1("CSmsSegmentationStore::RSmsSegmentationStoreRefStatusArray::InternalizeL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_RSMSSEGMENTATIONSTOREREFSTATUSARRAY_INTERNALIZEL_1, "CSmsSegmentationStore::RSmsSegmentationStoreRefStatusArray::InternalizeL()"); TInt count = aStream.ReadInt32L(); while (count--) @@ -1537,7 +1542,7 @@ void CSmsSegmentationStore::RSmsSegmentationStoreRefStatusArray::ExternalizeL(RWriteStream& aStream) const { - LOGSMSPROT1("CSmsSegmentationStore::RSmsSegmentationStoreRefStatusArray::ExternalizeL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_RSMSSEGMENTATIONSTOREREFSTATUSARRAYEXTERNALIZEL_1, "CSmsSegmentationStore::RSmsSegmentationStoreRefStatusArray::ExternalizeL()"); const TInt count = Count(); aStream.WriteInt32L(count); @@ -1551,7 +1556,7 @@ TBool CSmsSegmentationStore::HasEntryWithLogIdL(TLogId aLogID,TInt& aRefNo,TInt& aSent) { - LOGSMSPROT1("CSmsSegmentationStore::HasEntryWithLogIdL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_HASENTRYWITHLOGIDL_1, "CSmsSegmentationStore::HasEntryWithLogIdL()"); TInt count=Entries().Count(); TBool found=EFalse; @@ -1576,7 +1581,7 @@ else { DeleteEntryL(i); - LOGSMSPROT3("CSmsSegmentationStore::HasEntryWithLogIdL [Entry: %d LogId %d - deleted]", i, aLogID ); + OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_HASENTRYWITHLOGIDL_2, "CSmsSegmentationStore::HasEntryWithLogIdL [Entry: %d LogId %d - deleted]", i, (TInt)aLogID ); } break; } @@ -1592,7 +1597,7 @@ */ void CSmsSegmentationStore::OpenStoreL() { - LOGSMSPROT1("CSmsSegmentationStore::OpenStoreL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSEGMENTATIONSTORE_OPENSTOREL_1, "CSmsSegmentationStore::OpenStoreL()"); this->OpenL(iFullPathBuf,KSegmentationStoreUid); } // CSmsSegmentationStore::OpenStoreL