telephonyserverplugins/simtsy/src/CSimIndicator.cpp
branchRCL_3
changeset 20 07a122eea281
parent 19 630d2f34d719
--- a/telephonyserverplugins/simtsy/src/CSimIndicator.cpp	Tue Aug 31 16:23:08 2010 +0300
+++ b/telephonyserverplugins/simtsy/src/CSimIndicator.cpp	Wed Sep 01 12:40:21 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2001-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,16 +20,10 @@
  @file
 */
 
-
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "CSimIndicatorTraces.h"
-#endif
-
 #include <testconfigfileparser.h>
 #include "CSimIndicator.h"
 #include "CSimPhone.h"
+#include "Simlog.h"
 
 
 const TInt KIndicatorsGranularity=5;		// < Granularity for indicators list array
@@ -73,7 +67,7 @@
 	{
 	iIndicatorsInfo=new(ELeave) CArrayFixFlat<TPhoneIndicatorsInfo>(KIndicatorsGranularity);
 
-	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMINDICATOR_CONSTRUCTL_1, "Starting to parse Indicators config parameters...");
+	LOGPHONE1("Starting to parse Indicators config parameters...");
 	TInt count=CfgFile()->ItemCount(KIndicators);
 	const CTestConfigItem* item=NULL;
 	TInt ret=KErrNone;
@@ -90,13 +84,13 @@
 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,number);
 		if(ret!=KErrNone)
 			{
-			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMINDICATOR_CONSTRUCTL_2, "WARNING - CONFIGURATION FILE PARSING - Reading element NUMBER returned %d (element no. %d) from tag %s.",ret,0,KIndicators);
+			LOGPARSERR("number",ret,0,&KIndicators);
 			continue;
 			}
 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,error);
 		if(ret!=KErrNone)
 			{
-			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMINDICATOR_CONSTRUCTL_3, "WARNING - CONFIGURATION FILE PARSING - Reading element ERROR returned %d (element no. %d) from tag %s.",ret,1,KIndicators);
+			LOGPARSERR("error",ret,1,&KIndicators);
 			continue;
 			}
 		TPhoneIndicatorsInfo indicInfo;
@@ -104,14 +98,14 @@
 		indicInfo.iError=error;
 		iIndicatorsInfo->AppendL(indicInfo);
 		}
-	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMINDICATOR_CONSTRUCTL_4, "Finished parsing Indicators config parameters...%d items found", count);
+	LOGPHONE2("Finished parsing Indicators config parameters...%d items found", count);
 
 	iIndicatorCheckPeriod = 1;
 	count = CfgFile()->ItemCount(KIndicatorCheckPeriod);
 	if (count > 1)
 		{
-		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMINDICATOR_CONSTRUCTL_5, "Warning: Error parsing IndicatorCheckPeriod in config file.");
-		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMINDICATOR_CONSTRUCTL_6, "         More than one value found, using default value.");
+		LOGPHONE1("Warning: Error parsing IndicatorCheckPeriod in config file.");
+		LOGPHONE1("         More than one value found, using default value.");
 		}
 	else
 		{
@@ -123,8 +117,8 @@
 			ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,period);
 			if(ret!=KErrNone)
 				{
-				OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMINDICATOR_CONSTRUCTL_7, "Warning: Error parsing IndicatorCheckPeriod in config file.");
-				OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMINDICATOR_CONSTRUCTL_8, "         No value for IndicatorCheckPeriod found.");
+				LOGPHONE1("Warning: Error parsing IndicatorCheckPeriod in config file.");
+				LOGPHONE1("         No value for IndicatorCheckPeriod found.");
 				}
 			else
 				{
@@ -191,7 +185,7 @@
  * @return TInt			Standard error value.
  */
 	{
-	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMINDICATOR_GETINDICATOR_1, "CSimIndicator::GetIndicator request made: returning %d",iCurrentIndicator);
+	LOGPHONE2("CSimIndicator::GetIndicator request made: returning %d",iCurrentIndicator);
 	TPckg<TUint32>* indicPckg=(TPckg<TUint32>*)aPckg1;
 	TUint32& indic=(*indicPckg)();
 	
@@ -210,7 +204,7 @@
  * @return TInt			Standard error value.
  */
 	{
-	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMINDICATOR_NOTIFYINDICATORCHANGE_1, "CSimIndicator::NotifyIndicatorChange notification posted");
+	LOGPHONE1("CSimIndicator::NotifyIndicatorChange notification posted");
 	TPckg<TUint32>* indicPckg=(TPckg<TUint32>*)aPckg1;
 	TUint32& indic=(*indicPckg)();
 
@@ -230,7 +224,7 @@
 	{
 	if(iIndicatorsChangeNotificationPending)
 		{
-		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMINDICATOR_NOTIFYINDICATORCHANGECANCEL_1, "CSimIndicator::NotifyIndicatorChange notification cancelled");
+		LOGPHONE1("CSimIndicator::NotifyIndicatorChange notification cancelled");
 		iIndicatorsChangeNotificationPending=EFalse;
 		iPhone->ReqCompleted(iIndicatorsChangeNotificationReqHandle,KErrCancel);
 		}
@@ -268,7 +262,7 @@
 // Trigger notification with appropriate data and result codes
 			iIndicatorsChangeNotificationPending=EFalse;
 			*iIndicatorsChangeNofificationValue=iCurrentIndicator;
-			OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMINDICATOR_CHECKNOTIFICATION_1, "CSimIndicator::NotifyIndicatorChange triggered: returned %d",iCurrentIndicator);
+			LOGPHONE2("CSimIndicator::NotifyIndicatorChange triggered: returned %d",iCurrentIndicator);
 			iPhone->ReqCompleted(iIndicatorsChangeNotificationReqHandle,ret);
 			}
 		}