diff -r a179b74831c9 -r c1f20ce4abcf kerneltest/e32test/usbho/t_usbdi/src/testdeviceb.cpp --- a/kerneltest/e32test/usbho/t_usbdi/src/testdeviceb.cpp Thu Aug 19 11:14:22 2010 +0300 +++ b/kerneltest/e32test/usbho/t_usbdi/src/testdeviceb.cpp Tue Aug 31 16:34:26 2010 +0300 @@ -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 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(" Unable to set interface setting 0",err); + OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL, " 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(" Unable to set class-specific interface setting 0 descriptor",err); + OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP01, " 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(" Unable to set class-specific endpoint 1 descriptor on setting 0",err); + OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP02, " 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(" Unable to set class-specific endpoint 2 descriptor on setting 0",err); + OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP03, " 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(" Unable to set class-specific endpoint 3 descriptor on setting 0",err); + OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP04, " 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(" Unable to set interface setting 1",err); + OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP05, " 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(" Unable to set class-specific interface setting 1 descriptor",err); + OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP06, " 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(" Unable to set class-specific endpoint 1 descriptor on setting 1",err); + OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP07, " 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(" Unable to set class-specific endpoint 2 descriptor on setting 1",err); + OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP08, " 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(" Unable to set class-specific endpoint 3 descriptor on setting 1",err); + OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP09, " 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(" Unable to set interface setting 2",err); + OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP10, " 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(" Unable to set class-specific interface setting 2 descriptor",err); + OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP11, " 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(" Unable to set class-specific endpoint 1 descriptor on setting 2",err); + OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP12, " 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(" Unable to set class-specific endpoint 2 descriptor on setting 2",err); + OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP13, " 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(" Unable to set class-specific endpoint 3 descriptor on setting 2",err); + OstTrace1(TRACE_NORMAL, RUSBDEVICEB_OPENL_DUP14, " 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 ); }