diff -r c1f20ce4abcf -r 3e88ff8f41d5 kerneltest/e32test/usbho/t_usbdi/src/hostbulktransfers.cpp --- a/kerneltest/e32test/usbho/t_usbdi/src/hostbulktransfers.cpp Tue Aug 31 16:34:26 2010 +0300 +++ b/kerneltest/e32test/usbho/t_usbdi/src/hostbulktransfers.cpp Wed Sep 01 12:34:56 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-2009 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" @@ -17,10 +17,6 @@ // #include "hosttransfers.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "hostbulktransfersTraces.h" -#endif #include namespace NUnitTesting_USBDI @@ -31,65 +27,60 @@ : CBaseTransfer(aPipe,aInterface,aObserver,aTransferId), iTransferDescriptor(aMaxTransferSize) // Allocate the buffer for bulk transfers { - OstTraceFunctionEntryExt( CBULKTRANSFER_CBULKTRANSFER_ENTRY, this ); // Register the transfer descriptor with the interface TInt err(Interface().RegisterTransferDescriptor(iTransferDescriptor)); if(err != KErrNone) { - OstTrace1(TRACE_NORMAL, CBULKTRANSFER_CBULKTRANSFER, " Unable to register transfer descriptor",err); + RDebug::Printf(" Unable to register transfer descriptor",err); } - OstTraceFunctionExit1( CBULKTRANSFER_CBULKTRANSFER_EXIT, this ); } CBulkTransfer::~CBulkTransfer() { - OstTraceFunctionEntry1( CBULKTRANSFER_CBULKTRANSFER_ENTRY_DUP01, this ); + LOG_FUNC // Cancel the transfer Cancel(); - OstTraceFunctionExit1( CBULKTRANSFER_CBULKTRANSFER_EXIT_DUP01, this ); } TPtrC8 CBulkTransfer::DataPolled() { - OstTraceFunctionEntry1( CBULKTRANSFER_DATAPOLLED_ENTRY, this ); return iTransferDescriptor.Buffer(); } void CBulkTransfer::TransferIn(TInt aExpectedDataSize) { - OstTraceFunctionEntryExt( CBULKTRANSFER_TRANSFERIN_ENTRY, this ); + LOG_FUNC // Activate the asynchronous transfer - OstTrace0(TRACE_NORMAL, CBULKTRANSFER_TRANSFERIN, "Activating bulk in transfer"); + RDebug::Printf("Activating bulk in transfer"); iTransferDescriptor.SaveData(aExpectedDataSize); Pipe().Transfer(iTransferDescriptor,iStatus); SetActive(); - OstTraceFunctionExit1( CBULKTRANSFER_TRANSFERIN_EXIT, this ); } void CBulkTransfer::TransferOut(const TDesC8& aBulkData, TBool aUseZLPIfRequired) { - OstTraceFunctionEntryExt( CBULKTRANSFER_TRANSFEROUT_ENTRY, this ); + LOG_FUNC // Copy the data across if(aBulkData.Length() > iTransferDescriptor.iMaxSize) { - OstTrace0(TRACE_NORMAL, CBULKTRANSFER_TRANSFEROUT, "Too much data in bulk transfer. This test suite will now PANIC!"); - OstTraceExt2(TRACE_NORMAL, CBULKTRANSFER_TRANSFEROUT_DUP01, "Bytes requested %d, Max allowed %d", aBulkData.Length(), iTransferDescriptor.iMaxSize); + RDebug::Printf("Too much data in bulk transfer. This test suite will now PANIC!"); + RDebug::Printf("Bytes requested %d, Max allowed %d", aBulkData.Length(), iTransferDescriptor.iMaxSize); ASSERT(EFalse); } TPtr8 buffer = iTransferDescriptor.WritableBuffer(); buffer.Copy(aBulkData); - OstTrace1(TRACE_NORMAL, CBULKTRANSFER_TRANSFEROUT_DUP02, "Transfer buffer now has %d bytes to write",buffer.Length()); + RDebug::Printf("Transfer buffer now has %d bytes to write",buffer.Length()); iTransferDescriptor.SaveData(buffer.Length()); if(aUseZLPIfRequired) { @@ -102,35 +93,33 @@ // Activate the asynchronous transfer - OstTrace0(TRACE_NORMAL, CBULKTRANSFER_TRANSFEROUT_DUP03, "Activating bulk out transfer"); + RDebug::Printf("Activating bulk out transfer"); Pipe().Transfer(iTransferDescriptor,iStatus); SetActive(); - OstTraceFunctionExit1( CBULKTRANSFER_TRANSFEROUT_EXIT, this ); } void CBulkTransfer::TransferOut(const TDesC8& aBulkDataPattern, TUint aNumBytes, TBool aUseZLPIfRequired) { - OstTraceFunctionEntryExt( CBULKTRANSFER_TRANSFEROUT_ENTRY_DUP01, this ); + LOG_FUNC TransferOut(aBulkDataPattern, 0, aNumBytes, aUseZLPIfRequired); - OstTraceFunctionExit1( CBULKTRANSFER_TRANSFEROUT_EXIT_DUP01, this ); } void CBulkTransfer::TransferOut(const TDesC8& aBulkDataPattern, TUint aStartPoint, TUint aNumBytes, TBool aUseZLPIfRequired) { - OstTraceFunctionEntryExt( CBULKTRANSFER_TRANSFEROUT_ENTRY_DUP02, this ); + LOG_FUNC // Copy the data across if(aNumBytes > iTransferDescriptor.iMaxSize) { - OstTrace0(TRACE_NORMAL, CBULKTRANSFER_TRANSFEROUT_DUP10, "Too much data in bulk transfer. This test suite will now PANIC!"); - OstTraceExt2(TRACE_NORMAL, CBULKTRANSFER_TRANSFEROUT_DUP11, "Bytes requested %d, Max allowed %d", aNumBytes, iTransferDescriptor.iMaxSize); + RDebug::Printf("Too much data in bulk transfer. This test suite will now PANIC!"); + RDebug::Printf("Bytes requested %d, Max allowed %d", aNumBytes, iTransferDescriptor.iMaxSize); ASSERT(EFalse); } if(aBulkDataPattern.Length()<=0) { - OstTrace0(TRACE_NORMAL, CBULKTRANSFER_TRANSFEROUT_DUP12, "ZERO LENGTH data pattern used in TransferOut. This test suite will now PANIC!"); + RDebug::Printf("ZERO LENGTH data pattern used in TransferOut. This test suite will now PANIC!"); ASSERT(EFalse); } TUint startPoint = aStartPoint%aBulkDataPattern.Length(); @@ -151,7 +140,7 @@ { buffer.Append(aBulkDataPattern.Left(numEndBytes)); } - OstTrace1(TRACE_NORMAL, CBULKTRANSFER_TRANSFEROUT_DUP13, "Transfer buffer now has %d bytes to write",buffer.Length()); + RDebug::Printf("Transfer buffer now has %d bytes to write",buffer.Length()); iTransferDescriptor.SaveData(buffer.Length()); if(aUseZLPIfRequired) { @@ -164,10 +153,9 @@ // Activate the asynchronous transfer - OstTrace0(TRACE_NORMAL, CBULKTRANSFER_TRANSFEROUT_DUP14, "Activating bulk out transfer"); + RDebug::Printf("Activating bulk out transfer"); Pipe().Transfer(iTransferDescriptor,iStatus); SetActive(); - OstTraceFunctionExit1( CBULKTRANSFER_TRANSFEROUT_EXIT_DUP02, this ); } }