diff -r d3e8e7d462dd -r f92a4f87e424 usbmgmt/usbmgr/host/functiondrivers/ms/msmm/server/src/msmmterminator.cpp --- a/usbmgmt/usbmgr/host/functiondrivers/ms/msmm/server/src/msmmterminator.cpp Thu Jul 15 20:42:20 2010 +0300 +++ b/usbmgmt/usbmgr/host/functiondrivers/ms/msmm/server/src/msmmterminator.cpp Tue Aug 31 17:01:47 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-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" @@ -24,33 +24,39 @@ #include "eventqueue.h" #include +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "msmmterminatorTraces.h" +#endif -#ifdef __FLOG_ACTIVE -_LIT8(KLogComponent, "UsbHostMsmmServer"); -#endif const TInt KShutdownDelay = 2000000; // approx 2 seconds const TInt KMsmmTerminatorPriority = CActive::EPriorityStandard; CMsmmTerminator* CMsmmTerminator::NewL(const CDeviceEventQueue& anEventQueue) { - LOG_STATIC_FUNC_ENTRY + OstTraceFunctionEntry0( CMSMMTERMINATOR_NEWL_ENTRY ); + CMsmmTerminator* self = new (ELeave) CMsmmTerminator(anEventQueue); CleanupStack::PushL(self); self->ConstructL(); CleanupStack::Pop(self); + OstTraceFunctionExit0( CMSMMTERMINATOR_NEWL_EXIT ); return self; } void CMsmmTerminator::Start() { - LOG_FUNC + OstTraceFunctionEntry0( CMSMMTERMINATOR_START_ENTRY ); + After(KShutdownDelay); + OstTraceFunctionExit0( CMSMMTERMINATOR_START_EXIT ); } void CMsmmTerminator::RunL() { - LOG_FUNC + OstTraceFunctionEntry0( CMSMMTERMINATOR_RUNL_ENTRY ); + if (iEventQueue.Count()) { // There are some events still in the event queue to @@ -61,20 +67,25 @@ { CActiveScheduler::Stop(); } + OstTraceFunctionExit0( CMSMMTERMINATOR_RUNL_EXIT ); } CMsmmTerminator::CMsmmTerminator(const CDeviceEventQueue& anEventQueue): CTimer(KMsmmTerminatorPriority), iEventQueue(anEventQueue) { - LOG_FUNC + OstTraceFunctionEntry0( CMSMMTERMINATOR_CMSMMTERMINATOR_CONS_ENTRY ); + CActiveScheduler::Add(this); + OstTraceFunctionExit0( CMSMMTERMINATOR_CMSMMTERMINATOR_CONS_EXIT ); } void CMsmmTerminator::ConstructL() { - LOG_FUNC + OstTraceFunctionEntry0( CMSMMTERMINATOR_CONSTRUCTL_ENTRY ); + CTimer::ConstructL(); + OstTraceFunctionExit0( CMSMMTERMINATOR_CONSTRUCTL_EXIT ); } // End of file