--- a/smsprotocols/smsstack/smsprot/Src/smspread.cpp Tue Aug 31 16:23:08 2010 +0300
+++ b/smsprotocols/smsstack/smsprot/Src/smspread.cpp Wed Sep 01 12:40:21 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1997-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -16,12 +16,6 @@
@file
*/
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "smspreadTraces.h"
-#endif
-
#include "smspread.h"
#include "smspmain.h"
@@ -59,7 +53,7 @@
CSmspReceiveMode& aSmspReceiveMode,
CSmsMonitorDiskSpace& aSmsMonitorDiskSpace)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_NEWL_1, "CSmsPDURead::NewL()");
+ LOGSMSPROT1("CSmsPDURead::NewL()");
CSmsPDURead* smsPduRead = new (ELeave) CSmsPDURead(aSmsComm,
aSmsSettings,
@@ -81,7 +75,7 @@
void CSmsPDURead::ConstructL()
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_CONSTRUCTL_1, "CSmsPDURead::ConstructL()");
+ LOGSMSPROT1("CSmsPDURead::ConstructL()");
ConstructTimeoutL();
User::LeaveIfError(iOOMTimer.CreateLocal());
@@ -134,7 +128,7 @@
*/
void CSmsPDURead::Start()
{
- OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_START_1, "CSmsPDURead::Start(): iStatus=%d, iState=%d", iStatus.Int(), iState );
+ LOGSMSPROT3("CSmsPDURead::Start(): iStatus=%d, iState=%d", iStatus.Int(), iState );
if (IsSupported() && IsActive() == EFalse && iReassemblyStore.IsFull() == EFalse)
{
@@ -148,7 +142,7 @@
void CSmsPDURead::ProcessPDUL()
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_PROCESSPDUL_1, "CSmsPDURead::ProcessPDUL()");
+ LOGSMSPROT1("CSmsPDURead::ProcessPDUL()");
//
// Initilse the Slot location data...
@@ -175,7 +169,7 @@
TRAPD(decodeError, iPduProcessor->DecodeAndProcessPDUL(iSlot, EFalse));
iStatus = decodeError;
- OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_PROCESSPDUL_2, "CSmsPDURead::ProcessPDUL(): DecodeAndProcessPDUL() returned %d", iStatus.Int());
+ LOGSMSPROT2("CSmsPDURead::ProcessPDUL(): DecodeAndProcessPDUL() returned %d", iStatus.Int());
//
// If the PDU cannot be decoded, and this was not due to memory or disk
@@ -206,7 +200,7 @@
*/
void CSmsPDURead::DoRunL()
{
- OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_DORUNL_1, "CSmsPDURead::DoRunL [iStatus=%d, iState=%d]", iStatus.Int(), iState);
+ LOGSMSPROT3("CSmsPDURead::DoRunL [iStatus=%d, iState=%d]", iStatus.Int(), iState);
//
// Handle state changes only for successful operations. Any errors will be
@@ -237,12 +231,8 @@
{
if (iStatus.Int() == KErrNone)
{
-#if (OST_TRACE_CATEGORY & OST_TRACE_CATEGORY_DEBUG)
- LogSmsIfPDUL(_L8("ETEL RX PDU: "), iMsgData, EFalse);
- TBuf<40> timestamp;
- SmsTimeStampL(timestamp);
- OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS,CSMSPDUREAD_DORUNL_2, "%S",timestamp);
-#endif
+ LOGSMSIFPDU(_L8("ETEL RX PDU: "), iMsgData, EFalse);
+ LOGSMSIFTIMESTAMP();
ProcessPDUL();
}
}
@@ -276,8 +266,8 @@
{
if (iStatus.Int() == KErrNone)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_DORUNL_3, "CSmsPDURead::DoRunL in ESmsPDUReadSystemOutOfMemorySendNack2");
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_DORUNL_4, "CSmsPDURead::DoRunL activate post OOM timer");
+ LOGSMSPROT1("CSmsPDURead::DoRunL in ESmsPDUReadSystemOutOfMemorySendNack2");
+ LOGSMSPROT1("CSmsPDURead::DoRunL activate post OOM timer");
iState = ESmsPDUWaitTimerAfterOOM;
iOOMTimer.After(iStatus,KWaitReadPduTime);
SetActive();
@@ -321,7 +311,7 @@
*/
void CSmsPDURead::ResumeSmsReception()
{
- OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_RESUMESMSRECEPTION_1, "CSmsPDURead::ResumeSmsReception [iStatus=%d, iState=%d]", iStatus.Int(), iState );
+ LOGSMSPROT3("CSmsPDURead::ResumeSmsReception [iStatus=%d, iState=%d]", iStatus.Int(), iState );
if (!IsActive())
{
@@ -346,7 +336,7 @@
*/
void CSmsPDURead::Receive()
{
- OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_RECEIVE_1, "CSmsPDURead::Receive [iStatus=%d, iState=%d]", iStatus.Int(), iState );
+ LOGSMSPROT3("CSmsPDURead::Receive [iStatus=%d, iState=%d]", iStatus.Int(), iState );
//
// Check if we need to resume reception first. This may be required if a
@@ -384,7 +374,7 @@
*/
void CSmsPDURead::DoCancel()
{
- OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_DOCANCEL_1, "CSmsPDURead::DoCancel [iStatus=%d iState=%d]", iStatus.Int(), iState );
+ LOGSMSPROT3("CSmsPDURead::DoCancel [iStatus=%d iState=%d]", iStatus.Int(), iState );
TimedSetActiveCancel();
@@ -465,7 +455,7 @@
void CSmsPDURead::AddLogEvent()
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_ADDLOGEVENT_1, "CSmsPDURead::AddLogEvent()");
+ LOGSMSPROT1("CSmsPDURead::AddLogEvent()");
iState = ESmsPDUReadLogging;
@@ -496,7 +486,7 @@
void CSmsPDURead::DoEncodeDeliverReportL()
{
- OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_DOENCODEDELIVERREPORTL_1, "CSmsPDUReadProcess::DoEncodeDeliverReport [iStatus=%d]", iStatus.Int());
+ LOGSMSPROT2("CSmsPDUReadProcess::DoEncodeDeliverReport [iStatus=%d]", iStatus.Int());
iDeliverReport.SetPdu(KNullDesC8);
@@ -512,7 +502,8 @@
case ESmsPDUReadInvalidPDUSendNegativeAck:
case ESmsPDUReadSystemOutOfMemorySendNegativeAck:
{
- OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_DOENCODEDELIVERREPORTL_2, "CSmsPDURead::DoEncodeDeliverReport SendNegativeAck [iStatus=%d, iState=%d, iRpErrorCodesSupported= %d]",iStatus.Int(), iState, iRpErrorCodesSupported);
+ LOGSMSPROT4("CSmsPDURead::DoEncodeDeliverReport SendNegativeAck [iStatus=%d, iState=%d, iRpErrorCodesSupported= %d]",
+ iStatus.Int(), iState, iRpErrorCodesSupported);
deliverReport.SetIsRPError(ETrue);
const TInt failureCause = ErrorToTPError(iStatus.Int());
@@ -523,13 +514,15 @@
case ESmsPDUReadAbsorbInvalidPduSendPositiveAck:
case ESmsPDUReadAbsorbValidPduSendPositiveAck:
{
- OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_DOENCODEDELIVERREPORTL_3, "CSmsPDURead::DoEncodeDeliverReport SendPositiveAck [iStatus=%d, iState=%d, iRpErrorCodesSupported= %d]",iStatus.Int(), iState, iRpErrorCodesSupported);
+ LOGSMSPROT4("CSmsPDURead::DoEncodeDeliverReport SendPositiveAck [iStatus=%d, iState=%d, iRpErrorCodesSupported= %d]",
+ iStatus.Int(), iState, iRpErrorCodesSupported);
deliverReport.SetIsRPError(EFalse);
break;
}
default:
{
- OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_DOENCODEDELIVERREPORTL_4, "CSmsPDURead::DoEncodeDeliverReport [iStatus=%d, iState=%d, iRpErrorCodesSupported= %d]",iStatus.Int(), iState, iRpErrorCodesSupported);
+ LOGSMSPROT4("CSmsPDURead::DoEncodeDeliverReport [iStatus=%d, iState=%d, iRpErrorCodesSupported= %d]",
+ iStatus.Int(), iState, iRpErrorCodesSupported);
SmspPanic( KSmspPanicUnexpectedStateEncountered );
break;
}
@@ -575,7 +568,7 @@
void CSmsPDURead::SendDeliverReport()
{
// Method behaviour based on DEF047323
- OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_SENDDELIVERREPORT_1, "CSmsPDUReadProcess::SendDeliverReport(): iStatus=%d ",iStatus.Int());
+ LOGSMSPROT2("CSmsPDUReadProcess::SendDeliverReport(): iStatus=%d ",iStatus.Int());
MakeStateTransitionBasedOnErrorCode();
@@ -587,7 +580,7 @@
TRAPD(err, DoEncodeDeliverReportL());
if(err != KErrNone)
{
- OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_SENDDELIVERREPORT_2, "CSmsPDURead::DoEncodeDeliverReport [err=%d]", err);
+ LOGSMSPROT2("CSmsPDURead::DoEncodeDeliverReport [err=%d]", err);
}
}
else
@@ -618,7 +611,8 @@
default:
{
- OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_SENDDELIVERREPORT_3, "CSmsPDURead::DoEncodeDeliverReport [iStatus=%d, iState=%d, iRpErrorCodesSupported= %d]",iStatus.Int(), iState, iRpErrorCodesSupported);
+ LOGSMSPROT4("CSmsPDURead::DoEncodeDeliverReport [iStatus=%d, iState=%d, iRpErrorCodesSupported= %d]",
+ iStatus.Int(), iState, iRpErrorCodesSupported);
SmspPanic( KSmspPanicUnexpectedStateEncountered );
}
break;
@@ -634,7 +628,7 @@
*/
void CSmsPDURead::Complete(TInt aError)
{
- OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_COMPLETE_1, "CSmsPDURead::Complete [aError=%d, iState=%d]", aError, iState );
+ LOGSMSPROT3("CSmsPDURead::Complete [aError=%d, iState=%d]", aError, iState );
switch (iState)
{
@@ -734,7 +728,7 @@
*/
void CSmsPDURead::SetErrorCodeStatus(enum TRpErrorCodeIndex aIndex, TBool aValue)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_SETERRORCODESTATUS_1, "CSmsPDURead::SetErrorCodeStatus()");
+ LOGSMSPROT1("CSmsPDURead::SetErrorCodeStatus()");
if (aValue)
{
@@ -758,7 +752,7 @@
*/
TBool CSmsPDURead::GetErrorCodeStatus(enum TRpErrorCodeIndex aIndex)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_GETERRORCODESTATUS_1, "CSmsPDURead::GetErrorCodeStatus()");
+ LOGSMSPROT1("CSmsPDURead::GetErrorCodeStatus()");
TBool rc;
iRpErrorCodesSupported & (((TUint8) 0x01) << aIndex) ? rc = ETrue : rc = EFalse;
@@ -776,7 +770,7 @@
*/
TBool CSmsPDURead::MapRpErrorToIndex(TInt aRpErrorCode, TRpErrorCodeIndex& aIndex)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_MAPRPERRORTOINDEX_1, "CSmsPDURead::MapRpErrorToIndex()");
+ LOGSMSPROT1("CSmsPDURead::MapRpErrorToIndex()");
switch( aRpErrorCode )
{
@@ -909,7 +903,7 @@
TRAPD(ret, ini=CESockIniData::NewL(_L("smswap.sms.esk")));
if(ret!=KErrNone)
{
- OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_READCONFIGURABLESMSSETTINGSL_1, "esk read failed, error code = [%d]", ret);
+ LOGSMSPROT2("esk read failed, error code = [%d]", ret);
User::Leave(ret);
}
@@ -986,7 +980,7 @@
*/
TBool CSmsPDURead::IsSupported() const
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_ISSUPPORTED_1, "CSmsPDURead::IsSupported()");
+ LOGSMSPROT1("CSmsPDURead::IsSupported()");
if (( iMobileSmsCaps.iSmsControl & RMobileSmsMessaging::KCapsReceiveUnstoredClientAck ) ||
( iMobileSmsCaps.iSmsControl & RMobileSmsMessaging::KCapsReceiveUnstoredPhoneAck ) ||
@@ -1013,7 +1007,7 @@
*/
void CSmsPDURead::MakeStateTransitionBasedOnErrorCode()
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_MAKESTATETRANSITIONBASEDONERRORCODE_1, "CSmsPDURead::MakeStateTransitionBasedOnErrorCode()");
+ LOGSMSPROT1("CSmsPDURead::MakeStateTransitionBasedOnErrorCode()");
if (iState != ESmsPDUReadWaitingForPDU)
SmspPanic( KSmspPanicUnexpectedStateEncountered );
@@ -1046,7 +1040,7 @@
(iPduProcessor->IsClass2Message() && iPduProcessor->IsDiscardType0Class2() ) ||
(iPduProcessor->IsClass0Message() == EFalse && iPduProcessor->IsClass2Message() == EFalse)) )
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREAD_MAKESTATETRANSITIONBASEDONERRORCODE_2, "CSmsPDURead::MakeStateTransitionBasedOnErrorCode Absorb Valid PDU");
+ LOGSMSPROT1("CSmsPDURead::MakeStateTransitionBasedOnErrorCode Absorb Valid PDU");
iState = ESmsPDUReadAbsorbValidPduSendPositiveAck;
}
else
@@ -1067,7 +1061,7 @@
*/
CSmsPDUReadLogger* CSmsPDUReadLogger::NewL(RFs& aFs, TInt aPriority)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREADLOGGER_NEWL_1, "CSmsPDUReadLogger::NewL()");
+ LOGSMSPROT1("CSmsPDUReadLogger::NewL()");
CSmsPDUReadLogger* self = new (ELeave) CSmsPDUReadLogger(aPriority);
CleanupStack::PushL(self);
@@ -1097,7 +1091,7 @@
*/
void CSmsPDUReadLogger::ConstructL(RFs& aFs)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREADLOGGER_CONSTRUCTL_1, "CSmsPDUReadLogger::ConstructL()");
+ LOGSMSPROT1("CSmsPDUReadLogger::ConstructL()");
iLogger = CSmsEventLogger::NewL(aFs, Priority());
} // CSmsPDUReadLogger::ConstructL
@@ -1123,7 +1117,7 @@
*/
void CSmsPDUReadLogger::ChangeOrAddLogEvent(CSmsMessage& aSmsMessage, const TLogSmsPduData& aSmsPDUData, const TTime* aTime, TRequestStatus& aStatus)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREADLOGGER_CHANGEORADDLOGEVENT_1, "CSmsPDUReadLogger::ChangeOrAddLogEvent()");
+ LOGSMSPROT1("CSmsPDUReadLogger::ChangeOrAddLogEvent()");
__ASSERT_DEBUG(iState == ESmsPDUReadLoggerIdle, SmspPanic(KSmspPanicUnexpectedState));
@@ -1159,7 +1153,7 @@
*/
void CSmsPDUReadLogger::AddLogEvent()
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREADLOGGER_ADDLOGEVENT_1, "CSmsPDUReadLogger::AddLogEvent()");
+ LOGSMSPROT1("CSmsPDUReadLogger::AddLogEvent()");
iState = ESmsPDUReadLoggerAdd;
@@ -1173,7 +1167,7 @@
*/
void CSmsPDUReadLogger::GetLogEvent()
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREADLOGGER_GETLOGEVENT_1, "CSmsPDUReadLogger::GetLogEvent()");
+ LOGSMSPROT1("CSmsPDUReadLogger::GetLogEvent()");
__ASSERT_DEBUG(iSmsMessage->LogServerId() != KLogNullId, SmspPanic(KSmspPanicLogIdNull));
@@ -1189,7 +1183,7 @@
*/
void CSmsPDUReadLogger::ChangeLogEvent()
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREADLOGGER_CHANGELOGEVENT_1, "CSmsPDUReadLogger::ChangeLogEvent()");
+ LOGSMSPROT1("CSmsPDUReadLogger::ChangeLogEvent()");
iState = ESmsPDUReadLoggerChange;
iLogger->ChangeEvent(iStatus, *iSmsMessage, iTimePtr, *iSmsPDUData);
@@ -1199,7 +1193,7 @@
void CSmsPDUReadLogger::DoRunL()
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREADLOGGER_DORUNL_1, "CSmsPDUReadLogger::DoRunL()");
+ LOGSMSPROT1("CSmsPDUReadLogger::DoRunL()");
switch (iState)
{
@@ -1249,7 +1243,7 @@
// conditions are very difficult to create in a deterministic way.
BULLSEYE_OFF
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREADLOGGER_DOCANCEL_1, "CSmsPDUReadLogger::DoCancel()");
+ LOGSMSPROT1("CSmsPDUReadLogger::DoCancel()");
iLogger->Cancel();
@@ -1270,7 +1264,7 @@
void CSmsPDUReadLogger::Complete(TInt aStatus)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDUREADLOGGER_COMPLETE_1, "CSmsPDUReadLogger::Complete()");
+ LOGSMSPROT1("CSmsPDUReadLogger::Complete()");
// Call the base function to perform the actual complete...
CSmsuActiveBase::Complete(aStatus);