testexecfw/stf/stfext/testmodules/teftestmod/teftestmodulefw/utils/inc/commandprocessor.h
changeset 2 8bb370ba6d1d
equal deleted inserted replaced
1:bbd31066657e 2:8bb370ba6d1d
       
     1 /*
       
     2 * Copyright (c) 2005-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 "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 * @file
       
    16 * This contains CommandProcessor.h
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 #ifndef __COMMAND_PROCESSOR_H__
       
    23 #define __COMMAND_PROCESSOR_H__
       
    24 
       
    25 #include <e32base.h>
       
    26 
       
    27 class MCommandProcessorCallback
       
    28 /**
       
    29  * @internalComponent
       
    30  * @test
       
    31  *
       
    32  * Test timer completion callback
       
    33  */
       
    34 	{
       
    35 public:
       
    36 	/**
       
    37 	* Method from which CCommandProcessor informs the user RunL call
       
    38 	*
       
    39 	* @leave	system wide error
       
    40 	*/
       
    41 	virtual void	NextCommandL() = 0;
       
    42 	};
       
    43 
       
    44 class CCommandProcessor : public CActive
       
    45 /**
       
    46  * @internalComponent
       
    47  * @test
       
    48  *
       
    49  * @see		CActive
       
    50  *
       
    51  * Test Active Notification class
       
    52  *
       
    53  */
       
    54 	{
       
    55 public:
       
    56 	IMPORT_C virtual ~CCommandProcessor();
       
    57 	IMPORT_C static CCommandProcessor*	NewL(MCommandProcessorCallback& aCallback, TInt aPriority=EPriorityStandard);
       
    58 	IMPORT_C static CCommandProcessor*	NewLC(MCommandProcessorCallback& aCallback, TInt aPriority=EPriorityStandard);
       
    59 
       
    60 	IMPORT_C void	Activate();
       
    61 	IMPORT_C void	KickState();
       
    62 	void			RunL();
       
    63 	void			DoCancel();
       
    64 
       
    65 protected:
       
    66 	CCommandProcessor(MCommandProcessorCallback& aCallback, TInt aPriority);
       
    67 
       
    68 private:
       
    69 	void	ConstructL();
       
    70 
       
    71 private:
       
    72 	/**
       
    73 	* This is internal and not intended for use.
       
    74 	*/
       
    75 	MCommandProcessorCallback&	iCallback;
       
    76 	};
       
    77 
       
    78 #endif /* __COMMAND_PROCESSOR_H__ */