telephonyserverplugins/simtsy/src/CSimPacketService.cpp
changeset 42 3adadc800673
parent 0 3553901f7fa8
child 64 b34bb05ac869
--- a/telephonyserverplugins/simtsy/src/CSimPacketService.cpp	Thu May 27 14:05:07 2010 +0300
+++ b/telephonyserverplugins/simtsy/src/CSimPacketService.cpp	Fri Jun 11 14:49:29 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2001-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"
@@ -22,8 +22,14 @@
  @file
 */
 
+
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "CSimPacketServiceTraces.h"
+#endif
+
 #include "CSimPacketService.h"
-#include "Simlog.h"
 #include <pcktcs.h>
 #include "CSimPhone.h"
 #include "utils.h"
@@ -108,7 +114,7 @@
 * @panic Panics with SIMTSY EInvalidParameterFormatInConfigFile if an additional param data item is in an invalid format
 */
 	{
-	LOGPACKET1("CSimPacketService: Entered ConstructL()");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_CONSTRUCTL_1, "CSimPacketService: Entered ConstructL()");
 	
 	iTimer = CSimTimer::NewL(iPhone);
 	iPcktRegTimer = CSimTimer::NewL(iPhone);
@@ -380,14 +386,14 @@
 						{
 						// AdditionalParamDataFormat not been specified,
 						// default to plain ASCII
-						LOGPARSERR("AdditionalParamItem::additionalParamDataFormat",ret,2,&KDefaultGPRSAdditionalParamItem);
+						OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_CONSTRUCTL_2, "WARNING - CONFIGURATION FILE PARSING - Reading element ADDITIONALPARAMITEM::ADDITIONALPARAMDATAFORMAT returned %d (element no. %d) from tag %s.",ret,2,KDefaultGPRSAdditionalParamItem);
 						format = EConfigDataFormatAscii;
 						}
 					else
 						{
 						if (AsciiToNum(additionalParamDataFormat, format) != KErrNone)
 							{
-							LOGPARSERR("AdditionalParamItem::additionalParamDataFormat",KErrArgument,2,&KDefaultGPRSAdditionalParamItem);
+							OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_CONSTRUCTL_3, "WARNING - CONFIGURATION FILE PARSING - Reading element ADDITIONALPARAMITEM::ADDITIONALPARAMDATAFORMAT returned %d (element no. %d) from tag %s.",KErrArgument,2,KDefaultGPRSAdditionalParamItem);
 							format = EConfigDataFormatAscii;
 							}
 
@@ -396,7 +402,7 @@
 						// default to ASCII if not.
 						if (format >= EMaxConfigDataFormat)
 							{
-							LOGPARSERR("AdditionalParamItem::additionalParamDataFormat",KErrArgument,2,&KDefaultGPRSAdditionalParamItem);
+							OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_CONSTRUCTL_4, "WARNING - CONFIGURATION FILE PARSING - Reading element ADDITIONALPARAMITEM::ADDITIONALPARAMDATAFORMAT returned %d (element no. %d) from tag %s.",KErrArgument,2,KDefaultGPRSAdditionalParamItem);
 							format = EConfigDataFormatAscii;
 							}
 						}
@@ -417,7 +423,7 @@
 
 							if (ParseMixedBinaryAsciiDataL(additionalParamDataBuffer) != KErrNone)
 								{
-								LOGPARSERR("AdditionalParamItem::additionalParamContent",KErrArgument,1,&KDefaultGPRSAdditionalParamItem);
+								OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_CONSTRUCTL_5, "WARNING - CONFIGURATION FILE PARSING - Reading element ADDITIONALPARAMITEM::ADDITIONALPARAMCONTENT returned %d (element no. %d) from tag %s.",KErrArgument,1,KDefaultGPRSAdditionalParamItem);
 								SimPanic(EInvalidParameterFormatInConfigFile);
 								}
 
@@ -445,7 +451,7 @@
 			}
 		else
 			{
-			LOGPARSERR("ProtocolConfigOption::numAdditionalParams",ret,14,&KDefaultContextparamGPRS);	
+			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_CONSTRUCTL_6, "WARNING - CONFIGURATION FILE PARSING - Reading element PROTOCOLCONFIGOPTION::NUMADDITIONALPARAMS returned %d (element no. %d) from tag %s.",ret,14,KDefaultContextparamGPRS);
 			} 
 		} 
 
@@ -552,14 +558,14 @@
 						{
 						// AdditionalParamDataFormat not been specified,
 						// default to plain ASCII
-						LOGPARSERR("No AdditionalParamItem::additionalParamDataFormat",ret,2,&KDefaultAdditionalParamItemRel99);
+						OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_CONSTRUCTL_7, "WARNING - CONFIGURATION FILE PARSING - Reading element NO ADDITIONALPARAMITEM::ADDITIONALPARAMDATAFORMAT returned %d (element no. %d) from tag %s.",ret,2,KDefaultAdditionalParamItemRel99);
 						format = EConfigDataFormatAscii;
 						}
 					else
 						{
 						if (AsciiToNum(additionalParamDataFormat, format) != KErrNone)
 							{
-							LOGPARSERR("AdditionalParamItem::additionalParamDataFormat",KErrArgument,2,&KDefaultAdditionalParamItemRel99);
+							OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_CONSTRUCTL_8, "WARNING - CONFIGURATION FILE PARSING - Reading element ADDITIONALPARAMITEM::ADDITIONALPARAMDATAFORMAT returned %d (element no. %d) from tag %s.",KErrArgument,2,KDefaultAdditionalParamItemRel99);
 							format = EConfigDataFormatAscii;
 							}
 
@@ -568,7 +574,7 @@
 						// default to ASCII if not.
 						if (format >= EMaxConfigDataFormat)
 							{
-							LOGPARSERR("AdditionalParamItem::additionalParamDataFormat",KErrArgument,2,&KDefaultAdditionalParamItemRel99);
+							OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_CONSTRUCTL_9, "WARNING - CONFIGURATION FILE PARSING - Reading element ADDITIONALPARAMITEM::ADDITIONALPARAMDATAFORMAT returned %d (element no. %d) from tag %s.",KErrArgument,2,KDefaultAdditionalParamItemRel99);
 							format = EConfigDataFormatAscii;
 							}
 						}
@@ -588,7 +594,7 @@
 
 							if (ParseMixedBinaryAsciiDataL(additionalParamDataBuffer) != KErrNone)
 								{
-								LOGPARSERR("AdditionalParamItem::additionalParamContent",KErrArgument,1,&KDefaultAdditionalParamItemRel99);
+								OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_CONSTRUCTL_10, "WARNING - CONFIGURATION FILE PARSING - Reading element ADDITIONALPARAMITEM::ADDITIONALPARAMCONTENT returned %d (element no. %d) from tag %s.",KErrArgument,1,KDefaultAdditionalParamItemRel99);
 								SimPanic(EInvalidParameterFormatInConfigFile);
 								}
 
@@ -615,7 +621,7 @@
 			}
 		else
 			{
-			LOGPARSERR("ProtocolConfigOption::numAdditionalParams",ret,12,&KDefaultContextparamRel99);	
+			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_CONSTRUCTL_11, "WARNING - CONFIGURATION FILE PARSING - Reading element PROTOCOLCONFIGOPTION::NUMADDITIONALPARAMS returned %d (element no. %d) from tag %s.",ret,12,KDefaultContextparamRel99);
 			} 		
 
 		}
@@ -775,14 +781,14 @@
 						{
 						// AdditionalParamDataFormat not been specified,
 						// default to plain ASCII
-						LOGPARSERR("No AdditionalParamItem::additionalParamDataFormat",ret,2,&KDefaultAdditionalParamItem);
+						OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_CONSTRUCTL_12, "WARNING - CONFIGURATION FILE PARSING - Reading element NO ADDITIONALPARAMITEM::ADDITIONALPARAMDATAFORMAT returned %d (element no. %d) from tag %s.",ret,2,KDefaultAdditionalParamItem);
 						format = EConfigDataFormatAscii;
 						}
 					else
 						{
 						if (AsciiToNum(additionalParamDataFormat, format) != KErrNone)
 							{
-							LOGPARSERR("AdditionalParamItem::additionalParamDataFormat",KErrArgument,2,&KDefaultAdditionalParamItem);
+							OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_CONSTRUCTL_13, "WARNING - CONFIGURATION FILE PARSING - Reading element ADDITIONALPARAMITEM::ADDITIONALPARAMDATAFORMAT returned %d (element no. %d) from tag %s.",KErrArgument,2,KDefaultAdditionalParamItem);
 							format = EConfigDataFormatAscii;
 							}
 
@@ -791,7 +797,7 @@
 						// default to ASCII if not.
 						if (format >= EMaxConfigDataFormat)
 							{
-							LOGPARSERR("AdditionalParamItem::additionalParamDataFormat",KErrArgument,2,&KDefaultAdditionalParamItem);
+							OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_CONSTRUCTL_14, "WARNING - CONFIGURATION FILE PARSING - Reading element ADDITIONALPARAMITEM::ADDITIONALPARAMDATAFORMAT returned %d (element no. %d) from tag %s.",KErrArgument,2,KDefaultAdditionalParamItem);
 							format = EConfigDataFormatAscii;
 							}
 						}
@@ -811,7 +817,7 @@
 
 								if (ParseMixedBinaryAsciiDataL(additionalParamDataBuffer) != KErrNone)
 									{
-									LOGPARSERR("AdditionalParamItem::additionalParamContent",KErrArgument,1,&KDefaultAdditionalParamItem);
+									OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_CONSTRUCTL_15, "WARNING - CONFIGURATION FILE PARSING - Reading element ADDITIONALPARAMITEM::ADDITIONALPARAMCONTENT returned %d (element no. %d) from tag %s.",KErrArgument,1,KDefaultAdditionalParamItem);
 									SimPanic(EInvalidParameterFormatInConfigFile);
 									}
 
@@ -1002,7 +1008,7 @@
 *
 */
 	{
-	LOGPACKET1("CSimPacketService: Entered destructor");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_DTOR_1, "CSimPacketService: Entered destructor");
 		
 	delete iIncomingContextManager;
 	
@@ -1438,11 +1444,11 @@
 		case EPacketNotifyAttachModeChange:
 		case EPacketNotifyMbmsNetworkServiceStatusChange:
 		case EPacketNotifyMbmsServiceAvailabilityChange:
-			LOGPACKET1("CSimPacketService: RegisterNotification");
+			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_REGISTERNOTIFICATION_1, "CSimPacketService: RegisterNotification");
 			return KErrNone;
 		default:
 			// Unknown or invalid IPC
-			LOGPACKET1("CSimPacketService: Register error, unknown IPC");
+			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_REGISTERNOTIFICATION_2, "CSimPacketService: Register error, unknown IPC");
 			return KErrNotSupported;
 		}
 	}
@@ -1472,11 +1478,11 @@
 		case EPacketNotifyAttachModeChange:
 		case EPacketNotifyMbmsNetworkServiceStatusChange:
 		case EPacketNotifyMbmsServiceAvailabilityChange:
-			LOGPACKET1("CSimPacketService: DeregisterNotification");
+			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_DEREGISTERNOTIFICATION_1, "CSimPacketService: DeregisterNotification");
 			return KErrNone;
 		default:
 			// Unknown or invalid IPC
-			LOGPACKET1("CSimPacketService: Deregister error, unknown IPC");
+			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_DEREGISTERNOTIFICATION_2, "CSimPacketService: Deregister error, unknown IPC");
 			return KErrNotSupported;
 		}
 	}
@@ -1497,7 +1503,7 @@
 		case EPacketNotifyStatusChange:
 		case EPacketNotifyDynamicCapsChange:
 		case EPacketNotifyMbmsNetworkServiceStatusChange:
-			LOGPACKET1("CSimPacketService: Registered with 10 slots");
+			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_NUMBEROFSLOTSL_1, "CSimPacketService: Registered with 10 slots");
 			numberOfSlots=10;
 			break;
 		case EPacketNotifyContextAdded:
@@ -1507,12 +1513,12 @@
 		case EPacketNotifyReleaseModeChange:
 		case EPacketNotifyAttachModeChange:
 		case EPacketNotifyMbmsServiceAvailabilityChange:
-			LOGPACKET1("CSimPacketService: Registered with 2 slots");
+			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_NUMBEROFSLOTSL_2, "CSimPacketService: Registered with 2 slots");
 			numberOfSlots=2;
 			break;
 		default:
 			// Unknown or invalid IPC
-			LOGPACKET1("CSimPacketService: Number of Slots error, unknown IPC");
+			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_NUMBEROFSLOTSL_3, "CSimPacketService: Number of Slots error, unknown IPC");
 			User::Leave(KErrNotSupported);
 			break;
 		}  
@@ -1679,7 +1685,7 @@
 * @return err KErrNone if request completes ok
 */
 	{
-	LOGPACKET1("CSimPacketService: - CancelService called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_CANCELSERVICE_1, "CSimPacketService: - CancelService called");
 	switch (aIpc)
 		{
 		case EPacketNotifyContextAdded:
@@ -1772,7 +1778,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::NotifyContextAddedCancel called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_NOTIFYCONTEXTADDEDCANCEL_1, "CSimPacketService::NotifyContextAddedCancel called");
 	if(iNotifyContextAdded.iNotifyPending)
 		{
 		iNotifyContextAdded.iNotifyPending=EFalse;
@@ -1791,7 +1797,7 @@
 * @return TInt KErrnone if request completes ok
 */
 	{
-	LOGPACKET1("CSimPacketService::Attach called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_ATTACH_1, "CSimPacketService::Attach called");
 	iAttachRequestHandle=aTsyReqHandle;
 	return ActionEvent(EPacketEventAttach);
 	}
@@ -1805,7 +1811,7 @@
 * @return TInt KErrnone if request completes ok
 */
 	{
-	LOGPACKET1("CSimPacketService::AttachCancel called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_ATTACHCANCEL_1, "CSimPacketService::AttachCancel called");
 	if((iState == RPacketService::EStatusUnattached) && (iCurrentEvent==EPacketEventAttach))
 		{
 		iTimer->Cancel();
@@ -1873,7 +1879,7 @@
 * @return TInt KErrnone if request completes ok
 */
 	{
-	LOGPACKET1("CSimPacketService::Detach called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_DETACH_1, "CSimPacketService::Detach called");
 	iDetachRequestHandle=aTsyReqHandle;
 	return ActionEvent(EPacketEventDetach);
 	}
@@ -1888,7 +1894,7 @@
 * @return TInt KErrnone if request completes ok
 */
 	{
-	LOGPACKET1("CSimPacketService::DetachCancel called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_DETACHCANCEL_1, "CSimPacketService::DetachCancel called");
 	if((iState == RPacketService::EStatusAttached) && (iCurrentEvent==EPacketEventDetach))
 			{
 			iTimer->Cancel();
@@ -1907,7 +1913,7 @@
 * @return TInt err KErrNone if ok
 */
 	{
-	LOGPACKET1("CSimPacketService::GetStatus called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_GETSTATUS_1, "CSimPacketService::GetStatus called");
 	*aStatus = iState;
 	ReqCompleted(aTsyReqHandle,KErrNone);
 	return KErrNone;
@@ -1942,7 +1948,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::NotifyStatusChangeCancel called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_NOTIFYSTATUSCHANGECANCEL_1, "CSimPacketService::NotifyStatusChangeCancel called");
 	if(iNotifyStatusChange.iNotifyPending)
 		{
 		iNotifyStatusChange.iNotifyPending=EFalse;
@@ -1967,7 +1973,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::NotifyContextActivationRequested called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_NOTIFYCONTEXTACTIVATIONREQUESTED_1, "CSimPacketService::NotifyContextActivationRequested called");
 	
 	iConfigData.iTsyReqHandle = aTsyReqHandle;
 	iConfigData.iData = aContextParameters;
@@ -1994,7 +2000,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::NotifyContextActivationRequestedCancel called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_NOTIFYCONTEXTACTIVATIONREQUESTEDCANCEL_1, "CSimPacketService::NotifyContextActivationRequestedCancel called");
 
 	iIncomingContextManager->Cancel();	
 	iIncomingContextManager->SetUseTimerOff();	
@@ -2041,7 +2047,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::EnumerateContexts called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_ENUMERATECONTEXTS_1, "CSimPacketService::EnumerateContexts called");
 	// this should enumerate all primary and secondary contexts
 	*aCount = iPrimaryContextNameInc + iSecondaryContextNameInc;
 	*aMaxAllowed = KMaxContextPoolSize;
@@ -2058,7 +2064,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::Enumerate Context Cancel called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_ENUMERATECONTEXTSCANCEL_1, "CSimPacketService::Enumerate Context Cancel called");
 	return KErrNone;
 	}
 
@@ -2072,7 +2078,7 @@
 * @return KErrNone if context is found in the list of contexts 
 */
 	{
-	LOGPACKET1("CSimPacketService::GetContextInfo called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_GETCONTEXTINFO_1, "CSimPacketService::GetContextInfo called");
 	CSimPacketContext*  packetContext;
 
 	if((*aIndex >= iContextCount) || (*aIndex < 0))
@@ -2125,7 +2131,7 @@
 * @return KErrNone 
 */
 	{
-	LOGPACKET1("CSimPacketService::GetNtwkRegStatus called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_GETNTWKREGSTATUS_1, "CSimPacketService::GetNtwkRegStatus called");
 	*aRegistrationStatus = (RPacketService::TRegistrationStatus)iCurrentRegStatus;
 	ReqCompleted(aTsyReqHandle,KErrNone);
 	return KErrNone;
@@ -2165,7 +2171,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::NotifyChangeOfNtwkRegStatusCancel called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_NOTIFYCHANGEOFNTWKREGSTATUSCANCEL_1, "CSimPacketService::NotifyChangeOfNtwkRegStatusCancel called");
 	if(iNotifyChangeOfNtwk.iNotifyPending)
 		{
 		iNotifyChangeOfNtwk.iNotifyPending=EFalse;
@@ -2271,7 +2277,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::GetStaticCaps called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_GETSTATICCAPS_1, "CSimPacketService::GetStaticCaps called");
 	*aCaps = KPacketServiceCaps;
 	*aPdpType = RPacketContext::EPdpTypePPP;
 	ReqCompleted(aTsyReqHandle,KErrNone);
@@ -2287,7 +2293,7 @@
 */
 TInt CSimPacketService::GetDynamicCaps(const TTsyReqHandle aTsyReqHandle, RPacketService::TDynamicCapsFlags* aCaps)
 	{
-	LOGPACKET1("CSimPacketService::GetDynamicCaps called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_GETDYNAMICCAPS_1, "CSimPacketService::GetDynamicCaps called");
 	
 	if (iDynamicCapsArray->Count() == 0)
 		{
@@ -2308,7 +2314,7 @@
 */
 TInt CSimPacketService::NotifyDynamicCapsChange(const TTsyReqHandle aTsyReqHandle, RPacketService::TDynamicCapsFlags* aCaps)
 	{
-	LOGPACKET1("CSimPacketService::NotifyDynamicCapsChange called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_NOTIFYDYNAMICCAPSCHANGE_1, "CSimPacketService::NotifyDynamicCapsChange called");
 	__ASSERT_ALWAYS(!iNotifyDynamicCapsChange.iNotifyPending,SimPanic(ENotificationAlreadyPending));
  
 	if (iDynamicCapsArray->Count() == 0)
@@ -2331,7 +2337,7 @@
 */
 TInt CSimPacketService::NotifyDynamicCapsChangeCancel(const TTsyReqHandle aTsyReqHandle)
 	{
-	LOGPACKET1("CSimPacketService::NotifyDynamicCapsChangeCancel called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_NOTIFYDYNAMICCAPSCHANGECANCEL_1, "CSimPacketService::NotifyDynamicCapsChangeCancel called");
 	if( (iNotifyDynamicCapsChange.iNotifyPending) && (aTsyReqHandle == iNotifyDynamicCapsChange.iNotifyHandle))
 		{
 		iNotifyDynamicCapsChange.iNotifyPending=EFalse;
@@ -2370,7 +2376,7 @@
 * @return KErrNone 
 */
 	{
-	LOGPACKET1("CSimPacketService::SetAttachMode called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_SETATTACHMODE_1, "CSimPacketService::SetAttachMode called");
 	if(*aMode != RPacketService::EAttachWhenNeeded)
 		{
 		ReqCompleted(aTsyReqHandle, KErrNotSupported);
@@ -2399,7 +2405,7 @@
 * @return KErrNone 
 */
 	{
-	LOGPACKET1("CSimPacketService::GetAttachMode called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_GETATTACHMODE_1, "CSimPacketService::GetAttachMode called");
 	*aMode = iAttachMode;
 	ReqCompleted(aTsyReqHandle,KErrNone);
 	return KErrNone;
@@ -2414,7 +2420,7 @@
 * @return KErrNone 
 */
 	{
-	LOGPACKET1("CSimPacketService::NotifyAttachModeChange called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_NOTIFYATTACHMODECHANGE_1, "CSimPacketService::NotifyAttachModeChange called");
 	
 	__ASSERT_ALWAYS(!iNotifyChangeOfAttachMode.iNotifyPending,SimPanic(ENotificationAlreadyPending));
 	
@@ -2434,7 +2440,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::SetDefaultContextParams called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_SETDEFAULTCONTEXTPARAMS_1, "CSimPacketService::SetDefaultContextParams called");
 	
 	TPckg<TPacketDataConfigBase>* configBase = (TPckg<TPacketDataConfigBase>*)aPckg;
 	TPacketDataConfigBase& configBaseV1 = (*configBase)();
@@ -2616,7 +2622,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::GetDefaultContextParams called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_GETGPRSDEFAULTCONTEXTPARAMS_1, "CSimPacketService::GetDefaultContextParams called");
 
 	TPckg<RPacketContext::TContextConfigGPRS>* contextConfigGPRSPckg = (TPckg<RPacketContext::TContextConfigGPRS>*)aPckg;
 	RPacketContext::TContextConfigGPRS& contextConfigV1 = (*contextConfigGPRSPckg)();
@@ -2649,7 +2655,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::GetDefaultContextParams called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_GETDEFAULTCONTEXTPARAMS_1, "CSimPacketService::GetDefaultContextParams called");
 	TPckg<TPacketDataConfigBase>* configBase = (TPckg<TPacketDataConfigBase>*)aPckg;
 	TPacketDataConfigBase& configBaseV1 = (*configBase)();
 
@@ -2746,7 +2752,7 @@
 * @param aId an id identifying which timer callback is being called
 */
 	{
-	LOGPACKET1(">>CSimPacketService::TimerCallBack");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_TIMERCALLBACK_1, ">>CSimPacketService::TimerCallBack");
 
 	if(aId == ETimerIdPcktServPacket)
 		{
@@ -2819,7 +2825,7 @@
 		TInt ret = ActionEvent(EPacketEventTimeOut);
 		__ASSERT_ALWAYS(ret==KErrNone,SimPanic(ETimeOutEventActionFailed));	// Note: this is very crude error handling and should be replaced by something rather more elegant.
 		}
-	LOGPACKET1("<<CSimPacketService::TimerCallBack");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_TIMERCALLBACK_2, "<<CSimPacketService::TimerCallBack");
 	}
 
 void CSimPacketService::TimerCallBackDeactivate()
@@ -2918,7 +2924,7 @@
 		}
 	else
 		{  // Error. Some sort of stange request. Hopefully impossible.
-		LOGPACKET1("CSimPacketService::SimPSEvent property mismatch.");
+		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_SIMPSEVENT_1, "CSimPacketService::SimPSEvent property mismatch.");
 		SimPanic(EFailedToSetProperty);
 		}
 	
@@ -3014,7 +3020,7 @@
 * @return Error indication if change of state is successful or not
 */
 	{
-	LOGPACKET2(">>CSimPacketService::ChangeState [newState=%d]", aNewState);
+	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_CHANGESTATE_1, ">>CSimPacketService::ChangeState [newState=%d]", aNewState);
 	if(iState == aNewState)
 		return KErrNone;
 
@@ -3068,7 +3074,7 @@
 		ReqCompleted(iNotifyStatusChange.iNotifyHandle,KErrNone);
 		}
 
-	LOGPACKET1("<<CSimPacketService::ChangeState");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_CHANGESTATE_2, "<<CSimPacketService::ChangeState");
 	return KErrNone;
 	}
 
@@ -3088,7 +3094,7 @@
 	switch(aEvent)
 		{
 	case EPacketEventAttach:
-		LOGPACKET1(">>CSimPacketService::ActionEvent = [EPacketEventAttach]");
+		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_ACTIONEVENT_1, ">>CSimPacketService::ActionEvent = [EPacketEventAttach]");
 		if(iState==RPacketService::EStatusUnattached)
 			{
 			iCurrentEvent=EPacketEventAttach;
@@ -3099,7 +3105,7 @@
 		break;
 
 	case EPacketEventDetach:
-		LOGPACKET1(">>CSimPacketService::ActionEvent = [EPacketEventDetach]");
+		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_ACTIONEVENT_2, ">>CSimPacketService::ActionEvent = [EPacketEventDetach]");
 		if(iState !=RPacketService::EStatusUnattached)
 			{
 			iCurrentEvent=EPacketEventDetach;
@@ -3206,7 +3212,7 @@
 TInt CSimPacketService::GetCurrentReleaseMode(const TTsyReqHandle aTsyReqHandle,RPacketService::TPacketReleaseMode* aReleaseMode)
 // return current release mode
 	{
-	LOGPACKET1("CSimPacketService::GetCurrentReleaseMode called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_GETCURRENTRELEASEMODE_1, "CSimPacketService::GetCurrentReleaseMode called");
 	*aReleaseMode = (RPacketService::TPacketReleaseMode)iCurrentPacketReleaseMode;
 	ReqCompleted(aTsyReqHandle, KErrNone);
 	return KErrNone;
@@ -3348,7 +3354,7 @@
 */
 TInt CSimPacketService::NotifyReleaseModeChangeCancel(const TTsyReqHandle aTsyReqHandle)
 	{
-	LOGPACKET1("CSimPacketService::NotifyChangeOfNtwkRegStatusCancel called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_NOTIFYRELEASEMODECHANGECANCEL_1, "CSimPacketService::NotifyChangeOfNtwkRegStatusCancel called");
 	if(iNotifyChangeOfReleaseMode.iNotifyPending)
 		{
 		iNotifyChangeOfReleaseMode.iNotifyPending=EFalse;
@@ -3394,7 +3400,7 @@
 */
 TInt CSimPacketService::NotifyAttachModeChangeCancel(const TTsyReqHandle aTsyReqHandle)
 	{
-	LOGPACKET1("CSimPacketService::NotifyAttachModeChangeCancel called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_NOTIFYATTACHMODECHANGECANCEL_1, "CSimPacketService::NotifyAttachModeChangeCancel called");
 	if(iNotifyChangeOfAttachMode.iNotifyPending)
 		{
 		iNotifyChangeOfAttachMode.iNotifyPending=EFalse;
@@ -3412,7 +3418,7 @@
 * @return TInt err KErrNone if ok
 */
 	{
-	LOGPACKET1("CSimPacketService::GetMbmsNetworkServiceStatus called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_GETMBMSNETWORKSERVICESTATUS_1, "CSimPacketService::GetMbmsNetworkServiceStatus called");
 	*aStatus = (iMbmsBroadcastParamsArray->At(iCurrentMbmsParamsIndex).iMbmsNetworkStatus);
 	if(aAttemptAttach)
 		{
@@ -3460,7 +3466,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::NotifyMbmsNetworkServiceStatusChange called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_NOTIFYMBMSNETWORKSERVICESTATUSCHANGE_1, "CSimPacketService::NotifyMbmsNetworkServiceStatusChange called");
  	__ASSERT_ALWAYS(!iNotifyMbmsNetworkStatusChange.iNotifyPending,SimPanic(ENotificationAlreadyPending));
 
  	iNotifyMbmsNetworkStatusChange.iNotifyPending = ETrue;
@@ -3478,7 +3484,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::NotifyMbmsNetworkServiceStatusChangeCancel called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_NOTIFYMBMSNETWORKSERVICESTATUSCHANGECANCEL_1, "CSimPacketService::NotifyMbmsNetworkServiceStatusChangeCancel called");
 	if(iNotifyMbmsNetworkStatusChange.iNotifyPending)
 		{
 		iNotifyMbmsNetworkStatusChange.iNotifyPending=EFalse;
@@ -3498,7 +3504,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::NotifyMbmsServiceAvailabilityChange called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_NOTIFYMBMSSERVICEAVAILABILITYCHANGE_1, "CSimPacketService::NotifyMbmsServiceAvailabilityChange called");
  	__ASSERT_ALWAYS(!iNotifyMbmsNetworkStatusChange.iNotifyPending,SimPanic(ENotificationAlreadyPending));
 
  	iNotifyMbmsServAvailChange.iNotifyPending = ETrue;
@@ -3516,7 +3522,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::NotifyMbmsServiceAvailabilityChangeCancel called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_NOTIFYMBMSSERVICEAVAILABILITYCHANGECANCEL_1, "CSimPacketService::NotifyMbmsServiceAvailabilityChangeCancel called");
 	if(iNotifyMbmsServAvailChange.iNotifyPending)
 		{
 		iNotifyMbmsServAvailChange.iNotifyPending=EFalse;
@@ -3537,7 +3543,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::UpdateMbmsMonitorServiceListL called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_UPDATEMBMSMONITORSERVICELISTL_1, "CSimPacketService::UpdateMbmsMonitorServiceListL called");
 	CPcktMbmsMonitoredServiceList* monServList = CPcktMbmsMonitoredServiceList::NewL();
 	CleanupStack::PushL(monServList); 
 
@@ -3552,7 +3558,7 @@
 	switch(*aAction)
 		{
 		case SIMTSY_PACKET_MBMS_ADD_ENTRIES:
-			LOGPACKET1("CSimPacketService::UpdateMbmsMonitorServiceListL Action: ADD ");
+			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_UPDATEMBMSMONITORSERVICELISTL_2, "CSimPacketService::UpdateMbmsMonitorServiceListL Action: ADD ");
 			monServList->RestoreL(*aBuffer);
 			countAdd = monServList->Enumerate();
 			if(countAdd != SIMTSY_PACKET_MBMS_ADD_ENTRIES_COUNT)
@@ -3606,7 +3612,7 @@
 			break;
 
 		case SIMTSY_PACKET_MBMS_REM_ENTRIES:
-			LOGPACKET1("CSimPacketService::UpdateMbmsMonitorServiceListL Action: REMOVE ");
+			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_UPDATEMBMSMONITORSERVICELISTL_3, "CSimPacketService::UpdateMbmsMonitorServiceListL Action: REMOVE ");
 			monServList->RestoreL(*aBuffer);
 			countRem = monServList->Enumerate();
 			if(countRem != SIMTSY_PACKET_MBMS_REM_ENTRIES_COUNT)
@@ -3672,14 +3678,14 @@
 		case SIMTSY_PACKET_MBMS_REM_ALL_ENTRIES:
 			iMbmsMonitorListCount = 0;
 			iMbmsMonitorListParamsArray->Delete(0,iMbmsMonitorListParamsArray->Count());
-			LOGPACKET1("CSimPacketService::UpdateMbmsMonitorServiceListL Action: REMOVE_ALL ");
+			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_UPDATEMBMSMONITORSERVICELISTL_4, "CSimPacketService::UpdateMbmsMonitorServiceListL Action: REMOVE_ALL ");
 			iUpdateMbmsServiceError = KErrNone;
 			iUpdateMbmsServiceReqHandle = aTsyReqHandle;
 			CleanupStack::PopAndDestroy(); // monServList
 			break;
 			
 		default:
-			LOGPACKET1("CSimPacketService::UpdateMbmsMonitorServiceListL Action: Default ");
+			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_UPDATEMBMSMONITORSERVICELISTL_5, "CSimPacketService::UpdateMbmsMonitorServiceListL Action: Default ");
 			ReqCompleted(aTsyReqHandle,KErrNotFound);
 			CleanupStack::PopAndDestroy(); // monServList
 			break;
@@ -3695,7 +3701,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::UpdateMbmsMonitorServiceListCancel Called ");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_UPDATEMBMSMONITORSERVICELISTCANCEL_1, "CSimPacketService::UpdateMbmsMonitorServiceListCancel Called ");
 	ReqCompleted(aTsyReqHandle,KErrCancel);
 	return KErrNone;
 	}
@@ -3713,7 +3719,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::GetMbmsMonitoredServicesListPhase1 called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_GETMBMSMONITOREDSERVICESLISTPHASE1_1, "CSimPacketService::GetMbmsMonitoredServicesListPhase1 called");
 	TInt ret=KErrNone;
 	TInt leaveCode=KErrNone;
 	TRAP(leaveCode, ret=ProcessGetMbmsMonitoredServicesListPhase1L(aTsyReqHandle, aClient, aBufSize););
@@ -3737,7 +3743,7 @@
 */
 	{
 	
-	LOGPACKET1("CSimPacketService::ProcessGetMbmsMonitoredServicesListPhase1L called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_PROCESSGETMBMSMONITOREDSERVICESLISTPHASE1L_1, "CSimPacketService::ProcessGetMbmsMonitoredServicesListPhase1L called");
 	CPcktMbmsMonitoredServiceList* list=CPcktMbmsMonitoredServiceList::NewL();
 	CleanupStack::PushL(list);
 
@@ -3752,7 +3758,7 @@
 			entry.iTmgi.SetMNC(iMbmsMonitorListParamsArray->At(i).iMNC);
 			entry.iTmgi.SetServiceId(iMbmsMonitorListParamsArray->At(i).iServiceId);
 			// Add the entry into the list, at the next empty location
-			LOGPACKET2("Adding the Entry no. %d to the List",i+1);
+			OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_PROCESSGETMBMSMONITOREDSERVICESLISTPHASE1L_2, "Adding the Entry no. %d to the List",i+1);
 			list->AddEntryL(entry);
 		}
 	
@@ -3787,7 +3793,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::GetMbmsMonitoredServicesListPhase2 called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_GETMBMSMONITOREDSERVICESLISTPHASE2_1, "CSimPacketService::GetMbmsMonitoredServicesListPhase2 called");
 	CPcktListReadAllAttempt* read=NULL;
 	// Find the get MBMS Monitor Service List from this client
 	for (TInt i=0; i<iMbmsServicesList->Count(); ++i)
@@ -3818,7 +3824,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::GetMbmsMonitoredServicesListCancel called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_GETMBMSMONITOREDSERVICESLISTCANCEL_1, "CSimPacketService::GetMbmsMonitoredServicesListCancel called");
 	// Remove the read all attempt from iGetMbmsMonitoredServices
 
 	CPcktListReadAllAttempt* read=NULL;
@@ -3846,7 +3852,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::EnumerateMbmsMonitorServiceList called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_ENUMERATEMBMSMONITORSERVICELIST_1, "CSimPacketService::EnumerateMbmsMonitorServiceList called");
 	*aCount = iMbmsMonitorListCount;
 	*aMaxAllowed = KMaxMbmsMonitorContexts;
 	iEnumerateMonitorListReqHandle = aTsyReqHandle;
@@ -3883,7 +3889,7 @@
 * @return KErrNone
 */
 	{
-	LOGPACKET1("CSimPacketService::EnumerateMbmsActiveServiceList called");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETSERVICE_ENUMERATEMBMSACTIVESERVICELIST_1, "CSimPacketService::EnumerateMbmsActiveServiceList called");
 	*aCount = iMbmsNifWrappers.Count(); // The NifWrapper contains the list of mbmsContexts that are activated.
 	*aMaxAllowed = KMaxMbmsActiveContexts;
 	iEnumerateActiveListReqHandle = aTsyReqHandle;