usbmgmt/usbmgr/device/classdrivers/acm/classimplementation/ecacm/src/ActiveDataAvailableNotifier.cpp
--- a/usbmgmt/usbmgr/device/classdrivers/acm/classimplementation/ecacm/src/ActiveDataAvailableNotifier.cpp Tue Aug 31 17:01:47 2010 +0300
+++ b/usbmgmt/usbmgr/device/classdrivers/acm/classimplementation/ecacm/src/ActiveDataAvailableNotifier.cpp Wed Sep 01 12:35:00 2010 +0100
@@ -1,5 +1,5 @@
/*
-* 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 "Eclipse Public License v1.0"
@@ -22,13 +22,12 @@
#include "AcmPanic.h"
#include "AcmUtils.h"
#include "NotifyDataAvailableObserver.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "ActiveDataAvailableNotifierTraces.h"
+#include <usb/usblogger.h>
+
+#ifdef __FLOG_ACTIVE
+_LIT8(KLogComponent, "ECACM");
#endif
-
-
CActiveDataAvailableNotifier::CActiveDataAvailableNotifier(
MNotifyDataAvailableObserver& aParent,
RDevUsbcClient& aLdd,
@@ -47,9 +46,7 @@
* @param aEndpoint The endpoint to read from.
*/
{
- OstTraceFunctionEntry0( CACTIVEDATAAVAILABLENOTIFIER_CACTIVEDATAAVAILABLENOTIFIER_CONS_ENTRY );
CActiveScheduler::Add(this);
- OstTraceFunctionExit0( CACTIVEDATAAVAILABLENOTIFIER_CACTIVEDATAAVAILABLENOTIFIER_CONS_EXIT );
}
CActiveDataAvailableNotifier::~CActiveDataAvailableNotifier()
@@ -57,9 +54,9 @@
* Destructor.
*/
{
- OstTraceFunctionEntry0( CACTIVEDATAAVAILABLENOTIFIER_CACTIVEDATAAVAILABLENOTIFIER_DES_ENTRY );
+ LOG_FUNC
+
Cancel();
- OstTraceFunctionExit0( CACTIVEDATAAVAILABLENOTIFIER_CACTIVEDATAAVAILABLENOTIFIER_DES_EXIT );
}
CActiveDataAvailableNotifier* CActiveDataAvailableNotifier::NewL(
@@ -77,10 +74,10 @@
* @return Ownership of a new CActiveReadOneOrMoreReader object.
*/
{
- OstTraceFunctionEntry0( CACTIVEDATAAVAILABLENOTIFIER_NEWL_ENTRY );
+ LOG_STATIC_FUNC_ENTRY
+
CActiveDataAvailableNotifier* self =
new(ELeave) CActiveDataAvailableNotifier(aParent, aLdd, aEndpoint);
- OstTraceFunctionExit0( CACTIVEDATAAVAILABLENOTIFIER_NEWL_EXIT );
return self;
}
@@ -89,10 +86,12 @@
* When incoming data arrives at the LDD notify the caller.
*/
{
- OstTraceFunctionEntry0( CACTIVEDATAAVAILABLENOTIFIER_NOTIFYDATAAVAILABLE_ENTRY );
+ LOGTEXT(_L8(">>CActiveDataAvailableNotifier::NotifyDataAvailable"));
+
iLdd.ReadOneOrMore(iStatus, iEndpoint, iUnusedBuf, 0);
SetActive();
- OstTraceFunctionExit0( CACTIVEDATAAVAILABLENOTIFIER_NOTIFYDATAAVAILABLE_EXIT );
+
+ LOGTEXT(_L8("<<CActiveDataAvailableNotifier::NotifyDataAvailable"));
}
void CActiveDataAvailableNotifier::DoCancel()
@@ -100,9 +99,9 @@
* Cancel an outstanding request.
*/
{
- OstTraceFunctionEntry0( CACTIVEDATAAVAILABLENOTIFIER_DOCANCEL_ENTRY );
+ LOG_FUNC
+
iLdd.ReadCancel(iEndpoint);
- OstTraceFunctionExit0( CACTIVEDATAAVAILABLENOTIFIER_DOCANCEL_EXIT );
}
void CActiveDataAvailableNotifier::RunL()
@@ -115,8 +114,10 @@
* been detached.
*/
{
- OstTraceFunctionEntry0( CACTIVEDATAAVAILABLENOTIFIER_RUNL_ENTRY );
- OstTrace1( TRACE_NORMAL, CACTIVEDATAAVAILABLENOTIFIER_RUNL, "CActiveDataAvailableNotifier::RunL;iStatus=%d", iStatus.Int() );
+ LOG_LINE
+ LOG_FUNC
+ LOGTEXT2(_L8("\tiStatus = %d"), iStatus.Int());
+
TBool complete = EFalse;
TInt completeErr = KErrNone;
@@ -161,7 +162,6 @@
{
iParent.NotifyDataAvailableCompleted(completeErr);
}
- OstTraceFunctionExit0( CACTIVEDATAAVAILABLENOTIFIER_RUNL_EXIT );
}
//