usbmgmt/usbmgr/device/classdrivers/acm/classimplementation/ecacm/src/linkstatenotifier.cpp
branchRCL_3
changeset 16 012cc2ee6408
parent 15 f92a4f87e424
--- a/usbmgmt/usbmgr/device/classdrivers/acm/classimplementation/ecacm/src/linkstatenotifier.cpp	Tue Aug 31 17:01:47 2010 +0300
+++ b/usbmgmt/usbmgr/device/classdrivers/acm/classimplementation/ecacm/src/linkstatenotifier.cpp	Wed Sep 01 12:35:00 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-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"
@@ -17,19 +17,19 @@
 
 #include <e32base.h>
 #include <d32usbc.h>
+#include <usb/usblogger.h>
 #include "AcmPanic.h"
 #include "linkstatenotifier.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "linkstatenotifierTraces.h"
+
+#ifdef __FLOG_ACTIVE
+_LIT8(KLogComponent, "ECACM");
 #endif
 
-
 CLinkStateNotifier* CLinkStateNotifier::NewL(MLinkStateObserver& aParent, RDevUsbcClient& aUsb)
 	{
-	OstTraceFunctionEntry0( CLINKSTATENOTIFIER_NEWL_ENTRY );
+	LOG_STATIC_FUNC_ENTRY
+	
 	CLinkStateNotifier* self = new (ELeave) CLinkStateNotifier(aParent, aUsb);
-	OstTraceFunctionExit0( CLINKSTATENOTIFIER_NEWL_EXIT );
 	return self;
 	}
 
@@ -38,9 +38,9 @@
 	 : CActive(EPriorityStandard),
 	   iParent(aParent), iUsb(aUsb)
 	{
-	OstTraceFunctionEntry0( CLINKSTATENOTIFIER_CLINKSTATENOTIFIER_CONS_ENTRY );
+	LOG_FUNC
+	
 	CActiveScheduler::Add(this);
-	OstTraceFunctionExit0( CLINKSTATENOTIFIER_CLINKSTATENOTIFIER_CONS_EXIT );
 	}
 
 
@@ -50,9 +50,8 @@
 */
 CLinkStateNotifier::~CLinkStateNotifier()
 	{
-	OstTraceFunctionEntry0( CLINKSTATENOTIFIER_CLINKSTATENOTIFIER_DES_ENTRY );
+	LOG_FUNC
 	Cancel();
-	OstTraceFunctionExit0( CLINKSTATENOTIFIER_CLINKSTATENOTIFIER_DES_EXIT );
 	}
 
 
@@ -63,8 +62,6 @@
 */
 TInt CLinkStateNotifier::RunError(TInt /*aError*/)
 	{
-	OstTraceFunctionEntry0( CLINKSTATENOTIFIER_RUNERROR_ENTRY );
-	OstTraceFunctionExit0( CLINKSTATENOTIFIER_RUNERROR_EXIT );
 	return KErrNone;
 	}
 
@@ -75,16 +72,14 @@
 */
 void CLinkStateNotifier::RunL()
 	{
-	OstTraceFunctionEntry0( CLINKSTATENOTIFIER_RUNL_ENTRY );
-	OstTrace1( TRACE_NORMAL, CLINKSTATENOTIFIER_RUNL, "CLinkStateNotifier::RunL;called state=0x%X", iUsbState );
+	LOGTEXT2(_L8("CObexUsbHandler::RunL called state=0x%X"), iUsbState);
 	
 	if (iStatus != KErrNone)
 		{
-		OstTrace1( TRACE_NORMAL, CLINKSTATENOTIFIER_RUNL_DUP1, "CLinkStateNotifier::RunL;- Error = %d", iStatus.Int() );
+		LOGTEXT2(_L8("CObexUsbHandler::RunL() - Error = %d"),iStatus.Int());
 		LinkDown();
 		iParent.MLSOStateChange(KDefaultMaxPacketTypeBulk);
 
-		OstTraceFunctionExit0( CLINKSTATENOTIFIER_RUNL_EXIT );
 		return;
 		}
 
@@ -110,8 +105,7 @@
 			break;
 
 		default:
-			OstTrace0( TRACE_FATAL, CLINKSTATENOTIFIER_RUNL_DUP2, "CLinkStateNotifier::RunL;EPanicUnknownDeviceState" );
-			__ASSERT_DEBUG( EFalse, User::Panic(KAcmPanicCat, EPanicUnknownDeviceState) );
+			__ASSERT_DEBUG(false, _USB_PANIC(KAcmPanicCat, EPanicUnknownDeviceState));
 			break;
 			}
 		}
@@ -121,7 +115,6 @@
 	// Await further notification of a state change.
 	iUsb.AlternateDeviceStatusNotify(iStatus, iUsbState);
 	SetActive();
-	OstTraceFunctionExit0( CLINKSTATENOTIFIER_RUNL_EXIT_DUP1 );
 	}
 
 
@@ -130,9 +123,9 @@
 */
 void CLinkStateNotifier::DoCancel()
 	{
-	OstTraceFunctionEntry0( CLINKSTATENOTIFIER_DOCANCEL_ENTRY );
+	LOG_FUNC
+
 	iUsb.AlternateDeviceStatusNotifyCancel();
-	OstTraceFunctionExit0( CLINKSTATENOTIFIER_DOCANCEL_EXIT );
 	}
 
 
@@ -142,16 +135,14 @@
 */
 void CLinkStateNotifier::Start()
 	{
-	OstTraceFunctionEntry0( CLINKSTATENOTIFIER_START_ENTRY );
+	LOG_FUNC
 	iUsb.AlternateDeviceStatusNotify(iStatus, iUsbState);
 	SetActive();
-	OstTraceFunctionExit0( CLINKSTATENOTIFIER_START_EXIT );
 	}
 
 
 void CLinkStateNotifier::LinkUp()
 	{
-	OstTraceFunctionEntry0( CLINKSTATENOTIFIER_LINKUP_ENTRY );
 	if (iUsb.CurrentlyUsingHighSpeed())
 		{
 		iPacketSize = KMaxPacketTypeBulkHS;
@@ -160,13 +151,10 @@
 		{
 		iPacketSize = KMaxPacketTypeBulkFS;
 		}
-	OstTraceFunctionExit0( CLINKSTATENOTIFIER_LINKUP_EXIT );
 	}
 
 
 void CLinkStateNotifier::LinkDown()
 	{
-	OstTraceFunctionEntry0( CLINKSTATENOTIFIER_LINKDOWN_ENTRY );
 	iPacketSize = 0;
-	OstTraceFunctionExit0( CLINKSTATENOTIFIER_LINKDOWN_EXIT );
 	}