cryptomgmtlibs/securitytestfw/test/testhandler2/t_sleep.h
changeset 0 2c201484c85f
child 8 35751d3474b7
equal deleted inserted replaced
-1:000000000000 0:2c201484c85f
       
     1 /*
       
     2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __T_SLEEP_H__
       
    20 #define __T_SLEEP_H__
       
    21 
       
    22 #include "t_testaction.h"
       
    23 
       
    24 /**
       
    25  * A test action that sleeps for a specified length of time.
       
    26  */
       
    27 class CSleep : public CTestAction
       
    28 	{
       
    29 public:
       
    30 	static CTestAction* NewL(CConsoleBase& aConsole, Output& aOut, const TTestActionSpec& aTestActionSpec);
       
    31 	static CTestAction* NewLC(CConsoleBase& aConsole, Output& aOut, const TTestActionSpec& aTestActionSpec);
       
    32 	virtual ~CSleep();
       
    33 	virtual void PerformAction(TRequestStatus& aStatus);
       
    34 	virtual void PerformCancel();
       
    35 private:
       
    36 	CSleep(CConsoleBase& aConsole, Output& aOut);
       
    37 	void ConstructL(const TTestActionSpec& aTestActionSpec);
       
    38 private:
       
    39 	void DoReportAction();
       
    40 	void DoCheckResult(TInt aError);
       
    41 private:
       
    42 	enum TState
       
    43 		{
       
    44 		ESleeping, 
       
    45 		EFinished
       
    46 		};
       
    47 private:
       
    48 	TState iState;
       
    49 	RTimer iTimer;
       
    50 	TUint iSeconds;	
       
    51 	};
       
    52 
       
    53 #endif