telephonyserverplugins/simatktsy/src/CSatNotifySendUssd.cpp
branchRCL_3
changeset 20 07a122eea281
parent 19 630d2f34d719
--- a/telephonyserverplugins/simatktsy/src/CSatNotifySendUssd.cpp	Tue Aug 31 16:23:08 2010 +0300
+++ b/telephonyserverplugins/simatktsy/src/CSatNotifySendUssd.cpp	Wed Sep 01 12:40:21 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-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 "CSatNotifySendUssdTraces.h"
-#endif
-
 #include <satcs.h>                  // Etel SAT IPC definitions
 #include "CSatTsy.h"                // Tsy class header
 #include "CSatNotifySendUssd.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, CSATNOTIFYSENDUSSD_NEWL_1, "CSAT: CSatNotifySendUssd::NewL");
+    TFLOGSTRING("CSAT: CSatNotifySendUssd::NewL");
    	CSatNotifySendUssd* const satNotifySendUssd = 
         new ( ELeave ) CSatNotifySendUssd( aNotificationsTsy );
     CleanupStack::PushL( satNotifySendUssd );
     satNotifySendUssd->ConstructL();
     CleanupStack::Pop( satNotifySendUssd );
-    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSENDUSSD_NEWL_2, "CSAT: CSatNotifySendUssd::NewL, end of method");
+    TFLOGSTRING("CSAT: CSatNotifySendUssd::NewL, end of method");
     return satNotifySendUssd;
     }
 
@@ -67,7 +62,7 @@
 		// None
         )
     {
-    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSENDUSSD_DTOR_1, "CSAT: CSatNotifySendUssd::~CSatNotifySendUssd");
+    TFLOGSTRING("CSAT: CSatNotifySendUssd::~CSatNotifySendUssd");
     }
     
 // -----------------------------------------------------------------------------
@@ -93,7 +88,7 @@
         // None
         )
     {
-    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSENDUSSD_CONSTRUCTL_1, "CSAT: CSatNotifySendUssd::ConstructL");
+    TFLOGSTRING("CSAT: CSatNotifySendUssd::ConstructL");
     }
    
 // -----------------------------------------------------------------------------
@@ -108,7 +103,7 @@
         const TDataPackage& aPackage 
         )
     {
-    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSENDUSSD_NOTIFY_1, "CSAT: CSatNotifySendUssd::Notify");
+    TFLOGSTRING("CSAT: CSatNotifySendUssd::Notify");
 
     // Save data pointer to client side for completion
     iSendUssdV1Pckg = reinterpret_cast<RSat::TSendUssdV1Pckg*>( 
@@ -135,7 +130,7 @@
         const TTsyReqHandle aTsyReqHandle 
         )
     {
-    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSENDUSSD_CANCELNOTIFICATION_1, "CSAT: CSatNotifySendUssd::CancelNotification");
+    TFLOGSTRING("CSAT: CSatNotifySendUssd::CancelNotification");
     
     // Reset the request handle
     TTsyReqHandle reqHandle = iNotificationsTsy->iSatReqHandleStore->
@@ -159,7 +154,7 @@
         TInt aErrorCode                  
         )
     {
-    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSENDUSSD_COMPLETENOTIFYL_1, "CSAT: CSatNotifySendUssd::CompleteNotifyL");
+    TFLOGSTRING("CSAT: CSatNotifySendUssd::CompleteNotifyL");	
 	TInt ret( KErrNone );
 	TInt returnValue( KErrNone );
 	TBuf<1> additionalInfo;
@@ -208,7 +203,8 @@
 				TUint16 alphaIdLength = alphaIdentifier.GetLength() ;
 				if ( RSat::KAlphaIdMaxSize < alphaIdLength )
 					{
-					OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSENDUSSD_COMPLETENOTIFYL_2, "CSAT: CSatNotifySendUssd::CompleteNotifyL, Alpha ID length exceeded");
+					TFLOGSTRING("CSAT: CSatNotifySendUssd::CompleteNotifyL,\
+					    Alpha ID length exceeded");
 					// String too long
 					additionalInfo.Zero();
                     additionalInfo.Append( KNoCause );
@@ -234,13 +230,15 @@
 					}
 				else
 					{
-					OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSENDUSSD_COMPLETENOTIFYL_3, "CSAT: CSatNotifySendUssd::CompleteNotifyL, Alpha ID is NULL");
+					TFLOGSTRING("CSAT: CSatNotifySendUssd::CompleteNotifyL,\
+					    Alpha ID is NULL");
 					sendUssdV1.iAlphaId.iStatus = RSat::EAlphaIdNull;
 					}  
 				}
 			else
 				{
-				OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSENDUSSD_COMPLETENOTIFYL_4, "CSAT: CSatNotifySendUssd::CompleteNotifyL, Alpha ID not present");
+				TFLOGSTRING("CSAT: CSatNotifySendUssd::CompleteNotifyL,\
+				    Alpha ID not present");
 				sendUssdV1.iAlphaId.iStatus = RSat::EAlphaIdNotPresent;
 				}
 
@@ -275,7 +273,8 @@
 	                  && RSat::KStringMaxSize<8*ussdStringLengthInBytes/7))
                 	{
                 	// The Ussd text string is too long.
-                	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSENDUSSD_COMPLETENOTIFYL_5, "CSAT:CSatNotifySendUssd::CompleteNotifyL, USSD String too long");
+                	TFLOGSTRING("CSAT:CSatNotifySendUssd::CompleteNotifyL, \
+                	    USSD String too long");
 					// Text string too long
 					ret = KErrCorrupt;
 					additionalInfo.Zero();
@@ -312,7 +311,8 @@
 	                        }
 	                    default:
 	                        {
-	                        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSENDUSSD_COMPLETENOTIFYL_6, "CSAT:CSatNotifySendUssd::CompleteNotifyL, USSD DCS has a reserved value");
+	                        TFLOGSTRING("CSAT:CSatNotifySendUssd::CompleteNotifyL, \
+	                            USSD DCS has a reserved value");
 	                        // The DCS has a reserved value
 	                        ret = KErrCorrupt;
 							additionalInfo.Zero();
@@ -352,7 +352,8 @@
         } // End of if ( reqHandle != CSatTsy::ESatReqHandleUnknown )	
 	else 
         {
-        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSENDUSSD_COMPLETENOTIFYL_7, "CSAT: CSatNotifySendUssd::CompleteNotifyL, Request not ongoing");
+        TFLOGSTRING("CSAT: CSatNotifySendUssd::CompleteNotifyL,\
+            Request not ongoing");
         // Request not on, returning response immediately
         additionalInfo.Zero();
         additionalInfo.Append( KNoCause );
@@ -375,7 +376,7 @@
         TDes8* aRsp 
         )
     {
-    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSENDUSSD_TERMINALRESPONSEL_1, "CSAT: CSatNotifySendUssd::TerminalResponseL");
+    TFLOGSTRING("CSAT: CSatNotifySendUssd::TerminalResponseL");
 	
     TInt ret( KErrNone );
     TBuf<RSat::KAdditionalInfoMaxSize> additionalInfo;
@@ -402,7 +403,8 @@
         && ( RSat::KCmdBeyondMeCapabilities != rspV1.iGeneralResult )
         && ( RSat::KUssdReturnError != rspV1.iGeneralResult ) )
         {
-        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSENDUSSD_TERMINALRESPONSEL_2, "CSAT: CSatNotifySendUssd::CompleteNotifyL, Invalid General Result");
+        TFLOGSTRING("CSAT: CSatNotifySendUssd::CompleteNotifyL,\
+            Invalid General Result");
         // Invalid general result
         ret = KErrCorrupt;
         }
@@ -419,7 +421,8 @@
         if ( 0 == rspV1.iAdditionalInfo.Length() )
             {
             // No info
-            OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSENDUSSD_TERMINALRESPONSEL_3, "CSAT:CSatNotifySendUssd::TerminalResponseL, AdditionalInfoType set, but no additional info available");
+            TFLOGSTRING("CSAT:CSatNotifySendUssd::TerminalResponseL, \
+            	AdditionalInfoType set, but no additional info available");            
             ret = KErrCorrupt;
             }
         else if ( RSat::KTextString == rspV1.iInfoType )
@@ -430,7 +433,8 @@
             // performed successfully, SAT Server uses the 
             // rspV1.iUssdString.iUssdString to return the USSD string
             // sent by the network.
-            OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSENDUSSD_TERMINALRESPONSEL_4, "CSAT:CSatNotifySendUssd::TerminalResponseL, AdditionalInfoType set to TextString.");
+            TFLOGSTRING("CSAT:CSatNotifySendUssd::TerminalResponseL, \
+            	AdditionalInfoType set to TextString.");            
             }            
         else
             {
@@ -467,7 +471,7 @@
 		TUint8 aDcs		
 		)
     {
-	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSENDUSSD_CREATETERMINALRESPL_1, "CSAT: CSatNotifySendUssd::CreateTerminalRespL");
+	TFLOGSTRING("CSAT: CSatNotifySendUssd::CreateTerminalRespL");
     TTlv tlvSpecificData;
     TBuf8<RSat::KStringMaxSize> string;
 
@@ -529,7 +533,9 @@
                 // Reserved
                 // The general result should in fact prevent reaching this branch of
                 // the switch.
-                OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSENDUSSD_CREATETERMINALRESPL_2, "TSY:CSatMessHandler::SendUssdTerminalRespL, The DCS sent by the network has a reserved value. The general result should have been set to UssdReturnError");
+                TFLOGSTRING("TSY:CSatMessHandler::SendUssdTerminalRespL, \
+                    The DCS sent by the network has a reserved value. The general result \
+                    should have been set to UssdReturnError");
                 break;
                 }                        
             }