diff -r f1fd07aa74c9 -r 59aa7d6e3e0f usbmgmt/usbmgr/device/classdrivers/acm/classimplementation/ecacm/src/ActiveWriter.cpp --- a/usbmgmt/usbmgr/device/classdrivers/acm/classimplementation/ecacm/src/ActiveWriter.cpp Wed Jul 07 14:16:40 2010 +0800 +++ b/usbmgmt/usbmgr/device/classdrivers/acm/classimplementation/ecacm/src/ActiveWriter.cpp Wed Jul 07 15:08:54 2010 +0800 @@ -1,5 +1,5 @@ /* -* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 1997-2010 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" @@ -22,11 +22,11 @@ #include "AcmPanic.h" #include "WriteObserver.h" #include "AcmUtils.h" -#include +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "ActiveWriterTraces.h" +#endif -#ifdef __FLOG_ACTIVE -_LIT8(KLogComponent, "ECACM"); -#endif CActiveWriter::CActiveWriter(MWriteObserver& aParent, RDevUsbcClient& aLdd, TEndpointNumber aEndpoint) : CActive(KEcacmAOPriority), @@ -44,7 +44,9 @@ * @param aEndpoint The endpoint to write to. */ { + OstTraceFunctionEntry0( CACTIVEWRITER_CACTIVEWRITER_CONS_ENTRY ); CActiveScheduler::Add(this); + OstTraceFunctionExit0( CACTIVEWRITER_CACTIVEWRITER_CONS_EXIT ); } CActiveWriter::~CActiveWriter() @@ -52,9 +54,9 @@ * Destructor. */ { - LOG_FUNC - + OstTraceFunctionEntry0( CACTIVEWRITER_CACTIVEWRITER_DES_ENTRY ); Cancel(); + OstTraceFunctionExit0( CACTIVEWRITER_CACTIVEWRITER_DES_EXIT ); } CActiveWriter* CActiveWriter::NewL(MWriteObserver& aParent, @@ -70,9 +72,9 @@ * @return Ownership of a new CActiveWriter object. */ { - LOG_STATIC_FUNC_ENTRY - + OstTraceFunctionEntry0( CACTIVEWRITER_NEWL_ENTRY ); CActiveWriter* self = new(ELeave) CActiveWriter(aParent, aLdd, aEndpoint); + OstTraceFunctionExit0( CACTIVEWRITER_NEWL_EXIT ); return self; } @@ -87,8 +89,8 @@ * @param aZlp Whether ZLP termination may be required. */ { - LOGTEXT(_L8(">>CActiveWriter::Write")); - + OstTraceFunctionEntry0( CACTIVEWRITER_WRITE_ENTRY ); + if ( aZlp ) { // the driver can be relied on to correctly handle appended ZLPs @@ -109,7 +111,7 @@ { iLdd.Write(iStatus, iEndpoint, aDes, aLen, EFalse); iWritingState = ECompleteMessage; - LOGTEXT2(_L8("CActiveWriter::Writing %d bytes"), aLen); + OstTrace1( TRACE_NORMAL, CACTIVEWRITER_WRITE, "CActiveWriter::Write;Writing %d bytes", aLen ); } else { @@ -125,12 +127,12 @@ iLdd.Write(iStatus, iEndpoint, iFirstPortion, aLen-1, EFalse); iWritingState = EFirstMessagePart; - LOGTEXT3(_L8("CActiveWriter::Writing %d bytes of the %d"), aLen-1, aLen); + OstTraceExt2( TRACE_NORMAL, CACTIVEWRITER_WRITE_DUP1, + "CActiveWriter::Write;Writing %d bytes of the %d", aLen-1, aLen ); } } SetActive(); - - LOGTEXT(_L8("<>CActiveWriter::RunL iStatus=%d"), iStatus.Int()); + OstTraceFunctionEntry0( CACTIVEWRITER_RUNL_ENTRY ); + OstTrace1( TRACE_NORMAL, CACTIVEWRITER_RUNL, "CActiveWriter::RunL;iStatus=%d", iStatus.Int() ); if ( iWritingState == EFirstMessagePart ) { @@ -159,8 +161,8 @@ // now send the second part.. iLdd.Write(iStatus, iEndpoint, iSecondPortion, iSecondPortion.Length(), EFalse); iWritingState = EFinalMessagePart; - LOGTEXT(_L8("CActiveWriter::Writing 1 byte to complete original nx64 byte message")); - + OstTrace0( TRACE_NORMAL, CACTIVEWRITER_RUNL_DUP1, + "CActiveWriter::RunL;Writing 1 byte to complete original nx64 byte message" ); SetActive(); } else @@ -175,7 +177,7 @@ iParent.WriteCompleted(iStatus.Int()); } - LOGTEXT(_L8("<