telephonyserverplugins/simatktsy/src/csatdatadownloadtsy.cpp
branchRCL_3
changeset 65 630d2f34d719
parent 0 3553901f7fa8
child 66 07a122eea281
--- a/telephonyserverplugins/simatktsy/src/csatdatadownloadtsy.cpp	Thu Aug 19 11:03:36 2010 +0300
+++ b/telephonyserverplugins/simatktsy/src/csatdatadownloadtsy.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"
@@ -19,6 +19,12 @@
 
 
 
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "csatdatadownloadtsyTraces.h"
+#endif
+
 #include <satcs.h>                  // Etel SAT IPC definitions
 #include <etelmm.h> 				// Etel MM Definitions
 #include "CSatDataPackage.h"        // Parameter packing 
@@ -26,7 +32,6 @@
 #include "CSatTsy.h"                // Sat Tsy class
 #include "TSatUtility.h"            // Utilities
 #include "cmmmessagemanagerbase.h"  // Message manager class for forwarding req.
-#include "TfLogger.h"               // For TFLOGSTRING
 #include "CBerTlv.h"                // Ber Tlv
 #include "TTlv.h"					// TTlv class
 #include "MSatTsy_IPCDefs.h"        // Sat Tsy internal request types
@@ -41,14 +46,14 @@
         CSatTsy* aSatTsy  
         )
     {
-    TFLOGSTRING( "CSAT: CSatDataDownloadTsy::NewL" );
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_NEWL_1,  "CSAT: CSatDataDownloadTsy::NewL" );
     CSatDataDownloadTsy* const satDataDownloadTsy = 
         new ( ELeave ) CSatDataDownloadTsy();
     CleanupStack::PushL( satDataDownloadTsy );
     satDataDownloadTsy->iSatTsy = aSatTsy;
     satDataDownloadTsy->ConstructL();
     CleanupStack::Pop( satDataDownloadTsy );
-    TFLOGSTRING( "CSAT: CSatDataDownloadTsy::NewL, end of method" );
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_NEWL_2,  "CSAT: CSatDataDownloadTsy::NewL, end of method" );
     return satDataDownloadTsy; 
     }
 
@@ -62,7 +67,7 @@
         void   
         )
     {
-    TFLOGSTRING( "CSAT: CSatDataDownloadTsy::~CSatDataDownloadTsy" );
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_DTOR_1,  "CSAT: CSatDataDownloadTsy::~CSatDataDownloadTsy" );
     // Unregister
     iSatTsy->MessageManager()->RegisterTsyObject(
 		CMmMessageManagerBase::ESatDataDownloadTsyObjType, NULL );
@@ -91,7 +96,7 @@
         void
         )
     {
-    TFLOGSTRING( "CSAT: CSatDataDownloadTsy::ConstructL" );
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_CONSTRUCTL_1,  "CSAT: CSatDataDownloadTsy::ConstructL" );
     // Register
     iSatTsy->MessageManager()->RegisterTsyObject(
 		CMmMessageManagerBase::ESatDataDownloadTsyObjType, this );
@@ -110,7 +115,7 @@
          const CSatDataPackage* aDataPackage
          )
     {
-    TFLOGSTRING( "CSAT:CSatDataDownloadTsy::CompleteCellBroadcastDdlL" );
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_COMPLETECELLBROADCASTDDLL_1,  "CSAT:CSatDataDownloadTsy::CompleteCellBroadcastDdlL" );
 
     TBuf8<KCbsMsgMaxLength> aPdu;
     aDataPackage->UnPackData( aPdu );     
@@ -152,7 +157,7 @@
         const CSatDataPackage* aDataPackage
         )
     {  
-    TFLOGSTRING( "CSAT:CSatDataDownloadTsy::CompleteSmsPpDdlL" );
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_COMPLETESMSPPDDLL_1,  "CSAT:CSatDataDownloadTsy::CompleteSmsPpDdlL" );
     TBuf8<KAddrMaxLength> smsScAddress;
     TBuf8<RMobileSmsMessaging::KGsmTpduSize> smsTpdu;
     
@@ -172,8 +177,7 @@
              KSmsTpduProtcolIdUSimDdl == iSmsTpdu.iProtocolId && 
             ( !( iSmsTpdu.iDcs & 0x01 ) ) && ( iSmsTpdu.iDcs & 0x02 ) )
             {
-            TFLOGSTRING( "CSAT:CSatDataDownloadTsy::CompleteSmsPpDdlL,\
-                SMS PP DDL is not supported, Store SMS to EFsms" ); 
+            OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_COMPLETESMSPPDDLL_2,  "CSAT:CSatDataDownloadTsy::CompleteSmsPpDdlL, SMS PP DDL is not supported, Store SMS to EFsms" );
             CreateEntryForSavingSmsL( smsScAddress, smsTpdu );
             }
         }
@@ -191,8 +195,7 @@
         const TDesC8& aSmsTpdu
         )
     {  
-    TFLOGSTRING2( "CSAT:CSatDataDownloadTsy::CreateEntryForSavingSms\
-        SC Addr. length: %d", aSmsScAddress.Length() );
+    OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_CREATEENTRYFORSAVINGSMSL_1,  "CSAT:CSatDataDownloadTsy::CreateEntryForSavingSms SC Addr. length: %d", aSmsScAddress.Length() );
     TInt offset = 0;
     
     // Check that the SC address length contains the length in
@@ -228,8 +231,7 @@
         // Copy the Service Centre address and TPDU data
         smsEntry.iServiceCentre.iTelNumber.Copy( scAddress16 );
                 
-        TFLOGSTRING2("CSAT:CSatDataDownloadTsy::CreateEntryForSavingSms,\
-            iTelNumber: %S", &smsEntry.iServiceCentre.iTelNumber );
+        OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_CREATEENTRYFORSAVINGSMSL_2, "CSAT:CSatDataDownloadTsy::CreateEntryForSavingSms, iTelNumber: %S", smsEntry.iServiceCentre.iTelNumber );
             
         smsEntry.iMsgData.Copy( aSmsTpdu ); 
         
@@ -260,7 +262,7 @@
         TInt aResult
         )  
     {
-    TFLOGSTRING("CSAT: CSatDataDownloadTsy::CreateSmsDeliverReportL");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_CREATESMSDELIVERREPORTL_1, "CSAT: CSatDataDownloadTsy::CreateSmsDeliverReportL");
     TBuf8<KTpduMaxSize> reportData;
        
     // Get User Data length
@@ -269,8 +271,7 @@
     // Check that SMS TPDU data exists by checking the last mandatory item
     if ( KSmsTpduByteUnknownOrReserved != iSmsTpdu.iDcs )
         {
-        TFLOGSTRING("CSAT: CSatDataDownloadTsy::CreateSmsDeliverReportL,\
-            SMS TPDU OK");
+        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_CREATESMSDELIVERREPORTL_2, "CSAT: CSatDataDownloadTsy::CreateSmsDeliverReportL, SMS TPDU OK");
         reportData.Zero();
         reportData.Append( iSmsTpdu.iParameters );   // 1st byte -> parameters
         reportData.Append( KAllOptParamsPresent );   // TP-Parameter-Indicator
@@ -289,8 +290,7 @@
         // Cause must be inserted after the parameters
         if ( KErrNone != aResult )
             {
-            TFLOGSTRING("CSAT: CSatDataDownloadTsy::CreateSmsDeliverReportL,\
-                Add TP Failure Cause: KDataDownloadError");
+            OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_CREATESMSDELIVERREPORTL_3, "CSAT: CSatDataDownloadTsy::CreateSmsDeliverReportL, Add TP Failure Cause: KDataDownloadError");
             TBuf8<1> failureCause;
             failureCause.Zero();
             failureCause.Append( KDataDownloadError );
@@ -319,12 +319,11 @@
         const TDesC8& aSmsTpdu
         )
     {  
-    TFLOGSTRING( "CSAT:CSatDataDownloadTsy::CreateSmsPpDdlEnvelopeL" );
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_CREATESMSPPDDLENVELOPEL_1,  "CSAT:CSatDataDownloadTsy::CreateSmsPpDdlEnvelopeL" );
     // Check that the data exists
     if ( aSmsScAddress.Length() && aSmsTpdu.Length() )
         {
-        TFLOGSTRING( "CSAT:CSatDataDownloadTsy::CreateSmsPpDdlEnvelopeL,\
-            Data Ok" );
+        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_CREATESMSPPDDLENVELOPEL_2,  "CSAT:CSatDataDownloadTsy::CreateSmsPpDdlEnvelopeL, Data Ok" );
         TTlv envelope;
  
         envelope.Begin( KBerTlvSmsPpDownloadTag );
@@ -357,7 +356,7 @@
         void 
         )
     {
-    TFLOGSTRING( "CSAT: CSatDataDownloadTsy::CompleteReadCbmids" );
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_COMPLETEREADCBMIDSL_1,  "CSAT: CSatDataDownloadTsy::CompleteReadCbmids" );
     // Convert constants and append to simFilePath
     TBuf8<KMaxFilePath> simFilePath;
     // Append data
@@ -390,8 +389,7 @@
         )
     {
     aDataPackage->UnPackData( iIsSmsPpDdlSupported );   
-    TFLOGSTRING2("CSAT: CSatNotifyMoSmControlRequest::SetActivationStatus, %d",
-    	iIsSmsPpDdlSupported );     
+    OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_SETSMSPPDDLSTATUS_1, "CSAT: CSatNotifyMoSmControlRequest::SetActivationStatus, %d",iIsSmsPpDdlSupported );
     }  
     
 // -----------------------------------------------------------------------------
@@ -404,7 +402,7 @@
         const TDesC8& aSmsTpdu
         )
     {
-    TFLOGSTRING("CSAT: CSatDataDownloadTsy::ParseSmsTpdu");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_PARSESMSTPDU_1, "CSAT: CSatDataDownloadTsy::ParseSmsTpdu");
     TInt ret( KErrCorrupt );
     
     // Initialize values
@@ -439,8 +437,7 @@
         // Just to be on the safe side, check that the offset is not too big
         if ( aSmsTpdu.Length() > ( offset + 1 + KSmsTpduSctsLength ) )
             {
-            TFLOGSTRING( "CSAT:CSatDataDownloadTsy::ParseSmsTpdu,\
-                SmsTpdu length Ok" );
+            OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_PARSESMSTPDU_2,  "CSAT:CSatDataDownloadTsy::ParseSmsTpdu, SmsTpdu length Ok" );
             // Set protocol id and data coding shceme
             iSmsTpdu.iProtocolId = aSmsTpdu[offset];
             iSmsTpdu.iDcs = aSmsTpdu[++offset] ;
@@ -453,8 +450,7 @@
             if ( tpduUserDataLength )
                 {
                 iSmsTpdu.iUserData.Copy( aSmsTpdu.Mid( ++offset ) );
-                TFLOGSTRING2( "CSAT:CSatDataDownloadTsy::ParseSmsTpdu,\
-                    iUserData length: %d", iSmsTpdu.iUserData.Length() );
+                OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATDATADOWNLOADTSY_PARSESMSTPDU_3,  "CSAT:CSatDataDownloadTsy::ParseSmsTpdu, iUserData length: %d", iSmsTpdu.iUserData.Length() );
                 }
 
             ret = KErrNone;