diff -r 630d2f34d719 -r 07a122eea281 telephonyserverplugins/simatktsy/src/CSatNotifySetUpMenu.cpp --- a/telephonyserverplugins/simatktsy/src/CSatNotifySetUpMenu.cpp Tue Aug 31 16:23:08 2010 +0300 +++ b/telephonyserverplugins/simatktsy/src/CSatNotifySetUpMenu.cpp Wed Sep 01 12:40:21 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-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" @@ -20,12 +20,6 @@ //INCLUDES - -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "CSatNotifySetUpMenuTraces.h" -#endif - #include // Etel SAT IPC definitions #include "CSatTsy.h" // Tsy class header #include "CSatNotifySetUpMenu.h" // Tsy class header @@ -33,6 +27,7 @@ #include "CBerTlv.h" // Ber Tlv data handling #include "TTlv.h" // TTlv class #include "CSatDataPackage.h" // Parameter packing +#include "TfLogger.h" // For TFLOGSTRING #include "TSatUtility.h" // Utilities #include "CSatTsyReqHandleStore.h" // Request handle class #include "cmmmessagemanagerbase.h" // Message manager class for forwarding req. @@ -47,13 +42,13 @@ CSatNotificationsTsy* aNotificationsTsy ) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_NEWL_1, "CSAT: CSatNotifySetUpMenu::NewL"); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::NewL"); CSatNotifySetUpMenu* const satNotifySetUpMenu = new ( ELeave ) CSatNotifySetUpMenu( aNotificationsTsy ); CleanupStack::PushL( satNotifySetUpMenu ); satNotifySetUpMenu->ConstructL(); CleanupStack::Pop( satNotifySetUpMenu ); - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_NEWL_2, "CSAT: CSatNotifySetUpMenu::NewL"); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::NewL"); return satNotifySetUpMenu; } @@ -67,7 +62,7 @@ // None ) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_DTOR_1, "CSAT: CSatNotifySetUpMenu::~CSatNotifySetUpMenu"); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::~CSatNotifySetUpMenu"); } // ----------------------------------------------------------------------------- @@ -93,7 +88,7 @@ // None ) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_CONSTRUCTL_1, "CSAT: CSatNotifySetUpMenu::ConstructL"); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::ConstructL"); iItemsNextIndicatorRemoved = EFalse; } @@ -109,7 +104,7 @@ const TDataPackage& aPackage ) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_NOTIFY_1, "CSAT: CSatNotifySetUpMenu::Notify"); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::Notify"); // Save data pointer to client side for completion iSetUpMenuV2Pckg = reinterpret_cast( aPackage.Des1n() ); @@ -133,7 +128,7 @@ const TTsyReqHandle aTsyReqHandle ) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_CANCELNOTIFICATION_1, "CSAT: CSatNotifySetUpMenu::CancelNotification"); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CancelNotification"); // Reset the request handle TTsyReqHandle reqHandle = iNotificationsTsy->iSatReqHandleStore-> ResetTsyReqHandle( CSatTsy::ESatNotifySetUpMenuPCmdReqType ); @@ -155,7 +150,7 @@ TInt aErrorCode ) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_1, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL"); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CompleteNotifyL"); TInt ret( KErrNone ); TInt returnValue( KErrNone ); // Unpack parameters @@ -167,7 +162,8 @@ iNotificationsTsy->iSatReqHandleStore->ResetTsyReqHandle( CSatTsy::ESatNotifySetUpMenuPCmdReqType ); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_2, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL reqHandle is :%d", reqHandle ); + TFLOGSTRING2("CSAT: CSatNotifySetUpMenu::CompleteNotifyL reqHandle is :%d", + reqHandle ); // Get ber tlv CBerTlv berTlv; @@ -225,7 +221,7 @@ TUint16 alphaIdLength = alphaIdentifier.GetLength(); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_3, "CSAT: Alpha ID length:%d", alphaIdLength ); + TFLOGSTRING2("CSAT: Alpha ID length:%d", alphaIdLength ); if ( RSat::KAlphaIdMaxSize < alphaIdLength ) { @@ -243,11 +239,13 @@ // Set SAT toolikit name, send SAT SMS logging purpose iToolKitName.Copy( menu.iAlphaId.iAlphaId ); - OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_4, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, iToolKitName:%S", iToolKitName ); + TFLOGSTRING2("CSAT: CSatNotifySetUpMenu::CompleteNotifyL, \ + iToolKitName:%S", &iToolKitName ); } else { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_5, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, Wrong length of alpha id."); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CompleteNotifyL,\ + Wrong length of alpha id."); } // Alpha Id status @@ -257,7 +255,8 @@ } else { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_6, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, Alpha ID is NULL"); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CompleteNotifyL,\ + Alpha ID is NULL"); menu.iAlphaId.iStatus = RSat::EAlphaIdNull; } @@ -270,7 +269,8 @@ } else { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_7, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, No Help available"); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CompleteNotifyL,\ + No Help available"); // No help menu.iHelp = RSat::ENoHelpAvailable; } @@ -307,12 +307,14 @@ } else if ( KErrNotFound == retValue ) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_8, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, No Icon ID"); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CompleteNotifyL,\ + No Icon ID"); menu.iIconListQualifier = RSat::ENoIconId; } else { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_9, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, Wrong return value of icon identifier list."); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CompleteNotifyL, \ + Wrong return value of icon identifier list."); } //Items Data @@ -374,7 +376,8 @@ // Suffle through all the menu items stringLength = 0; - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_10, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, item number:%d", i ); + TFLOGSTRING2("CSAT: CSatNotifySetUpMenu::CompleteNotifyL, \ + item number:%d", i ); // Fill the new item newItem.iItemId = itemsData.GetShortInfo( @@ -401,12 +404,14 @@ newItem.iItemString ); } - OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_11, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL newItem.iItemString:%S", newItem.iItemString ); + TFLOGSTRING2("CSAT: CSatNotifySetUpMenu::CompleteNotifyL \ + newItem.iItemString:%S", &newItem.iItemString ); // Adding the new menuitem if( NULL != iconIdList.Size() && ( i < iconIdList.Length() ) ) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_12, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL Icons on the list" ); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CompleteNotifyL \ + Icons on the list" ); if( ( NULL != itemNextIndicator.Size() ) && ( i < itemNextIndicator.Length() ) ) { @@ -414,7 +419,8 @@ if ( KErrNoMemory == menu.AddItem( newItem, itemNextIndicator[i], iconIdList[i] ) ) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_13, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, Menu item length exceeded"); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::\ + CompleteNotifyL, Menu item length exceeded"); // Too many or long menu items ret = KErrCorrupt; } @@ -423,7 +429,8 @@ else if ( KErrNoMemory == menu.AddItemIcon( newItem, iconIdList[i] ) ) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_14, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, Menu item length exceeded"); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::\ + CompleteNotifyL, Menu item length exceeded"); // Too many or long menu items ret = KErrCorrupt; } @@ -438,7 +445,8 @@ if ( KErrNoMemory == menu.AddItem( newItem, itemNextIndicator[i] ) ) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_15, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, Menu item length exceeded"); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::\ + CompleteNotifyL, Menu item length exceeded"); // Too many or long menu items ret = KErrCorrupt; } @@ -449,7 +457,8 @@ TInt retAdd = menu.AddItem( newItem ); if ( KErrNoMemory == retAdd ) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_16, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, Menu item length exceeded"); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::\ + CompleteNotifyL, Menu item length exceeded"); // Too many or long menu items // If there is not enough space left in the buffer used // by the menu KErrNoMemory is returned. @@ -478,12 +487,14 @@ } // Complete to the client side - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_17, "CSAT: Completing CSatNotifySetUpMenu: error %d",aErrorCode ); + TFLOGSTRING2("CSAT: Completing CSatNotifySetUpMenu: error %d", + aErrorCode ); iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, ret ); } else { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_18, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, Request not ongoing"); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CompleteNotifyL, \ + Request not ongoing"); TBuf16<1>additionalInfo; additionalInfo.Append ( RSat::KNoSpecificMeProblem ); CreateTerminalRespL( pCmdNumber, @@ -502,7 +513,7 @@ TDes8* aRsp ) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_TERMINALRESPONSEL_1, "CSAT: CSatNotifySetUpMenu::TerminalResponseL"); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::TerminalResponseL"); TInt ret( KErrNone ); TBuf16<1> additionalInfo; @@ -541,7 +552,8 @@ if( RSat::KSuccess == rspV1.iGeneralResult && iItemsNextIndicatorRemoved ) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_TERMINALRESPONSEL_2, "CSatNotifySetUpMenu::TerminalResponseL, iItemsNextIndicatorRemoved"); + TFLOGSTRING("CSatNotifySetUpMenu::TerminalResponseL, \ + iItemsNextIndicatorRemoved"); rspV1.iGeneralResult = RSat::KPartialComprehension; } @@ -566,7 +578,7 @@ const TDesC16& aAdditionalInfo ) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_CREATETERMINALRESPL_1, "CSAT: CSatNotifySetUpMenu::CreateTerminalRespL"); + TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CreateTerminalRespL"); // Create and append response data TTlv tlvSpecificData; // Create General Result TLV here