kerneltest/e32test/usb/t_usb_device/src/activetimer.cpp
changeset 259 57b9594f5772
parent 0 a41df078684a
child 257 3e88ff8f41d5
equal deleted inserted replaced
247:d8d70de2bd36 259:57b9594f5772
     1 // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2000-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    16 // Device-side part, to work against T_USB_HOST running on the host.
    16 // Device-side part, to work against T_USB_HOST running on the host.
    17 // 
    17 // 
    18 //
    18 //
    19 
    19 
    20 #include "general.h"									// CActiveControl, CActiveRW
    20 #include "general.h"									// CActiveControl, CActiveRW
       
    21 #include "OstTraceDefinitions.h"
       
    22 #ifdef OST_TRACE_COMPILER_IN_USE
       
    23 #include "activetimerTraces.h"
       
    24 #endif
    21 #include "activetimer.h"
    25 #include "activetimer.h"
    22 
    26 
    23 extern RTest test;
    27 extern RTest test;
    24 extern TBool gVerbose;
    28 extern TBool gVerbose;
    25 extern TBool gSkip;
    29 extern TBool gSkip;
    56 
    60 
    57 
    61 
    58 CActiveTimer::~CActiveTimer()
    62 CActiveTimer::~CActiveTimer()
    59 	{
    63 	{
    60 	TUSB_VERBOSE_PRINT("CActiveTimer::~CActiveTimer()");
    64 	TUSB_VERBOSE_PRINT("CActiveTimer::~CActiveTimer()");
       
    65 	if(gVerbose)
       
    66 	    {
       
    67 	    OstTrace0(TRACE_VERBOSE, CACTIVETIMER_DCACTIVETIMER, "CActiveTimer::~CActiveTimer()");
       
    68 	    }
    61 	Cancel();												// base class
    69 	Cancel();												// base class
    62 	iTimer.Close();
    70 	iTimer.Close();
    63 	}
    71 	}
    64 
    72 
    65 
    73 
    66 void CActiveTimer::DoCancel()
    74 void CActiveTimer::DoCancel()
    67 	{
    75 	{
    68 	TUSB_VERBOSE_PRINT("CActiveTimer::DoCancel()");
    76 	TUSB_VERBOSE_PRINT("CActiveTimer::DoCancel()");
       
    77 	if(gVerbose)
       
    78 	    {
       
    79 	    OstTrace0(TRACE_VERBOSE, CACTIVETIMER_DOCANCEL, "CActiveTimer::DoCancel()");
       
    80 	    }
    69 	iTimer.Cancel();
    81 	iTimer.Cancel();
    70 	}
    82 	}
    71 
    83 
    72 
    84 
    73 void CActiveTimer::RunL()
    85 void CActiveTimer::RunL()
    74 	{
    86 	{
    75 	TUSB_VERBOSE_PRINT("CActiveTimer::RunL()");
    87 	TUSB_VERBOSE_PRINT("CActiveTimer::RunL()");
       
    88 	if(gVerbose)
       
    89 	    {
       
    90 	    OstTrace0(TRACE_VERBOSE, CACTIVETIMER_RUNL, "CActiveTimer::RunL()");
       
    91 	    }
    76 	// Nothing to do here, as we call ReadCancel() after a manual WaitForRequest()
    92 	// Nothing to do here, as we call ReadCancel() after a manual WaitForRequest()
    77 	// (in CActiveRW::ReceiveVersion()).
    93 	// (in CActiveRW::ReceiveVersion()).
    78 	}
    94 	}
    79 
    95 
    80 
    96