--- a/usbmgmt/usbmgr/usbman/server/SRC/CUsbDeviceStateWatcher.cpp Thu Jul 15 20:42:20 2010 +0300
+++ b/usbmgmt/usbmgr/usbman/server/SRC/CUsbDeviceStateWatcher.cpp Tue Aug 31 17:01:47 2010 +0300
@@ -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"
@@ -21,14 +21,15 @@
@file
*/
-#include <usb/usblogger.h>
#include "CUsbScheduler.h"
#include "CUsbDeviceStateWatcher.h"
#include "CUsbDevice.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "CUsbDeviceStateWatcherTraces.h"
+#endif
-#ifdef __FLOG_ACTIVE
-_LIT8(KLogComponent, "USBSVR");
-#endif
+
/**
* The CUsbDeviceStateWatcher::NewL method
@@ -43,9 +44,10 @@
*/
CUsbDeviceStateWatcher* CUsbDeviceStateWatcher::NewL(CUsbDevice& aOwner, RDevUsbcClient& aLdd)
{
- LOG_STATIC_FUNC_ENTRY
+ OstTraceFunctionEntry0( CUSBDEVICESTATEWATCHER_NEWL_ENTRY );
CUsbDeviceStateWatcher* r = new (ELeave) CUsbDeviceStateWatcher(aOwner, aLdd);
+ OstTraceFunctionExit0( CUSBDEVICESTATEWATCHER_NEWL_EXIT );
return r;
}
@@ -59,7 +61,8 @@
*/
CUsbDeviceStateWatcher::~CUsbDeviceStateWatcher()
{
- LOGTEXT2(_L8(">CUsbDeviceStateWatcher::~CUsbDeviceStateWatcher (0x%08x)"), (TUint32) this);
+ OstTrace1( TRACE_NORMAL, CUSBDEVICESTATEWATCHER_CUSBDEVICESTATEWATCHER,
+ "CUsbDeviceStateWatcher::~CUsbDeviceStateWatcher; this=(0x%08x)", (TUint32)this );
Cancel();
}
@@ -85,19 +88,21 @@
{
if (iStatus.Int() != KErrNone)
{
- LOGTEXT2(_L8("CUsbDeviceStateWatcher::RunL() - Error = %d"), iStatus.Int());
+ OstTrace1( TRACE_NORMAL, CUSBDEVICESTATEWATCHER_RUNL,
+ "CUsbDeviceStateWatcher::RunL;Error=%d", iStatus.Int() );
return;
}
- LOGTEXT2(_L8("CUsbDeviceStateWatcher::RunL() - State Changed to %d"), iState);
-
+ OstTrace1( TRACE_NORMAL, CUSBDEVICESTATEWATCHER_RUNL_DUP1, "CUsbDeviceStateWatcher::RunL; - State Changed to %u", iState );
+
if (!(iState & KUsbAlternateSetting))
iOwner.SetDeviceState((TUsbcDeviceState) iState);
- LOGTEXT(_L8("CUsbDeviceStateWatcher::RunL() - About to call DeviceStatusNotify"));
+ OstTrace0( TRACE_NORMAL, CUSBDEVICESTATEWATCHER_RUNL_DUP2,
+ "CUsbDeviceStateWatcher::RunL - About to call DeviceStatusNotify" );
iLdd.AlternateDeviceStatusNotify(iStatus, iState);
SetActive();
- LOGTEXT(_L8("CUsbDeviceStateWatcher::RunL() - Called DeviceStatusNotify"));
+ OstTrace0( TRACE_NORMAL, CUSBDEVICESTATEWATCHER_RUNL_DUP3, "CUsbDeviceStateWatcher::RunL - Called DeviceStatusNotify" );
}
@@ -106,8 +111,9 @@
*/
void CUsbDeviceStateWatcher::DoCancel()
{
- LOG_FUNC
+ OstTraceFunctionEntry0( CUSBDEVICESTATEWATCHER_DOCANCEL_ENTRY );
iLdd.AlternateDeviceStatusNotifyCancel();
+ OstTraceFunctionExit0( CUSBDEVICESTATEWATCHER_DOCANCEL_EXIT );
}
@@ -116,7 +122,8 @@
*/
void CUsbDeviceStateWatcher::Start()
{
- LOG_FUNC
+ OstTraceFunctionEntry0( CUSBDEVICESTATEWATCHER_START_ENTRY );
iLdd.AlternateDeviceStatusNotify(iStatus, iState);
SetActive();
+ OstTraceFunctionExit0( CUSBDEVICESTATEWATCHER_START_EXIT );
}