diff -r 630d2f34d719 -r 07a122eea281 smsprotocols/smsstack/gsmu/src/Gsmumsg.cpp --- a/smsprotocols/smsstack/gsmu/src/Gsmumsg.cpp Tue Aug 31 16:23:08 2010 +0300 +++ b/smsprotocols/smsstack/gsmu/src/Gsmumsg.cpp Wed Sep 01 12:40:21 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 1999-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1999-2009 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,6 @@ @file */ - -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "GsmumsgTraces.h" -#endif - #include #include "Gsmumain.h" #include @@ -34,9 +28,10 @@ #include #include -#include +#include // Used for KLogNullId only #include #include +#include #include #include @@ -63,7 +58,7 @@ */ EXPORT_C CSmsMessage* CSmsMessage::NewL(RFs& aFs, const TGsmSms& aGsmSms,CSmsBufferBase* aBuffer, TBool aIsRPError,TBool aIsMobileTerminated) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_NEWL_1, "CSmsMessage::NewL()"); + LOGGSMU1("CSmsMessage::NewL()"); CleanupStack::PushL(aBuffer); CSmsMessage* smsmessage=new(ELeave) CSmsMessage(aFs, aBuffer); @@ -90,7 +85,7 @@ */ EXPORT_C CSmsMessage* CSmsMessage::NewL(RFs& aFs, CSmsPDU::TSmsPDUType aType,CSmsBufferBase* aBuffer,TBool aIsRPError) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_NEWL1_1, "CSmsMessage::NewL()"); + LOGGSMU1("CSmsMessage::NewL()"); CleanupStack::PushL(aBuffer); CSmsMessage* smsmessage=new(ELeave) CSmsMessage(aFs, aBuffer); @@ -108,7 +103,7 @@ */ EXPORT_C CSmsMessage::~CSmsMessage() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_DTOR_1, "CSmsMessage::~CSmsMessage()"); + LOGGSMU1("CSmsMessage::~CSmsMessage()"); delete iSmsPDU; delete iBuffer; @@ -134,7 +129,7 @@ */ EXPORT_C void CSmsMessage::InternalizeWithoutBufferL(RReadStream& aStream) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_INTERNALIZEWITHOUTBUFFERL_1, "CSmsMessage::InternalizeWithoutBufferL()"); + LOGGSMU1("CSmsMessage::InternalizeWithoutBufferL()"); InternalizeWithoutBufferAndVersionL(aStream); InternalizeVersionL(aStream); @@ -158,7 +153,7 @@ */ EXPORT_C void CSmsMessage::ExternalizeWithoutBufferL(RWriteStream& aStream) const { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_EXTERNALIZEWITHOUTBUFFERL_1, "CSmsMessage::ExternalizeWithoutBufferL()"); + LOGGSMU1("CSmsMessage::ExternalizeWithoutBufferL()"); ExternalizeWithoutBufferAndVersionL(aStream); ExternalizeVersionL(aStream); @@ -178,7 +173,7 @@ */ EXPORT_C void CSmsMessage::InternalizeL(RReadStream& aStream) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_INTERNALIZEL_1, "CSmsMessage::InternalizeL()"); + LOGGSMU1("CSmsMessage::InternalizeL()"); InternalizeWithoutBufferAndVersionL(aStream); InternalizeBufferL(aStream); @@ -200,7 +195,7 @@ */ EXPORT_C void CSmsMessage::ExternalizeL(RWriteStream& aStream) const { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_EXTERNALIZEL_1, "CSmsMessage::ExternalizeL()"); + LOGGSMU1("CSmsMessage::ExternalizeL()"); ExternalizeWithoutBufferAndVersionL(aStream); ExternalizeBufferL(aStream); @@ -221,7 +216,7 @@ */ EXPORT_C TBool CSmsMessage::TextPresent() const { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_TEXTPRESENT_1, "CSmsMessage::TextPresent()"); + LOGGSMU1("CSmsMessage::TextPresent()"); CSmsPDU::TSmsPDUType pdutype=SmsPDU().Type(); return (pdutype==CSmsPDU::ESmsSubmit) || @@ -242,7 +237,7 @@ */ EXPORT_C TInt CSmsMessage::NumMessagePDUsL() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_NUMMESSAGEPDUSL_1, "CSmsMessage::NumMessagePDUsL()"); + LOGGSMU1("CSmsMessage::NumMessagePDUsL()"); TInt nummessagepdus=1; if (IsDecoded()) @@ -263,7 +258,7 @@ nummessagepdus=SmsPDU().NumConcatenatedMessagePDUs(); } - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_NUMMESSAGEPDUSL_2, "CSmsMessage::NumMessagePDUsL() returns %d", nummessagepdus); + LOGGSMU2("CSmsMessage::NumMessagePDUsL() returns %d", nummessagepdus); return nummessagepdus; } // CSmsMessage::NumMessagePDUsL @@ -287,7 +282,7 @@ maxmessagelength=maxmessagelength*0xFF; } - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_MAXMESSAGELENGTH_1, "CSmsMessage::MaxMessageLength() returns %d", maxmessagelength); + LOGGSMU2("CSmsMessage::MaxMessageLength() returns %d", maxmessagelength); return maxmessagelength; } // CSmsMessage::MaxMessageLength @@ -303,7 +298,7 @@ // Ignore in code coverage - not used in SMS stack and not exported // but cannot be removed as impacts public header. BULLSEYE_OFF - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_CONVERTEDBUFFERLENGTHL_1, "CSmsMessage::ConvertedBufferLengthL()"); + LOGGSMU1("CSmsMessage::ConvertedBufferLengthL()"); TInt convertedBufferLength=0; CSmsAlphabetConverter* converter=CSmsAlphabetConverter::NewLC(*iCharacterSetConverter,iFs,SmsPDU().Alphabet(),BinaryData()); @@ -311,7 +306,7 @@ convertedBufferLength=segmenter->TotalConvertedLengthL(iAdditionalInfo->Alternative7bitEncoding()); CleanupStack::PopAndDestroy(2, converter); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_CONVERTEDBUFFERLENGTHL_2, "CSmsMessage::ConvertedBufferLengthL() returns %d", convertedBufferLength); + LOGGSMU2("CSmsMessage::ConvertedBufferLengthL() returns %d", convertedBufferLength); return convertedBufferLength; BULLSEYE_RESTORE @@ -331,7 +326,7 @@ */ EXPORT_C TInt CSmsMessage::MessageLengthL() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_MESSAGELENGTHL_1, "CSmsMessage::MessageLengthL()"); + LOGGSMU1("CSmsMessage::MessageLengthL()"); TInt messagelength=0; if (!SmsPDU().TextCompressed()) @@ -350,7 +345,7 @@ EXPORT_C void CSmsMessage::GetEncodingInfoL(TInt& aPdus, TInt& aUnconvertedChars, TInt& aDowngradedChars, TInt& aFreeUDUnitsInLastPDU) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_GETENCODINGINFOL_1, "CSmsMessage::GetEncodingInfoL()"); + LOGGSMU1("CSmsMessage::GetEncodingInfoL()"); aPdus = 1; aUnconvertedChars = 0; @@ -400,10 +395,10 @@ } } - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_GETENCODINGINFOL_2, "CSmsMessage::GetEncodingInfoL(): aPdus=%d", aPdus); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_GETENCODINGINFOL_3, "CSmsMessage::GetEncodingInfoL(): aUnconvertedChars=%d", aUnconvertedChars); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_GETENCODINGINFOL_4, "CSmsMessage::GetEncodingInfoL(): aDowngradedChars=%d", aDowngradedChars); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_GETENCODINGINFOL_5, "CSmsMessage::GetEncodingInfoL(): aFreeUDUnitsInLastPDU=%d", aFreeUDUnitsInLastPDU); + LOGGSMU2("CSmsMessage::GetEncodingInfoL(): aPdus=%d", aPdus); + LOGGSMU2("CSmsMessage::GetEncodingInfoL(): aUnconvertedChars=%d", aUnconvertedChars); + LOGGSMU2("CSmsMessage::GetEncodingInfoL(): aDowngradedChars=%d", aDowngradedChars); + LOGGSMU2("CSmsMessage::GetEncodingInfoL(): aFreeUDUnitsInLastPDU=%d", aFreeUDUnitsInLastPDU); } // CSmsMessage::GetEncodingInfoL @@ -415,7 +410,7 @@ */ EXPORT_C void CSmsMessage::UserDataSettings(TSmsUserDataSettings& aSettings) const { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_USERDATASETTINGS_1, "CSmsMessage::UserDataSettings()"); + LOGGSMU1("CSmsMessage::UserDataSettings()"); __ASSERT_DEBUG(TextPresent(),Panic(KGsmuPanicTextNotPresent)); aSettings.SetAlphabet(SmsPDU().Alphabet()); @@ -434,7 +429,7 @@ */ EXPORT_C void CSmsMessage::SetUserDataSettingsL(const TSmsUserDataSettings& aSettings) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_SETUSERDATASETTINGSL_1, "CSmsMessage::SetUserDataSettingsL()"); + LOGGSMU1("CSmsMessage::SetUserDataSettingsL()"); __ASSERT_DEBUG(TextPresent(),Panic(KGsmuPanicTextNotPresent)); SmsPDU().SetAlphabet(aSettings.Alphabet()); @@ -470,7 +465,7 @@ */ EXPORT_C void CSmsMessage::OptimizeSettingsL(TInt aOptions) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_OPTIMIZESETTINGSL_1, "CSmsMessage::OptimizeSettingsL()"); + LOGGSMU1("CSmsMessage::OptimizeSettingsL()"); __ASSERT_DEBUG(TextPresent(),Panic(KGsmuPanicTextNotPresent)); __ASSERT_DEBUG(IsDecoded(),Panic(KGsmuPanicNotDecoded)); @@ -527,7 +522,7 @@ */ EXPORT_C TSmsEncoding CSmsMessage::Alternative7bitEncoding() const { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_ALTERNATIVE7BITENCODING_1, "CSmsMessage::Alternative7bitEncoding()"); + LOGGSMU1("CSmsMessage::Alternative7bitEncoding()"); return iAdditionalInfo->Alternative7bitEncoding(); } // CSmsMessage::Alternative7bitEncoding @@ -548,7 +543,7 @@ */ EXPORT_C TInt CSmsMessage::SetAlternative7bitEncoding(TSmsEncoding aEncoding) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_SETALTERNATIVE7BITENCODING_1, "CSmsMessage::SetAlternative7bitEncoding(%d)", aEncoding); + LOGGSMU2("CSmsMessage::SetAlternative7bitEncoding(%d)", aEncoding); // // Get the encoders that would be used for this encoding method. @@ -583,7 +578,8 @@ */ void CSmsMessage::MergeAlternative7bitEncoding(TSmsEncoding aEncoding) const { - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_MERGEALTERNATIVE7BITENCODING_1, "CSmsMessage::MergeAlternative7bitEncoding(): aEncoding=%d (currently %d)",aEncoding, iAdditionalInfo->Alternative7bitEncoding()); + LOGGSMU3("CSmsMessage::MergeAlternative7bitEncoding(): aEncoding=%d (currently %d)", + aEncoding, iAdditionalInfo->Alternative7bitEncoding()); switch (iAdditionalInfo->Alternative7bitEncoding()) { @@ -643,7 +639,8 @@ } }; - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_MERGEALTERNATIVE7BITENCODING_2, "CSmsMessage::MergeAlternative7bitEncoding(): New encoding=%d",iAdditionalInfo->Alternative7bitEncoding()); + LOGGSMU2("CSmsMessage::MergeAlternative7bitEncoding(): New encoding=%d", + iAdditionalInfo->Alternative7bitEncoding()); } // CSmsMessage::MergeAlternative7bitEncoding @@ -663,7 +660,7 @@ EXPORT_C TBool CSmsMessage::IsSupportedL(const TDesC& aDes, TInt& aNumberOfUnconvertibleCharacters, TInt& aIndexOfFirstUnconvertibleCharacter) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_ISSUPPORTEDL_1, "[1] CSmsMessage::IsSupportedL()"); + LOGGSMU1("[1] CSmsMessage::IsSupportedL()"); __ASSERT_DEBUG(TextPresent(), Panic(KGsmuPanicTextNotPresent)); @@ -703,7 +700,7 @@ TInt& aNumberRequiringAlternativeEncoding, TInt& aIndexOfFirstUnconvertibleCharacter) const { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_ISSUPPORTEDL1_1, "[2] CSmsMessage::IsSupportedL()"); + LOGGSMU1("[2] CSmsMessage::IsSupportedL()"); __ASSERT_DEBUG(TextPresent(), Panic(KGsmuPanicTextNotPresent)); @@ -737,7 +734,7 @@ */ EXPORT_C void CSmsMessage::EncodeMessagePDUsL(CArrayFix& aSmsArray, TInt aReference) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_ENCODEMESSAGEPDUSL_1, "CSmsMessage::EncodeMessagePDUsL(): aReference=%d", aReference); + LOGGSMU2("CSmsMessage::EncodeMessagePDUsL(): aReference=%d", aReference); __ASSERT_DEBUG((aSmsArray.Count()==0),Panic(KGsmuPanicSmsArrayNotEmpty)); @@ -794,7 +791,7 @@ */ void CSmsMessage::PrepareCommandMessageL() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_PREPARECOMMANDMESSAGEL_1, "CSmsMessage::PrepareCommandMessageL()"); + LOGGSMU1("CSmsMessage::PrepareCommandMessageL()"); if (SmsPDU().Type()==CSmsPDU::ESmsCommand) { @@ -817,7 +814,7 @@ break; } default: - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_PREPARECOMMANDMESSAGEL_2, "CSmsMessage::PrepareCommandMessageL,default switch category = %d", category); + LOGGSMU2("CSmsMessage::PrepareCommandMessageL,default switch category = %d, id = %d", category); break; } } @@ -836,7 +833,7 @@ */ EXPORT_C void CSmsMessage::DecodeMessagePDUsL(const CArrayFix& aSmsArray) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_DECODEMESSAGEPDUSL_1, "CSmsMessage::DecodeMessagePDUsL(): PDUs=%d", aSmsArray.Count()); + LOGGSMU2("CSmsMessage::DecodeMessagePDUsL(): PDUs=%d", aSmsArray.Count()); TInt count=aSmsArray.Count(); SetIsComplete(ETrue); @@ -894,7 +891,7 @@ */ EXPORT_C void CSmsMessage::DecodePartialCompleteMessagePDUsL(const CArrayFix& aSmsArray, TBool aLastPartialCompleteMsg) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_DECODEPARTIALCOMPLETEMESSAGEPDUSL_1, "CSmsMessage::DecodePartialCompleteMessagePDUsL(): PDUs=%d", aSmsArray.Count()); + LOGGSMU2("CSmsMessage::DecodePartialCompleteMessagePDUsL(): PDUs=%d", aSmsArray.Count()); TInt count=aSmsArray.Count(); SetIsComplete(EFalse); @@ -981,7 +978,7 @@ void CSmsMessage::ConstructL(const TGsmSms& aGsmSms, TBool aIsRPError,TBool aIsMobileTerminated) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_CONSTRUCTL_1, "CSmsMessage::ConstructL()"); + LOGGSMU1("CSmsMessage::ConstructL()"); iCharacterSetConverter=CCnvCharacterSetConverter::NewL(); iInformationElementArray = new (ELeave) RPointerArray(8); @@ -1040,7 +1037,8 @@ void CSmsMessage::ConstructL(CSmsPDU::TSmsPDUType aType,TBool aIsRPError) { - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_CONSTRUCTL1_1, "CSmsMessage::ConstructL(): aType=%d, aIsRPError=%d", (TInt) aType,aIsRPError); + LOGGSMU3("CSmsMessage::ConstructL(): aType=%d, aIsRPError=%d", (TInt) aType, + aIsRPError); iCharacterSetConverter=CCnvCharacterSetConverter::NewL(); iInformationElementArray = new (ELeave) RPointerArray(2); @@ -1065,7 +1063,7 @@ */ TInt CSmsMessage::NumMessageEmsPDUsL() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_NUMMESSAGEEMSPDUSL_1, "CSmsMessage::NumMessageEmsPDUsL()"); + LOGGSMU1("CSmsMessage::NumMessageEmsPDUsL()"); // // Clear the concatenated flag, EncodeBufferL() will add it if needed. @@ -1092,7 +1090,7 @@ CleanupStack::PopAndDestroy(tmpArray); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_NUMMESSAGEEMSPDUSL_2, "CSmsMessage::NumMessageEmsPDUsL() returns %d", numMsgs); + LOGGSMU2("CSmsMessage::NumMessageEmsPDUsL() returns %d", numMsgs); return numMsgs; } // CSmsMessage::NumMessageEmsPDUsL @@ -1110,7 +1108,7 @@ */ void CSmsMessage::ResetWorkingPDUL() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_RESETWORKINGPDUL_1, "CSmsMessage::ResetWorkingPDUL()"); + LOGGSMU1("CSmsMessage::ResetWorkingPDUL()"); CSmsUserData& uData = SmsPDU().UserData(); //remove non-mandatory EMS information elements @@ -1137,7 +1135,8 @@ RPointerArray& aCorrectedFormattingIEArray, TUint aCharsAlreadyAdded) { - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_CORRECTFORMATTINGL_1, "CSmsMessage::CorrectFormattingL(): aCharsAddedToCurrentPDU=%u, aCharsAlreadyAdded=%u",aCharsAddedToCurrentPDU, aCharsAlreadyAdded); + LOGGSMU3("CSmsMessage::CorrectFormattingL(): aCharsAddedToCurrentPDU=%d, aCharsAlreadyAdded=%d", + aCharsAddedToCurrentPDU, aCharsAlreadyAdded); CSmsUserData& uData = SmsPDU().UserData(); for (TInt a= 0; a < uData.NumInformationElements(); a++) @@ -1164,8 +1163,8 @@ CleanupStack::PushL(newie); newie->SetFormatLength(oldFormatLen - newFormatLen); newie->SetStartPosition(aCharsAlreadyAdded+aCharsAddedToCurrentPDU); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_CORRECTFORMATTINGL_2, "CSmsMessage::CorrectFormattingL Count=%d",aCorrectedFormattingIEArray.Count()); - User::LeaveIfError(aCorrectedFormattingIEArray.Append(newie)); + LOGGSMU2("CSmsMessage::CorrectFormattingL",aCorrectedFormattingIEArray.Count()); + aCorrectedFormattingIEArray.Append(newie); CleanupStack::Pop(newie); } } @@ -1176,7 +1175,7 @@ void CSmsMessage::CorrectFormattingInSinglePDUL() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_CORRECTFORMATTINGINSINGLEPDUL_1, "CSmsMessage::CorrectFormattingInSinglePDUL()"); + LOGGSMU1("CSmsMessage::CorrectFormattingInSinglePDUL()"); CSmsUserData& uData = SmsPDU().UserData(); for (TInt a= 0; a < uData.NumInformationElements(); a++) @@ -1210,7 +1209,8 @@ */ void CSmsMessage::AddCurrentPDUToPDUArrayL(TBool aDoEncode) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ADDCURRENTPDUTOPDUARRAYL_1, "CSmsMessage::AddCurrentPDUToPDUArrayL(): Adding PDU number %d",iAdditionalInfo->SmsPDUArray().Count() + 1); + LOGGSMU2("CSmsMessage::AddCurrentPDUToPDUArrayL(): Adding PDU number %d", + iAdditionalInfo->SmsPDUArray().Count() + 1); // // Maximum number of PDU is 255, so if we have that already then we cannot @@ -1261,7 +1261,7 @@ TBool CSmsMessage::AddIEToUserDataL(CEmsInformationElement* aIE, TInt aCharsAlreadyAdded,TUint& aCharsAddedToCurrentPDU,CSmsEMSBufferSegmenter& aSeg) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ADDIETOUSERDATAL_1, "CSmsMessage::AddIEToUserDataL()"); + LOGGSMU1("CSmsMessage::AddIEToUserDataL()"); TBool ieAdded=EFalse; if (SmsPDU().UserData().EmsInformationElementWillFitL(aIE,aSeg,aCharsAddedToCurrentPDU)) @@ -1288,7 +1288,7 @@ */ TInt CSmsMessage::FillPduL(CSmsEMSBufferSegmenter& aSeg, TInt aNumChars, TSmsEncoding aEncoding) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_FILLPDUL_1, "CSmsMessage::FillPduL()"); + LOGGSMU1("CSmsMessage::FillPduL()"); TUint maxUDUnitsREmaining=SmsPDU().UserData().MaxPackedUDUnitsInBodyRemaining(); @@ -1333,7 +1333,7 @@ void CSmsMessage::AddControlInformationElementsToMultiSegmentMessageL(TSmsInformationElementCategories::TInformationElementCategory aCategory, TBool aMandatoryInPDU, TBool aDoEncode) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ADDCONTROLINFORMATIONELEMENTSTOMULTISEGMENTMESSAGEL_1, "CSmsMessage::AddControlInformationElementsToMultiSegmentMessageL()"); + LOGGSMU1("CSmsMessage::AddControlInformationElementsToMultiSegmentMessageL()"); TUint numberOfInformationElements = iAdditionalInfo->NumberOfControlInformationElements(aCategory); @@ -1365,7 +1365,7 @@ TBool canFit = SmsPDU().UserData().ControlInformationElementWillFitL(cloneInformationElement); if (canFit == EFalse) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ADDCONTROLINFORMATIONELEMENTSTOMULTISEGMENTMESSAGEL_2, "CSmsMessage::AddControlInformationElementsToMultiSegmentMessage, IE too bit to fit in any PDUL"); + LOGGSMU1("CSmsMessage::AddControlInformationElementsToMultiSegmentMessage, IE too bit to fit in any PDUL"); User::Leave(KErrArgument); } i--; @@ -1389,7 +1389,7 @@ */ void CSmsMessage::AddControlInformationElementsToMultiSegmentMessageL(TBool aDoEncode) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ADDCONTROLINFORMATIONELEMENTSTOMULTISEGMENTMESSAGEL1_1, "CSmsMessage::AddControlInformationElementsToMultiSegmentMessageL() 1"); + LOGGSMU1("CSmsMessage::AddControlInformationElementsToMultiSegmentMessageL() 1"); TBool mandatoryInEachPDU = ETrue; AddControlInformationElementsToMultiSegmentMessageL(TSmsInformationElementCategories::ECtrlMandatoryIn1stPDUOnly, @@ -1425,13 +1425,13 @@ TUint& aCurrEMSIEno, TUint& aCharsAlreadyAdded) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ADDEMSINFORMATIONELEMENTSTOMULTISEGMENTMESSAGEL_1, "CSmsMessage::AddEMSInformationElementsToMultiSegmentMessageL()"); + LOGGSMU1("CSmsMessage::AddEMSInformationElementsToMultiSegmentMessageL()"); TUint startPosition=0; // number of chars added to the current PDU TUint no=iInformationElementArray->Count(); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ADDEMSINFORMATIONELEMENTSTOMULTISEGMENTMESSAGEL_2, "CSmsMessage::AddEMSInformationElementsToMultiSegmentMessageL no of IE %d",no); + LOGGSMU2("CSmsMessage::AddEMSInformationElementsToMultiSegmentMessageL no of IE %d",no); CEmsInformationElement* ie = NULL; TUint msgLen=iBuffer->Length(); TUint filledChars=0; @@ -1472,7 +1472,7 @@ aCharsAddedToCurrentPDU+=filledChars; } - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ADDEMSINFORMATIONELEMENTSTOMULTISEGMENTMESSAGEL_3, "CSmsMessage::AddEMSInformationElementsToMultiSegmentMessageL: filled %d chars", filledChars); + LOGGSMU2("CSmsMessage::AddEMSInformationElementsToMultiSegmentMessageL: filled %d chars", filledChars); if (aCharsAddedToCurrentPDU==startPosition) { @@ -1492,7 +1492,7 @@ else { // Information Element will not fit send PDU - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ADDEMSINFORMATIONELEMENTSTOMULTISEGMENTMESSAGEL_4, "CSmsMessage::AddEMSInformationElementsToMultiSegmentMessageL: ie will not fit send Message"); + LOGGSMU1("CSmsMessage::AddEMSInformationElementsToMultiSegmentMessageL: ie will not fit send Message"); CorrectFormattingL(aCharsAddedToCurrentPDU,aCorrectedFormatingIEArray,aCharsAlreadyAdded); aCharsAlreadyAdded += aCharsAddedToCurrentPDU; @@ -1513,7 +1513,7 @@ else { // native chars upto start position will not fit send PDu. - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ADDEMSINFORMATIONELEMENTSTOMULTISEGMENTMESSAGEL_5, "CSmsMessage::AddEMSInformationElementsToMultiSegmentMessageL: PDU is filled with chars sending"); + LOGGSMU1("CSmsMessage::AddEMSInformationElementsToMultiSegmentMessageL: PDU is filled with chars sending"); CorrectFormattingL(aCharsAddedToCurrentPDU,aCorrectedFormatingIEArray,aCharsAlreadyAdded); @@ -1551,7 +1551,7 @@ TBool CSmsMessage::AddEMSInformationElementsToSingleSegmentMessageL(CSmsEMSBufferSegmenter& aSegmenter, TSmsEncoding aEncoding) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ADDEMSINFORMATIONELEMENTSTOSINGLESEGMENTMESSAGEL_1, "CSmsMessage::AddEMSInformationElementsToSingleSegmentMessageL()"); + LOGGSMU1("CSmsMessage::AddEMSInformationElementsToSingleSegmentMessageL()"); TUint charsAddedToCurrentPDU=0; TUint numOfEmsIE=iInformationElementArray->Count(); @@ -1608,7 +1608,7 @@ TInt& aUnconvertedChars, TInt& aDowngradedChars, TInt& aFreeUDUnitsInLastPDU, TBool aDoEncode) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ENCODEBUFFERL_1, "CSmsMessage::EncodeBufferL()"); + LOGGSMU1("CSmsMessage::EncodeBufferL()"); aUnconvertedChars = 0; aDowngradedChars = 0; @@ -1712,13 +1712,13 @@ // while (segmenter->MoreL()) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ENCODEBUFFERL_2, "CSmsMessage::EncodeBufferL - there is MoreL"); + LOGGSMU1("CSmsMessage::EncodeBufferL - there is MoreL"); // // Calculate the space left to use in this PDU... // TInt size = SmsPDU().UserData().MaxPackedUDUnitsInBodyRemaining(); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ENCODEBUFFERL_3, "CSmsMessage::EncodeBufferL - remaining size in PDU is %d",size); + LOGGSMU2("CSmsMessage::EncodeBufferL - remaining size in PDU is %d",size); // // While there is no space, correct the formatting (which may @@ -1755,7 +1755,7 @@ // Add any elements that can be placed now (from previous // PDUs and above)... // - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ENCODEBUFFERL_4, "CSmsMessage::EncodeBufferL: IE count %d corrected count %d",iInformationElementArray->Count(),correctedFormatingIEArray.Count() ); + LOGGSMU3("CSmsMessage::EncodeBufferL: IE count %d corrected count %d",iInformationElementArray->Count(),correctedFormatingIEArray.Count() ); if ((TUint)iInformationElementArray->Count() > currEMSIEno || correctedFormatingIEArray.Count() > 0) { @@ -1769,7 +1769,7 @@ // Calculate the space left remaining in this new PDU... // size = SmsPDU().UserData().MaxPackedUDUnitsInBodyRemaining(); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ENCODEBUFFERL_5, "CSmsMessage::EncodeBufferL - remaining size in PDU is %d",size); + LOGGSMU2("CSmsMessage::EncodeBufferL - remaining size in PDU is %d",size); } // @@ -1780,7 +1780,7 @@ SmsPDU().UserData().AppendBodyL(ptr); TUint charsInSegment= isUnicode ? ptr.Length()/2 : ptr.Length(); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ENCODEBUFFERL_6, "CSmsMessage::EncodeBufferL: segmenting added %d chars", charsInSegment); + LOGGSMU2("CSmsMessage::EncodeBufferL: segmenting added %d chars", charsInSegment); // // At this point the working PDU is either full (e.g. we filled the @@ -1793,7 +1793,7 @@ charsAdded2CurrentPDU+=charsInSegment; CorrectFormattingL(charsAdded2CurrentPDU, correctedFormatingIEArray, charsAlreadyAdded); charsAlreadyAdded+=charsAdded2CurrentPDU; - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ENCODEBUFFERL_7, "CSmsMessage::EncodeBufferL(): charsAlreadyAdded=%d", charsAlreadyAdded); + LOGGSMU2("CSmsMessage::EncodeBufferL(): charsAlreadyAdded=%d", charsAlreadyAdded); // // Now store this PDU and reset the working PDU... @@ -1816,7 +1816,8 @@ // Add any elements that can be placed now given we have a new // empty PDU... // - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ENCODEBUFFERL_8, "CSmsMessage::EncodeBufferL: IE count %d corrected count %d",iInformationElementArray->Count(), correctedFormatingIEArray.Count() ); + LOGGSMU3("CSmsMessage::EncodeBufferL: IE count %d corrected count %d", + iInformationElementArray->Count(), correctedFormatingIEArray.Count() ); if ((TUint)iInformationElementArray->Count() > currEMSIEno || correctedFormatingIEArray.Count() > 0) { @@ -1825,11 +1826,11 @@ correctedFormatingIEArray, currEMSIEno, charsAlreadyAdded); } - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ENCODEBUFFERL_9, "CSmsMessage::EncodeBufferL end Moreloop"); + LOGGSMU1("CSmsMessage::EncodeBufferL end Moreloop"); } CleanupStack::PopAndDestroy(buf); - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ENCODEBUFFERL_10, "CSmsMessage::EncodeBufferL - last PDU"); + LOGGSMU1("CSmsMessage::EncodeBufferL - last PDU"); // // This is the last PDU. We need to check if there is a partial PDU left over @@ -1864,7 +1865,7 @@ // TInt numPDUs = iAdditionalInfo->SmsPDUArray().Count(); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ENCODEBUFFERL_11, "CSmsMessage::EncodeBufferL number of PDUs: %d", iAdditionalInfo->SmsPDUArray().Count()); + LOGGSMU2("CSmsMessage::EncodeBufferL number of PDUs: %d", iAdditionalInfo->SmsPDUArray().Count()); if (aDoEncode) { @@ -1955,7 +1956,7 @@ TBool CSmsMessage::EncodeIntoSinglePDUL(CArrayFix& aSmsArray, TInt& aUnconvertedChars, TInt& aDowngradedChars, TInt& aFreeUDUnitsInLastPDU) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ENCODEINTOSINGLEPDUL_1, "CSmsMessage::EncodeIntoSinglePDUL()"); + LOGGSMU1("CSmsMessage::EncodeIntoSinglePDUL()"); __ASSERT_DEBUG((aSmsArray.Count()==0),Panic(KGsmuPanicSmsArrayNotEmpty)); @@ -2002,7 +2003,7 @@ break; } } - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ENCODEINTOSINGLEPDUL_2, "CSmsMessage::EncodeIntoSinglePDUL, ctrl elem len = %d", ieLength); + LOGGSMU2("CSmsMessage::EncodeIntoSinglePDUL, ctrl elem len = %d", ieLength); CEmsInformationElement* emsIE =NULL; for (TInt num=0; numCount();num++) @@ -2017,7 +2018,7 @@ if( msgLength > remainInBody) return EFalse; - OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ENCODEINTOSINGLEPDUL_3, "CSmsMessage::EncodeIntoSinglePDUL, ie len = %d, remainInBody = %d, msgLength = %d", ieLength, msgLength, remainInBody); + LOGGSMU4("CSmsMessage::EncodeIntoSinglePDUL, ie len = %d, remainInBody = %d, msgLength = %d", ieLength, msgLength, remainInBody); // add all control information elements into working PDU. // for (TUint8 category = 0; category < TSmsInformationElementCategories::ENumberOfCategories; category++) @@ -2135,7 +2136,7 @@ */ EXPORT_C TBool CSmsMessage::EncodeIntoSinglePDUL(CArrayFix& aSmsArray) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_ENCODEINTOSINGLEPDUL1_1, "CSmsMessage::EncodeIntoSinglePDUL()"); + LOGGSMU1("CSmsMessage::EncodeIntoSinglePDUL()"); TInt unconvertedChars, downgradedChars, freeUDUnitsInLastPDU; @@ -2218,7 +2219,7 @@ void CSmsMessage::DecodeBufferL(CArrayPtr& aSmsPDUArray, CSmsBufferBase& aBuffer) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_DECODEBUFFERL_1, "CSmsMessage::DecodeBufferL()"); + LOGGSMU1("CSmsMessage::DecodeBufferL()"); iInformationElementArray->ResetAndDestroy(); @@ -2280,7 +2281,7 @@ void CSmsMessage::DecodeOnlyTextL(CArrayPtr& aSmsPDUArray, CSmsBufferBase& aBuffer) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_DECODEONLYTEXTL_1, "CSmsMessage::DecodeOnlyTextL()"); + LOGGSMU1("CSmsMessage::DecodeOnlyTextL()"); for (TInt i=0; iGetNonIEOperationL(ESmsIncompleteClass0MessageParameter); incompleteClass0MsgInfo.SetVersion(CIncompleteClass0MessageInfo::ESmsIncompleteClass0MessageV0); @@ -2331,7 +2332,7 @@ void CSmsMessage::InstallControlInformationElementsL(CSmsUserData& aUserData, TInt aSegmentSequenceNum) { // Installs all the information elements within the subsequent PDUs. - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_INSTALLCONTROLINFORMATIONELEMENTSL_1, "CSmsMessage::InstallControlInformationElements()"); + LOGGSMU1("CSmsMessage::InstallControlInformationElements()"); CSmsMessageAdditionalAttributes::CSmsStatusReportScheme& scheme = iAdditionalInfo->GetStatusReportScheme(); @@ -2346,7 +2347,8 @@ switch (category) { case TSmsInformationElementCategories::ECtrlMandatoryInEveryPDUMultipleInstancesPerPDU: // e.g. Special SMS Message Indication - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_INSTALLCONTROLINFORMATIONELEMENTSL_2, "CSmsMessage::InstallControlInformationElements \ECtrlMandatoryInEveryPDUMultipleInstancesPerPDU id = %d", ie.Identifier()); + LOGGSMU2("CSmsMessage::InstallControlInformationElements \ + ECtrlMandatoryInEveryPDUMultipleInstancesPerPDU id = %d", ie.Identifier()); if (ie.Identifier()== CSmsInformationElement::ESmsIEISpecialSMSMessageIndication) { @@ -2378,14 +2380,15 @@ else { // Unknown category. - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_INSTALLCONTROLINFORMATIONELEMENTSL_3, "CSmsMessage::InstallControlInformationElementsL category = %d, id = %d", category, ie.Identifier()); + LOGGSMU3("CSmsMessage::InstallControlInformationElementsL category = %d, id = %d", category, ie.Identifier()); User::Leave(KErrArgument); } break; case TSmsInformationElementCategories::ECtrlMandatoryIn1stPDUOnly: case TSmsInformationElementCategories::ECtrlSingleInstanceOnly: { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_INSTALLCONTROLINFORMATIONELEMENTSL_4, "CSmsMessage::InstallControlInformationElements ECtrlMandatoryIn1stPDUOnly ""ECtrlSingleInstanceOnly, id = %d", ie.Identifier()); + LOGGSMU2("CSmsMessage::InstallControlInformationElements ECtrlMandatoryIn1stPDUOnly " + "ECtrlSingleInstanceOnly, id = %d", ie.Identifier()); TUint index = 0; if (iAdditionalInfo->Find1stInstanceOfControlInformationElement(ie.Identifier(), index)) @@ -2410,7 +2413,8 @@ } case TSmsInformationElementCategories::ECtrlMandatoryInEveryPDUAndWithIdenticalValues: { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_INSTALLCONTROLINFORMATIONELEMENTSL_5, "CSmsMessage::InstallControlInformationElements ECtrlMandatoryInEveryPDUAndWithIdenticalValues ""ECtrlSingleInstanceOnly, id = %d", ie.Identifier()); + LOGGSMU2("CSmsMessage::InstallControlInformationElements ECtrlMandatoryInEveryPDUAndWithIdenticalValues " + "ECtrlSingleInstanceOnly, id = %d", ie.Identifier()); TInt index = 0; if (SmsPDU().UserData().InformationElementIndex(ie.Identifier(),index)) { @@ -2434,7 +2438,8 @@ case TSmsInformationElementCategories::ECtrlMultipleInstancesAllowed: { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_INSTALLCONTROLINFORMATIONELEMENTSL_6, "CSmsMessage::InstallControlInformationElements ECtrlMandatoryInEveryPDUAndWithIdenticalValues ""ECtrlSingleInstanceOnly, id = %d", ie.Identifier() ); + LOGGSMU2("CSmsMessage::InstallControlInformationElements ECtrlMandatoryInEveryPDUAndWithIdenticalValues " + "ECtrlSingleInstanceOnly, id = %d", ie.Identifier() ); CSmsInformationElement* cloneInformationElement = CSmsInformationElement::NewL( ie.Identifier(),ie.Data() ); CleanupStack::PushL(cloneInformationElement); @@ -2443,7 +2448,8 @@ break; } case TSmsInformationElementCategories::ECtrlMandatoryInEveryPDUButWithValueSpecificToPDU: - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_INSTALLCONTROLINFORMATIONELEMENTSL_7, "CSmsMessage::InstallControlInformationElements ECtrlMandatoryInEveryPDUButWithValueSpecificToPDU ""ECtrlSingleInstanceOnly, id = %d", ie.Identifier() ); + LOGGSMU2("CSmsMessage::InstallControlInformationElements ECtrlMandatoryInEveryPDUButWithValueSpecificToPDU " + "ECtrlSingleInstanceOnly, id = %d", ie.Identifier() ); if (ie.Identifier() == CSmsInformationElement::ESmsIEISMSCControlParameters) { @@ -2470,11 +2476,12 @@ // or left as is. break; case TSmsInformationElementCategories::EEmsInformationElement: - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_INSTALLCONTROLINFORMATIONELEMENTSL_8, "CSmsMessage::InstallControlInformationElements ECtrlMandatoryInEveryPDUButWithValueSpecificToPDU ""ECtrlSingleInstanceOnly, id = %d", ie.Identifier() ); + LOGGSMU2("CSmsMessage::InstallControlInformationElements ECtrlMandatoryInEveryPDUButWithValueSpecificToPDU " + "ECtrlSingleInstanceOnly, id = %d", ie.Identifier() ); // Will be handled in the method InstallEmsInformationElements, nothing to do here break; default: - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_INSTALLCONTROLINFORMATIONELEMENTSL_9, "CSmsMessage::InstallControlInformationElementsToMultiSegmentMessageL, default switch, category = %d, id= %d", category, ie.Identifier() ); + LOGGSMU3("CSmsMessage::InstallControlInformationElementsToMultiSegmentMessageL, default switch, category = %d, id= %d", category, ie.Identifier() ); break; } } @@ -2492,7 +2499,7 @@ void CSmsMessage::InstallEmsInformationElementsL(CSmsUserData& aUserData, TInt aCharsAlreadyAdded) { // Installs all the information elements within the subsequent PDUs. - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_INSTALLEMSINFORMATIONELEMENTSL_1, "CSmsMessage::InstallEmsInformationElements()"); + LOGGSMU1("CSmsMessage::InstallEmsInformationElements()"); CSmsInformationElement::TSmsInformationElementIdentifier id; CEmsInformationElement* newIE =NULL; @@ -2540,7 +2547,7 @@ // but cannot be removed as impacts public header. BULLSEYE_OFF // Installs all the information elements within the subsequent PDUs. - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_INSTALLEMSINFORMATIONELEMENTSL1_1, "CSmsMessage::InstallEmsInformationElements()"); + LOGGSMU1("CSmsMessage::InstallEmsInformationElements()"); CSmsInformationElement::TSmsInformationElementIdentifier id; CEmsInformationElement* newIE=NULL; @@ -2666,7 +2673,7 @@ */ EXPORT_C void CSmsMessage::AddEMSInformationElementL(const CEmsInformationElement& aEmsIE) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_ADDEMSINFORMATIONELEMENTL_1, "CSmsMessage::AddEMSInformationElementL()"); + LOGGSMU1("CSmsMessage::AddEMSInformationElementL()"); if(aEmsIE.StartPosition() > (TUint)iBuffer->Length()) { @@ -2708,7 +2715,7 @@ TBool CSmsMessage::CanBeRemoved(const CEmsInformationElement& aIE, const TUint aIEIndex) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_CANBEREMOVED_1, "CSmsMessage::CanBeRemoved()"); + LOGGSMU1("CSmsMessage::CanBeRemoved()"); TBool ret=ETrue; if(CSmsInformationElement::ESmsEnhancedODI == aIE.Identifier()) @@ -2733,7 +2740,7 @@ } } - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_CANBEREMOVED_2, "CSmsMessage::CanBeRemoved() returns %d", ret); + LOGGSMU2("CSmsMessage::CanBeRemoved() returns %d", ret); return ret; } // CSmsMessage::CanBeRemoved @@ -2746,7 +2753,7 @@ */ void CSmsMessage::AddEmsUserPromptL(const CEmsUserPrompt& aUserPromptIE) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ADDEMSUSERPROMPTL_1, "CSmsMessage::AddEmsUserPromptL()"); + LOGGSMU1("CSmsMessage::AddEmsUserPromptL()"); if(aUserPromptIE.ObjectCount() == 0 )User::Leave(KErrArgument); @@ -2823,7 +2830,7 @@ */ void CSmsMessage::AddEmsObjectDistributionL(const CEmsObjectDistribution& aObjectDistributionIE) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ADDEMSOBJECTDISTRIBUTIONL_1, "CSmsMessage::AddEmsObjectDistributionL()"); + LOGGSMU1("CSmsMessage::AddEmsObjectDistributionL()"); TUint count=iInformationElementArray->Count(); TUint objectDistributionStartPosition=aObjectDistributionIE.StartPosition(); @@ -2875,7 +2882,7 @@ */ EXPORT_C CEmsInformationElement* CSmsMessage::RemoveEMSInformationElementL(const TUint aStartPosition,const TSmsId aEmsId) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_REMOVEEMSINFORMATIONELEMENTL_1, "CSmsMessage::RemoveEMSInformationElementL()"); + LOGGSMU1("CSmsMessage::RemoveEMSInformationElementL()"); CEmsInformationElement* emsIE=NULL; CEmsInformationElement* ie=NULL; @@ -2913,7 +2920,7 @@ */ EXPORT_C RPointerArray* CSmsMessage::RemoveEMSInformationElementsL(const TUint aStartPosition,const TSmsId aEmsId) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_REMOVEEMSINFORMATIONELEMENTSL_1, "CSmsMessage::RemoveEMSInformationElementsL()"); + LOGGSMU1("CSmsMessage::RemoveEMSInformationElementsL()"); CEmsInformationElement* ie=NULL; RPointerArray* selectedIEs = NULL; @@ -2944,7 +2951,7 @@ */ EXPORT_C void CSmsMessage::ResetEMSL() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_RESETEMSL_1, "CSmsMessage::ResetEMSL()"); + LOGGSMU1("CSmsMessage::ResetEMSL()"); iInformationElementArray->ResetAndDestroy(); } // CSmsMessage::ResetEMSL @@ -2958,7 +2965,7 @@ */ EXPORT_C const RPointerArray& CSmsMessage::GetEMSInformationElementsL()const { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_GETEMSINFORMATIONELEMENTSL_1, "CSmsMessage::GetEMSInformationElementsL()"); + LOGGSMU1("CSmsMessage::GetEMSInformationElementsL()"); return (const RPointerArray&)(*iInformationElementArray); } // CSmsMessage::GetEMSInformationElementsL @@ -2966,7 +2973,7 @@ void CSmsMessage::UpdateUserPromptAndODIElementsStartPosition() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_UPDATEUSERPROMPTANDODIELEMENTSSTARTPOSITION_1, "CSmsMessage::UpdateUserPromptAndODIElementsStartPosition()"); + LOGGSMU1("CSmsMessage::UpdateUserPromptAndODIElementsStartPosition()"); TUint num=iInformationElementArray->Count(); TInt startPosition=-1; @@ -2994,7 +3001,7 @@ TInt CSmsMessage::AddReceivedEmsInformationElement(CEmsInformationElement* aEmsIE) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_ADDRECEIVEDEMSINFORMATIONELEMENT_1, "CSmsMessage::AddReceivedEmsInformationElement()"); + LOGGSMU1("CSmsMessage::AddReceivedEmsInformationElement()"); TInt ret=KErrNone; if(CSmsInformationElement::ESmsEnhancedUserPromptIndicator == aEmsIE->Identifier() || CSmsInformationElement::ESmsEnhancedODI == aEmsIE->Identifier()) @@ -3027,7 +3034,7 @@ */ EXPORT_C void CSmsMessage::UpdateSlotsL(TDesC8& aDesc) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_UPDATESLOTSL_1, "CSmsMessage::UpdateSlotsL()"); + LOGGSMU1("CSmsMessage::UpdateSlotsL()"); TGsmSmsSlotEntry newSlot; @@ -3070,7 +3077,7 @@ */ EXPORT_C void CSmsMessage::CopyEmsElementsL(CSmsMessage& aToMessage) const { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_COPYEMSELEMENTSL_1, "CSmsMessage::CopyEmsElementsL()"); + LOGGSMU1("CSmsMessage::CopyEmsElementsL()"); // CSmsMessage extended EMS API method creates array of references to EMS elements in // the source message @@ -3092,7 +3099,7 @@ */ EXPORT_C void CSmsMessage::AddSlotL(const TGsmSmsSlotEntry& aSlot) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_ADDSLOTL_1, "CSmsMessage::AddSlotL()"); + LOGGSMU1("CSmsMessage::AddSlotL()"); TInt count = iSlotArray.Count(); TInt i(0); @@ -3102,8 +3109,8 @@ if(aSlot.iIndex == iSlotArray[i].iIndex)found=ETrue; else ++i; } - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_ADDSLOTL_2, "CSmsMessage::AddSlotL current no in: %d, adds index %d", count,aSlot.iIndex ); - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_ADDSLOTL_3, "found %d at position %d",found,i); + LOGGSMU3("CSmsMessage::AddSlotL current no in: %d, adds index %d", count,aSlot.iIndex ); + LOGGSMU3("found %d at position %d",found,i); iSlotArray.AppendL(aSlot); } // CSmsMessage::AddSlotL @@ -3112,7 +3119,7 @@ */ EXPORT_C TBool CSmsMessage::MatchSlots(const CArrayFixFlat& aSlotArray) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_MATCHSLOTS_1, "CSmsMessage::MatchSlots()"); + LOGGSMU1("CSmsMessage::MatchSlots()"); TBool match = EFalse; TInt count = aSlotArray.Count(); @@ -3173,7 +3180,7 @@ void CSmsMessage::InstallEmailHeaderInformationElementL(CSmsUserData& aUserData,TInt& aHeaderLength) { // Installs all the information elements within the subsequent PDUs. - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_INSTALLEMAILHEADERINFORMATIONELEMENTL_1, "CSmsMessage::InstallEmailHeaderInformationElementL()"); + LOGGSMU1("CSmsMessage::InstallEmailHeaderInformationElementL()"); CSmsInformationElement::TSmsInformationElementIdentifier id; @@ -3202,7 +3209,7 @@ // but cannot be removed as impacts public header. BULLSEYE_OFF // Installs all the information elements within the subsequent PDUs. - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_INSTALLEMAILHEADERINFORMATIONELEMENTL1_1, "CSmsMessage::InstallEmailHeaderInformationElementL()"); + LOGGSMU1("CSmsMessage::InstallEmailHeaderInformationElementL()"); CSmsInformationElement::TSmsInformationElementIdentifier id; @@ -3233,7 +3240,7 @@ */ EXPORT_C void CSmsMessage::AddEmailHeaderL(const TDesC& aEmailHeader, const TDesC& aEmailBody) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_ADDEMAILHEADERL_1, "CSmsMessage::AddEmailHeaderL()"); + LOGGSMU1("CSmsMessage::AddEmailHeaderL()"); if(IsEmailHeader()) User::Leave(KErrAlreadyExists); @@ -3281,7 +3288,7 @@ */ EXPORT_C TBool CSmsMessage::IsEmailHeader() const { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_ISEMAILHEADER_1, "CSmsMessage::IsEmailHeader()"); + LOGGSMU1("CSmsMessage::IsEmailHeader()"); TInt emailIndex; return SmsPDU().UserData().InformationElementIndex(CSmsInformationElement::ESmsIEIRFC822EmailHeader,emailIndex); @@ -3300,7 +3307,7 @@ */ EXPORT_C TBool CSmsMessage::GetEmailHeaderL(HBufC** aEmailHeader,HBufC** aEmailBody) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_GETEMAILHEADERL_1, "CSmsMessage::GetEmailHeaderL()"); + LOGGSMU1("CSmsMessage::GetEmailHeaderL()"); if(IsEmailHeader()) { @@ -3347,7 +3354,7 @@ */ EXPORT_C TTimeIntervalSeconds CSmsMessage::UTCOffset() const { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_UTCOFFSET_1, "CSmsMessage::UTCOffset()"); + LOGGSMU1("CSmsMessage::UTCOffset()"); TUint timeZoneOffset = ((iFlags & ESmsUTCOffsetSecondGranularityMask) >> ESecondBitOffset); @@ -3373,7 +3380,7 @@ */ EXPORT_C TBool CSmsMessage::SetUTCOffset(const TTimeIntervalSeconds& aTimeOffset) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_SETUTCOFFSET_1, "CSmsMessage::SetUTCOffset()"); + LOGGSMU1("CSmsMessage::SetUTCOffset()"); TBool rc = ETrue; @@ -3396,7 +3403,7 @@ } else { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_SETUTCOFFSET_2, "CSmsMessage::SetUTCOffset offset [out of range] = %d",timeOffset); + LOGGSMU2("CSmsMessage::SetUTCOffset offset [out of range] = %d",timeOffset); rc = EFalse; } @@ -3410,7 +3417,7 @@ */ EXPORT_C TInt CSmsMessage::Version() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_VERSION_1, "CSmsMessage::Version()"); + LOGGSMU1("CSmsMessage::Version()"); return iVersion; } // CSmsMessage::Version @@ -3426,7 +3433,7 @@ */ EXPORT_C TInt CSmsMessage::SetVersion(TInt aVersion) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_SETVERSION_1, "CSmsMessage::SetVersion(), version = %d", aVersion); + LOGGSMU2("CSmsMessage::SetVersion()", aVersion); if((aVersion>=ESmsMessageV0) && (aVersion<=ESmsMessageV4)) { @@ -3449,7 +3456,7 @@ */ EXPORT_C void CSmsMessage::InternalizeWithoutBufferAndVersionL(RReadStream& aStream) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_INTERNALIZEWITHOUTBUFFERANDVERSIONL_1, "CSmsMessage::InternalizeWithoutBufferAndVersionL()"); + LOGGSMU1("CSmsMessage::InternalizeWithoutBufferAndVersionL()"); iFlags=aStream.ReadInt32L(); iStatus=(NMobileSmsStore::TMobileSmsStoreStatus) aStream.ReadInt32L(); @@ -3489,7 +3496,7 @@ */ EXPORT_C void CSmsMessage::ExternalizeWithoutBufferAndVersionL(RWriteStream& aStream) const { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_EXTERNALIZEWITHOUTBUFFERANDVERSIONL_1, "CSmsMessage::ExternalizeWithoutBufferAndVersionL()"); + LOGGSMU1("CSmsMessage::ExternalizeWithoutBufferAndVersionL()"); aStream.WriteInt32L(iFlags); aStream.WriteInt32L(iStatus); @@ -3585,11 +3592,11 @@ */ EXPORT_C CSmsIEOperation& CSmsMessage::GetOperationsForIEL(CSmsInformationElement::TSmsInformationElementIdentifier aId) const { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_GETOPERATIONSFORIEL_1, "CSmsMessage::GetOperationsForIEL()"); + LOGGSMU1("CSmsMessage::GetOperationsForIEL()"); if (iVersion < CSmsMessage::ESmsMessageV1) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_GETOPERATIONSFORIEL_2, "CSmsMessage::GetOperationsForIEL, Operation not supported, Msg Version %d", iVersion); + LOGGSMU2("CSmsMessage::GetOperationsForIEL, Operation not supported, Msg Version %d", iVersion); User::Leave(KErrNotSupported); } @@ -3598,11 +3605,11 @@ EXPORT_C CSmsNonIEOperation& CSmsMessage::GetOperationsForNonIEL(TSmsNonIEIdentifier aId) const { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_GETOPERATIONSFORNONIEL_1, "CSmsMessage::GetOperationsForNonIEL"); + LOGGSMU1("CSmsMessage::GetOperationsForNonIEL"); if (iVersion < CSmsMessage::ESmsMessageV2) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_GETOPERATIONSFORNONIEL_2, "GetOperationsForNonIEL not supported, Msg Version %d", iVersion); + LOGGSMU2("GetOperationsForNonIEL not supported, Msg Version %d", iVersion); User::Leave(KErrNotSupported); } @@ -3612,7 +3619,7 @@ void CSmsMessage::CreateControlIEOperationsClassesL() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSMESSAGE_CREATECONTROLIEOPERATIONSCLASSESL_1, "CSmsMessage::CreateControlIEOperationsClassesL()"); + LOGGSMU1("CSmsMessage::CreateControlIEOperationsClassesL()"); CSmsIEOperation* iEOperation = NULL; @@ -3669,7 +3676,7 @@ */ EXPORT_C void CSmsMessage::SetDecodedOnSIM(TBool aOnSim) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_SETDECODEDONSIM_1, "CSmsMessage::SetDecodedOnSIM(): %d", aOnSim); + LOGGSMU2("CSmsMessage::SetDecodedOnSIM(): %d", aOnSim); if (aOnSim) { @@ -3697,7 +3704,7 @@ */ EXPORT_C TBool CSmsMessage::DecodedOnSim() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_DECODEDONSIM_1, "CSmsMessage::DecodedOnSim()"); + LOGGSMU1("CSmsMessage::DecodedOnSim()"); if (iFlags & EDecodedOnSimBit) { @@ -3723,7 +3730,7 @@ */ EXPORT_C void CSmsMessage::SetForwardToClient(TBool aForward) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_SETFORWARDTOCLIENT_1, "CSmsMessage::SetForwardToClient(): %d", aForward); + LOGGSMU2("CSmsMessage::SetForwardToClient(): %d", aForward); if (aForward) { @@ -3750,7 +3757,7 @@ */ EXPORT_C TBool CSmsMessage::ForwardToClient() { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSMESSAGE_FORWARDTOCLIENT_1, "CSmsMessage::ForwardToClient()"); + LOGGSMU1("CSmsMessage::ForwardToClient()"); if (iFlags & EForwardToClientBit) {