kerneltest/e32test/usbho/t_usbdi/src/testdeviceb.cpp
changeset 253 d37db4dcc88d
parent 0 a41df078684a
child 257 3e88ff8f41d5
--- a/kerneltest/e32test/usbho/t_usbdi/src/testdeviceb.cpp	Tue Aug 24 14:42:58 2010 +0100
+++ b/kerneltest/e32test/usbho/t_usbdi/src/testdeviceb.cpp	Tue Aug 24 14:49:21 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of the License "Eclipse Public License v1.0"
@@ -19,6 +19,10 @@
 #include "modelleddevices.h"
 #include "testinterfacesettingbase.h"
 #include "testinterfacebase.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "testdevicebTraces.h"
+#endif
 #include <e32test.h>
 
 namespace NUnitTesting_USBDI
@@ -26,21 +30,26 @@
 
 RUsbDeviceB::RUsbDeviceB()
 	{
+	OstTraceFunctionEntry1( RUSBDEVICEB_RUSBDEVICEB_ENTRY, this );
+	OstTraceFunctionExit1( RUSBDEVICEB_RUSBDEVICEB_EXIT, this );
 	}
 	
 RUsbDeviceB::RUsbDeviceB(CBaseTestCase* aTestCase):RUsbTestDevice(aTestCase)
 	{
-	LOG_FUNC	
+	OstTraceFunctionEntryExt( RUSBDEVICEB_RUSBDEVICEB_ENTRY_DUP01, this );
+	OstTraceFunctionExit1( RUSBDEVICEB_RUSBDEVICEB_EXIT_DUP01, this );
 	}
 
 RUsbDeviceB::~RUsbDeviceB()
 	{
+	OstTraceFunctionEntry1( RUSBDEVICEB_RUSBDEVICEB_ENTRY_DUP02, this );
+	OstTraceFunctionExit1( RUSBDEVICEB_RUSBDEVICEB_EXIT_DUP02, this );
 	}
 
 
 void RUsbDeviceB::OpenL(const TDesC& aSerialNumber)
 	{
-	LOG_FUNC
+	OstTraceFunctionEntryExt( RUSBDEVICEB_OPENL_ENTRY, this );
 	
 	RUsbTestDevice::OpenL();
 	
@@ -78,7 +87,7 @@
 	TInt err(iClientDriver.SetInterface(0,interfaceSetting));
 	if(err != KErrNone)
 		{
-		RDebug::Printf("<Error %d> Unable to set interface setting 0",err);
+		OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL, "<Error %d> Unable to set interface setting 0",err);
 		User::Leave(err);
 		}
 		
@@ -89,7 +98,7 @@
 	err = iClientDriver.SetCSInterfaceDescriptorBlock(0,cs_interfaceDescriptor);
 	if(err != KErrNone)
 		{
-		RDebug::Printf("<Error %d> Unable to set class-specific interface setting 0 descriptor",err);
+		OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP01, "<Error %d> Unable to set class-specific interface setting 0 descriptor",err);
 		User::Leave(err);
 		}
 
@@ -98,21 +107,21 @@
 	err = iClientDriver.SetCSEndpointDescriptorBlock(0,1,cs_endpointDescriptor);
 	if(err != KErrNone)
 		{
-		RDebug::Printf("<Error %d> Unable to set class-specific endpoint 1 descriptor on setting 0",err);
+		OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP02, "<Error %d> Unable to set class-specific endpoint 1 descriptor on setting 0",err);
 		User::Leave(err);
 		}
 			
 	err = iClientDriver.SetCSEndpointDescriptorBlock(0,2,cs_endpointDescriptor);
 	if(err != KErrNone)
 		{
-		RDebug::Printf("<Error %d> Unable to set class-specific endpoint 2 descriptor on setting 0",err);
+		OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP03, "<Error %d> Unable to set class-specific endpoint 2 descriptor on setting 0",err);
 		User::Leave(err);
 		}	
 		
 	err = iClientDriver.SetCSEndpointDescriptorBlock(0,3,cs_endpointDescriptor);
 	if(err != KErrNone)
 		{
-		RDebug::Printf("<Error %d> Unable to set class-specific endpoint 3 descriptor on setting 0",err);
+		OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP04, "<Error %d> Unable to set class-specific endpoint 3 descriptor on setting 0",err);
 		User::Leave(err);
 		}
 	
@@ -121,7 +130,7 @@
 	err = iClientDriver.SetInterface(1,interfaceSetting);
 	if(err != KErrNone)
 		{
-		RDebug::Printf("<Error %d> Unable to set interface setting 1",err);
+		OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP05, "<Error %d> Unable to set interface setting 1",err);
 		User::Leave(err);
 		}
 	
@@ -132,7 +141,7 @@
 	err = iClientDriver.SetCSInterfaceDescriptorBlock(1,cs_interfaceDescriptor);
 	if(err != KErrNone)
 		{
-		RDebug::Printf("<Error %d> Unable to set class-specific interface setting 1 descriptor",err);
+		OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP06, "<Error %d> Unable to set class-specific interface setting 1 descriptor",err);
 		User::Leave(err);
 		}
 
@@ -141,21 +150,21 @@
 	err = iClientDriver.SetCSEndpointDescriptorBlock(1,1,cs_endpointDescriptor);
 	if(err != KErrNone)
 		{
-		RDebug::Printf("<Error %d> Unable to set class-specific endpoint 1 descriptor on setting 1",err);
+		OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP07, "<Error %d> Unable to set class-specific endpoint 1 descriptor on setting 1",err);
 		User::Leave(err);
 		}
 	
 	err = iClientDriver.SetCSEndpointDescriptorBlock(1,2,cs_endpointDescriptor);
 	if(err != KErrNone)
 		{
-		RDebug::Printf("<Error %d> Unable to set class-specific endpoint 2 descriptor on setting 1",err);
+		OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP08, "<Error %d> Unable to set class-specific endpoint 2 descriptor on setting 1",err);
 		User::Leave(err);
 		}
 		
 	err = iClientDriver.SetCSEndpointDescriptorBlock(1,3,cs_endpointDescriptor);
 	if(err != KErrNone)
 		{
-		RDebug::Printf("<Error %d> Unable to set class-specific endpoint 3 descriptor on setting 1",err);
+		OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP09, "<Error %d> Unable to set class-specific endpoint 3 descriptor on setting 1",err);
 		User::Leave(err);
 		}
 
@@ -164,7 +173,7 @@
 	err = iClientDriver.SetInterface(2,interfaceSetting);
 	if(err != KErrNone)
 		{
-		RDebug::Printf("<Error %d> Unable to set interface setting 2",err);
+		OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP10, "<Error %d> Unable to set interface setting 2",err);
 		User::Leave(err);
 		}
 
@@ -175,7 +184,7 @@
 	err = iClientDriver.SetCSInterfaceDescriptorBlock(2,cs_interfaceDescriptor);
 	if(err != KErrNone)
 		{
-		RDebug::Printf("<Error %d> Unable to set class-specific interface setting 2 descriptor",err);
+		OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP11, "<Error %d> Unable to set class-specific interface setting 2 descriptor",err);
 		User::Leave(err);
 		}
 
@@ -184,29 +193,31 @@
 	err = iClientDriver.SetCSEndpointDescriptorBlock(2,1,cs_endpointDescriptor);
 	if(err != KErrNone)
 		{
-		RDebug::Printf("<Error %d> Unable to set class-specific endpoint 1 descriptor on setting 2",err);
+		OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP12, "<Error %d> Unable to set class-specific endpoint 1 descriptor on setting 2",err);
 		User::Leave(err);
 		}
 	
 	err = iClientDriver.SetCSEndpointDescriptorBlock(2,2,cs_endpointDescriptor);
 	if(err != KErrNone)
 		{
-		RDebug::Printf("<Error %d> Unable to set class-specific endpoint 2 descriptor on setting 2",err);
+		OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP13, "<Error %d> Unable to set class-specific endpoint 2 descriptor on setting 2",err);
 		User::Leave(err);
 		}
 		
 	err = iClientDriver.SetCSEndpointDescriptorBlock(2,3,cs_endpointDescriptor);
 	if(err != KErrNone)
 		{
-		RDebug::Printf("<Error %d> Unable to set class-specific endpoint 3 descriptor on setting 2",err);
+		OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP14, "<Error %d> Unable to set class-specific endpoint 3 descriptor on setting 2",err);
 		User::Leave(err);
 		}
+	OstTraceFunctionExit1( RUSBDEVICEB_OPENL_EXIT, this );
 	}
 
 
 void RUsbDeviceB::OnStateChangeL(TUsbcDeviceState aNewState)
 	{
-	LOG_FUNC
+	OstTraceFunctionEntryExt( RUSBDEVICEB_ONSTATECHANGEL_ENTRY, this );
+	OstTraceFunctionExit1( RUSBDEVICEB_ONSTATECHANGEL_EXIT, this );
 	}