telephonyserverplugins/simatktsy/src/CSatNotifySetUpCall.cpp
branchRCL_3
changeset 65 630d2f34d719
parent 0 3553901f7fa8
child 66 07a122eea281
--- a/telephonyserverplugins/simatktsy/src/CSatNotifySetUpCall.cpp	Thu Aug 19 11:03:36 2010 +0300
+++ b/telephonyserverplugins/simatktsy/src/CSatNotifySetUpCall.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 "CSatNotifySetUpCallTraces.h"
+#endif
+
 #include <satcs.h>                  // Etel SAT IPC definitions
 #include "CSatTsy.h"                // Tsy class header
 #include "CSatNotifySetUpCall.h"    // Tsy 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.
@@ -42,13 +47,13 @@
         CSatNotificationsTsy* aNotificationsTsy 
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifySetupCall::NewL"); 
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_NEWL_1, "CSAT: CSatNotifySetupCall::NewL");
     CSatNotifySetUpCall* const satNotifySetUpCall = 
         new ( ELeave ) CSatNotifySetUpCall( aNotificationsTsy );
     CleanupStack::PushL( satNotifySetUpCall );
     satNotifySetUpCall->ConstructL();
     CleanupStack::Pop( satNotifySetUpCall );
-    TFLOGSTRING("CSAT: CSatNotifySetupCall::NewL, end of method"); 
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_NEWL_2, "CSAT: CSatNotifySetupCall::NewL, end of method");
     return satNotifySetUpCall;
     }
 
@@ -62,7 +67,7 @@
         // None
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifySetupCall::~CSatNotifySetUpCall"); 
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_DTOR_1, "CSAT: CSatNotifySetupCall::~CSatNotifySetUpCall");
     }
         
 // -----------------------------------------------------------------------------
@@ -88,7 +93,7 @@
         // None
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifySetupCall::ConstructL"); 
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_CONSTRUCTL_1, "CSAT: CSatNotifySetupCall::ConstructL");
     iCallConnectedEvent.Zero();
     }
     
@@ -103,15 +108,14 @@
         const TDataPackage& aPackage   
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifySetupCall::Notify"); 
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_NOTIFY_1, "CSAT: CSatNotifySetupCall::Notify");
     // Save data pointer to client side for completion
     iSetUpCallV1Pckg = reinterpret_cast<RSat::TSetUpCallV1Pckg*>( 
         aPackage.Des1n() );
     // Save the request handle
     iNotificationsTsy->iSatTsy->SaveReqHandle( aTsyReqHandle, 
 		CSatTsy::ESatNotifySetUpCallPCmdReqType );   
-    TFLOGSTRING2("CSAT: CSatNotifySetUpCall::Notify\t Handle:%d",
-           aTsyReqHandle);
+    OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_NOTIFY_2, "CSAT: CSatNotifySetUpCall::Notify\t Handle:%d",aTsyReqHandle);
     // Check if requested notification is already pending
     iNotificationsTsy->NotifySatReadyForNotification( KSetUpCall );   
 
@@ -131,7 +135,7 @@
         const TTsyReqHandle aTsyReqHandle
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifySetUpCall::CancelNotification");   
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_CANCELNOTIFICATION_1, "CSAT: CSatNotifySetUpCall::CancelNotification");
     // Reset the request handle 
     iNotificationsTsy->iSatReqHandleStore->ResetTsyReqHandle( 
         CSatTsy::ESatNotifySetUpCallPCmdReqType );
@@ -155,7 +159,7 @@
         TInt aErrorCode  
         ) 
     {
-    TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_1, "CSAT: CSatNotifySetupCall::CompleteNotifyL");
     TInt returnValue( KErrNone );
     TInt ret( KErrNone );
     iCCResult = 0;
@@ -181,8 +185,7 @@
     
     TUint8 pCmdNumber( commandDetails.GetShortInfo( ETLV_CommandNumber ) );
                 
-    TFLOGSTRING2("CSAT: CSatNotifySetUpCall::CompleteNotifyL\t Handle:%d",
-           reqHandle);
+    OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_2, "CSAT: CSatNotifySetUpCall::CompleteNotifyL\t Handle:%d",reqHandle);
     // In case the request was ongoing, continue..
     if ( CSatTsy::ESatReqHandleUnknown  != reqHandle )
         {
@@ -195,9 +198,7 @@
             // Transaction ID
             setUpCallV1.SetPCmdNumber( pCmdNumber );
             
-            TFLOGSTRING2("CSAT: CSatNotifySetupCall::CompleteNotifyL \
-            	CommandQualifier %d", iNotificationsTsy->iTerminalRespData.
-            	iCommandDetails[ KCommandQualifier ]);
+            OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_3, "CSAT: CSatNotifySetupCall::CompleteNotifyL CommandQualifier %d", iNotificationsTsy->iTerminalRespData.iCommandDetails[ KCommandQualifier ]);
 
             switch ( iNotificationsTsy->iTerminalRespData.
             		iCommandDetails[ KCommandQualifier ] )
@@ -241,8 +242,7 @@
                     }
                 default:
                     {
-                    TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL,\
-                        Call type not set");
+                    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_4, "CSAT: CSatNotifySetupCall::CompleteNotifyL,Call type not set");
                     // Call type not set
                     setUpCallV1.iType = RSat::ESetUpCallTypeNotSet;
                     break;
@@ -275,9 +275,7 @@
                      // Get alpha id string
                     sourceString.Set( alphaIdentifier.GetData( 
                         ETLV_AlphaIdentifier ) );
-                    TFLOGSTRING2("CSAT: CSatNotifySetupCall::CompleteNotifyL User \
-                        confirmation phase: sourceString %s", 
-                        &sourceString );               
+                    OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_5, "CSAT: CSatNotifySetupCall::CompleteNotifyL User confirmation phase: sourceString %s", sourceString );
                     // Convert and set the alpha id
                     TSatUtility::SetAlphaId( sourceString ,
                         setUpCallV1.iAlphaIdConfirmationPhase.iAlphaId ); 
@@ -287,8 +285,7 @@
                 // is zero
                 else
                     {
-                    TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL \
-                        User confirmation phase: Alpha Id missing");
+                    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_6, "CSAT: CSatNotifySetupCall::CompleteNotifyL User confirmation phase: Alpha Id missing");
                     setUpCallV1.iAlphaIdConfirmationPhase.iStatus = 
                         RSat::EAlphaIdNull;
                     }
@@ -296,8 +293,7 @@
             // No alpha id for user confirmation phase
             else
                 {
-                TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL,\
-                    User confirmation phase: Alpha ID not present");
+                OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_7, "CSAT: CSatNotifySetupCall::CompleteNotifyL, User confirmation phase: Alpha ID not present");
                 setUpCallV1.iAlphaIdConfirmationPhase.iStatus = 
                     RSat::EAlphaIdNotPresent;
                 }  
@@ -317,9 +313,7 @@
                      // Get alpha id string
                     sourceString.Set( alphaIdentifier.GetData( 
                         ETLV_AlphaIdentifier ) );
-                    TFLOGSTRING2("CSAT: CSatNotifySetupCall::CompleteNotifyL \
-                        Call Set Up phase: sourceString %s",
-                        &sourceString );
+                    OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_8, "CSAT: CSatNotifySetupCall::CompleteNotifyL Call Set Up phase: sourceString %s",sourceString );
                     // Convert and set the alpha id
                     TSatUtility::SetAlphaId( sourceString,
                         setUpCallV1.iAlphaIdCallSetUpPhase.iAlphaId ); 
@@ -328,8 +322,7 @@
                 // Alpha id found for set up call phase,  but length is zero
                 else
                     {
-                    TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL \
-                        Call Set Up phase: Alpha Id is NULL"); 
+                    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_9, "CSAT: CSatNotifySetupCall::CompleteNotifyL Call Set Up phase: Alpha Id is NULL");
                     setUpCallV1.iAlphaIdCallSetUpPhase.iStatus = 
                         RSat::EAlphaIdNull;
                     }
@@ -338,8 +331,7 @@
             // No alpha id set up call phase
             else
                 {
-                TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL,\
-                    Alpha ID not present");
+                OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_10, "CSAT: CSatNotifySetupCall::CompleteNotifyL, Alpha ID not present");
                 setUpCallV1.iAlphaIdCallSetUpPhase.iStatus = 
                     RSat::EAlphaIdNotPresent;
                 }  
@@ -409,8 +401,7 @@
                     // Set actual number
                     setUpCallV1.iAddress.iTelNumber.Copy( tempNumber );
 
-                    TFLOGSTRING2("CSAT: CSatNotifySetUpCall::CompleteNotifyL, \
-                    	TelNumber: %S", &setUpCallV1.iAddress.iTelNumber );
+                    OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_11, "CSAT: CSatNotifySetUpCall::CompleteNotifyL, TelNumber: %S", setUpCallV1.iAddress.iTelNumber );
                     	
                     iNotificationsTsy->iSatTsy->StoreProactiveAddress( 
                         &tempNumber );
@@ -418,8 +409,7 @@
                 }
             else
                 {
-                TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL,\
-                    Request not ongoing");
+                OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_12, "CSAT: CSatNotifySetupCall::CompleteNotifyL, Request not ongoing");
                 additionalInfo.Zero();
                 additionalInfo.Append( KNoCause );
                 // Request not on, returning response immediately
@@ -441,8 +431,7 @@
                 setUpCallV1.iCapabilityConfigParams.Append( capabilityConfig.
                     GetData( ETLV_CapabilityConfigurationParameters ) );
 
-                TFLOGSTRING2("CSAT: CSatNotifySetUpCall::CompleteNotifyL, \
-                   CapabilityParams: %s", &setUpCallV1.iCapabilityConfigParams );
+                OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_13, "CSAT: CSatNotifySetUpCall::CompleteNotifyL, CapabilityParams: %s", setUpCallV1.iCapabilityConfigParams );
                 }
 
             // Called Party SubAddress
@@ -479,8 +468,7 @@
                         setUpCallV1.iSubAddress );
                     }
                 
-                TFLOGSTRING2("CSAT: CSatNotifySetUpCall, SubAddress: %S", 
-                    &setUpCallV1.iSubAddress );
+                OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_14, "CSAT: CSatNotifySetUpCall, SubAddress: %S", setUpCallV1.iSubAddress );
                 }
 
             // Duration ( optional, maximum duration for the redial mechanism )
@@ -511,8 +499,7 @@
                         }
                     default:
                         {
-                        TFLOGSTRING("CSAT: CSatNotifySetupCall::\
-                            CompleteNotifyL, time unit not set");
+                        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_15, "CSAT: CSatNotifySetupCall::CompleteNotifyL, time unit not set");
                         setUpCallV1.iDuration.iTimeUnit = 
                             RSat::ETimeUnitNotSet;
                         break;
@@ -523,8 +510,7 @@
                 setUpCallV1.iDuration.iNumOfUnits = 
                     callDuration.GetShortInfo( ETLV_TimeInterval );
 
-                TFLOGSTRING("CSAT: CSatNotifySetUpCall::CompleteNotifyL Max \
-                	Duration for the Redial Mechanism" );
+                OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_16, "CSAT: CSatNotifySetUpCall::CompleteNotifyL Max Duration for the Redial Mechanism" );
 
                 // Check that Time interval value is not invalid
                 if ( NULL == setUpCallV1.iDuration.iNumOfUnits )
@@ -549,8 +535,7 @@
         }        
     else
         {
-        TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL,\
-            Request not ongoing");
+        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_17, "CSAT: CSatNotifySetupCall::CompleteNotifyL, Request not ongoing");
         additionalInfo.Zero();
         additionalInfo.Append( KNoCause );
         // Request not on, returning response immediately
@@ -571,7 +556,7 @@
         TDes8* aRsp
         )
     {
-    TFLOGSTRING("CSAT:CSatNotifySetUpCall::TerminalResponseL");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_TERMINALRESPONSEL_1, "CSAT:CSatNotifySetUpCall::TerminalResponseL");
 
     TInt    ret( KErrNone );
     TBuf<1> additionalInfo;
@@ -597,8 +582,7 @@
         && ( RSat::KErrorRequiredValuesMissing != rspV2.iGeneralResult ) 
         && ( RSat::KInteractionWithCCPermanentError != rspV2.iGeneralResult) )
         {
-        TFLOGSTRING("CSAT:CSatNotifySetUpCall::TerminalResponseL,\
-            Invalid General Result");
+        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_TERMINALRESPONSEL_2, "CSAT:CSatNotifySetUpCall::TerminalResponseL, Invalid General Result");
         // Invalid general result
         ret = KErrCorrupt;
         }
@@ -617,8 +601,7 @@
             }
         else
             {
-            TFLOGSTRING("CSAT:CSatNotifySetUpCall::TerminalResponseL,\
-                Invalid Additional Info");
+            OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_TERMINALRESPONSEL_3, "CSAT:CSatNotifySetUpCall::TerminalResponseL, Invalid Additional Info");
             ret = KErrCorrupt;
             }
         }
@@ -667,7 +650,7 @@
         TDesC16& aAdditionalInfo            
 		)
     {
-    TFLOGSTRING("CSAT: CSatNotifySetUpCall::CreateTerminalRespL");    
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_CREATETERMINALRESPL_1, "CSAT: CSatNotifySetUpCall::CreateTerminalRespL");
     // Create and append response data
     TTlv tlvSpecificData;
     tlvSpecificData.AddTag( KTlvResultTag );
@@ -685,8 +668,7 @@
             }
         else
             {
-            TFLOGSTRING( "CSAT: CSatNotifySetUpCall::CreateTerminalRespL \
-                aAdditionalInfo.Length() == 0" ); 
+            OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_CREATETERMINALRESPL_2,  "CSAT: CSatNotifySetUpCall::CreateTerminalRespL aAdditionalInfo.Length() == 0" );
             }
         }
     
@@ -714,7 +696,7 @@
         const TDesC8& aEnvelope
         )
     {
-    TFLOGSTRING("CSAT: CSatNotifySetUpCall::StoreCallConnectedEvent");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_STORECALLCONNECTEDEVENT_1, "CSAT: CSatNotifySetUpCall::StoreCallConnectedEvent");
     // Store it to the buffer
     iCallConnectedEvent = aEnvelope;
     }