kerneltest/e32test/usbho/t_otgdi/inc/testcasewd.h
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // @internalComponent
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef TESTCASEWD_H
       
    19 #define TESTCASEWD_H
       
    20 
       
    21 	
       
    22 // method prototype used to pass a 'this' pointer to a friend
       
    23 typedef void (*WDCancellerMethod)(CTestCaseRoot* pThis);
       
    24 
       
    25 class CTestCaseRoot;
       
    26 
       
    27 class CTestCaseWatchdog : public CTimer
       
    28 	{
       
    29 public:	
       
    30 	~CTestCaseWatchdog();
       
    31 
       
    32 	  // Static construction
       
    33 	static CTestCaseWatchdog* NewL();
       
    34 
       
    35 	  // issue request
       
    36 	void IssueRequest(TInt aWatchdogIntervalMS, CTestCaseRoot* pRoot, WDCancellerMethod cancelMethod); //ms duration 
       
    37 
       
    38 	  // service completed request.
       
    39 	  // Defined as pure virtual by CActive;
       
    40 	  // implementation provided by this class.
       
    41 	void RunL();
       
    42 
       
    43 private:
       
    44 	CTestCaseWatchdog();
       
    45 	  // Second phase construction
       
    46 	void ConstructL(); 
       
    47 	
       
    48 	TBool IsValid();
       
    49 
       
    50 	// DATA
       
    51 protected:
       
    52 	TInt iMSRequested;  // Total MS to watchdog for
       
    53 	CTestCaseRoot	*iThisPointer;
       
    54 	WDCancellerMethod iCancelFriendFunc;
       
    55 	
       
    56 	TInt	iValidConstr;
       
    57 	};
       
    58 	        
       
    59 	
       
    60 
       
    61 #endif // TESTCASEWD_H