telephonyserverplugins/simatktsy/src/CSatNotifyRefresh.cpp
branchRCL_3
changeset 65 630d2f34d719
parent 0 3553901f7fa8
child 66 07a122eea281
--- a/telephonyserverplugins/simatktsy/src/CSatNotifyRefresh.cpp	Thu Aug 19 11:03:36 2010 +0300
+++ b/telephonyserverplugins/simatktsy/src/CSatNotifyRefresh.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"
@@ -20,6 +20,12 @@
 
 
 //INCLUDES
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "CSatNotifyRefreshTraces.h"
+#endif
+
 #include <satcs.h>                  // Etel SAT IPC definitions
 #include "CSatTsy.h"                // Tsy class header
 #include "CSatNotifyRefresh.h"  	// Class header
@@ -27,7 +33,6 @@
 #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.
@@ -45,13 +50,13 @@
         CSatNotificationsTsy* aNotificationsTsy 
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifyRefresh::NewL");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_NEWL_1, "CSAT: CSatNotifyRefresh::NewL");
    	CSatNotifyRefresh* const satNotifyRefresh = 
         new ( ELeave ) CSatNotifyRefresh( aNotificationsTsy );
     CleanupStack::PushL( satNotifyRefresh );
     satNotifyRefresh->ConstructL();
     CleanupStack::Pop( satNotifyRefresh );
-    TFLOGSTRING("CSAT: CSatNotifyRefresh::NewL, end of method");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_NEWL_2, "CSAT: CSatNotifyRefresh::NewL, end of method");
     return satNotifyRefresh;
     }
 
@@ -65,7 +70,7 @@
 		// None
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifyRefresh::~CSatNotifyRefresh");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_DTOR_1, "CSAT: CSatNotifyRefresh::~CSatNotifyRefresh");
     }
     
 // -----------------------------------------------------------------------------
@@ -91,7 +96,7 @@
         // None
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifyRefresh::ConstructL");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_CONSTRUCTL_1, "CSAT: CSatNotifyRefresh::ConstructL");
     }
 
 // -----------------------------------------------------------------------------
@@ -105,7 +110,7 @@
         const TDataPackage& aPackage  
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifyRefresh::Notify");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_NOTIFY_1, "CSAT: CSatNotifyRefresh::Notify");
 
     // Save data pointer to client side for completion
     iRefreshV2Pckg = reinterpret_cast<RSat::TRefreshV2Pckg*>( 
@@ -136,7 +141,7 @@
         const TDataPackage& aPackage 
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifyRefresh::NotifyRefreshRequired");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_NOTIFYREFRESHREQUIRED_1, "CSAT: CSatNotifyRefresh::NotifyRefreshRequired");
 
     // Save data pointer to client side for completion
     iRefreshRequiredV2Pckg = reinterpret_cast<RSat::TRefreshV2Pckg*>( 
@@ -166,7 +171,7 @@
         const TTsyReqHandle aTsyReqHandle
         )
     {
-    TFLOGSTRING( "CSAT: CSatNotifyRefresh::CancelNotification" );
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_CANCELNOTIFICATION_1,  "CSAT: CSatNotifyRefresh::CancelNotification" );
     
     // Reset the request handle
     iNotificationsTsy->iSatReqHandleStore->ResetTsyReqHandle( 
@@ -191,7 +196,7 @@
     	const TTsyReqHandle aTsyReqHandle
      	)
 	{
-    TFLOGSTRING( "CSAT: CSatNotifyRefresh::CancelRefreshRequiredNotification" );
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_CANCELREFRESHREQUIREDNOTIFICATION_1,  "CSAT: CSatNotifyRefresh::CancelRefreshRequiredNotification" );
         
     // Reset the request handle
     iNotificationsTsy->iSatReqHandleStore->ResetTsyReqHandle( 
@@ -218,15 +223,14 @@
         TInt aErrorCode                 
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifyRefresh::CompleteNotifyL");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETENOTIFYL_1, "CSAT: CSatNotifyRefresh::CompleteNotifyL");
 
     TInt ret( KErrNone );
 	TBuf<1> additionalInfo;	
     // Unpack parameters
     TPtrC8* data;
     aDataPackage->UnPackData( &data );
-    TFLOGSTRING2("CSAT: CSatNotifyRefresh::CompleteNotifyL, dataLength: %d", 
-        data->Length());
+    OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETENOTIFYL_2, "CSAT: CSatNotifyRefresh::CompleteNotifyL, dataLength: %d", data->Length());
     // Reset req handle. Returns the deleted req handle
     TTsyReqHandle reqHandle = iNotificationsTsy->iSatReqHandleStore->
         TsyReqHandle( CSatTsy::ESatNotifyRefreshPCmdReqType );
@@ -323,8 +327,7 @@
 	        else if ( KFileChangeNotification == iNotificationsTsy->
 	        	iTerminalRespData.iCommandDetails[KCommandQualifier] )
 	            {
-	            TFLOGSTRING("CSAT: CSatNotifyRefresh::CompleteNotifyL,\
-	                File list missing");
+	            OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETENOTIFYL_3, "CSAT: CSatNotifyRefresh::CompleteNotifyL, File list missing");
 	            // File list object is missing, return terminal resp immediately.
 	            ret = KErrCorrupt;
 	            additionalInfo.Zero();
@@ -340,9 +343,7 @@
 	                {
 	                case KSimInitFullFileChangeNotification:
 	                    {
-	                    TFLOGSTRING("CSAT: CSatNotifyRefresh::\
-	                    	CompleteNotifyL, Refresh mode: Sim init \
-	                    	and full file change notification");
+	                    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETENOTIFYL_4, "CSAT: CSatNotifyRefresh::CompleteNotifyL, Refresh mode: Sim init and full file change notification");
 	                    refreshV2.iType = 
 	                        RSat::ESimInitFullFileChangeNotification;
 	                    iInternalCache = CSatNotificationsTsy::ECacheEFSST + 
@@ -351,11 +352,8 @@
 	                    }
 	                case KFileChangeNotification:
 	                    {
-	                    TFLOGSTRING("CSAT: CSatNotifyRefresh::CompleteNotifyL\
-	                    	Refresh mode: File Change Notification");
-	                    TFLOGSTRING2("CSAT: CSatNotifyRefresh::CompleteNotifyL\
-	                    	Number of files: %d", 
-	                    	refreshV2.iFileList.Length() );
+	                    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETENOTIFYL_5, "CSAT: CSatNotifyRefresh::CompleteNotifyL Refresh mode: File Change Notification");
+	                    OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETENOTIFYL_6, "CSAT: CSatNotifyRefresh::CompleteNotifyL Number of files: %d", refreshV2.iFileList.Length() );
 	                    refreshV2.iType = RSat::EFileChangeNotification;
 	                    
 	                    if ( ( KErrNotFound != refreshV2.iFileList.Locate( 
@@ -378,19 +376,14 @@
 	                    }
 	                case KSimInitFileChangeNotification:
 	                    {
-	                    TFLOGSTRING("CSAT: CSatNotifyRefresh::CompleteNotifyL,\
-	                    	Refresh mode: Sim init and file \
-	                    	change notification");
-	                    TFLOGSTRING2("CSAT: CSatNotifyRefresh::CompleteNotifyL\
-	                    	Number of files: %d", 
-	                    	refreshV2.iFileList.Length() );
+	                    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETENOTIFYL_7, "CSAT: CSatNotifyRefresh::CompleteNotifyL, Refresh mode: Sim init and file change notification");
+	                    OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETENOTIFYL_8, "CSAT: CSatNotifyRefresh::CompleteNotifyL Number of files: %d", refreshV2.iFileList.Length() );
 	                    refreshV2.iType = RSat::ESimInitFileChangeNotification;
 	                    break;
 	                    }
 	                case KSimInit:
 	                    {
-	                    TFLOGSTRING("CSAT: CSatNotifyRefresh::CompleteNotifyL\
-	                    	Refresh mode: Sim init ");
+	                    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETENOTIFYL_9, "CSAT: CSatNotifyRefresh::CompleteNotifyL Refresh mode: Sim init ");
 	                    refreshV2.iType = RSat::ESimInit;
 	                    iInternalCache = CSatNotificationsTsy::ECacheEFSST 
 	                    	+ CSatNotificationsTsy::ECacheEFCBMID;
@@ -401,16 +394,14 @@
 	                case KSimReset:
 	                    {
 	                    refreshV2.iType = RSat::ESimReset;
-	                    TFLOGSTRING("CSAT: CSatNotifyRefresh::CompleteNotifyL\
-	                    	Refresh mode: Reset");
+	                    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETENOTIFYL_10, "CSAT: CSatNotifyRefresh::CompleteNotifyL Refresh mode: Reset");
 	                    iInternalCache = CSatNotificationsTsy::ECacheEFSST + 
 	                    	CSatNotificationsTsy::ECacheEFCBMID;
 	                    break;
 	                    }
 	                case KUSIMApplicationReset:
 	                    {
-	                    TFLOGSTRING("CSAT: CSatNotifyRefresh::CompleteNotifyL\
-	                    	Refresh mode: USIM Application Reset");
+	                    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETENOTIFYL_11, "CSAT: CSatNotifyRefresh::CompleteNotifyL Refresh mode: USIM Application Reset");
 	                    refreshV2.iType = RSat::EUsimApplicationReset;
 	                    iInternalCache = CSatNotificationsTsy::ECacheEFSST + 
 	                    	CSatNotificationsTsy::ECacheEFCBMID;
@@ -418,15 +409,13 @@
 	                    }
 	                case K3GSessionReset:
 	                    {
-	                    TFLOGSTRING("CSAT: CSatNotifyRefresh::CompleteNotifyL\
-	                    	Refresh mode: 3G Session Reset");
+	                    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETENOTIFYL_12, "CSAT: CSatNotifyRefresh::CompleteNotifyL Refresh mode: 3G Session Reset");
 	                    refreshV2.iType = RSat::E3GSessionReset;
 	                    break;
 	                    }
 	                default:
 	                    {
-	                    TFLOGSTRING("CSAT: CSatNotifyRefresh::CompleteNotifyL\
-	                    	Refresh type not set!");
+	                    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETENOTIFYL_13, "CSAT: CSatNotifyRefresh::CompleteNotifyL Refresh type not set!");
 	                    // This migth be an error case
 	                    refreshV2.iType = RSat::ERefreshTypeNotSet;
 	                    break;
@@ -461,8 +450,7 @@
         }
     else
     	{        
-    	TFLOGSTRING("CSAT: CSatNotifyRefresh::CompleteNotifyL,\
-    	    One or more of the requests not ongoing");
+    	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETENOTIFYL_14, "CSAT: CSatNotifyRefresh::CompleteNotifyL, One or more of the requests not ongoing");
         // Some of the request were not on, returning response immediately
         additionalInfo.Zero();
         additionalInfo.Append( RSat::KNoSpecificMeProblem );
@@ -486,7 +474,7 @@
         TDes8* aRsp
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifyRefresh::TerminalResponseL");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_TERMINALRESPONSEL_1, "CSAT: CSatNotifyRefresh::TerminalResponseL");
 
     RSat::TRefreshRspV1Pckg* aRspPckg = 
             reinterpret_cast<RSat::TRefreshRspV1Pckg*>( aRsp );
@@ -508,8 +496,7 @@
     		( RSat::KSuccess != rspV1.iGeneralResult ) ) && 
     		( EImsiNotEqual != iImsiState ) )
         {
-        TFLOGSTRING("CSAT: CSatNotifyRefresh::TerminalResponseL, \
-        	S60 has done the Refresh" );
+        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_TERMINALRESPONSEL_2, "CSAT: CSatNotifyRefresh::TerminalResponseL, S60 has done the Refresh" );
         // Send terminal response
         CreateTerminalRespL( pCmdNumber, (TUint8) rspV1.iGeneralResult, 
         	additionalInfo );
@@ -539,11 +526,10 @@
         // None
     	)
     {
-    TFLOGSTRING("CSAT: CSatNotifyRefresh::CompleteImsiChange");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETEIMSICHANGE_1, "CSAT: CSatNotifyRefresh::CompleteImsiChange");
     if ( ERefreshSimInitReceived == iImsiState )
         {
-        TFLOGSTRING("CSAT: CSatNotifyRefresh::CompleteImsiChange, \
-            IMSI not equal");
+        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETEIMSICHANGE_2, "CSAT: CSatNotifyRefresh::CompleteImsiChange, IMSI not equal");
         iImsiState = EImsiNotEqual;
         }        
     }    
@@ -561,7 +547,7 @@
         TDesC16& aAdditionalInfo		   
 		)
     {
-	TFLOGSTRING("CSAT: CSatNotifyRefresh::CreateTerminalRespL");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_CREATETERMINALRESPL_1, "CSAT: CSatNotifyRefresh::CreateTerminalRespL");
     // Create and append response data
     TTlv tlvSpecificData;
     // append result tag
@@ -601,7 +587,7 @@
 		const TDataPackage& aPackage
     	)
     {
-    TFLOGSTRING("CSAT: CSatNotifyRefresh::RefreshAllowed ");       
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_REFRESHALLOWEDL_1, "CSAT: CSatNotifyRefresh::RefreshAllowed ");
     RSat::TRefreshRspV1Pckg* aRspPckg = 
             reinterpret_cast<RSat::TRefreshRspV1Pckg*>( aPackage.Des1n() );
     RSat::TRefreshRspV1& rspV1 = ( *aRspPckg ) ();
@@ -625,8 +611,7 @@
     else
         {
         // Refresh not allowed by the client
-        TFLOGSTRING("CSAT: CSatNotifyRefresh::RefreshAllowed, refresh was not \
-            allowed by the client");
+        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_REFRESHALLOWEDL_2, "CSAT: CSatNotifyRefresh::RefreshAllowed, refresh was not allowed by the client");
 		TBuf<RSat::KAdditionalInfoMaxSize> additionalInfo;
 		additionalInfo.Append(RSat::KNoSpecificMeProblem);
         if ( RSat::KNoAdditionalInfo != rspV1.iInfoType )
@@ -654,7 +639,7 @@
         TInt /*aErrorCode*/              
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifyRefresh::CompleteTerminalRespDataL");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETETERMINALRESPDATAL_1, "CSAT: CSatNotifyRefresh::CompleteTerminalRespDataL");
     TInt ret( KErrNone );
     CSatNotificationsTsy::TTerminalRespData* terminalRespData;
     // Send terminal response
@@ -681,13 +666,11 @@
     TTsyReqHandle reqHandle = iNotificationsTsy->iSatReqHandleStore->
         ResetTsyReqHandle( CSatTsy::ESatNotifyRefreshPCmdReqType );
 		
-    TFLOGSTRING3("CSAT: CSatNotifyRefresh::CompleteRequest.\
-    	 \n\t\t\t Handle:%d\n\t\t\t Error:%d", reqHandle, aErrorCode);
+    OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETEREQUEST_1, "CSAT: CSatNotifyRefresh::CompleteRequest.\n\t\t\t Handle:%d\n\t\t\t Error:%d", reqHandle, aErrorCode);
     	 		
     iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, aErrorCode);
 
-    TFLOGSTRING("CSAT: CSatNotifyRefresh::CompleteRequest. Request is \
-    	now completed");    
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETEREQUEST_2, "CSAT: CSatNotifyRefresh::CompleteRequest. Request is now completed");
     }     
 #else //USING_CTSY_DISPATCHER
 void CSatNotifyRefresh::CompleteRequest
@@ -702,15 +685,13 @@
     TTsyReqHandle reqHandle = iNotificationsTsy->iSatReqHandleStore->
         ResetTsyReqHandle( CSatTsy::ESatNotifyRefreshPCmdReqType );
 
-    TFLOGSTRING3("CSAT: CSatNotifyRefresh::CompleteRequest.\
-    	 \n\t\t\t Handle:%d\n\t\t\t Error:%d", reqHandle, retValue);
+    OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETEREQUEST1_1, "CSAT: CSatNotifyRefresh::CompleteRequest. \n\t\t\t Handle:%d\n\t\t\t Error:%d", reqHandle, retValue);
     	 		   
     if(CSatTsy::ESatReqHandleUnknown != reqHandle) 
     	{
         iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, retValue );
 
-        TFLOGSTRING("CSAT: CSatNotifyRefresh::CompleteRequest. Request is \
-        	now completed");
+        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYREFRESH_COMPLETEREQUEST1_2, "CSAT: CSatNotifyRefresh::CompleteRequest. Request is now completed");
     	} 
     
     }