diff -r 17af172ffa5f -r 630d2f34d719 smsprotocols/smsstack/gsmu/src/Gsmuelem.cpp --- a/smsprotocols/smsstack/gsmu/src/Gsmuelem.cpp Thu Aug 19 11:03:36 2010 +0300 +++ b/smsprotocols/smsstack/gsmu/src/Gsmuelem.cpp Tue Aug 31 16:23:08 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 "GsmuelemTraces.h" +#endif + #include #include #include "Gsmumain.h" @@ -182,7 +188,7 @@ CSmsCommandData* CSmsCommandData::NewL(TSmsFirstOctet& aFirstOctet) { - LOGGSMU1("CSmsCommandData::NewL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_NEWL_1, "CSmsCommandData::NewL()"); CSmsCommandData* commanddata=new(ELeave) CSmsCommandData(aFirstOctet); CleanupStack::PushL(commanddata); @@ -207,7 +213,7 @@ */ CSmsCommandData* CSmsCommandData::DuplicateL() const { - LOGGSMU1("CSmsCommandData::DuplicateL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_DUPLICATEL_1, "CSmsCommandData::DuplicateL()"); CSmsCommandData* smsCommandData = CSmsCommandData::NewL(iFirstOctet); CleanupStack::PushL(smsCommandData); @@ -228,7 +234,7 @@ CSmsInformationElement& CSmsCommandData::InformationElement(TInt aIndex) const { - LOGGSMU1("CSmsCommandData::InformationElement()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_INFORMATIONELEMENT_1, "CSmsCommandData::InformationElement()"); CSmsInformationElement* ie=iInformationElementArray[aIndex]; return *ie; @@ -240,7 +246,7 @@ // Ignore in code coverage - not used in SMS stack and not exported // but cannot be removed as impacts public header. BULLSEYE_OFF - LOGGSMU1("CSmsCommandData::InformationElementPtr()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_INFORMATIONELEMENTPTR_1, "CSmsCommandData::InformationElementPtr()"); return iInformationElementArray[aIndex]; BULLSEYE_RESTORE } @@ -248,7 +254,7 @@ TBool CSmsCommandData::InformationElementIndex(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier, TInt& aIndex) const { - LOGGSMU1("CSmsCommandData::InformationElementIndex()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_INFORMATIONELEMENTINDEX_1, "CSmsCommandData::InformationElementIndex()"); TBool found=EFalse; TInt count=NumInformationElements(); @@ -264,7 +270,7 @@ void CSmsCommandData::AddInformationElementL(const TSmsId aIdentifier,const TDesC8& aData) { - LOGGSMU1("CSmsCommandData::AddInformationElementL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_ADDINFORMATIONELEMENTL_1, "CSmsCommandData::AddInformationElementL()"); // // Currently there is no restriction on how many instances of an information element can be @@ -284,7 +290,7 @@ void CSmsCommandData::RemoveInformationElement(TInt aIndex) { - LOGGSMU1("CSmsCommandData::RemoveInformationElement()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_REMOVEINFORMATIONELEMENT_1, "CSmsCommandData::RemoveInformationElement()"); // Since iInformationElementArray[aIndex] is removed from iInformationElementArray, no double free issue. // coverity[double_free] delete iInformationElementArray[aIndex]; @@ -300,7 +306,7 @@ TPtrC8 CSmsCommandData::Data() const { - LOGGSMU1("CSmsCommandData::Data()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_DATA_1, "CSmsCommandData::Data()"); TPtrC8 ptr; ptr.Set(iBuffer->Des()); @@ -310,7 +316,7 @@ void CSmsCommandData::SetDataL(const TDesC8& aData) { - LOGGSMU1("CSmsCommandData::SetDataL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_SETDATAL_1, "CSmsCommandData::SetDataL()"); TInt length=aData.Length(); __ASSERT_DEBUG(length<=KSmsMaxDataSize,Panic(KGsmuPanicCommandDataLengthTooLong)); @@ -324,7 +330,7 @@ TUint8* CSmsCommandData::EncodeL(TUint8* aPtr) const { - LOGGSMU1("CSmsCommandData::EncodeL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_ENCODEL_1, "CSmsCommandData::EncodeL()"); __ASSERT_DEBUG(iBuffer->Length()<=MaxDataLength(),Panic(KGsmuPanicCommandDataBufferTooLong)); TSmsOctet datalength=iBuffer->Length()+TSmsOctet(TotalHeaderLengthInUDLUnits()); @@ -349,7 +355,7 @@ void CSmsCommandData::DecodeL(TGsmuLex8& aPdu) { - LOGGSMU1("CSmsCommandData::DecodeL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_DECODEL_1, "CSmsCommandData::DecodeL()"); iInformationElementArray.ResetAndDestroy(); const TBool headerPresent=HeaderPresent(); @@ -417,7 +423,7 @@ TInt CSmsCommandData::HeaderLength() const { - LOGGSMU1("CSmsCommandData::HeaderLength()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMANDDATA_HEADERLENGTH_1, "CSmsCommandData::HeaderLength()"); TInt headerLength=0; for (TInt i=0; iDes()); - TPtr backToUnicodeAfterStd(backToUnicodeAfterStdBuf->Des()); - - // - // Convert the input string to standard 7bit (with downgrades if needed)... - // - PrepareForConversionFromNativeL(ESmsEncodingNone); - - TInt notConverted = iCharacterSetConverter.ConvertFromUnicode(encoded, aDes); - - if (notConverted > 0) - { - aNumberOfUnconvertibleCharacters += notConverted; - } - else if (notConverted < 0) - { - aNumberOfUnconvertibleCharacters = desLength; - } - - // - // Convert it back again to the native format... - // - TInt state = CCnvCharacterSetConverter::KStateDefault; - TInt notRestored = iCharacterSetConverter.ConvertToUnicode(backToUnicodeAfterStd, encoded, state); - - if (notRestored > 0) - { - aNumberOfUnconvertibleCharacters += notRestored; - } - else if (notRestored < 0) - { - aNumberOfUnconvertibleCharacters = desLength; - } // - // Work out if the string is acceptable as it is (e.g. no unconvertible - // and no downgrades). We only need do this if the previous conversions were - // complete with no issues. + // Create buffer for restored text string... + // + HBufC* backToUnicodeAfterStdBuf = HBufC::NewLC(desLength); + TPtr backToUnicodeAfterStd(backToUnicodeAfterStdBuf->Des()); + // - for (TInt pos = desLength-1; pos >= 0; --pos) - { - if (backToUnicodeAfterStd[pos] != aDes[pos]) - { - aNumberOfUnconvertibleCharacters++; - aIndexOfFirstUnconvertibleCharacter = pos; - } - } - + // Convert the string... + // + TInt numberOfDowngradedCharacters; + TBool isCountDowngrade = EFalse; // Don't count downgrades + ConvertWith7BitEncodingL(aDes, backToUnicodeAfterStd, + aNumberOfUnconvertibleCharacters, numberOfDowngradedCharacters, + aIndexOfFirstUnconvertibleCharacter, isCountDowngrade); + CleanupStack::PopAndDestroy(backToUnicodeAfterStdBuf); - CleanupStack::PopAndDestroy(encodedBuf); - // - // Useful logging... - // TBool supported = (aNumberOfUnconvertibleCharacters == 0); - LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): aNumberOfUnconvertibleCharacters=%d.", aNumberOfUnconvertibleCharacters); - LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): aIndexOfFirstUnconvertibleCharacter=%d.", aIndexOfFirstUnconvertibleCharacter); - LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): supported=%d.", supported); - - return supported; - } // CSmsAlphabetConverter::IsSupportedL - - -/** - * Tests if the character is supported by the current character set. - * This function can be used with 7bit and 8bit alphabets. - * - * @param aChar Character to investigate. - * @param aEncoding Alternative 7bit encoding (if used). - * @param aIsDowngrade Exit param set to ETrue if the - * character has to be downgraded. - * @param aRequiresAlternativeEncoding Exit param set to ETrue if the - * alternative encoding has to be - * used to encode it. - * - * @return ETrue if the character is supported. - */ -TBool CSmsAlphabetConverter::IsSupportedL(TChar aChar, TSmsEncoding aEncoding, - TBool& aIsDowngrade, - TBool& aRequiresAlternativeEncoding) - { - LOGGSMU2("[3] CSmsAlphabetConverter::IsSupportedL(aChar=0x%04x)", (TUint) aChar); - - // - // Convert the character... - // - TInt numberOfUnconvertibleCharacters, numberOfDowngradedCharacters, - numberRequiringAlternativeEncoding, indexOfFirstUnconvertibleCharacter; - TBuf<4> toEncode; - - toEncode.SetLength(1); - toEncode[0]=(TText)aChar; - - TBool supported = IsSupportedL(toEncode, aEncoding, - numberOfUnconvertibleCharacters, - numberOfDowngradedCharacters, - numberRequiringAlternativeEncoding, - indexOfFirstUnconvertibleCharacter); - - // - // Calculate the exit params... - // - aIsDowngrade = (numberOfDowngradedCharacters > 0); - aRequiresAlternativeEncoding = (numberRequiringAlternativeEncoding > 0); - - // - // Useful logging... - // - LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): aIsDowngrade=%d.", aIsDowngrade); - LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): aRequiresAlternativeEncoding=%d.", aRequiresAlternativeEncoding); - LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): supported=%d.", supported); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL_2, "CSmsAlphabetConverter::IsSupportedL(): aNumberOfUnconvertibleCharacters=%d.", aNumberOfUnconvertibleCharacters); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL_3, "CSmsAlphabetConverter::IsSupportedL(): aIndexOfFirstUnconvertibleCharacter=%d.", aIndexOfFirstUnconvertibleCharacter); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL_4, "CSmsAlphabetConverter::IsSupportedL(): supported=%d.", supported); return supported; } // CSmsAlphabetConverter::IsSupportedL @@ -1590,77 +1468,28 @@ TInt& aNumberRequiringAlternativeEncoding, TInt& aIndexOfFirstUnconvertibleCharacter) { - LOGGSMU2("[4] CSmsAlphabetConverter::IsSupportedL(aDes=\"%S\")", &aDes); + OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL1_1, "[2] CSmsAlphabetConverter::IsSupportedL(aDes=\"%S\")", aDes); TInt desLength = aDes.Length(); // - // Initialise the exit params... + // Initialise the exit param... // - aNumberOfUnconvertibleCharacters = 0; - aNumberOfDowngradedCharacters = 0; aNumberRequiringAlternativeEncoding = 0; - aIndexOfFirstUnconvertibleCharacter = desLength; // - // Create buffers for the input converted to 7Bit and a buffer for it once - // converted back again... + // Create buffer for restored text string... // - HBufC8* encodedBuf = HBufC8::NewLC(desLength*2); // worse case HBufC* backToUnicodeAfterStdBuf = HBufC::NewLC(desLength); - TPtr8 encoded(encodedBuf->Des()); TPtr backToUnicodeAfterStd(backToUnicodeAfterStdBuf->Des()); - - // - // Convert the input string to standard 7bit (with downgrades if needed)... - // - PrepareForConversionFromNativeL(ESmsEncodingNone); - - TInt notConverted = iCharacterSetConverter.ConvertFromUnicode(encoded, aDes); - - if (notConverted > 0) - { - aNumberOfUnconvertibleCharacters += notConverted; - } - else if (notConverted < 0) - { - aNumberOfUnconvertibleCharacters = desLength; - } + TBool isCountDowngrade = ETrue; // Count downgraded chars // - // Convert it back again to the native format... - // - TInt state = CCnvCharacterSetConverter::KStateDefault; - TInt notRestored = iCharacterSetConverter.ConvertToUnicode(backToUnicodeAfterStd, encoded, state); - - if (notRestored > 0) - { - aNumberOfUnconvertibleCharacters += notRestored; - } - else if (notRestored < 0) - { - aNumberOfUnconvertibleCharacters = desLength; - } - - // - // Work out if the string is acceptable as it is (e.g. no unconvertible - // and no downgrades). - // - for (TInt pos = desLength-1; pos >= 0; --pos) - { - if (backToUnicodeAfterStd[pos] != aDes[pos]) - { - if (backToUnicodeAfterStd[pos] != KReplacementCharacter) - { - aNumberOfDowngradedCharacters++; - } - else - { - aNumberOfUnconvertibleCharacters++; - aIndexOfFirstUnconvertibleCharacter = pos; - } - } - } - + // Convert the character... + // + ConvertWith7BitEncodingL(aDes, backToUnicodeAfterStd, + aNumberOfUnconvertibleCharacters, aNumberOfDowngradedCharacters, + aIndexOfFirstUnconvertibleCharacter, isCountDowngrade); + TInt totalCharFaultsSoFar = aNumberOfUnconvertibleCharacters + aNumberOfDowngradedCharacters; @@ -1694,73 +1523,12 @@ TInt tmpDowngradedCharacters = 0; TInt tmpUnconvertibleCharacters = 0; TInt tmpIndexOfFirstUnconvertibleCharacter = desLength; - - // - // Convert the input string to the alternative encoding... - // - PrepareForConversionFromNativeL(aEncoding); - - notConverted = iCharacterSetConverter.ConvertFromUnicode(encoded, aDes); - if (notConverted > 0) - { - tmpUnconvertibleCharacters = notConverted; - } - else if (notConverted < 0) - { - tmpUnconvertibleCharacters = desLength; - } - - // - // Convert it back again to the native format... - // - HBufC* backToUnicodeAfterAltBuf = HBufC::NewLC(desLength); - TPtr backToUnicodeAfterAlt(backToUnicodeAfterAltBuf->Des()); - TInt state = CCnvCharacterSetConverter::KStateDefault; - TInt notRestored = iCharacterSetConverter.ConvertToUnicode(backToUnicodeAfterAlt, encoded, state); - - if (notRestored > 0) - { - tmpUnconvertibleCharacters += notRestored; - } - else if (notRestored < 0) - { - tmpUnconvertibleCharacters = desLength; - } - - // - // Now work out which characters are downgrades, require alternative encoding - // or are unsupported. - // - for (TInt pos = desLength-1; pos >= 0; --pos) - { - if (backToUnicodeAfterStd[pos] != aDes[pos]) - { - // Not supported by standard encoder... - if (backToUnicodeAfterAlt[pos] == aDes[pos]) - { - // Supported by alternative encoder... - aNumberRequiringAlternativeEncoding++; - } - else if (backToUnicodeAfterStd[pos] != KReplacementCharacter) - { - // Downgraded by standard encoder... - tmpDowngradedCharacters++; - } - else if (backToUnicodeAfterAlt[pos] != KReplacementCharacter) - { - // Downgraded by alternative encoder... - tmpDowngradedCharacters++; - aNumberRequiringAlternativeEncoding++; - } - else - { - // Unconvertible... - tmpUnconvertibleCharacters++; - tmpIndexOfFirstUnconvertibleCharacter = pos; - } - } - } - + + ConvertWithAlternativeEncodingL(aDes, backToUnicodeAfterStd, aEncoding, + tmpUnconvertibleCharacters, tmpDowngradedCharacters, + aNumberRequiringAlternativeEncoding, + tmpIndexOfFirstUnconvertibleCharacter); + // Is this better? if ( totalCharFaultsSoFar >= (tmpUnconvertibleCharacters + tmpDowngradedCharacters) ) { @@ -1774,29 +1542,238 @@ // Best conversion is the standard conversion aNumberRequiringAlternativeEncoding = 0; } - - CleanupStack::PopAndDestroy(backToUnicodeAfterAltBuf); } - CleanupStack::PopAndDestroy(backToUnicodeAfterStdBuf); - CleanupStack::PopAndDestroy(encodedBuf); - + CleanupStack::PopAndDestroy(backToUnicodeAfterStdBuf); + // // Useful logging... // TBool supported = (aNumberOfUnconvertibleCharacters == 0); - LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): aNumberOfUnconvertibleCharacters=%d.", aNumberOfUnconvertibleCharacters); - LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): aNumberOfDowngradedCharacters=%d.", aNumberOfDowngradedCharacters); - LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): aNumberRequiringAlternativeEncoding=%d.", aNumberRequiringAlternativeEncoding); - LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): aIndexOfFirstUnconvertibleCharacter=%d.", aIndexOfFirstUnconvertibleCharacter); - LOGGSMU2("CSmsAlphabetConverter::IsSupportedL(): supported=%d.", supported); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL1_2, "CSmsAlphabetConverter::IsSupportedL(): aNumberOfUnconvertibleCharacters=%d.", aNumberOfUnconvertibleCharacters); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL1_3, "CSmsAlphabetConverter::IsSupportedL(): aNumberOfDowngradedCharacters=%d.", aNumberOfDowngradedCharacters); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL1_4, "CSmsAlphabetConverter::IsSupportedL(): aNumberRequiringAlternativeEncoding=%d.", aNumberRequiringAlternativeEncoding); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL1_5, "CSmsAlphabetConverter::IsSupportedL(): aIndexOfFirstUnconvertibleCharacter=%d.", aIndexOfFirstUnconvertibleCharacter); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_ISSUPPORTEDL1_6, "CSmsAlphabetConverter::IsSupportedL(): supported=%d.", supported); return supported; } // CSmsAlphabetConverter::IsSupportedL /** + * Tests if the descriptor text is supported by the current character set. + * + * @param aDes Text string to check. + * @param aRestoredDes Exit restored text string after conversion. + * @param aNumberOfUnconvertibleCharacters Exit param for the number of + * characters unconvertible. + * @param aNumberOfDowngradedCharacters Exit param for the number of + * downgraded characters. + * @param aIndexOfFirstUnconvertibleCharacter Exit param for the first + * unconverted character. + * @param aIsCountDowngrade Flag for counting downgrades. + */ +void CSmsAlphabetConverter::ConvertWith7BitEncodingL(const TDesC& aDes, TDes& aRestoredDes, + TInt& aNumberOfUnconvertibleCharacters, + TInt& aNumberOfDowngradedCharacters, + TInt& aIndexOfFirstUnconvertibleCharacter, + TBool aIsCountDowngrade) + { + OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_CONVERTWITH7BITENCODINGL_1, "CSmsAlphabetConverter::ConvertWith7BitEncodingL(aDes=\"%S\")", aDes); + + TInt desLength = aDes.Length(); + // + // Initialise the exit params... + // + aNumberOfUnconvertibleCharacters = 0; + aNumberOfDowngradedCharacters = 0; + aIndexOfFirstUnconvertibleCharacter = desLength; + + // + // Create buffer for the input converted to 7Bit. + // + HBufC8* encodedBuf = HBufC8::NewLC(desLength*2); // worse case + TPtr8 encoded(encodedBuf->Des()); + + // + // Convert the input string to standard 7bit (with downgrades if needed)... + // + PrepareForConversionFromNativeL(ESmsEncodingNone); + + TInt notConverted = iCharacterSetConverter.ConvertFromUnicode(encoded, aDes); + + if (notConverted > 0) + { + aNumberOfUnconvertibleCharacters += notConverted; + } + else if (notConverted < 0) + { + aNumberOfUnconvertibleCharacters = desLength; + } + + // + // Convert it back again to the native format... + // + TInt state = CCnvCharacterSetConverter::KStateDefault; + TInt notRestored = iCharacterSetConverter.ConvertToUnicode(aRestoredDes, encoded, state); + + if (notRestored > 0) + { + aNumberOfUnconvertibleCharacters += notRestored; + } + else if (notRestored < 0) + { + aNumberOfUnconvertibleCharacters = desLength; + } + + // + // Work out if the string is acceptable as it is (e.g. no unconvertible + // and no downgrades). + // + for (TInt pos = desLength-1; pos >= 0; --pos) + { + if (aRestoredDes[pos] != aDes[pos]) + { + if (aRestoredDes[pos] != KReplacementCharacter + && aIsCountDowngrade) + { + ++aNumberOfDowngradedCharacters; + } + else + { + ++aNumberOfUnconvertibleCharacters; + aIndexOfFirstUnconvertibleCharacter = pos; + } + } + } + + CleanupStack::PopAndDestroy(encodedBuf); + + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_CONVERTWITH7BITENCODINGL_2, "CSmsAlphabetConverter::ConvertWith7BitEncodingL(): aNumberOfUnconvertibleCharacters=%d.", aNumberOfUnconvertibleCharacters); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_CONVERTWITH7BITENCODINGL_3, "CSmsAlphabetConverter::ConvertWith7BitEncodingL(): aNumberOfDowngradedCharacters=%d.", aNumberOfDowngradedCharacters); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_CONVERTWITH7BITENCODINGL_4, "CSmsAlphabetConverter::ConvertWith7BitEncodingL(): aIndexOfFirstUnconvertibleCharacter=%d.", aIndexOfFirstUnconvertibleCharacter); + } // CSmsAlphabetConverter::ConvertWith7BitEncodingL + +/** + * Tests if the descriptor text is supported by given encoding. + * This function can be used with 7bit and 8bit alphabets. + * + * @param aDes Text string to check. + * @param aRestoredStdDes Text string restored from 7bit encoding. + * @param aEncoding Alternative 7bit encoding. + * @param aNumberOfUnconvertibleCharacters Exit param for the number of + * characters unconvertible. + * @param aNumberOfDowngradedCharacters Exit param for the number of + * downgraded characters. + * @param aNumberRequiringAlternativeEncoding Exit param for the number of + * characters requiring use of + * the alternative encoder. + * @param aIndexOfFirstUnconvertibleCharacter Exit param for the first + */ +void CSmsAlphabetConverter::ConvertWithAlternativeEncodingL(const TDesC& aDes, const TDesC& aRestoredStdDes, + TSmsEncoding aEncoding, + TInt& aNumberOfUnconvertibleCharacters, + TInt& aNumberOfDowngradedCharacters, + TInt& aNumberRequiringAlternativeEncoding, + TInt& aIndexOfFirstUnconvertibleCharacter) + { + OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_CONVERTWITHALTERNATIVEEENCODINGL_1, "CSmsAlphabetConverter::ConvertWithAlternativeEncodingL(aDes=\"%S\")", aDes); + + TInt desLength = aDes.Length(); + // + // Initialise the exit params... + // + aNumberOfUnconvertibleCharacters = 0; + aNumberOfDowngradedCharacters = 0; + aNumberRequiringAlternativeEncoding = 0; + aIndexOfFirstUnconvertibleCharacter = desLength; + + // + // Create buffer for the input converted to 7Bit. + // + HBufC8* encodedBuf = HBufC8::NewLC(desLength*2); // worse case + TPtr8 encoded(encodedBuf->Des()); + + // + // Convert the input string to the alternative encoding... + // + PrepareForConversionFromNativeL(aEncoding); + + TInt notConverted = iCharacterSetConverter.ConvertFromUnicode(encoded, aDes); + if (notConverted > 0) + { + aNumberOfUnconvertibleCharacters = notConverted; + } + else if (notConverted < 0) + { + aNumberOfUnconvertibleCharacters = desLength; + } + + // + // Create buffer for restored text... + // + HBufC* backToUnicodeBuf = HBufC::NewLC(desLength); + TPtr backToUnicode(backToUnicodeBuf->Des()); + + // + // Convert it back again to the native format... + // + TInt state = CCnvCharacterSetConverter::KStateDefault; + TInt notRestored = iCharacterSetConverter.ConvertToUnicode(backToUnicode, encoded, state); + + if (notRestored > 0) + { + aNumberOfUnconvertibleCharacters += notRestored; + } + else if (notRestored < 0) + { + aNumberOfUnconvertibleCharacters = desLength; + } + + // + // Now work out which characters are downgrades, require alternative encoding + // or are unsupported. + // + for (TInt pos = desLength-1; pos >= 0; --pos) + { + if (aRestoredStdDes[pos] != aDes[pos]) + { + // Not supported by standard encoder... + if (backToUnicode[pos] == aDes[pos]) + { + // Supported by alternative encoder... + ++aNumberRequiringAlternativeEncoding; + } + else if (aRestoredStdDes[pos] != KReplacementCharacter) + { + // Downgraded by standard encoder... + ++aNumberOfDowngradedCharacters; + } + else if (backToUnicode[pos] != KReplacementCharacter) + { + // Downgraded by alternative encoder... + ++aNumberOfDowngradedCharacters; + ++aNumberRequiringAlternativeEncoding; + } + else + { + // Unconvertible... + ++aNumberOfUnconvertibleCharacters; + aIndexOfFirstUnconvertibleCharacter = pos; + } + } + } + + CleanupStack::PopAndDestroy(2, encodedBuf); // backToUnicode, encodedBuf + + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_CONVERTWITHALTERNATIVEEENCODINGL_2, "CSmsAlphabetConverter::ConvertWithAlternativeEncodingL(): aNumberOfUnconvertibleCharacters=%d.", aNumberOfUnconvertibleCharacters); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_CONVERTWITHALTERNATIVEEENCODINGL_3, "CSmsAlphabetConverter::ConvertWithAlternativeEncodingL(): aNumberOfDowngradedCharacters=%d.", aNumberOfDowngradedCharacters); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_CONVERTWITHALTERNATIVEEENCODINGL_4, "CSmsAlphabetConverter::ConvertWithAlternativeEncodingL(): aNumberRequiringAlternativeEncoding=%d.", aNumberRequiringAlternativeEncoding); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_CONVERTWITHALTERNATIVEEENCODINGL_5, "CSmsAlphabetConverter::ConvertWithAlternativeEncodingL(): aIndexOfFirstUnconvertibleCharacter=%d.", aIndexOfFirstUnconvertibleCharacter); + } // CSmsAlphabetConverter::ConvertWithAlternativeEncodingL + +/** * Given a piece of text and an alternative encoding, this function works out * which encoding is best to use and returns the ID of that converter. * @@ -1808,8 +1785,7 @@ TSmsEncoding CSmsAlphabetConverter::FindBestAlternativeEncodingL(const TDesC& aNativeCharacters, TSmsEncoding aSuggestedEncoding) { - LOGGSMU2("CSmsAlphabetConverter::FindBestAlternativeEncodingL(): aSuggestedEncoding=%d", - aSuggestedEncoding); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_FINDBESTALTERNATIVEENCODINGL_1, "CSmsAlphabetConverter::FindBestAlternativeEncodingL(): aSuggestedEncoding=%d",aSuggestedEncoding); TSmsEncoding encodingToUse = ESmsEncodingNone; @@ -1820,6 +1796,7 @@ if (aSuggestedEncoding != ESmsEncodingNone && iSmsAlphabet == TSmsDataCodingScheme::ESmsAlphabet7Bit) { + TInt desLength = aNativeCharacters.Length(); TInt numberOfUnconvertibleCharacters, numberOfDowngradedCharacters; TInt numberRequiringAlternativeEncoding, indexOfFirstUnconvertibleCharacter; @@ -1827,53 +1804,62 @@ // First try the default encoding (but in this case treat downgrades // as unconverted, since later encoders might do better)... // - IsSupportedL(aNativeCharacters, ESmsEncodingNone, - numberOfUnconvertibleCharacters, - numberOfDowngradedCharacters, - numberRequiringAlternativeEncoding, - indexOfFirstUnconvertibleCharacter); + HBufC* backToUnicodeAfterStdBuf = HBufC::NewLC(desLength); + TPtr backToUnicodeAfterStd(backToUnicodeAfterStdBuf->Des()); + TBool isCountDowngrade = ETrue; // Count downgraded chars + + ConvertWith7BitEncodingL(aNativeCharacters, backToUnicodeAfterStd, + numberOfUnconvertibleCharacters, numberOfDowngradedCharacters, + indexOfFirstUnconvertibleCharacter, isCountDowngrade); + TInt leastUnconvertibleCharacters = numberOfUnconvertibleCharacters + numberOfDowngradedCharacters; - // - // Create a list of alternative encodings to try... - // - TSmsEncoding encodingList[8]; - TInt encodingCount = 0; + if (leastUnconvertibleCharacters > 0) + { + // + // Create a list of alternative encodings to try... + // + TSmsEncoding encodingList[8]; + TInt encodingCount = 0; + + if (aSuggestedEncoding == ESmsEncodingTurkishLockingAndSingleShift) + { + encodingList[encodingCount++] = ESmsEncodingTurkishSingleShift; + encodingList[encodingCount++] = ESmsEncodingTurkishLockingShift; + } + else if (aSuggestedEncoding == ESmsEncodingPortugueseLockingAndSingleShift) + { + encodingList[encodingCount++] = ESmsEncodingPortugueseSingleShift; + encodingList[encodingCount++] = ESmsEncodingPortugueseLockingShift; + } + + encodingList[encodingCount++] = aSuggestedEncoding; + + // + // Now try the all the alternatives... + // + for (TInt encoder = 0; encoder < encodingCount && leastUnconvertibleCharacters > 0; ++encoder) + { + ConvertWithAlternativeEncodingL(aNativeCharacters, backToUnicodeAfterStd, + encodingList[encoder], + numberOfUnconvertibleCharacters, + numberOfDowngradedCharacters, + numberRequiringAlternativeEncoding, + indexOfFirstUnconvertibleCharacter); + + if (numberOfUnconvertibleCharacters + numberOfDowngradedCharacters < leastUnconvertibleCharacters) + { + encodingToUse = encodingList[encoder]; + leastUnconvertibleCharacters = numberOfUnconvertibleCharacters + numberOfDowngradedCharacters; + } + } + } - if (aSuggestedEncoding == ESmsEncodingTurkishLockingAndSingleShift) - { - encodingList[encodingCount++] = ESmsEncodingTurkishSingleShift; - encodingList[encodingCount++] = ESmsEncodingTurkishLockingShift; - } - else if (aSuggestedEncoding == ESmsEncodingPortugueseLockingAndSingleShift) - { - encodingList[encodingCount++] = ESmsEncodingPortugueseSingleShift; - encodingList[encodingCount++] = ESmsEncodingPortugueseLockingShift; - } - - encodingList[encodingCount++] = aSuggestedEncoding; - encodingList[encodingCount++] = ESmsEncodingNone; - - // - // Now try the all the alternatives... - // - for (TInt encoder = 0; encoder < encodingCount; encoder++) - { - IsSupportedL(aNativeCharacters, encodingList[encoder], - numberOfUnconvertibleCharacters, - numberOfDowngradedCharacters, - numberRequiringAlternativeEncoding, - indexOfFirstUnconvertibleCharacter); - if (numberOfUnconvertibleCharacters + numberOfDowngradedCharacters < leastUnconvertibleCharacters) - { - encodingToUse = encodingList[encoder]; - leastUnconvertibleCharacters = numberOfUnconvertibleCharacters + numberOfDowngradedCharacters; - } - } + CleanupStack::PopAndDestroy(backToUnicodeAfterStdBuf); } - LOGGSMU2("CSmsAlphabetConverter::FindBestAlternativeEncodingL(): encodingToUse=%d", encodingToUse); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_FINDBESTALTERNATIVEENCODINGL_2, "CSmsAlphabetConverter::FindBestAlternativeEncodingL(): encodingToUse=%d", encodingToUse); return encodingToUse; } // CSmsAlphabetConverter::FindBestAlternativeEncoding @@ -1917,8 +1903,7 @@ */ void CSmsAlphabetConverter::PrepareForConversionFromNativeL(TSmsEncoding aEncoding) { - LOGGSMU2("CSmsAlphabetConverter::PrepareForConversionFromNativeL(): aEncoding=%d", - aEncoding); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_PREPAREFORCONVERSIONFROMNATIVEL_1, "CSmsAlphabetConverter::PrepareForConversionFromNativeL(): aEncoding=%d",aEncoding); __ASSERT_DEBUG(iIsBinary==EFalse,Panic(KGsmuPanicUnsupportedAlphabet)); switch (iSmsAlphabet) @@ -1938,8 +1923,7 @@ { CCnvCharacterSetConverter::TAvailability availability; - LOGGSMU2("CSmsAlphabetConverter::PrepareForConversionFromNativeL(): Converter 0x%08x", - alternativeEncoderID); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_PREPAREFORCONVERSIONFROMNATIVEL_2, "CSmsAlphabetConverter::PrepareForConversionFromNativeL(): Converter 0x%08x",alternativeEncoderID); availability = iCharacterSetConverter.PrepareToConvertToOrFromL(alternativeEncoderID, iFs); if (availability == CCnvCharacterSetConverter::EAvailable) @@ -2008,8 +1992,7 @@ */ void CSmsAlphabetConverter::PrepareForConversionToNativeL(TSmsEncoding aEncoding) { - LOGGSMU2("CSmsAlphabetConverter::PrepareForConversionToNativeL(): aEncoding=%d", - aEncoding); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_PREPAREFORCONVERSIONTONATIVEL_1, "CSmsAlphabetConverter::PrepareForConversionToNativeL(): aEncoding=%d",aEncoding); switch (iSmsAlphabet) { @@ -2028,8 +2011,7 @@ { CCnvCharacterSetConverter::TAvailability availability; - LOGGSMU2("CSmsAlphabetConverter::PrepareForConversionFromNativeL(): Converter 0x%08x", - alternativeEncoderID); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_PREPAREFORCONVERSIONTONATIVEL_2, "CSmsAlphabetConverter::PrepareForConversionFromNativeL(): Converter 0x%08x",alternativeEncoderID); availability = iCharacterSetConverter.PrepareToConvertToOrFromL(alternativeEncoderID, iFs); if (availability == CCnvCharacterSetConverter::EAvailable) @@ -2084,7 +2066,7 @@ */ void CSmsAlphabetConverter::GetAlternativeEncoderIDL(TSmsEncoding aEncoding, TUint& aEncoderID) const { - LOGGSMU2("CSmsAlphabetConverter::GetAlternativeEncoderIDL(%d)", aEncoding); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_GETALTERNATIVEENCODERIDL_1, "CSmsAlphabetConverter::GetAlternativeEncoderIDL(%d)", aEncoding); aEncoderID = 0; @@ -2157,7 +2139,7 @@ // TPtr16 CSmsAlphabetConverter::CheckAllocBufferL(HBufC16** aBuffer,TInt aMaxLength,TInt aUsedLength) { - LOGGSMU1("CSmsAlphabetConverter::CheckAllocBufferL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_CHECKALLOCBUFFERL_1, "CSmsAlphabetConverter::CheckAllocBufferL()"); if (*aBuffer!=NULL) { @@ -2180,7 +2162,7 @@ // TPtr8 CSmsAlphabetConverter::CheckAllocBufferL(HBufC8** aBuffer,TInt aMaxLength,TInt aUsedLength) { - LOGGSMU1("CSmsAlphabetConverter::CheckAllocBufferL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSALPHABETCONVERTER_CHECKALLOCBUFFERL1_1, "CSmsAlphabetConverter::CheckAllocBufferL()"); if (*aBuffer!=NULL) { @@ -2208,7 +2190,7 @@ */ EXPORT_C TBool TGsmSmsTelNumber::IsInstanceOf(TTypeOfIndicator aType) { - LOGGSMU1("TGsmSmsTelNumber::IsInstanceOf()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, TGSMSMSTELNUMBER_ISINSTANCEOF_1, "TGsmSmsTelNumber::IsInstanceOf()"); TBool rc = EFalse; @@ -2231,7 +2213,7 @@ CSmsAddress* CSmsAddress::NewL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs) { - LOGGSMU1("CSmsAddress::NewL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_NEWL_1, "CSmsAddress::NewL()"); CSmsAddress* address=new(ELeave) CSmsAddress(aCharacterSetConverter,aFs); CleanupStack::PushL(address); @@ -2255,7 +2237,7 @@ */ CSmsAddress* CSmsAddress::DuplicateL() const { - LOGGSMU1("CSmsAddress::DuplicateL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_DUPLICATEL_1, "CSmsAddress::DuplicateL()"); CSmsAddress* address = CSmsAddress::NewL(iCharacterSetConverter, iFs); CleanupStack::PushL(address); @@ -2270,7 +2252,7 @@ TPtrC CSmsAddress::Address() const { - LOGGSMU1("CSmsAddress::Address()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_ADDRESS_1, "CSmsAddress::Address()"); TPtrC ptr; if (iBuffer) @@ -2281,7 +2263,7 @@ void CSmsAddress::SetRawAddressL(TGsmSmsTypeOfAddress aTypeOfAddress, TPtrC aBufferPtr) { - LOGGSMU1("CSmsAddress::SetRawAddressL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_SETRAWADDRESSL_1, "CSmsAddress::SetRawAddressL()"); iTypeOfAddress = aTypeOfAddress; @@ -2293,7 +2275,7 @@ TGsmSmsTypeOfAddress& CSmsAddress::TypeOfAddress() { - LOGGSMU1("CSmsAddress::TypeOfAddress()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_TYPEOFADDRESS_1, "CSmsAddress::TypeOfAddress()"); return iTypeOfAddress; } // CSmsAddress::TypeOfAddress @@ -2301,7 +2283,7 @@ void CSmsAddress::SetAddressL(const TDesC& aAddress) { - LOGGSMU1("CSmsAddress::SetAddressL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_SETADDRESSL_1, "CSmsAddress::SetAddressL()"); TInt length=aAddress.Length(); NewBufferL(length); @@ -2361,7 +2343,7 @@ void CSmsAddress::SetParsedAddressL(const TGsmSmsTelNumber& aParsedAddress) { - LOGGSMU1("CSmsAddress::SetParsedAddressL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_SETPARSEDADDRESSL_1, "CSmsAddress::SetParsedAddressL()"); iTypeOfAddress=aParsedAddress.iTypeOfAddress; DoSetParsedAddressL(aParsedAddress.iTelNumber); @@ -2370,7 +2352,7 @@ TUint8 CSmsAddress::SizeL() { - LOGGSMU1("CSmsAddress::SizeL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_SIZEL_1, "CSmsAddress::SizeL()"); TUint8 size = 0; @@ -2730,7 +2712,7 @@ void CSmsAddress::NewBufferL(TInt aLength) { - LOGGSMU1("CSmsAddress::NewBufferL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_NEWBUFFERL_1, "CSmsAddress::NewBufferL()"); HBufC* buffer=HBufC::NewL(aLength); delete iBuffer; @@ -2742,7 +2724,7 @@ void CSmsAddress::DoSetParsedAddressL(const TDesC& aAddress) { - LOGGSMU2("CSmsAddress::DoSetParsedAddressL() the length of the Address [Length = %d", aAddress.Length()); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSADDRESS_DOSETPARSEDADDRESSL_1, "CSmsAddress::DoSetParsedAddressL() the length of the Address [Length = %d", aAddress.Length()); TInt length=aAddress.Length(); if ((iTypeOfAddress.TON()==EGsmSmsTONInternationalNumber) && @@ -2776,7 +2758,7 @@ TUint8* TSmsServiceCenterTimeStamp::EncodeL(TUint8* aPtr) const { - LOGGSMU1("TSmsServiceCenterTimeStamp::EncodeL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSSERVICECENTERTIMESTAMP_ENCODEL_1, "TSmsServiceCenterTimeStamp::EncodeL()"); TInt numquarterhours=iTimeZoneNumQuarterHours; @@ -2818,7 +2800,7 @@ void TSmsServiceCenterTimeStamp::DecodeL(TGsmuLex8& aPdu, TInt& aTimeError) { - LOGGSMU1("TSmsServiceCenterTimeStamp::DecodeL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSSERVICECENTERTIMESTAMP_DECODEL_1, "TSmsServiceCenterTimeStamp::DecodeL()"); TSmsOctet octet; octet.DecodeL(aPdu); @@ -2905,7 +2887,7 @@ TTime TSmsValidityPeriod::Time() const { - LOGGSMU1("TSmsValidityPeriod::Time()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSVALIDITYPERIOD_TIME_1, "TSmsValidityPeriod::Time()"); TTime time; time.UniversalTime(); @@ -2916,7 +2898,7 @@ TUint8* TSmsValidityPeriod::EncodeL(TUint8* aPtr) const { - LOGGSMU1("TSmsValidityPeriod::EncodeL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSVALIDITYPERIOD_ENCODEL_1, "TSmsValidityPeriod::EncodeL()"); TInt validityperiodformat=ValidityPeriodFormat(); switch (validityperiodformat) @@ -2962,7 +2944,7 @@ TUint8* TSmsValidityPeriod::EncodeL(TUint8* aPtr, const TEncodeParams* aEncodeParams) const { - LOGGSMU1("TSmsValidityPeriod::EncodeL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSVALIDITYPERIOD_ENCODEL1_1, "TSmsValidityPeriod::EncodeL()"); TInt validityperiodformat=ValidityPeriodFormat(); switch (validityperiodformat) @@ -3014,7 +2996,7 @@ void TSmsValidityPeriod::DecodeL(TGsmuLex8& aPdu) { - LOGGSMU1("TSmsValidityPeriod::DecodeL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSVALIDITYPERIOD_DECODEL_1, "TSmsValidityPeriod::DecodeL()"); TInt validityperiodformat=ValidityPeriodFormat(); switch (validityperiodformat) @@ -3069,7 +3051,7 @@ CSmsInformationElement* CSmsInformationElement::NewL(TSmsInformationElementIdentifier aIdentifier,const TDesC8& aData) { - LOGGSMU1("CSmsInformationElement::NewL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSINFORMATIONELEMENT_NEWL_1, "CSmsInformationElement::NewL()"); CSmsInformationElement* informationelement=new(ELeave) CSmsInformationElement(aIdentifier); CleanupStack::PushL(informationelement); @@ -3081,7 +3063,7 @@ CSmsInformationElement* CSmsInformationElement::NewL() { - LOGGSMU1("CSmsInformationElement::NewL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSINFORMATIONELEMENT_NEWL1_1, "CSmsInformationElement::NewL()"); CSmsInformationElement* informationelement=new(ELeave) CSmsInformationElement(ESmsIEIConcatenatedShortMessages8BitReference); CleanupStack::PushL(informationelement); @@ -3109,7 +3091,7 @@ */ EXPORT_C TPtr8 CSmsInformationElement::Data() { - LOGGSMU1("CSmsInformationElement::Data()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSINFORMATIONELEMENT_DATA_1, "CSmsInformationElement::Data()"); return iData->Des(); } // CSmsInformationElement::Data @@ -3123,7 +3105,7 @@ */ EXPORT_C const TDesC8& CSmsInformationElement::Data() const { - LOGGSMU1("CSmsInformationElement::Data()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSINFORMATIONELEMENT_DATA1_1, "CSmsInformationElement::Data()"); return *iData; } // CSmsInformationElement::Data @@ -3143,7 +3125,7 @@ TUint8* CSmsInformationElement::EncodeL(TUint8* aPtr) const { - LOGGSMU1("CSmsInformationElement::EncodeL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSINFORMATIONELEMENT_ENCODEL_1, "CSmsInformationElement::EncodeL()"); TSmsOctet id=iIdentifier; aPtr=id.EncodeL(aPtr); @@ -3157,7 +3139,7 @@ void CSmsInformationElement::DecodeL(TGsmuLex8& aPdu) { - LOGGSMU1("CSmsInformationElement::DecodeL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSINFORMATIONELEMENT_DECODEL_1, "CSmsInformationElement::DecodeL()"); TSmsOctet id; id.DecodeL(aPdu); @@ -3264,7 +3246,7 @@ void CSmsInformationElement::ConstructL(const TDesC8& aData) { - LOGGSMU1("CSmsInformationElement::ConstructL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSINFORMATIONELEMENT_CONSTRUCTL_1, "CSmsInformationElement::ConstructL()"); NewDataL(aData.Length()); iData->Des().Copy(aData); @@ -3273,7 +3255,7 @@ void CSmsInformationElement::NewDataL(TInt aLength) { - LOGGSMU1("CSmsInformationElement::NewDataL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSINFORMATIONELEMENT_NEWDATAL_1, "CSmsInformationElement::NewDataL()"); HBufC8* data=HBufC8::NewL(aLength); delete iData; @@ -3284,7 +3266,7 @@ TUint CSmsInformationElement::Length()const { - LOGGSMU1("CSmsInformationElement::Length()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSINFORMATIONELEMENT_LENGTH_1, "CSmsInformationElement::Length()"); return 2+iData->Length(); // 2 stands for IEID and IEDL } // CSmsInformationElement::Length @@ -3305,7 +3287,7 @@ */ TBool TSmsInformationElementCategories::TranslateCategoryToIndex(TInformationElementId aId, TInt& aIndex) { - LOGGSMU1("CSmsMessage::TranslateCategoryToIndex"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSINFORMATIONELEMENTCATEGORIES_TRANSLATECATEGORYTOINDEX_1, "CSmsMessage::TranslateCategoryToIndex"); TBool rc = ETrue; @@ -3384,7 +3366,7 @@ else { rc = EFalse; - LOGGSMU3("CSmsMessage::TranslateCategoryToIndex id = %d, found = %d", aId, rc); + OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSINFORMATIONELEMENTCATEGORIES_TRANSLATECATEGORYTOINDEX_2, "CSmsMessage::TranslateCategoryToIndex id = %d, found = %d", aId, rc); } return rc; } // TSmsInformationElementCategories::TranslateCategoryToIndex @@ -3405,7 +3387,7 @@ */ TBool TSmsInformationElementCategories::GetCategoryDefinition(TInformationElementId aId, TInformationElementCategory& aCategory) { - LOGGSMU1("TSmsInformationElementCategories::GetCategoryDefinition"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSINFORMATIONELEMENTCATEGORIES_GETCATEGORYDEFINITION_1, "TSmsInformationElementCategories::GetCategoryDefinition"); TInt index; if (TranslateCategoryToIndex(aId,index)) @@ -3414,7 +3396,7 @@ } else { - LOGGSMU2("TSmsInformationElementCategories::GetCategoryDefinition, Failure, aId = %d", aId); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSMSINFORMATIONELEMENTCATEGORIES_GETCATEGORYDEFINITION_2, "TSmsInformationElementCategories::GetCategoryDefinition, Failure, aId = %d", aId); return EFalse; } @@ -3436,7 +3418,7 @@ CSmsUserData* CSmsUserData::NewL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs,TSmsFirstOctet& aFirstOctet,const TSmsDataCodingScheme& aDataCodingScheme) { - LOGGSMU1("CSmsUserData::NewL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_NEWL_1, "CSmsUserData::NewL()"); CSmsUserData* userdata=new(ELeave) CSmsUserData(aCharacterSetConverter,aFs,aFirstOctet,aDataCodingScheme); CleanupStack::PushL(userdata); @@ -3465,7 +3447,7 @@ */ EXPORT_C CSmsInformationElement& CSmsUserData::InformationElement(TInt aIndex) const { - LOGGSMU1("CSmsUserData::InformationElement()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_INFORMATIONELEMENT_1, "CSmsUserData::InformationElement()"); return *iInformationElementArray[aIndex]; } // CSmsUserData::InformationElement @@ -3473,7 +3455,7 @@ CSmsInformationElement*& CSmsUserData::InformationElementPtr(TInt aIndex) { - LOGGSMU1("CSmsUserData::InformationElementPtr()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_INFORMATIONELEMENTPTR_1, "CSmsUserData::InformationElementPtr()"); return iInformationElementArray[aIndex]; } // CSmsUserData::InformationElementPtr @@ -3493,7 +3475,7 @@ */ EXPORT_C TBool CSmsUserData::InformationElementIndex(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier,TInt& aIndex) const { - LOGGSMU1("CSmsUserData::InformationElementIndex()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_INFORMATIONELEMENTINDEX_1, "CSmsUserData::InformationElementIndex()"); TBool found=EFalse; TInt count=NumInformationElements(); @@ -3521,7 +3503,7 @@ */ EXPORT_C TBool CSmsUserData::InformationElementLastIndex(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier,TInt& aIndex) const { - LOGGSMU1("CSmsUserData::InformationElementLastIndex()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_INFORMATIONELEMENTLASTINDEX_1, "CSmsUserData::InformationElementLastIndex()"); TBool found=EFalse; TInt count=NumInformationElements(); @@ -3548,7 +3530,7 @@ */ void CSmsUserData::InformationElementIndicesL(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier, CArrayFixFlat& aIndices) const { - LOGGSMU1("CSmsUserData::InformationElementIndicesL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_INFORMATIONELEMENTINDICESL_1, "CSmsUserData::InformationElementIndicesL()"); aIndices.Reset(); @@ -3571,7 +3553,7 @@ */ TBool CSmsUserData::EmsInformationElementWillFitL(CEmsInformationElement* aIe,CSmsEMSBufferSegmenter& aSeg,TUint& aCharsAddedToCurrentPDU) { - LOGGSMU1("CSmsUserData::EmsInformationElementWillFitL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_EMSINFORMATIONELEMENTWILLFITL_1, "CSmsUserData::EmsInformationElementWillFitL()"); // Before using an EmsInformationElement polymorphically as an SmsIE, // we need to make sure that the IE has been encoded @@ -3604,7 +3586,7 @@ */ TBool CSmsUserData::ControlInformationElementWillFitL(CSmsInformationElement* aIe) { - LOGGSMU1("CSmsUserData::ControlInformationElementWillFitL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_CONTROLINFORMATIONELEMENTWILLFITL_1, "CSmsUserData::ControlInformationElementWillFitL()"); if (aIe == NULL) { @@ -3667,7 +3649,7 @@ */ EXPORT_C void CSmsUserData::AddInformationElementL(TSmsId aIdentifier,const TDesC8& aData) { - LOGGSMU1("CSmsUserData::AddInformationElementL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_ADDINFORMATIONELEMENTL_1, "CSmsUserData::AddInformationElementL"); if ((aIdentifier >= 0x21) && (aIdentifier <= 0x23) || (aIdentifier >= 0x26) && (aIdentifier <= 0x6F) || @@ -3692,7 +3674,7 @@ */ void CSmsUserData::UpdateInformationElementArrayL(TSmsId aIdentifier,const TDesC8& aData) { - LOGGSMU1("CSmsUserData::UpdateInformationElementsL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_UPDATEINFORMATIONELEMENTARRAYL_1, "CSmsUserData::UpdateInformationElementsL"); TInt count=NumInformationElements(); if(!CEmsFactory::Supported(aIdentifier)) @@ -3714,7 +3696,7 @@ { if (InformationElement(i).Identifier() == CSmsInformationElement::ESmsIEISpecialSMSMessageIndication) { - LOGGSMU3("CSmsUserData::AddInformationElementL1 category = %d, identifier = %d",category,aIdentifier); + OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_UPDATEINFORMATIONELEMENTARRAYL_2, "CSmsUserData::AddInformationElementL1 category = %d, identifier = %d",category,aIdentifier); //if Msg type is the same, swap with the most recent value if ((InformationElement(i).Data()[0] & ((TUint8) EGsmSmsSpecialMessageIndicationTypeMask)) == @@ -3725,7 +3707,7 @@ } else { - LOGGSMU4("CSmsUserData::AddInformationElementL3 category = %d, identifier = %d, data = %S",category,aIdentifier, &aData); + OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_UPDATEINFORMATIONELEMENTARRAYL_3, "CSmsUserData::AddInformationElementL3 category = %d, identifier = %d, data = %s",category,aIdentifier, aData); User::Leave(KErrArgument); } break; @@ -3734,18 +3716,18 @@ case TSmsInformationElementCategories::ECtrlMandatoryIn1stPDUOnly: case TSmsInformationElementCategories::ECtrlSingleInstanceOnly: { - LOGGSMU3("CSmsUserData::AddInformationElementL4 category = %d, identifier = %d",category,aIdentifier); + OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_UPDATEINFORMATIONELEMENTARRAYL_4, "CSmsUserData::AddInformationElementL4 category = %d, identifier = %d",category,aIdentifier); User::Leave(KErrAlreadyExists); break; } case TSmsInformationElementCategories::ECtrlMultipleInstancesAllowed: { - LOGGSMU3("CSmsUserData::AddInformationElementL5 category = %d, identifier = %d",category,aIdentifier); + OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_UPDATEINFORMATIONELEMENTARRAYL_5, "CSmsUserData::AddInformationElementL5 category = %d, identifier = %d",category,aIdentifier); break; } case TSmsInformationElementCategories::ECtrlMandatoryInEveryPDUButWithValueSpecificToPDU: { - LOGGSMU3("CSmsUserData::AddInformationElementL6 category = %d, identifier = %d",category,aIdentifier); + OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_UPDATEINFORMATIONELEMENTARRAYL_6, "CSmsUserData::AddInformationElementL6 category = %d, identifier = %d",category,aIdentifier); User::Leave(KErrAlreadyExists); // currently the email header is updated in: // void CSmsMessage::DecodeBufferL(CArrayPtr& aSmsPDUArray,CSmsBufferBase& aBuffer) @@ -3753,7 +3735,7 @@ } default: { - LOGGSMU3("CSmsUserData::AddInformationElementL8 category = %d, identifier = %d",category,aIdentifier); + OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_UPDATEINFORMATIONELEMENTARRAYL_7, "CSmsUserData::AddInformationElementL8 category = %d, identifier = %d",category,aIdentifier); User::Leave(KErrNotSupported); break; } @@ -3772,7 +3754,7 @@ void CSmsUserData::AddEmsInformationElementL(CEmsInformationElement* aIe) { - LOGGSMU1("CSmsUserData::AddEmsInformationElementL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_ADDEMSINFORMATIONELEMENTL_1, "CSmsUserData::AddEmsInformationElementL()"); // Before using an EmsInformationElement polymorphically as an SmsIE, // we need to make sure that the IE has been encoded @@ -3790,7 +3772,7 @@ */ EXPORT_C void CSmsUserData::RemoveInformationElement(TInt aIndex) { - LOGGSMU1("CSmsUserData::RemoveInformationElement()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_REMOVEINFORMATIONELEMENT_1, "CSmsUserData::RemoveInformationElement()"); // Since iInformationElementArray[aIndex] pointer is removed from iInformationElementArray, there is no double free issue. // coverity[double_free] delete iInformationElementArray[aIndex]; @@ -3806,7 +3788,7 @@ TInt CSmsUserData::MaxPackedUDUnitsInBodyRemaining() const { - LOGGSMU1("CSmsUserData::MaxPackedUDUnitsInBodyRemaining()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_MAXPACKEDUDUNITSINBODYREMAINING_1, "CSmsUserData::MaxPackedUDUnitsInBodyRemaining()"); TInt totalHeaderLengthInUDLUnits=TotalHeaderLengthInUDLUnits(); TInt maxPackedUDUnitsInBody=0; @@ -3832,7 +3814,7 @@ TInt CSmsUserData::MaxPackedUDUnitsInBodyRemaining(TUint aIELen) const { - LOGGSMU1("CSmsUserData::MaxPackedUDUnitsInBodyRemaining()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_MAXPACKEDUDUNITSINBODYREMAINING1_1, "CSmsUserData::MaxPackedUDUnitsInBodyRemaining()"); TInt totalHeaderLengthInUDLUnits=TotalHeaderLengthInUDLUnits(aIELen); TInt maxPackedUDUnitsInBody=0; @@ -3861,7 +3843,7 @@ */ EXPORT_C TInt CSmsUserData::MaxBodyLengthInChars() const { - LOGGSMU1("CSmsUserData::MaxBodyLengthInChars()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_MAXBODYLENGTHINCHARS_1, "CSmsUserData::MaxBodyLengthInChars()"); TInt totalheaderlengthinudlunits=TotalHeaderLengthInUDLUnits(); TInt maxbodylengthinchars=0; @@ -3889,7 +3871,7 @@ break; } default: - LOGGSMU1("CSmsUserData::MaxBodyLengthInChars() WARNING! default case has been reached"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_MAXBODYLENGTHINCHARS_2, "CSmsUserData::MaxBodyLengthInChars() WARNING! default case has been reached"); break; } } @@ -3905,7 +3887,7 @@ */ EXPORT_C TPtrC8 CSmsUserData::Body() const { - LOGGSMU1("CSmsUserData::Body()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_BODY_1, "CSmsUserData::Body()"); return iBody->Des(); } // CSmsUserData::Body @@ -3919,7 +3901,7 @@ */ EXPORT_C void CSmsUserData::SetBodyL(const TDesC8& aBody) { - LOGGSMU1("CSmsUserData::SetBodyL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_SETBODYL_1, "CSmsUserData::SetBodyL()"); //Some tests fail with this line in, despite it being a valid condition! //__ASSERT_DEBUG(aBody.Length() <= MaxBodyLengthInChars(), User::Leave(KErrTooBig)); @@ -3931,7 +3913,7 @@ void CSmsUserData::AppendBodyL(const TDesC8& aBody) { - LOGGSMU1("CSmsUserData::AppendBodyL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_APPENDBODYL_1, "CSmsUserData::AppendBodyL()"); if (iBody) { @@ -3964,11 +3946,21 @@ */ EXPORT_C TBool CSmsUserData::IsSupportedL(TChar aChar) { - LOGGSMU1("CSmsUserData::IsSupportedL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_ISSUPPORTEDL_1, "CSmsUserData::IsSupportedL()"); + + TInt numberOfUnconvertibleCharacters, numberOfDowngradedCharacters, + numberRequiringAlternativeEncoding, indexOfFirstUnconvertibleCharacter; + TBuf<4> toEncode; + toEncode.SetLength(1); + toEncode[0]=(TText)aChar; CSmsAlphabetConverter* converter=CSmsAlphabetConverter::NewLC(iCharacterSetConverter,iFs,iDataCodingScheme.Alphabet(),IsBinaryData()); - TBool result=converter->IsSupportedL(aChar); - CleanupStack::PopAndDestroy(); + TBool result=converter->IsSupportedL(toEncode, ESmsEncodingNone, + numberOfUnconvertibleCharacters, + numberOfDowngradedCharacters, + numberRequiringAlternativeEncoding, + indexOfFirstUnconvertibleCharacter); + CleanupStack::PopAndDestroy(converter); return result; } // CSmsUserData::IsSupportedL @@ -3991,7 +3983,7 @@ EXPORT_C TBool CSmsUserData::IsSupportedL(const TDesC& aDes, TInt& aNumberOfUnconvertibleCharacters, TInt& aIndexOfFirstUnconvertibleCharacter) const { - LOGGSMU1("[1] CSmsUserData::IsSupportedL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_ISSUPPORTEDL1_1, "[1] CSmsUserData::IsSupportedL()"); CSmsAlphabetConverter* converter=CSmsAlphabetConverter::NewLC(iCharacterSetConverter,iFs,iDataCodingScheme.Alphabet(),IsBinaryData()); TBool result=converter->IsSupportedL(aDes, aNumberOfUnconvertibleCharacters, @@ -4028,7 +4020,7 @@ TInt& aNumberRequiringAlternativeEncoding, TInt& aIndexOfFirstUnconvertibleCharacter) const { - LOGGSMU1("[2] CSmsUserData::IsSupportedL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSUSERDATA_ISSUPPORTEDL2_1, "[2] CSmsUserData::IsSupportedL()"); CSmsAlphabetConverter* converter=CSmsAlphabetConverter::NewLC(iCharacterSetConverter,iFs,iDataCodingScheme.Alphabet(),IsBinaryData()); TBool result=converter->IsSupportedL(aDes, aEncoding, @@ -4044,7 +4036,7 @@ TUint8* CSmsUserData::EncodeL(TUint8* aPtr) const { - LOGGSMU1("CSmsUserData::EncodeL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_ENCODEL_1, "CSmsUserData::EncodeL()"); __ASSERT_DEBUG(0<=MaxPackedUDUnitsInBodyRemaining(),Panic(KGsmuPanicUserDataBodyTooLong)); // Encode the user data length @@ -4078,7 +4070,7 @@ void CSmsUserData::DecodeL(TGsmuLex8& aPdu, TBool aAcceptTruncation) { - LOGGSMU1("CSmsUserData::DecodeL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_DECODEL1_1, "CSmsUserData::DecodeL()"); // Reset current data iInformationElementArray.ResetAndDestroy(); @@ -4182,7 +4174,7 @@ void CSmsUserData::ConstructL() { - LOGGSMU1("CSmsUserData::ConstructL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_CONSTRUCTL_1, "CSmsUserData::ConstructL()"); NewBodyL(0); } // CSmsUserData::ConstructL @@ -4196,7 +4188,7 @@ CSmsUserData* CSmsUserData::DuplicateL(TSmsFirstOctet& aFirstOctet, const TSmsDataCodingScheme& aDataCodingScheme) const { - LOGGSMU1("CSmsUserData::DuplicateL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_DUPLICATEL_1, "CSmsUserData::DuplicateL()"); CSmsUserData* userdata = CSmsUserData::NewL(iCharacterSetConverter, iFs, aFirstOctet, aDataCodingScheme); @@ -4230,7 +4222,7 @@ TInt CSmsUserData::HeaderLength() const { - LOGGSMU1("CSmsUserData::HeaderLength()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_HEADERLENGTH_1, "CSmsUserData::HeaderLength()"); TInt numinformationelements=NumInformationElements(); TInt headerlength=0; @@ -4242,7 +4234,7 @@ TInt CSmsUserData::TotalHeaderLengthInUDLUnits() const { - LOGGSMU1("CSmsUserData::TotalHeaderLengthInUDLUnits()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_TOTALHEADERLENGTHINUDLUNITS_1, "CSmsUserData::TotalHeaderLengthInUDLUnits()"); TInt totalheaderlengthinudlunits=0; if (iInformationElementArray.Count()>0) @@ -4268,7 +4260,7 @@ break; } default: - LOGGSMU1("CSmsUserData::TotalHeaderLengthInUDLUnits() WARNING default case has been reached"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_TOTALHEADERLENGTHINUDLUNITS_2, "CSmsUserData::TotalHeaderLengthInUDLUnits() WARNING default case has been reached"); break; } } @@ -4279,7 +4271,7 @@ TInt CSmsUserData::TotalHeaderLengthInUDLUnits(TInt aIElen) const { - LOGGSMU1("CSmsUserData::TotalHeaderLengthInUDLUnits()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_TOTALHEADERLENGTHINUDLUNITS1_1, "CSmsUserData::TotalHeaderLengthInUDLUnits()"); TInt totalheaderlengthinudlunits=0; TInt totalheaderlength=aIElen; @@ -4318,7 +4310,7 @@ TInt CSmsUserData::BodyLengthInUDLUnits() const { - LOGGSMU1("CSmsUserData::BodyLengthInUDLUnits()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_BODYLENGTHINUDLUNITS_1, "CSmsUserData::BodyLengthInUDLUnits()"); return iBody->Des().Length(); } // CSmsUserData::BodyLengthInUDLUnits @@ -4326,7 +4318,7 @@ void CSmsUserData::NewBodyL(TInt aLength) { - LOGGSMU1("CSmsUserData::NewBodyL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_NEWBODYL_1, "CSmsUserData::NewBodyL()"); HBufC8* body=HBufC8::NewL(aLength); @@ -4339,7 +4331,7 @@ TBool CSmsUserData::HeaderPresent() const { - LOGGSMU1("CSmsUserData::HeaderPresent()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_HEADERPRESENT_1, "CSmsUserData::HeaderPresent()"); return (iFirstOctet&TSmsFirstOctet::ESmsUDHIMask)==TSmsFirstOctet::ESmsUDHIHeaderPresent; } // CSmsUserData::HeaderPresent @@ -4347,7 +4339,7 @@ void CSmsUserData::SetHeaderPresent(TBool aHeaderPresent) { - LOGGSMU1("CSmsUserData::SetHeaderPresent()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_SETHEADERPRESENT_1, "CSmsUserData::SetHeaderPresent()"); iFirstOctet=aHeaderPresent? (iFirstOctet&(~TSmsFirstOctet::ESmsUDHIMask))|TSmsFirstOctet::ESmsUDHIHeaderPresent: (iFirstOctet&(~TSmsFirstOctet::ESmsUDHIMask))|TSmsFirstOctet::ESmsUDHIHeaderNotPresent; } // CSmsUserData::SetHeaderPresent @@ -4355,7 +4347,7 @@ TBool CSmsUserData::IsBinaryData() const { - LOGGSMU1("CSmsUserData::IsBinaryData()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSUSERDATA_ISBINARYDATA_1, "CSmsUserData::IsBinaryData()"); TInt index=0; return (iDataCodingScheme.TextCompressed()) || @@ -4377,7 +4369,7 @@ */ EXPORT_C void TGsmSmsTypeOfAddress::ConvertToETelMM(NMobilePhone::TMobileTON& aTon,NMobilePhone::TMobileNPI& aNpi) const { - LOGGSMU1("TGsmSmsTypeOfAddress::ConvertToETelMM()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, TGSMSMSTYPEOFADDRESS_CONVERTTOETELMM_1, "TGsmSmsTypeOfAddress::ConvertToETelMM()"); switch (TON()) { @@ -4473,7 +4465,7 @@ */ EXPORT_C void TGsmSmsTypeOfAddress::SetFromETelMM(NMobilePhone::TMobileTON aTon,NMobilePhone::TMobileNPI aNpi) { - LOGGSMU1("TGsmSmsTypeOfAddress::SetFromETelMM()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, TGSMSMSTYPEOFADDRESS_SETFROMETELMM_1, "TGsmSmsTypeOfAddress::SetFromETelMM()"); switch (aTon) { @@ -4571,7 +4563,7 @@ */ EXPORT_C TVoiceMailInfoType CEnhancedVoiceMailBoxInformation::Type() const { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::Type()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_TYPE_1, "CEnhancedVoiceMailBoxInformation::Type()"); return iType; } // CEnhancedVoiceMailBoxInformation::Type @@ -4589,7 +4581,7 @@ */ EXPORT_C void CEnhancedVoiceMailBoxInformation::SetProfile(TSmsMessageProfileType aProfile) { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::SetProfile()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_SETPROFILE_1, "CEnhancedVoiceMailBoxInformation::SetProfile()"); iProfile = aProfile; } // CEnhancedVoiceMailBoxInformation::SetProfile @@ -4607,7 +4599,7 @@ */ EXPORT_C TSmsMessageProfileType CEnhancedVoiceMailBoxInformation::Profile() const { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::Profile()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_PROFILE_1, "CEnhancedVoiceMailBoxInformation::Profile()"); return iProfile; } // CEnhancedVoiceMailBoxInformation::Profile @@ -4626,7 +4618,7 @@ */ EXPORT_C void CEnhancedVoiceMailBoxInformation::SetStorage(TBool aIsStored) { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::SetStorage()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_SETSTORAGE_1, "CEnhancedVoiceMailBoxInformation::SetStorage()"); iStorage = aIsStored; } // CEnhancedVoiceMailBoxInformation::SetStorage @@ -4645,7 +4637,7 @@ */ EXPORT_C TBool CEnhancedVoiceMailBoxInformation::Store() const { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::Store()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_STORE_1, "CEnhancedVoiceMailBoxInformation::Store()"); return iStorage; } // CEnhancedVoiceMailBoxInformation::Store @@ -4664,7 +4656,7 @@ */ EXPORT_C void CEnhancedVoiceMailBoxInformation::SetAlmostMaximumCapacity(TBool aIsAlmostFull) { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::SetAlmostMaximumCapacity()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_SETALMOSTMAXIMUMCAPACITY_1, "CEnhancedVoiceMailBoxInformation::SetAlmostMaximumCapacity()"); iAlmostFull = aIsAlmostFull; } // CEnhancedVoiceMailBoxInformation::SetAlmostMaximumCapacity @@ -4683,7 +4675,7 @@ */ EXPORT_C TBool CEnhancedVoiceMailBoxInformation::AlmostMaximumCapacity() const { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::AlmostMaximumCapacity()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_ALMOSTMAXIMUMCAPACITY_1, "CEnhancedVoiceMailBoxInformation::AlmostMaximumCapacity()"); return iAlmostFull; } // CEnhancedVoiceMailBoxInformation::AlmostMaximumCapacity @@ -4702,7 +4694,7 @@ */ EXPORT_C void CEnhancedVoiceMailBoxInformation::SetMaximumCapacity(TBool aIsFull) { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::SetMaximumCapacity()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_SETMAXIMUMCAPACITY_1, "CEnhancedVoiceMailBoxInformation::SetMaximumCapacity()"); iFull = aIsFull; } // CEnhancedVoiceMailBoxInformation::SetMaximumCapacity @@ -4721,7 +4713,7 @@ */ EXPORT_C TBool CEnhancedVoiceMailBoxInformation::MaximumCapacity() const { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::MaximumCapacity()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_MAXIMUMCAPACITY_1, "CEnhancedVoiceMailBoxInformation::MaximumCapacity()"); return iFull; } // CEnhancedVoiceMailBoxInformation::MaximumCapacity @@ -4740,7 +4732,7 @@ */ EXPORT_C TBool CEnhancedVoiceMailBoxInformation::ExtensionIndicator() const { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::ExtensionIndicator()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_EXTENSIONINDICATOR_1, "CEnhancedVoiceMailBoxInformation::ExtensionIndicator()"); return iExtensionIndicator; } // CEnhancedVoiceMailBoxInformation::ExtensionIndicator @@ -4748,7 +4740,7 @@ void CEnhancedVoiceMailBoxInformation::NewBufferL(TInt aLength) { - LOGGSMU2("CEnhancedVoiceMailBoxInformation::NewBufferL, length = %d",aLength); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_NEWBUFFERL_1, "CEnhancedVoiceMailBoxInformation::NewBufferL, length = %d",aLength); HBufC* buffer=HBufC::NewL(aLength); delete iAccessAddress; @@ -4770,7 +4762,7 @@ */ EXPORT_C void CEnhancedVoiceMailBoxInformation::SetAccessAddressL(const TDesC& aAddress) { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::SetAccessAddressL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_SETACCESSADDRESSL_1, "CEnhancedVoiceMailBoxInformation::SetAccessAddressL()"); TInt length=aAddress.Length(); NewBufferL(length); @@ -4793,7 +4785,7 @@ */ EXPORT_C TPtrC CEnhancedVoiceMailBoxInformation::AccessAddress() const { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::AccessAddress()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_ACCESSADDRESS_1, "CEnhancedVoiceMailBoxInformation::AccessAddress()"); TPtrC ptr; if (iAccessAddress) @@ -4814,7 +4806,7 @@ */ EXPORT_C void CEnhancedVoiceMailBoxInformation::SetParsedAccessAddressL(const TGsmSmsTelNumber& aParsedAddress) { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::SetParsedAccessAddressL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_SETPARSEDACCESSADDRESSL_1, "CEnhancedVoiceMailBoxInformation::SetParsedAccessAddressL()"); iTypeOfAddress=aParsedAddress.iTypeOfAddress; DoSetParsedAddressL(aParsedAddress.iTelNumber); @@ -4833,7 +4825,7 @@ */ EXPORT_C void CEnhancedVoiceMailBoxInformation::ParsedAccessAddress(TGsmSmsTelNumber& aParsedAddress) const { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::ParsedAccessAddress()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_PARSEDACCESSADDRESS_1, "CEnhancedVoiceMailBoxInformation::ParsedAccessAddress()"); aParsedAddress.iTypeOfAddress = iTypeOfAddress; @@ -4869,7 +4861,7 @@ void CEnhancedVoiceMailBoxInformation::DoSetParsedAddressL(const TDesC& aAddress) { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::DoSetParsedAddressL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_DOSETPARSEDADDRESSL_1, "CEnhancedVoiceMailBoxInformation::DoSetParsedAddressL()"); TInt length=aAddress.Length(); if ((iTypeOfAddress.TON()==EGsmSmsTONInternationalNumber) && @@ -4900,7 +4892,7 @@ */ EXPORT_C void CEnhancedVoiceMailBoxInformation::SetNumberOfVoiceMessages(TUint8 aNumber) { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::SetNumberOfVoiceMessages()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_SETNUMBEROFVOICEMESSAGES_1, "CEnhancedVoiceMailBoxInformation::SetNumberOfVoiceMessages()"); iNumberOfVoiceMessages=aNumber; } // CEnhancedVoiceMailBoxInformation::SetNumberOfVoiceMessages @@ -4918,7 +4910,7 @@ */ EXPORT_C TUint8 CEnhancedVoiceMailBoxInformation::NumberOfVoiceMessages() const { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::NumberOfVoiceMessages()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILBOXINFORMATION_NUMBEROFVOICEMESSAGES_1, "CEnhancedVoiceMailBoxInformation::NumberOfVoiceMessages()"); return iNumberOfVoiceMessages; } // CEnhancedVoiceMailBoxInformation::NumberOfVoiceMessages @@ -4933,7 +4925,7 @@ ((((TUint8) iFull) & EMask1Bit ) << 6) + (((TUint8) iExtensionIndicator ) << 7); - LOGGSMU2("CEnhancedVoiceMailBoxInformation::EncodeL 1st byte = %d",*aPtr); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_ENCODEL_1, "CEnhancedVoiceMailBoxInformation::EncodeL 1st byte = %d",*aPtr); aPtr++; // Create an address object to encode the mail box access address into the @@ -4967,7 +4959,7 @@ iFull = (TBool) ((Byte1 >> 6) & EMask1Bit); iExtensionIndicator = (TBool) ((Byte1 >> 7) & EMask1Bit); - LOGGSMU2("CEnhancedVoiceMailBoxInformation::DecodeL 1st byte = %d", Byte1); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_DECODEL_1, "CEnhancedVoiceMailBoxInformation::DecodeL 1st byte = %d", Byte1); // Create an address object to deccode the mail box access address from the // format required by 23.040 v6.5.0 section 9.1.2.5. @@ -5012,13 +5004,13 @@ CleanupStack::PopAndDestroy(decodedAddress); iNumberOfVoiceMessages = aVoiceMailInfo.GetL(); - LOGGSMU2("CEnhancedVoiceMailBoxInformation::DecodeL iNumberOfVoiceMessages = %d", iNumberOfVoiceMessages); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_DECODEL_2, "CEnhancedVoiceMailBoxInformation::DecodeL iNumberOfVoiceMessages = %d", iNumberOfVoiceMessages); } // CEnhancedVoiceMailBoxInformation::DecodeL CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation() { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_CTOR_1, "CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation()"); // Consider changing this over to a Panic. iType = EGsmSmsVoiceMailNotification; @@ -5034,7 +5026,7 @@ CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation(TVoiceMailInfoType aTVoiceMailInfoType) { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_CTOR1_1, "CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation()"); iType = aTVoiceMailInfoType; iOctet1Bit1 = EFalse; @@ -5059,7 +5051,7 @@ { // Ignore in code coverage - not intended to be used BULLSEYE_OFF - LOGGSMU1("CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_CTOR2_1, "CEnhancedVoiceMailBoxInformation::CEnhancedVoiceMailBoxInformation"); Panic(KGsmuPanicMethodBodyNotImplemented); BULLSEYE_RESTORE } @@ -5076,7 +5068,7 @@ { // Ignore in code coverage - not intended to be used BULLSEYE_OFF - LOGGSMU1("CEnhancedVoiceMailBoxInformation::operator=="); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_OPERATOR_1, "CEnhancedVoiceMailBoxInformation::operator=="); Panic(KGsmuPanicMethodBodyNotImplemented); return EFalse; BULLSEYE_RESTORE @@ -5094,14 +5086,14 @@ { // Ignore in code coverage - not intended to be used BULLSEYE_OFF - LOGGSMU1("CEnhancedVoiceMailBoxInformation::operator="); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_OPERATOR1_1, "CEnhancedVoiceMailBoxInformation::operator="); Panic(KGsmuPanicMethodBodyNotImplemented); BULLSEYE_RESTORE } void CEnhancedVoiceMailBoxInformation::ConstructL() { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::ConstructL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_CONSTRUCTL_1, "CEnhancedVoiceMailBoxInformation::ConstructL()"); NewBufferL(0); } // CEnhancedVoiceMailBoxInformation::ConstructL @@ -5109,14 +5101,14 @@ CEnhancedVoiceMailBoxInformation::~CEnhancedVoiceMailBoxInformation() { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::~CEnhancedVoiceMailBoxInformation"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_DTOR_1, "CEnhancedVoiceMailBoxInformation::~CEnhancedVoiceMailBoxInformation"); delete iAccessAddress; } // CEnhancedVoiceMailBoxInformation::ConstructL CEnhancedVoiceMailBoxInformation* CEnhancedVoiceMailBoxInformation::NewL() { - LOGGSMU1("CEnhancedVoiceMailBoxInformation::NewL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILBOXINFORMATION_NEWL_1, "CEnhancedVoiceMailBoxInformation::NewL()"); CEnhancedVoiceMailBoxInformation* aCEnhancedVoiceMailBoxInformation=new(ELeave) CEnhancedVoiceMailBoxInformation(); CleanupStack::PushL(aCEnhancedVoiceMailBoxInformation); @@ -5138,7 +5130,7 @@ */ EXPORT_C void CVoiceMailNotification::SetMessageId(TUint16 aMessageId) { - LOGGSMU1("CVoiceMailNotification::SetMessageId()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_SETMESSAGEID_1, "CVoiceMailNotification::SetMessageId()"); iMessageId = aMessageId; } // CVoiceMailNotification::SetMessageId @@ -5156,7 +5148,7 @@ */ EXPORT_C TUint16 CVoiceMailNotification::MessageId() const { - LOGGSMU1("CVoiceMailNotification::MessageId()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_MESSAGEID_1, "CVoiceMailNotification::MessageId()"); return iMessageId; } // CVoiceMailNotification::MessageId @@ -5174,7 +5166,7 @@ */ EXPORT_C void CVoiceMailNotification::SetMessageLength(TUint8 aLength) { - LOGGSMU1("CVoiceMailNotification::SetMessageLength()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_SETMESSAGELENGTH_1, "CVoiceMailNotification::SetMessageLength()"); iMessageLength=aLength; } // CVoiceMailNotification::SetMessageLength @@ -5192,7 +5184,7 @@ */ EXPORT_C TUint8 CVoiceMailNotification::MessageLength() const { - LOGGSMU1("CVoiceMailNotification::MessageLength()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_MESSAGELENGTH_1, "CVoiceMailNotification::MessageLength()"); return iMessageLength; } // CVoiceMailNotification::MessageLength @@ -5212,7 +5204,7 @@ */ EXPORT_C void CVoiceMailNotification::SetRetentionDays(TUint8 aDays) { - LOGGSMU1("CVoiceMailNotification::SetRetentionDays()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_SETRETENTIONDAYS_1, "CVoiceMailNotification::SetRetentionDays()"); if (aDays > 31) { @@ -5237,7 +5229,7 @@ */ EXPORT_C TUint8 CVoiceMailNotification::RetentionDays() const { - LOGGSMU1("CVoiceMailNotification::RetentionDays()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_RETENTIONDAYS_1, "CVoiceMailNotification::RetentionDays()"); return iRetentionDays; } // CVoiceMailNotification::RetentionDays @@ -5256,7 +5248,7 @@ */ EXPORT_C void CVoiceMailNotification::SetPriorityIndication(TBool aPriority) { - LOGGSMU1("CVoiceMailNotification::SetPriorityIndication()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_SETPRIORITYINDICATION_1, "CVoiceMailNotification::SetPriorityIndication()"); iPriorityIndication=aPriority; } // CVoiceMailNotification::SetPriorityIndication @@ -5275,7 +5267,7 @@ */ EXPORT_C TBool CVoiceMailNotification::PriorityIndication() const { - LOGGSMU1("CVoiceMailNotification::PriorityIndication()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_PRIORITYINDICATION_1, "CVoiceMailNotification::PriorityIndication()"); return iPriorityIndication; } // CVoiceMailNotification::PriorityIndication @@ -5294,7 +5286,7 @@ */ EXPORT_C TBool CVoiceMailNotification::MessageExtensionIndication() const { - LOGGSMU1("CVoiceMailNotification::MessageExtensionIndication()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_MESSAGEEXTENSIONINDICATION_1, "CVoiceMailNotification::MessageExtensionIndication()"); return iMessageExtensionIndicator; } // CVoiceMailNotification::MessageExtensionIndication @@ -5302,7 +5294,7 @@ void CVoiceMailNotification::NewBufferL(TInt aLength) { - LOGGSMU1("CVoiceMailNotification::NewBufferL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_NEWBUFFERL_1, "CVoiceMailNotification::NewBufferL()"); HBufC* buffer=HBufC::NewL(aLength); delete iCallingLineIdentity; @@ -5323,7 +5315,7 @@ */ EXPORT_C void CVoiceMailNotification::SetCallingLineIdentityL(TDesC& aLineIdentity) { - LOGGSMU1("CVoiceMailNotification::SetCallingLineIdentityL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_SETCALLINGLINEIDENTITYL_1, "CVoiceMailNotification::SetCallingLineIdentityL()"); TInt length=aLineIdentity.Length(); NewBufferL(length); @@ -5346,7 +5338,7 @@ */ EXPORT_C TPtrC CVoiceMailNotification::CallingLineIdentity() const { - LOGGSMU1("CVoiceMailNotification::CallingLineIdentity()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_CALLINGLINEIDENTITY_1, "CVoiceMailNotification::CallingLineIdentity()"); TPtrC ptr; if (iCallingLineIdentity) @@ -5367,7 +5359,7 @@ */ EXPORT_C void CVoiceMailNotification::SetParsedCallingLineIdentityL(TGsmSmsTelNumber& aParsedAddress) { - LOGGSMU1("CVoiceMailNotification::SetParsedCallingLineIdentityL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_SETPARSEDCALLINGLINEIDENTITYL_1, "CVoiceMailNotification::SetParsedCallingLineIdentityL()"); iTypeOfAddress=aParsedAddress.iTypeOfAddress; DoSetParsedAddressL(aParsedAddress.iTelNumber); @@ -5386,7 +5378,7 @@ */ EXPORT_C void CVoiceMailNotification::ParsedCallingLineIdentity(TGsmSmsTelNumber& aParsedAddress) const { - LOGGSMU1("CVoiceMailNotification::ParsedCallingLineIdentity()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_PARSEDCALLINGLINEIDENTITY_1, "CVoiceMailNotification::ParsedCallingLineIdentity()"); aParsedAddress.iTypeOfAddress = iTypeOfAddress; @@ -5422,7 +5414,7 @@ void CVoiceMailNotification::NewExtensionL(TInt aLength) { - LOGGSMU1("CVoiceMailNotification::NewExtensionL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_NEWEXTENSIONL_1, "CVoiceMailNotification::NewExtensionL()"); HBufC* buffer=HBufC::NewL(aLength); delete iExtension; @@ -5431,27 +5423,6 @@ iExtension->Des().FillZ(); } // CVoiceMailNotification::NewExtensionL - -/*void CVoiceMailNotification::SetExtension(TDesC& aExtension) - { - LOGGSMU1("CVoiceMailNotification::SetExtension()"); - - TInt length=aExtension.Length(); - NewExtensionL(length); - iExtension->Des().Copy(aExtension); - } // CVoiceMailNotification::SetExtension - -TPtrC CVoiceMailNotification::Extension() const - { - LOGGSMU1("CVoiceMailNotification::Extension()"); - - TPtrC ptr; - if (iExtension) - ptr.Set(iExtension->Des()); - return ptr; - }*/ - - /** * @internalComponent * @@ -5465,7 +5436,7 @@ */ TUint8 CVoiceMailNotification::SizeL(CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs) { - LOGGSMU1("CVoiceMailNotification::SizeL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_SIZEL_1, "CVoiceMailNotification::SizeL()"); const TUint8 KTotalSizeOfFixedLengthAttributes = 4; TUint8 size = KTotalSizeOfFixedLengthAttributes; @@ -5494,7 +5465,7 @@ // When changes are made to this function that affect the // number of bytes that are encoded, this should be reflected in // CVoiceMailNotification::SizeL() - LOGGSMU1("CVoiceMailNotification::EncodeL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_ENCODEL_1, "CVoiceMailNotification::EncodeL"); *aPtr = (TUint8) (iMessageId >> 8); // Message Id MSB @@ -5528,7 +5499,7 @@ void CVoiceMailNotification::DecodeL(TGsmuLex8& aVoiceMailInfo, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs) { - LOGGSMU1("CVoiceMailNotification::DecodeL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_DECODEL_1, "CVoiceMailNotification::DecodeL"); iMessageId = (((TUint16) aVoiceMailInfo.GetL()) << 8); iMessageId += ((TUint16) aVoiceMailInfo.GetL()); @@ -5599,7 +5570,7 @@ { // Ignore in code coverage - not intended to be used BULLSEYE_OFF - LOGGSMU1("CVoiceMailNotification::CVoiceMailNotification"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_CTOR_1, "CVoiceMailNotification::CVoiceMailNotification"); Panic(KGsmuPanicMethodBodyNotImplemented); BULLSEYE_RESTORE } @@ -5616,7 +5587,7 @@ { // Ignore in code coverage - not intended to be used BULLSEYE_OFF - LOGGSMU1("CVoiceMailNotification::operator=="); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_OPERATOR_1, "CVoiceMailNotification::operator=="); Panic(KGsmuPanicMethodBodyNotImplemented); return EFalse; BULLSEYE_RESTORE @@ -5634,14 +5605,14 @@ { // Ignore in code coverage - not intended to be used BULLSEYE_OFF - LOGGSMU1("CVoiceMailNotification::operator="); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_OPERATOR1_1, "CVoiceMailNotification::operator="); Panic(KGsmuPanicMethodBodyNotImplemented); BULLSEYE_RESTORE } CVoiceMailNotification::CVoiceMailNotification() { - LOGGSMU1("CVoiceMailNotification::CVoiceMailNotification()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_CTOR1_1, "CVoiceMailNotification::CVoiceMailNotification()"); iMessageId = 0; iMessageLength = 0; @@ -5662,7 +5633,7 @@ */ EXPORT_C CVoiceMailNotification::~CVoiceMailNotification() { - LOGGSMU1("CVoiceMailNotification::~CVoiceMailNotification"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_DTOR_1, "CVoiceMailNotification::~CVoiceMailNotification"); delete iCallingLineIdentity; delete iExtension; } // CVoiceMailNotification::CVoiceMailNotification @@ -5670,7 +5641,7 @@ void CVoiceMailNotification::ConstructL() { - LOGGSMU1("CVoiceMailNotification::ConstructL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_CONSTRUCTL_1, "CVoiceMailNotification::ConstructL()"); NewBufferL(0); NewExtensionL(0); @@ -5686,7 +5657,7 @@ */ EXPORT_C CVoiceMailNotification* CVoiceMailNotification::NewL() { - LOGGSMU1("CVoiceMailNotification::NewL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILNOTIFICATION_NEWL_1, "CVoiceMailNotification::NewL()"); CVoiceMailNotification* aCVoiceMailNotification=new(ELeave) CVoiceMailNotification(); CleanupStack::PushL(aCVoiceMailNotification); @@ -5698,7 +5669,7 @@ void CVoiceMailNotification::DoSetParsedAddressL(const TDesC& aAddress) { - LOGGSMU1("CVoiceMailNotification::DoSetParsedAddressL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILNOTIFICATION_DOSETPARSEDADDRESSL_1, "CVoiceMailNotification::DoSetParsedAddressL()"); TInt length=aAddress.Length(); if ((iTypeOfAddress.TON()==EGsmSmsTONInternationalNumber) && @@ -5730,32 +5701,12 @@ */ EXPORT_C TUint8 CEnhancedVoiceMailNotification::NumberOfVoiceMails() { - LOGGSMU1("CEnhancedVoiceMailNotification::NumberOfVoiceMails()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILNOTIFICATION_NUMBEROFVOICEMAILS_1, "CEnhancedVoiceMailNotification::NumberOfVoiceMails()"); return (TUint8) iNotifications->Count(); } // CEnhancedVoiceMailNotification::NumberOfVoiceMails -/*void CEnhancedVoiceMailNotification::SetExtension(TDesC& aExtension) - { - LOGGSMU1("CEnhancedVoiceMailNotification::SetExtension()"); - - TInt length=aExtension.Length(); - NewExtensionL(length); - iExtension->Des().Copy(aExtension); - } // CEnhancedVoiceMailNotification::SetExtension - -TPtrC CEnhancedVoiceMailNotification::Extension() const - { - LOGGSMU1("CEnhancedVoiceMailNotification::Extension()"); - - TPtrC ptr; - if (iExtension) - ptr.Set(iExtension->Des()); - return ptr; - }*/ - - /** * @publishedAll * @@ -5771,7 +5722,7 @@ */ EXPORT_C RPointerArray& CEnhancedVoiceMailNotification::GetVoiceMailNotifications() { - LOGGSMU1("CEnhancedVoiceMailNotification::GetVoiceMailNotifications()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILNOTIFICATION_GETVOICEMAILNOTIFICATIONS_1, "CEnhancedVoiceMailNotification::GetVoiceMailNotifications()"); return *iNotifications; } // CEnhancedVoiceMailNotification::GetVoiceMailNotifications @@ -5779,7 +5730,7 @@ void CEnhancedVoiceMailNotification::NewExtensionL(TInt aLength) { - LOGGSMU1("CEnhancedVoiceMailNotification::NewExtensionL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILNOTIFICATION_NEWEXTENSIONL_1, "CEnhancedVoiceMailNotification::NewExtensionL()"); HBufC* buffer=HBufC::NewL(aLength); delete iExtension; @@ -5798,7 +5749,7 @@ */ EXPORT_C CEnhancedVoiceMailNotification* CEnhancedVoiceMailNotification::NewL() { - LOGGSMU1("CEnhancedVoiceMailNotification::NewL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILNOTIFICATION_NEWL_1, "CEnhancedVoiceMailNotification::NewL()"); CEnhancedVoiceMailNotification* aCEnhancedVoiceMailNotification=new(ELeave) CEnhancedVoiceMailNotification(); CleanupStack::PushL(aCEnhancedVoiceMailNotification); @@ -5826,7 +5777,7 @@ { // Ignore in code coverage - not intended to be used BULLSEYE_OFF - LOGGSMU1("CEnhancedVoiceMailNotification::CEnhancedVoiceMailNotification"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILNOTIFICATION_CTOR1_1, "CEnhancedVoiceMailNotification::CEnhancedVoiceMailNotification"); Panic(KGsmuPanicMethodBodyNotImplemented); BULLSEYE_RESTORE } @@ -5843,7 +5794,7 @@ { // Ignore in code coverage - not intended to be used BULLSEYE_OFF - LOGGSMU1("CEnhancedVoiceMailNotification::operator=="); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILNOTIFICATION_OPERATOR_1, "CEnhancedVoiceMailNotification::operator=="); Panic(KGsmuPanicMethodBodyNotImplemented); return EFalse; BULLSEYE_RESTORE @@ -5861,7 +5812,7 @@ { // Ignore in code coverage - not intended to be used BULLSEYE_OFF - LOGGSMU1("CEnhancedVoiceMailNotification::operator="); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILNOTIFICATION_OPERATOR1_1, "CEnhancedVoiceMailNotification::operator="); Panic(KGsmuPanicMethodBodyNotImplemented); BULLSEYE_RESTORE } @@ -5875,7 +5826,7 @@ */ EXPORT_C CEnhancedVoiceMailNotification::~CEnhancedVoiceMailNotification() { - LOGGSMU1("CEnhancedVoiceMailNotification::~CEnhancedVoiceMailNotification"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILNOTIFICATION_DTOR_1, "CEnhancedVoiceMailNotification::~CEnhancedVoiceMailNotification"); delete iExtension; iNotifications->ResetAndDestroy(); iNotifications->Close(); @@ -5885,7 +5836,7 @@ void CEnhancedVoiceMailNotification::ConstructL() { - LOGGSMU1("CEnhancedVoiceMailNotification::ConstructL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILNOTIFICATION_CONSTRUCTL_1, "CEnhancedVoiceMailNotification::ConstructL()"); NewExtensionL(0); iNotifications = new (ELeave) RPointerArray(KMaxNumberOfNotifications); @@ -5894,7 +5845,7 @@ TUint8* CEnhancedVoiceMailNotification::EncodeL(TUint8* aCurrentPtr, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs) const { - LOGGSMU1("CEnhancedVoiceMailNotification::EncodeL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILNOTIFICATION_ENCODEL_1, "CEnhancedVoiceMailNotification::EncodeL"); TUint8* startPtr = aCurrentPtr; @@ -5930,7 +5881,7 @@ void CEnhancedVoiceMailNotification::DecodeL(TGsmuLex8& aVoiceMailInfo, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs) { - LOGGSMU1("CEnhancedVoiceMailNotification::DecodeL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILNOTIFICATION_DECODEL_1, "CEnhancedVoiceMailNotification::DecodeL"); CEnhancedVoiceMailBoxInformation::DecodeL(aVoiceMailInfo, aCharacterSetConverter, aFs); @@ -5967,7 +5918,7 @@ */ EXPORT_C void CVoiceMailDeletion::SetMessageId(TUint16 aMessageId) { - LOGGSMU1("CVoiceMailDeletion::SetMessageId()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILDELETION_SETMESSAGEID_1, "CVoiceMailDeletion::SetMessageId()"); iMessageId=aMessageId; } // CVoiceMailDeletion::SetMessageId @@ -5987,7 +5938,7 @@ */ EXPORT_C TUint16 CVoiceMailDeletion::MessageId() const { - LOGGSMU1("CVoiceMailDeletion::MessageId()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILDELETION_MESSAGEID_1, "CVoiceMailDeletion::MessageId()"); return iMessageId; } // CVoiceMailDeletion::MessageId @@ -6006,7 +5957,7 @@ */ EXPORT_C TBool CVoiceMailDeletion::MessageExtensionIndication() const { - LOGGSMU1("CVoiceMailDeletion::MessageExtensionIndication()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILDELETION_MESSAGEEXTENSIONINDICATION_1, "CVoiceMailDeletion::MessageExtensionIndication()"); return iExtensionIndicator; } // CVoiceMailDeletion::MessageExtensionIndication @@ -6014,7 +5965,7 @@ TUint8 CVoiceMailDeletion::SizeL() { - LOGGSMU1("CVoiceMailDeletion::SizeL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILDELETION_SIZEL_1, "CVoiceMailDeletion::SizeL()"); const TUint8 KSizeOfVoiceMailDeletion = 3; return KSizeOfVoiceMailDeletion; @@ -6026,7 +5977,7 @@ // When changes are made which affect the // number of bytes encoded, this should be // reflected in VoiceMailDeletion::SizeL() - LOGGSMU1("CVoiceMailDeletion::EncodeL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILDELETION_ENCODEL_1, "CVoiceMailDeletion::EncodeL"); *aPtr = (TUint8) (iMessageId >> 8); aPtr++; @@ -6040,7 +5991,7 @@ void CVoiceMailDeletion::DecodeL(TGsmuLex8& aVoiceMailInfo) { - LOGGSMU1("CVoiceMailDeletion::DecodeL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILDELETION_DECODEL_1, "CVoiceMailDeletion::DecodeL"); iMessageId = (((TUint16) aVoiceMailInfo.GetL()) << 8) + ((TUint16) aVoiceMailInfo.GetL()); @@ -6073,7 +6024,7 @@ { // Ignore in code coverage - not intended to be used BULLSEYE_OFF - LOGGSMU1("CVoiceMailDeletion::CVoiceMailDeletion"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILDELETION_CTOR1_1, "CVoiceMailDeletion::CVoiceMailDeletion"); Panic(KGsmuPanicMethodBodyNotImplemented); BULLSEYE_RESTORE } @@ -6090,7 +6041,7 @@ { // Ignore in code coverage - not intended to be used BULLSEYE_OFF - LOGGSMU1("CVoiceMailDeletion::operator=="); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILDELETION_OPERATOR_1, "CVoiceMailDeletion::operator=="); Panic(KGsmuPanicMethodBodyNotImplemented); return EFalse; BULLSEYE_RESTORE @@ -6108,7 +6059,7 @@ { // Ignore in code coverage - not intended to be used BULLSEYE_OFF - LOGGSMU1("CVoiceMailDeletion::operator="); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILDELETION_OPERATOR1_1, "CVoiceMailDeletion::operator="); Panic(KGsmuPanicMethodBodyNotImplemented); BULLSEYE_RESTORE } @@ -6122,7 +6073,7 @@ */ EXPORT_C CVoiceMailDeletion::~CVoiceMailDeletion() { - LOGGSMU1("CVoiceMailDeletion::~CVoiceMailDeletion"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILDELETION_DTOR_1, "CVoiceMailDeletion::~CVoiceMailDeletion"); delete iExtension; } // CVoiceMailDeletion::operator @@ -6130,7 +6081,7 @@ void CVoiceMailDeletion::ConstructL() { - LOGGSMU1("CVoiceMailDeletion::ConstructL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILDELETION_CONSTRUCTL_1, "CVoiceMailDeletion::ConstructL()"); NewBufferL(0); } // CVoiceMailDeletion::ConstructL @@ -6138,7 +6089,7 @@ void CVoiceMailDeletion::NewBufferL(TInt aLength) { - LOGGSMU1("CVoiceMailDeletion::NewBufferL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CVOICEMAILDELETION_NEWBUFFERL_1, "CVoiceMailDeletion::NewBufferL()"); HBufC* buffer=HBufC::NewL(aLength); delete iExtension; @@ -6157,7 +6108,7 @@ */ EXPORT_C CVoiceMailDeletion* CVoiceMailDeletion::NewL() { - LOGGSMU1("CVoiceMailDeletion::NewL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CVOICEMAILDELETION_NEWL_1, "CVoiceMailDeletion::NewL()"); CVoiceMailDeletion* voiceMailDeletion=new(ELeave) CVoiceMailDeletion(); CleanupStack::PushL(voiceMailDeletion); @@ -6167,31 +6118,9 @@ } // CVoiceMailDeletion::NewL -/* -void CVoiceMailDeletion::SetExtension(TDesC& aExtension) - { - LOGGSMU1("CVoiceMailDeletion::SetExtension()"); - - TInt length=aExtension.Length(); - NewBufferL(length); - iExtension->Des().Copy(aExtension); - } // CVoiceMailDeletion::SetExtension - - -TPtrC CVoiceMailDeletion::Extension() const - { - LOGGSMU1("CVoiceMailDeletion::Extension()"); - - TPtrC ptr; - if (iExtension) - ptr.Set(iExtension->Des()); - return ptr; - }*/ - - void CEnhancedVoiceMailDeleteConfirmations::NewExtensionL(TInt aLength) { - LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::NewExtensionL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILDELETECONFIRMATIONS_NEWEXTENSIONL_1, "CEnhancedVoiceMailDeleteConfirmations::NewExtensionL()"); HBufC* buffer=HBufC::NewL(aLength); delete iExtension; @@ -6216,7 +6145,7 @@ */ EXPORT_C CEnhancedVoiceMailDeleteConfirmations::~CEnhancedVoiceMailDeleteConfirmations() { - LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::~CEnhancedVoiceMailDeleteConfirmations"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILDELETECONFIRMATIONS_DTOR_1, "CEnhancedVoiceMailDeleteConfirmations::~CEnhancedVoiceMailDeleteConfirmations"); delete iExtension; iVoiceMailDeletions->ResetAndDestroy(); @@ -6237,7 +6166,7 @@ { // Ignore in code coverage - not intended to be used BULLSEYE_OFF - LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::CEnhancedVoiceMailDeleteConfirmations"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILDELETECONFIRMATIONS_CTOR1_1, "CEnhancedVoiceMailDeleteConfirmations::CEnhancedVoiceMailDeleteConfirmations"); Panic(KGsmuPanicMethodBodyNotImplemented); BULLSEYE_RESTORE } @@ -6254,7 +6183,7 @@ { // Ignore in code coverage - not intended to be used BULLSEYE_OFF - LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::operator=="); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILDELETECONFIRMATIONS_OPERATOR_1, "CEnhancedVoiceMailDeleteConfirmations::operator=="); Panic(KGsmuPanicMethodBodyNotImplemented); return EFalse; BULLSEYE_RESTORE @@ -6272,14 +6201,14 @@ { // Ignore in code coverage - not intended to be used BULLSEYE_OFF - LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::operator="); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILDELETECONFIRMATIONS_OPERATOR1_1, "CEnhancedVoiceMailDeleteConfirmations::operator="); Panic(KGsmuPanicMethodBodyNotImplemented); BULLSEYE_RESTORE } void CEnhancedVoiceMailDeleteConfirmations::ConstructL() { - LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::ConstructL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILDELETECONFIRMATIONS_CONSTRUCTL_1, "CEnhancedVoiceMailDeleteConfirmations::ConstructL()"); NewExtensionL(0); @@ -6296,7 +6225,7 @@ */ EXPORT_C CEnhancedVoiceMailDeleteConfirmations* CEnhancedVoiceMailDeleteConfirmations::NewL() { - LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::NewL()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILDELETECONFIRMATIONS_NEWL_1, "CEnhancedVoiceMailDeleteConfirmations::NewL()"); CEnhancedVoiceMailDeleteConfirmations* aCEnhancedVoiceMailDeleteConfirmations=new(ELeave) CEnhancedVoiceMailDeleteConfirmations(); CleanupStack::PushL(aCEnhancedVoiceMailDeleteConfirmations); @@ -6319,7 +6248,7 @@ */ EXPORT_C TUint8 CEnhancedVoiceMailDeleteConfirmations::NumberOfDeletes() { - LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::NumberOfDeletes()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILDELETECONFIRMATIONS_NUMBEROFDELETES_1, "CEnhancedVoiceMailDeleteConfirmations::NumberOfDeletes()"); return iVoiceMailDeletions->Count(); } // CEnhancedVoiceMailDeleteConfirmations::NumberOfDeletes @@ -6341,39 +6270,15 @@ */ EXPORT_C RPointerArray& CEnhancedVoiceMailDeleteConfirmations::GetVoiceMailDeletions() { - LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::GetVoiceMailDeletions()"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CENHANCEDVOICEMAILDELETECONFIRMATIONS_GETVOICEMAILDELETIONS_1, "CEnhancedVoiceMailDeleteConfirmations::GetVoiceMailDeletions()"); return *iVoiceMailDeletions; } // CEnhancedVoiceMailDeleteConfirmations::GetVoiceMailDeletions -/* -void CEnhancedVoiceMailDeleteConfirmations::SetExtension(TDesC& aExtension) - { - LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::SetExtension()"); - - TInt length=aExtension.Length(); - NewBufferL(length); - iExtension->Des().Copy(aExtension); - } // CEnhancedVoiceMailDeleteConfirmations::SetExtension - - -TPtrC CEnhancedVoiceMailDeleteConfirmations::Extension() const - { - LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::Extension()"); - - TPtrC ptr; - if (iExtension) - { - ptr.Set(iExtension->Des()); - } - return ptr; - }*/ - - TUint8* CEnhancedVoiceMailDeleteConfirmations::EncodeL(TUint8* aCurrentPtr, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs) const { - LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::EncodeL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILDELETECONFIRMATIONS_ENCODEL_1, "CEnhancedVoiceMailDeleteConfirmations::EncodeL"); TUint8* startPtr = aCurrentPtr; @@ -6412,7 +6317,7 @@ void CEnhancedVoiceMailDeleteConfirmations::DecodeL(TGsmuLex8& aVoiceMailInfo, CCnvCharacterSetConverter& aCharacterSetConverter, RFs& aFs) { - LOGGSMU1("CEnhancedVoiceMailDeleteConfirmations::DecodeL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CENHANCEDVOICEMAILDELETECONFIRMATIONS_DECODEL_1, "CEnhancedVoiceMailDeleteConfirmations::DecodeL"); CEnhancedVoiceMailBoxInformation::DecodeL(aVoiceMailInfo, aCharacterSetConverter, aFs);