telephonyserverplugins/simtsy/src/CSimCall.cpp
branchRCL_3
changeset 65 630d2f34d719
parent 0 3553901f7fa8
child 66 07a122eea281
--- a/telephonyserverplugins/simtsy/src/CSimCall.cpp	Thu Aug 19 11:03:36 2010 +0300
+++ b/telephonyserverplugins/simtsy/src/CSimCall.cpp	Tue Aug 31 16:23:08 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"
@@ -21,9 +21,14 @@
  @file
 */
 
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "CSimCallTraces.h"
+#endif
+
 #include "CSimCall.h"
 #include "CSimPhone.h"
-#include "Simlog.h"
 
 void CSimCall::CloseCall(TAny* aObj)
 /**
@@ -81,7 +86,7 @@
 	// in order to check the type of request it has
 
 	CTelObject::TReqMode reqMode=0;
-	LOGCALL2("CSimCall::ReqModeL called with IPC number %d",aIpc);
+	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_REQMODEL_1, "CSimCall::ReqModeL called with IPC number %d",aIpc);
 	switch (aIpc)
 		{
 	//
@@ -145,10 +150,10 @@
 	case EMobileCallNotifyMobileCallStatusChange:
 	case EMobileCallNotifyMobileCallCapsChange:
 	case EMobileCallNotifyRemotePartyInfoChange:
-		LOGCALL1("CSimCall: Registered with default number of slots");
+		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_NUMBEROFSLOTSL_1, "CSimCall: Registered with default number of slots");
 		return KDefaultNumberOfSlots;
 	default:
-		LOGCALL1("CSimCall::NumberOfSlotsL: No match for IPC, defering to base function");
+		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_NUMBEROFSLOTSL_2, "CSimCall::NumberOfSlotsL: No match for IPC, defering to base function");
 		break;
 		}
 	return CCallBase::NumberOfSlotsL(aIpc);
@@ -290,11 +295,11 @@
 * @return KErrNone
 */
 	{
-	LOGCALL1(">>CSimCall::NotifyHookChange");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_NOTIFYHOOKCHANGE_1, ">>CSimCall::NotifyHookChange");
 	iNotifyHookChange.iNotifyPending = ETrue;
 	iNotifyHookChange.iNotifyHandle = aTsyReqHandle;
 	iNotifyHookChange.iNotifyData = aHookStatus;
-	LOGCALL1("<<CSimCall::NotifyHookChange");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_NOTIFYHOOKCHANGE_2, "<<CSimCall::NotifyHookChange");
 	return KErrNone;
 	}
 
@@ -306,13 +311,13 @@
 * @return KErrNone
 */
 	{
-	LOGCALL1(">>CSimCall::NotifyHookChangeCancel");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_NOTIFYHOOKCHANGECANCEL_1, ">>CSimCall::NotifyHookChangeCancel");
 	if(iNotifyHookChange.iNotifyPending)
 		{
 		iNotifyHookChange.iNotifyPending=EFalse;
 		ReqCompleted(iNotifyHookChange.iNotifyHandle,KErrCancel);
 		}
-	LOGCALL1("<<CSimCall::NotifyHookChangeCancel");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_NOTIFYHOOKCHANGECANCEL_2, "<<CSimCall::NotifyHookChangeCancel");
 	return KErrNone;
 	}
 
@@ -328,13 +333,13 @@
 * @return KErrNone
 */
 	{
-	LOGCALL1(">>CSimCall::NotifyMobileCallStatusChange");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_NOTIFYMOBILECALLSTATUSCHANGE_1, ">>CSimCall::NotifyMobileCallStatusChange");
 	__ASSERT_ALWAYS(!iMobileNotifyStatusChange.iNotifyPending,SimPanic(ENotificationAlreadyPending));
 
 	iMobileNotifyStatusChange.iNotifyPending = ETrue;
 	iMobileNotifyStatusChange.iNotifyHandle = aTsyReqHandle;
 	iMobileNotifyStatusChange.iNotifyData = aStatus;
-	LOGCALL1("<<CSimCall::NotifyMobileCallStatusChange");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_NOTIFYMOBILECALLSTATUSCHANGE_2, "<<CSimCall::NotifyMobileCallStatusChange");
 	return KErrNone;
 	}
 
@@ -347,13 +352,13 @@
 * @return KErrNone
 */
 	{
-	LOGCALL1(">>CSimCall::NotifyMobileCallStatusChangeCancel");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_NOTIFYMOBILECALLSTATUSCHANGECANCEL_1, ">>CSimCall::NotifyMobileCallStatusChangeCancel");
 	if(iMobileNotifyStatusChange.iNotifyPending)
 		{
 		iMobileNotifyStatusChange.iNotifyPending=EFalse;
 		ReqCompleted(iMobileNotifyStatusChange.iNotifyHandle,KErrCancel);
 		}
-	LOGCALL1("<<CSimCall::NotifyMobileCallStatusChangeCancel");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_NOTIFYMOBILECALLSTATUSCHANGECANCEL_2, "<<CSimCall::NotifyMobileCallStatusChangeCancel");
 	return KErrNone;
 	}
 
@@ -370,13 +375,13 @@
 * @return KErrNone
 */
 	{
-	LOGCALL1(">>CSimCall::NotifyStatusChange");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_NOTIFYSTATUSCHANGE_1, ">>CSimCall::NotifyStatusChange");
 	__ASSERT_ALWAYS(!iNotifyStatusChange.iNotifyPending,SimPanic(ENotificationAlreadyPending));
 
 	iNotifyStatusChange.iNotifyPending = ETrue;
 	iNotifyStatusChange.iNotifyHandle = aTsyReqHandle;
 	iNotifyStatusChange.iNotifyData = aStatus;
-	LOGCALL1("<<CSimCall::NotifyStatusChange");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_NOTIFYSTATUSCHANGE_2, "<<CSimCall::NotifyStatusChange");
 	return KErrNone;
 	}
 
@@ -389,13 +394,13 @@
 * @return KErrNone
 */
 	{
-	LOGCALL1(">>CSimCall::NotifyStatusChangeCancel");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_NOTIFYSTATUSCHANGECANCEL_1, ">>CSimCall::NotifyStatusChangeCancel");
 	if(iNotifyStatusChange.iNotifyPending)
 		{
 		iNotifyStatusChange.iNotifyPending=EFalse;
 		ReqCompleted(iNotifyStatusChange.iNotifyHandle,KErrCancel);
 		}
-	LOGCALL1("<<CSimCall::NotifyStatusChangeCancel");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_NOTIFYSTATUSCHANGECANCEL_2, "<<CSimCall::NotifyStatusChangeCancel");
 	return KErrNone;
 	}
 
@@ -475,7 +480,7 @@
 	mobileCallInfo.iStatus=iState;
 	mobileCallInfo.iCallName.Copy(iName);
 	mobileCallInfo.iLineName.Copy(iLine->iLineName);
-	LOGCALL2("CSimCall::GetMobileCallInfo request completed with %d",iState);
+	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_GETMOBILECALLINFO_1, "CSimCall::GetMobileCallInfo request completed with %d",iState);
 	ReqCompleted(aTsyReqHandle,KErrNone);
 	return KErrNone;
 	}
@@ -519,10 +524,10 @@
 * @return KErrNone
 */
     {
-	LOGCALL1(">>CSimCall::GetStatus");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_GETSTATUS_1, ">>CSimCall::GetStatus");
 	*aCallStatus=GetCoreCallStatus();
 	ReqCompleted(aTsyReqHandle,KErrNone);
-	LOGCALL1("<<CSimCall::GetStatus");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_GETSTATUS_2, "<<CSimCall::GetStatus");
 	return KErrNone;
     }
 
@@ -535,10 +540,10 @@
 * @return KErrNone
 */
     {
-	LOGCALL1(">>CSimCall::GetMobileCallStatus");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_GETMOBILECALLSTATUS_1, ">>CSimCall::GetMobileCallStatus");
 	*aCallStatus=iState;
 	ReqCompleted(aTsyReqHandle,KErrNone);
-	LOGCALL1("<<CSimCall::GetMobileCallStatus");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_GETMOBILECALLSTATUS_2, "<<CSimCall::GetMobileCallStatus");
 	return KErrNone;
     }
 
@@ -577,12 +582,12 @@
 * Not supported in this version of the Simulator TSY
 */
 	{
-	LOGCALL1(">>CSimCall::GetCallDuration");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_GETCALLDURATION_1, ">>CSimCall::GetCallDuration");
 	
 	iCallDurationHandler->GetDuration(aTime);
 	
 	ReqCompleted(aTsyReqHandle,KErrNone);
-	LOGCALL1("<<CSimCall::GetCallDuration");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_GETCALLDURATION_2, "<<CSimCall::GetCallDuration");
 	return KErrNone;
 	}
 
@@ -660,7 +665,7 @@
 * @return Error indication if change of state is successful or not
 */
 	{
-	LOGCALL3(">>CSimCall::ChangeState 0x%08x [newState=%d] entry", this,aNewState);
+	OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_CHANGESTATEL_1, ">>CSimCall::ChangeState 0x%08x [newState=%d] entry", (TUint)this,aNewState);
 	
 	if(!aNoPropagation)
 		{
@@ -734,7 +739,7 @@
 	if((aNewState == RMobileCall::EStatusConnected && !aSwap)|| aNewState == RMobileCall::EStatusDisconnecting)
 		iLine->UpdatePhoneNotifiers(this,aNewState);		
 
-	LOGCALL2("<<CSimCall::ChangeState exit %d",iState);
+	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_CHANGESTATEL_2, "<<CSimCall::ChangeState exit %d",iState);
 	return KErrNone;
 	}
 
@@ -744,7 +749,7 @@
 	Update notifiers of other voice call when it gets swapped
 */
 	{
-	LOGCALL2(">>CSimCall::UpdateNotifiers 0x%08x entry", this);
+	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_UPDATENOTIFIERS_1, ">>CSimCall::UpdateNotifiers 0x%08x entry", this);
 	
 // Check for call duration change
 	if (!iCallDurationHandler)
@@ -805,7 +810,7 @@
 			}
 		}
 
-	LOGCALL2("<<CSimCall::UpdateNotifiers exit %d",iState);
+	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_UPDATENOTIFIERS_2, "<<CSimCall::UpdateNotifiers exit %d",iState);
 	}
 
 TInt CSimCall::ActionEvent(TCallEvent /*aEvent*/, TInt /*aStatus*/)
@@ -1006,7 +1011,7 @@
 * @return KErrNone
 */
 	{
-	LOGCALL1(">>CSimCall::NotifyRemotePartyInfoChange");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_NOTIFYREMOTEPARTYINFOCHANGE_1, ">>CSimCall::NotifyRemotePartyInfoChange");
 	__ASSERT_ALWAYS(iNotifyRemotePartyInfoTimer, SimPanic(EOjectNotConstructed));
 	__ASSERT_ALWAYS(!iNotifyRemotePartyInfoTimer->iNotifyRemotePartyInfo.iNotifyPending,SimPanic(ENotificationAlreadyPending));
 	
@@ -1027,7 +1032,7 @@
 	iNotifyRemotePartyInfoTimer->iNotifyRemotePartyInfo.iNotifyPending = ETrue;
 	iNotifyRemotePartyInfoTimer->iNotifyRemotePartyInfo.iNotifyHandle = aTsyReqHandle;
 	iNotifyRemotePartyInfoTimer->iNotifyRemotePartyInfo.iNotifyData = &remoteparty;
-	LOGCALL1("<<CSimCall::NotifyRemotePartyInfoChange");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_NOTIFYREMOTEPARTYINFOCHANGE_2, "<<CSimCall::NotifyRemotePartyInfoChange");
 	return KErrNone;
 	}
 	
@@ -1039,12 +1044,12 @@
 * @return KErrNone
 */
 	{
-	LOGCALL1(">>CSimCall::NotifyRemotePartyInfoChangeCancel");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_NOTIFYREMOTEPARTYINFOCHANGECANCEL_1, ">>CSimCall::NotifyRemotePartyInfoChangeCancel");
 	if(iNotifyRemotePartyInfoTimer && iNotifyRemotePartyInfoTimer->iNotifyRemotePartyInfo.iNotifyPending)
 		{
 		iNotifyRemotePartyInfoTimer->iNotifyRemotePartyInfo.iNotifyPending=EFalse;
 		ReqCompleted(iNotifyRemotePartyInfoTimer->iNotifyRemotePartyInfo.iNotifyHandle,KErrCancel);
 		}
-	LOGCALL1("<<CSimCall::NotifyRemotePartyInfoChangeCancel");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMCALL_NOTIFYREMOTEPARTYINFOCHANGECANCEL_2, "<<CSimCall::NotifyRemotePartyInfoChangeCancel");
 	return KErrNone;
 	}