telephonyserverplugins/simatktsy/src/CSatNotifyMoSmControlRequest.cpp
changeset 42 3adadc800673
parent 0 3553901f7fa8
child 66 07a122eea281
--- a/telephonyserverplugins/simatktsy/src/CSatNotifyMoSmControlRequest.cpp	Thu May 27 14:05:07 2010 +0300
+++ b/telephonyserverplugins/simatktsy/src/CSatNotifyMoSmControlRequest.cpp	Fri Jun 11 14:49:29 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 "CSatNotifyMoSmControlRequestTraces.h"
+#endif
+
 #include <satcs.h>                  // Etel SAT IPC definitions
 #include "CSatTsy.h"                // Tsy class header
 #include "CSatNotifyMoSmControlRequest.h"  // Class header
@@ -28,7 +34,6 @@
 #include "BerTlv_defs.h"            // Ber Tlv specific definitions
 #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.
@@ -44,13 +49,13 @@
         CSatNotificationsTsy* aNotificationsTsy 
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::NewL");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_NEWL_1, "CSAT: CSatNotifyMoSmControlRequest::NewL");
    	CSatNotifyMoSmControlRequest* const satNotifyMoSmControlRequest = 
         new ( ELeave ) CSatNotifyMoSmControlRequest( aNotificationsTsy );
     CleanupStack::PushL( satNotifyMoSmControlRequest );
     satNotifyMoSmControlRequest->ConstructL();
     CleanupStack::Pop( satNotifyMoSmControlRequest );
-    TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::NewL, end of method");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_NEWL_2, "CSAT: CSatNotifyMoSmControlRequest::NewL, end of method");
     return satNotifyMoSmControlRequest;
     }
 
@@ -64,8 +69,7 @@
 		// None
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::\
-    	~CSatNotifyMoSmControlRequest");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_DTOR_1, "CSAT: CSatNotifyMoSmControlRequest::~CSatNotifyMoSmControlRequest");
     }
     
 // -----------------------------------------------------------------------------
@@ -91,14 +95,13 @@
         // None
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::ConstructL");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_CONSTRUCTL_1, "CSAT: CSatNotifyMoSmControlRequest::ConstructL");
     // Checks if MO-SMS control should be activated
     iNotificationsTsy->iSatTsy->MessageManager()->HandleRequestL( 
     		ESatTsyMoSmsControlActivation );	
     // Initialize MO-SMS Control to deactivated
     iIsMoSmsCtrlActivated = EFalse; 
-    TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::ConstructL, \
-    	end of method"); 	
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_CONSTRUCTL_2, "CSAT: CSatNotifyMoSmControlRequest::ConstructL, end of method");
     }
 
 // -----------------------------------------------------------------------------
@@ -113,7 +116,7 @@
         const TDataPackage& aPackage 
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::Notify");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_NOTIFY_1, "CSAT: CSatNotifyMoSmControlRequest::Notify");
 
     // Save data pointer to client side for completion      
     iMoSmControlV1Pckg = reinterpret_cast<RSat::TMoSmControlV1Pckg*>(
@@ -137,7 +140,7 @@
         const TTsyReqHandle aTsyReqHandle
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::CancelNotification");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_CANCELNOTIFICATION_1, "CSAT: CSatNotifyMoSmControlRequest::CancelNotification");
     
     // Reset the request handle
     TTsyReqHandle reqHandle = iNotificationsTsy->iSatReqHandleStore->
@@ -162,7 +165,7 @@
         TInt aErrorCode                
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::CompleteNotifyL" );
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_COMPLETENOTIFYL_1, "CSAT: CSatNotifyMoSmControlRequest::CompleteNotifyL" );
     
     CSatNotificationsTsy::TMoSmCtrlData moSmCtrlData;
 
@@ -186,13 +189,11 @@
 		TDesC8* atkData = NULL;
 		aDataPackage->UnPackData( &atkData );
     	
-    	TFLOGSTRING2("CSAT: CSatNotifyMoSmControlRequest::CompleteNotifyL\
-    	    Data length: %d", ( *atkData ).Length() );
+    	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_COMPLETENOTIFYL_2, "CSAT: CSatNotifyMoSmControlRequest::CompleteNotifyL Data length: %d", ( *atkData ).Length() );
     	
 	    if ( KTlvMaxSize < ( *atkData ).Length() )
 	    	{
-            TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::CompleteNotifyL, \
-                Data length exceeded" );                
+            OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_COMPLETENOTIFYL_3, "CSAT: CSatNotifyMoSmControlRequest::CompleteNotifyL, Data length exceeded" );
             // Data not consistent, reject the call
             moSmCtrlData.iResult = KMoSmCtrlResultNotAllowed;
 	        isDataOk = EFalse;
@@ -205,8 +206,7 @@
 
             if ( KMoSmCtrlResultAllowedWithModifications == ( *atkData )[0] )
                 {
-                TFLOGSTRING3("CSAT: CSatNotifyMoSmControlRequest::CompleteNotifyL\
-    	            Addr1: %s, Addr2: %s", &addr1, &addr2 );
+                OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_COMPLETENOTIFYL_4, "CSAT: CSatNotifyMoSmControlRequest::CompleteNotifyL Addr1: %s, Addr2: %s", addr1, addr2 );
                 simRespDataConsistent = VerifyNotificationData( addr1, addr2 );      
                 }
                 
@@ -217,8 +217,7 @@
                 }
             else
                 {
-                TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::CompleteNotifyL, \
-                	NAA response data not consistent" );                
+                OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_COMPLETENOTIFYL_5, "CSAT: CSatNotifyMoSmControlRequest::CompleteNotifyL, NAA response data not consistent" );
                 // Data not consistent, reject the sms
                 moSmCtrlData.iResult = KMoSmCtrlResultNotAllowed;
 	        	isDataOk = EFalse;
@@ -300,15 +299,12 @@
 	        } // If MO SM Ctrl Activated and data ok
 	    else
 	        {
-	        TFLOGSTRING3("LSAT: CSatMoSmsCtrlMessHandler::CompleteNotifyL, \
-    	        iIsMoSmsCtrlActivated: %d, isDataOk: %d ", 
-    	        iIsMoSmsCtrlActivated, isDataOk);
+	        OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_COMPLETENOTIFYL_6, "LSAT: CSatMoSmsCtrlMessHandler::CompleteNotifyL, iIsMoSmsCtrlActivated: %d, isDataOk: %d ", iIsMoSmsCtrlActivated, isDataOk);
 	        }
     	} // if KErrNone
     else
         {
-        TFLOGSTRING("LSAT: CSatMoSmsCtrlMessHandler::CompleteNotifyL, \
-        	Error in notification ");
+        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_COMPLETENOTIFYL_7, "LSAT: CSatMoSmsCtrlMessHandler::CompleteNotifyL, Error in notification ");
         moSmCtrlData.iResult = KMoSmCtrlResultNotAllowed;
         // Pack data and send response right away to NAA
     	CSatDataPackage dataPackage;
@@ -332,13 +328,11 @@
 	    TInt /*aResult*/
 	    )   
     {   
-    TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::\
-        CreateMoSmsCtrlEnvelopeL"); 
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_CREATEMOSMSCTRLENVELOPEL_1, "CSAT: CSatNotifyMoSmControlRequest::CreateMoSmsCtrlEnvelopeL");
     // Check first if the MO-SMS is activated
     if ( iIsMoSmsCtrlActivated )
         {  
-    	TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::\
-    		CreateMoSmsCtrlEnvelopeL, MO SM Ctrl Activated");
+    	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_CREATEMOSMSCTRLENVELOPEL_2, "CSAT: CSatNotifyMoSmControlRequest::CreateMoSmsCtrlEnvelopeL, MO SM Ctrl Activated");
     	
 	    CSatNotificationsTsy::TAddressData* addressData;
 	    
@@ -390,8 +384,7 @@
     {
     // Unpack data
     aDataPackage->UnPackData( iIsMoSmsCtrlActivated );
-    TFLOGSTRING2("CSAT: CSatNotifyMoSmControlRequest::SetActivationStatus, %d",
-    	iIsMoSmsCtrlActivated );
+    OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_SETACTIVATIONSTATUS_1, "CSAT: CSatNotifyMoSmControlRequest::SetActivationStatus, %d",iIsMoSmsCtrlActivated );
     }
 
 // -----------------------------------------------------------------------------
@@ -404,7 +397,7 @@
 		void
 		)
     {
-    TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::ActivationStatus");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_ACTIVATIONSTATUS_1, "CSAT: CSatNotifyMoSmControlRequest::ActivationStatus");
     return iIsMoSmsCtrlActivated;
     }
     
@@ -419,7 +412,7 @@
 		TDes8& aAddr 
 		)
     {
-    TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::CleanAddressData");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_CLEANADDRESSDATA_1, "CSAT: CSatNotifyMoSmControlRequest::CleanAddressData");
     // Starts from index 1, since index 0 is for TON/NPI    
     for ( TInt i=1; i < aAddr.Length(); i++ )
         {
@@ -452,7 +445,7 @@
 	    RSat::TAlphaId& aAlphaId
 	    )
     {
-    TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::ParseNotification");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_PARSENOTIFICATION_1, "CSAT: CSatNotifyMoSmControlRequest::ParseNotification");
     
     // Input data:
     // aAtkData[0] : result
@@ -496,8 +489,7 @@
         // Check which TLV is received
         if ( ( KTlvAddressTag == tag ) && ( !address1_got ) )
             {
-            TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::ParseNotification\
-                Address 1");
+            OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_PARSENOTIFICATION_2, "CSAT: CSatNotifyMoSmControlRequest::ParseNotification Address 1");
             // RP address first
             address1_got = ETrue;
             // Copy data to output variable
@@ -510,8 +502,7 @@
             }
         else if ( KTlvAddressTag == tag )
             {
-            TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::ParseNotification\
-                Address 2");
+            OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_PARSENOTIFICATION_3, "CSAT: CSatNotifyMoSmControlRequest::ParseNotification Address 2");
             // TP address. Copy data to output variable
             aAddr2.Copy( aAtkData.Mid( indexInBerTlv + nn + 2, lengthTlv ) );         
             if ( KReservedTonNpi1 != aAddr2[0] && 
@@ -522,8 +513,7 @@
             }
         else if ( KTlvAlphaIdentifierTag == tag )
             {
-            TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::ParseNotification\
-                Alpha ID");
+            OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_PARSENOTIFICATION_4, "CSAT: CSatNotifyMoSmControlRequest::ParseNotification Alpha ID");
             // Alpha id must be converted to TBuf16/unicode
             if ( lengthTlv )
                 {
@@ -534,8 +524,7 @@
                 }
             else
                 {
-                TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest:: \
-                	ParseNotification. Alpha ID is NULL");
+                OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_PARSENOTIFICATION_5, "CSAT: CSatNotifyMoSmControlRequest:: ParseNotification. Alpha ID is NULL");
                 aAlphaId.iStatus = RSat::EAlphaIdNull;
                 }  
             }
@@ -559,7 +548,7 @@
 		TDes8& aTPAddr 
 		)
     {
-    TFLOGSTRING("CSAT: CSatNotifyMoSmControlRequest::VerifyNotificationData");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMOSMCONTROLREQUEST_VERIFYNOTIFICATIONDATA_1, "CSAT: CSatNotifyMoSmControlRequest::VerifyNotificationData");
     TBool ret( ETrue );    
     if ( ( 0 == aRPAddr.Length() && 0 == aTPAddr.Length() ) || 
          ( KMoSmCtrlMaxLengthAddr1Addr2 <= (