telephonyprotocols/pdplayer/src/pdpservices.cpp
changeset 42 3adadc800673
parent 0 3553901f7fa8
child 66 07a122eea281
child 69 b982c3e940f3
--- a/telephonyprotocols/pdplayer/src/pdpservices.cpp	Thu May 27 14:05:07 2010 +0300
+++ b/telephonyprotocols/pdplayer/src/pdpservices.cpp	Fri Jun 11 14:49:29 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -18,6 +18,12 @@
  @internalComponent
 */
 
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "pdpservicesTraces.h"
+#endif
+
 #include <comms-infras/ss_log.h>
 #include <comms-infras/ss_corepractivities.h> // TODO is this needed?
 #include <comms-infras/coretiermanagerstates.h> // TODO is this needed?
@@ -27,11 +33,6 @@
 #include <pcktcs.h>
 #include <comms-infras/es_connectionserv.h>
 
-#ifdef __CFLOG_ACTIVE
-#define KPDPTierMgrTag KESockMetaConnectionTag
-_LIT8(KMBMSObjectTag, "MBMSObject");
-#endif
-
 using namespace Messages;
 using namespace MeshMachine; // TODO is this needed?
 using namespace ESock;
@@ -119,7 +120,7 @@
 */
 void CMBMSServiceRequest::CancelMessage(const TInt aError)
 	{
-	__CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::CancelMessage(%d)"), this, aError));
+    OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMBMSSERVICEREQUEST_CANCELMESSAGE_1, "CMBMSServiceRequest[%08x]::CancelMessage(%d)", (TUint)this, aError);
 	if (iRequestType == TCFTierStatusProvider::TTierNotificationRegistration::Id())
 		{
 		iRequestOriginator.PostMessage(
@@ -197,7 +198,7 @@
 */
 TInt CMBMSServiceRequest::RunError(TInt aError)
 	{
-	__CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::RunError(%d)"), this, aError));
+    OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMBMSSERVICEREQUEST_RUNERROR_1, "CMBMSServiceRequest[%08x]::RunError(%d)", (TUint)this, aError);
 
 	// Stop the ScanEngine components
 	Cancel();
@@ -225,7 +226,7 @@
 		switch(iScanEngineState)
 			{
 			case EChecking:
-				__CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In EChecking State"), this));
+				OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMBMSSERVICEREQUEST_RUNL_1, "CMBMSServiceRequest[%08x]::In EChecking State", (TUint)this);
 				User::LeaveIfError(iMBMSEngine.GetRPacketService().GetStatus(iPsdStatus)); // get initial status
 
 				//check the query type
@@ -248,14 +249,14 @@
 
 			case EBearerAvailable:
 				//get MBMS bearer availability.
-				 __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In EBearerAvailable State"), this));
+				 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMBMSSERVICEREQUEST_RUNL_2, "CMBMSServiceRequest[%08x]::In EBearerAvailable State", (TUint)this);
 				 iMBMSEngine.GetRPacketService().GetMbmsNetworkServiceStatus(iStatus,ETrue,iNetworkServiceStatus);
 			 	 iScanEngineState = ERetrieveBearerAvailability;
 				 SetActive();
 			break;
 
 		   	case ERetrieveBearerAvailability:
-				__CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In ERetrieveBearerAvailability State"), this));
+				OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMBMSSERVICEREQUEST_RUNL_3, "CMBMSServiceRequest[%08x]::In ERetrieveBearerAvailability State", (TUint)this);
 			    //create a parameter bundle and send the results to the client.
 			    SendResultBundleL();
 
@@ -303,7 +304,7 @@
 
 			case EGetCountMonitorList:
 				{
-				__CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In ECountActiveServiceList State"), this));
+				OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMBMSSERVICEREQUEST_RUNL_4, "CMBMSServiceRequest[%08x]::In ECountActiveServiceList State", (TUint)this);
 				iMBMSEngine.GetRPacketService().EnumerateMbmsMonitorServiceList(iStatus,iCount,iMaxCount);
 
 				SetActive();
@@ -313,7 +314,7 @@
 
 			case EGetCountServiceList:
 				{
-				__CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In ECountActiveServiceList State"), this));
+				OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMBMSSERVICEREQUEST_RUNL_5, "CMBMSServiceRequest[%08x]::In ECountActiveServiceList State", (TUint)this);
 				iMBMSEngine.GetRPacketService().EnumerateMbmsActiveServiceList(iStatus,iCount,iMaxCount);
 
 				SetActive();
@@ -327,14 +328,14 @@
 
 			case ENotifyService:
 				//notify for MBMS Services.
-				__CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In ENotifyService State"), this));
+				OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMBMSSERVICEREQUEST_RUNL_6, "CMBMSServiceRequest[%08x]::In ENotifyService State", (TUint)this);
 				iMBMSEngine.GetRPacketService().NotifyMbmsServiceAvailabilityChange(iStatus);
 			    SetActive();
 				iScanEngineState = EStartMonitor;
 			break;
 
 			case EStartMonitor:
-				__CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In EStartMonitor State"), this));
+				OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMBMSSERVICEREQUEST_RUNL_7, "CMBMSServiceRequest[%08x]::In EStartMonitor State", (TUint)this);
 				iRetrievePcktMbms = CRetrievePcktMbmsMonitoredServices::NewL(iMBMSEngine.GetRPacketService());
 			    iRetrievePcktMbms->Start(iStatus);
 
@@ -354,13 +355,13 @@
 		}
 	else if(((iStatus.Int() == KErrMbmsImpreciseServiceEntries))||((iStatus.Int() == KErrNotFound)))
 		 {
-		  __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::RunL() KErrMbmsImpreciseServiceEntries || KErrNotFound"), this));
+		  OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMBMSSERVICEREQUEST_RUNL_8, "CMBMSServiceRequest[%08x]::RunL() KErrMbmsImpreciseServiceEntries || KErrNotFound", (TUint)this);
 		  CancelMessage(iStatus.Int());
 		  iMBMSEngine.RemoveFromRequestListL(GetClientId());
 		 }
 	else
 		{
-		 __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::RunL() ERROR: Incorrect status, Aborting"), this));
+		 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMBMSSERVICEREQUEST_RUNL_9, "CMBMSServiceRequest[%08x]::RunL() ERROR: Incorrect status, Aborting", (TUint)this);
 		 User::Leave(iStatus.Int());
 		}
 
@@ -373,7 +374,7 @@
 */
 CPcktMbmsMonitoredServiceList* CMBMSServiceRequest::UpdateMonitorServiceListL()
 	{
-	__CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In UpdateMonitorServiceListL()"), this));
+	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMBMSSERVICEREQUEST_UPDATEMONITORSERVICELISTL_1, "CMBMSServiceRequest[%08x]::In UpdateMonitorServiceListL()", (TUint)this);
 
 	//Read the entries in the parameter bundle and pass them to Etel.
 	CPcktMbmsMonitoredServiceList* serviceList= CPcktMbmsMonitoredServiceList::NewL();
@@ -447,7 +448,7 @@
 	CConnectionServParameterBundle* returnBundle = CConnectionServParameterBundle::NewL();
 	CleanupStack::PushL(returnBundle);
 
-	__CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In PrepareMonitorResultBundleL function"), this));
+	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMBMSSERVICEREQUEST_PREPAREMONITORRESULTBUNDLEL_1, "CMBMSServiceRequest[%08x]::In PrepareMonitorResultBundleL function", (TUint)this);
 	//read the MBMS Service list from Etel after receiving the MBMS Service Availability Notification.
 
 	CPcktMbmsMonitoredServiceList* serviceList = iRetrievePcktMbms->RetrieveListL();
@@ -492,7 +493,7 @@
 */
 CConnectionServParameterBundle* CMBMSServiceRequest::PrepareBearerResultBundleL() const
 	{
-	__CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In PrepareBearerResultBundleL function"), this));
+	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMBMSSERVICEREQUEST_PREPAREBEARERRESULTBUNDLEL_1, "CMBMSServiceRequest[%08x]::In PrepareBearerResultBundleL function", (TUint)this);
 
 	CConnectionServParameterBundle* returnBundle = CConnectionServParameterBundle::NewL();
 	CleanupStack::PushL(returnBundle);
@@ -517,7 +518,7 @@
 */
 CConnectionServParameterBundle* CMBMSServiceRequest::PrepareCountBundleL() const
 	{
-	__CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In PrepareCountBundleL function"), this));
+	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMBMSSERVICEREQUEST_PREPARECOUNTBUNDLEL_1, "CMBMSServiceRequest[%08x]::In PrepareCountBundleL function", (TUint)this);
 
 	CConnectionServParameterBundle* returnBundle = CConnectionServParameterBundle::NewL();
 	CleanupStack::PushL(returnBundle);
@@ -543,7 +544,7 @@
 CConnectionServParameterBundle* CMBMSServiceRequest::PrepareRemoveAllBundleL() const
 	{
 	//pass empty bundle
-	__CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In PrepareRemoveAllBundleL function"), this));
+	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMBMSSERVICEREQUEST_PREPAREREMOVEALLBUNDLEL_1, "CMBMSServiceRequest[%08x]::In PrepareRemoveAllBundleL function", (TUint)this);
 
 	CConnectionServParameterBundle* returnBundle = CConnectionServParameterBundle::NewL();
 	return returnBundle;