diff -r 17af172ffa5f -r 630d2f34d719 telephonyserverplugins/simatktsy/src/csatnotificationstsy.cpp --- a/telephonyserverplugins/simatktsy/src/csatnotificationstsy.cpp Thu Aug 19 11:03:36 2010 +0300 +++ b/telephonyserverplugins/simatktsy/src/csatnotificationstsy.cpp Tue Aug 31 16:23:08 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-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" @@ -21,6 +21,12 @@ //INCLUDES + +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "csatnotificationstsyTraces.h" +#endif + #include // Etel SAT IPC definitions #include "CSatDataPackage.h" // Parameter packing #include "CSatTsy.h" // Sat Tsy class @@ -58,7 +64,6 @@ #include "CSatNotifyReceiveData.h" // Receive data notification notify class #include "CSatNotifyMoreTime.h" // More time notification notify class #include "CSatTsyReqHandleStore.h" // Request handle class -#include "TfLogger.h" // For TFLOGSTRING #include "CBerTlv.h" // Ber Tlv #include "TTlv.h" // TTlv class #include "msattsy_ipcdefs.h" // Sat Tsy specific request types @@ -76,7 +81,7 @@ CSatTsyReqHandleStore* aSatReqHandleStore ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::NewL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_NEWL_1, "CSAT: CSatNotificationsTsy::NewL"); CSatNotificationsTsy* const satNotificationsTsy = new ( ELeave ) CSatNotificationsTsy( aSatTsy, aSatReqHandleStore ); @@ -84,7 +89,7 @@ satNotificationsTsy->ConstructL(); CleanupStack::Pop(); - TFLOGSTRING("CSAT: CSatNotificationsTsy::NewL, end of method"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_NEWL_2, "CSAT: CSatNotificationsTsy::NewL, end of method"); return satNotificationsTsy; } @@ -98,7 +103,7 @@ void ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::~CSatNotificationsTsy"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_DTOR_1, "CSAT: CSatNotificationsTsy::~CSatNotificationsTsy"); delete iSatTimer; @@ -136,8 +141,7 @@ // Unregister. iSatTsy->MessageManager()->RegisterTsyObject( CMmMessageManagerBase::ESatNotificationsTsyObjType, NULL ); - TFLOGSTRING("CSAT: CSatNotificationsTsy::~CSatNotificationsTsy, \ - end of method"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_DTOR_2, "CSAT: CSatNotificationsTsy::~CSatNotificationsTsy, end of method"); } // ----------------------------------------------------------------------------- @@ -165,7 +169,7 @@ void ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::ConstructL\n" ); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_CONSTRUCTL_1, "CSAT: CSatNotificationsTsy::ConstructL\n" ); // Register iSatTsy->MessageManager()->RegisterTsyObject( @@ -324,7 +328,7 @@ // Checks if MO-SMS control should be activated //unnecassary IPC request as this is already called in CSatNotifyMoSmControlRequest::ConstructL //iSatTsy->MessageManager()->HandleRequestL( ESatTsyQueryMoSmsControlActivated ); - TFLOGSTRING("CSAT: CSatNotificationsTsy::ConstructL, end of method" ); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_CONSTRUCTL_2, "CSAT: CSatNotificationsTsy::ConstructL, end of method" ); } // ----------------------------------------------------------------------------- @@ -339,8 +343,7 @@ const TDataPackage& aPackage ) { - TFLOGSTRING3("CSAT: CSatNotificationsTsy::DoExtFuncL\t IPC:%d,\t Handle:%d", - aIpc, aTsyReqHandle); + OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_DOEXTFUNCL_1, "CSAT: CSatNotificationsTsy::DoExtFuncL\t IPC:%d,\t Handle:%d",aIpc, aTsyReqHandle); TInt ret ( KErrNone ); @@ -502,8 +505,7 @@ } default: { - TFLOGSTRING("CSAT: CSatNotificationsTsy::DoExtFuncL, \ - IPC not supported"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_DOEXTFUNCL_2, "CSAT: CSatNotificationsTsy::DoExtFuncL, IPC not supported"); ret = KErrNotSupported; break; } @@ -522,8 +524,7 @@ const TTsyReqHandle aTsyReqHandle ) { - TFLOGSTRING2("CSAT: CSatNotificationsTsy::CancelService.\ - \n\t\t\t Handle:%d\n\t\t\t", aTsyReqHandle ); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_CANCELSERVICE_1, "CSAT: CSatNotificationsTsy::CancelService.\n\t\t\t Handle:%d\n\t\t\t", aTsyReqHandle ); TInt ret ( KErrNotSupported ); @@ -691,7 +692,7 @@ TInt aErrorCode ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::SetPollingResultL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_SETPOLLINGRESULTL_1, "CSAT: CSatNotificationsTsy::SetPollingResultL"); TUint8 pCmdNumber; TUint8 interval; TBuf additionalInfo; @@ -702,8 +703,7 @@ { if ( iPollingOff ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::SetPollingResultL, \ - Polling Off"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_SETPOLLINGRESULTL_2, "CSAT: CSatNotificationsTsy::SetPollingResultL, Polling Off"); additionalInfo.Zero(); additionalInfo.Append( RSat::KNoAdditionalInfo ); iNotifyPollingOff->CreateTerminalRespL( pCmdNumber, @@ -718,9 +718,7 @@ // NAA status not OK else { - TFLOGSTRING("CSAT: CSatNotificationsTsy::SetPollingResultL, \ - NAA Status Not OK, means that value in request is out of range\ - and default value is used."); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_SETPOLLINGRESULTL_3, "CSAT: CSatNotificationsTsy::SetPollingResultL, NAA Status Not OK, means that value in request is out of range and default value is used."); if ( iPollingOff ) { iPollingOff = EFalse; @@ -735,8 +733,7 @@ // renew the request with legacy maximum.. if ( iLongPollIntervalReq ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::SetPollingResultL, \ - Request set to legacy maximum (25 seconds)"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_SETPOLLINGRESULTL_4, "CSAT: CSatNotificationsTsy::SetPollingResultL, Request set to legacy maximum (25 seconds)"); SetPollingIntervalL( KMaxLegacyPollInterval ); iLongPollIntervalReq = EFalse; } @@ -764,8 +761,7 @@ TUint8 aValue ) { - TFLOGSTRING2("CSAT: CSatNotificationsTsy::SetPollingIntervalL, Value: %d", - aValue); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_SETPOLLINGINTERVALL_1, "CSAT: CSatNotificationsTsy::SetPollingIntervalL, Value: %d",aValue); if ( KMaxLegacyPollInterval < aValue ) { @@ -792,7 +788,7 @@ TUint32 aTimerValue ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::TimerExpirationL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_TIMEREXPIRATIONL_1, "CSAT: CSatNotificationsTsy::TimerExpirationL"); TUint8 time[3] = {0, 0, 0}; TInt num[3]; num[0] = aTimerValue / 3600; // Hours @@ -844,7 +840,7 @@ // None ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::GetSatTimer"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_GETSATTIMER_1, "CSAT: CSatNotificationsTsy::GetSatTimer"); // Pointer to SAT timer return iSatTimer; } @@ -859,7 +855,7 @@ // None ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::SatNotifySetUpCall"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_SATNOTIFYSETUPCALL_1, "CSAT: CSatNotificationsTsy::SatNotifySetUpCall"); // Pointer to NotifySetupCall return iNotifySetUpCall; } @@ -875,8 +871,7 @@ TInt /*aResult*/ ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::\ - SetProactiveCommandOnGoingStatus"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_SETPROACTIVECOMMANDONGOINGSTATUS_1, "CSAT: CSatNotificationsTsy::SetProactiveCommandOnGoingStatus"); TBool ProactiveCommandOngoingStatus; aDataPackage->UnPackData( ProactiveCommandOngoingStatus ); iSatTimer->SetProactiveCommandOnGoingStatus( @@ -895,7 +890,7 @@ TInt aResult ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::CompletePCmdL"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_COMPLETEPCMDL_1, "CSAT: CSatNotificationsTsy::CompletePCmdL"); TPtrC8* data; aDataPackage->UnPackData( &data ); @@ -1046,8 +1041,7 @@ } default: { - TFLOGSTRING("CSAT: CSatNotificationsTsy::CompletePCmdL, \ - Proactive command not supported" ); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_COMPLETEPCMDL_2, "CSAT: CSatNotificationsTsy::CompletePCmdL, Proactive command not supported" ); // If proactive command is not supported, terminal response // with "Command is beyond ME's capabilities" information // will be send. @@ -1082,7 +1076,7 @@ void ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::IsMoSmControlActivated"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_ISMOSMCONTROLACTIVATED_1, "CSAT: CSatNotificationsTsy::IsMoSmControlActivated"); return iNotifyMoSmControlRequest->ActivationStatus(); } @@ -1096,8 +1090,7 @@ TBool aPollingOff ) { - TFLOGSTRING2("CSAT: CSatNotificationsTsy::SetPollingOffStatus \ - status: %d", aPollingOff); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_SETPOLLINGOFFSTATUS_1, "CSAT: CSatNotificationsTsy::SetPollingOffStatus status: %d", aPollingOff); iPollingOff = aPollingOff; } @@ -1111,7 +1104,7 @@ // None ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::PollingOffStatus"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_POLLINGOFFSTATUS_1, "CSAT: CSatNotificationsTsy::PollingOffStatus"); return iPollingOff; } @@ -1125,7 +1118,7 @@ TTlv& aTlv ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::AddLocationInformationToTlv"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_ADDLOCATIONINFORMATIONTOTLV_1, "CSAT: CSatNotificationsTsy::AddLocationInformationToTlv"); // Get the current location data from CSatNotifyLocalInfo const TLocalInformation& locInfo = iNotifyLocalInfo->LocalInformation(); @@ -1153,7 +1146,7 @@ RSat::TControlResult aResult ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::NotifyClientForAlphaId"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_NOTIFYCLIENTFORALPHAID_1, "CSAT: CSatNotificationsTsy::NotifyClientForAlphaId"); iNotifyCallControlRequest->CompleteAlphaId( aAlphaId, aResult, KErrNone ); } @@ -1167,7 +1160,7 @@ void ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::RequestHandleStore"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_REQUESTHANDLESTORE_1, "CSAT: CSatNotificationsTsy::RequestHandleStore"); return iSatReqHandleStore; } @@ -1182,7 +1175,7 @@ TUint8 aPCmdMsgType ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::NotifySatReadyForNotification"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_NOTIFYSATREADYFORNOTIFICATION_1, "CSAT: CSatNotificationsTsy::NotifySatReadyForNotification"); TInt ret( KErrNone ); // Pack parameter for DOS call CSatDataPackage dataPackage; @@ -1194,8 +1187,7 @@ if ( trapError ) { ret = trapError; - TFLOGSTRING2("CSAT: CSatNotificationsTsy::NotifySatReadyForNotification\ - Trap error: %d", trapError); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_NOTIFYSATREADYFORNOTIFICATION_2, "CSAT: CSatNotificationsTsy::NotifySatReadyForNotification Trap error: %d", trapError); } return ret; @@ -1213,8 +1205,7 @@ TTsyReqHandle aTsyReqHandle ) { - TFLOGSTRING2("CSAT: CSatNotificationsTsy::TerminalResponseL.\ - \n\t\t\t Handle:%d\n\t\t\t", aTsyReqHandle ); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_TERMINALRESPONSEL_1, "CSAT: CSatNotificationsTsy::TerminalResponseL.\n\t\t\t Handle:%d\n\t\t\t", aTsyReqHandle ); TInt ret( KErrNone ); @@ -1334,8 +1325,7 @@ } default: { - TFLOGSTRING("CSAT: CSatNotificationsTsy::TerminalResponseL.\ - Proactive command unknown" ); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_TERMINALRESPONSEL_2, "CSAT: CSatNotificationsTsy::TerminalResponseL. Proactive command unknown" ); ret = KErrGeneral; break; } @@ -1358,8 +1348,7 @@ TInt aErrorCode // Error code ) { - TFLOGSTRING2("CSAT: CSatNotificationsTsy::CompleteTerminalResponse - \ - Error:%d", aErrorCode); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_COMPLETETERMINALRESPONSE_1, "CSAT: CSatNotificationsTsy::CompleteTerminalResponse - Error:%d", aErrorCode); TTsyReqHandle reqHandle = iSatTsy->GetSatReqHandleStore()-> ResetTsyReqHandle( CSatTsy::ESatTerminalRspReqType ); @@ -1383,7 +1372,7 @@ TUint8 aGeneralResult ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::CommandPerformedSuccessfully"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_COMMANDPERFORMEDSUCCESSFULLY_1, "CSAT: CSatNotificationsTsy::CommandPerformedSuccessfully"); TBool ret( EFalse ); switch ( aGeneralResult ) { @@ -1402,8 +1391,7 @@ } default: { - TFLOGSTRING("CSAT: CSatNotificationsTsy:: \ - CommandPerformedSuccessfully, EFalse"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_COMMANDPERFORMEDSUCCESSFULLY_2, "CSAT: CSatNotificationsTsy::CommandPerformedSuccessfully, EFalse"); ret = EFalse; break; } @@ -1421,7 +1409,7 @@ TTsyReqHandle aTsyReqHandle ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::NotifyCbDownload"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_NOTIFYCBDOWNLOAD_1, "CSAT: CSatNotificationsTsy::NotifyCbDownload"); TInt ret( KErrNone ); iSatTsy->ReqCompleted( aTsyReqHandle, ret ); return ret; @@ -1437,7 +1425,7 @@ TTsyReqHandle aTsyReqHandle ) { - TFLOGSTRING("CSAT: CSatNotificationsTsy::NotifySmsPpDownload"); + OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFICATIONSTSY_NOTIFYSMSPPDOWNLOAD_1, "CSAT: CSatNotificationsTsy::NotifySmsPpDownload"); TInt ret( KErrNone ); iSatTsy->ReqCompleted( aTsyReqHandle, ret ); return ret;