mmtestenv/mmtestfwunittest/src/tsu_mmtsth21/TSU_MmTsthStep21.cpp
changeset 32 ae690a8c4a18
parent 0 40261b775718
equal deleted inserted replaced
31:ae0addfe117e 32:ae690a8c4a18
       
     1 // Copyright (c) 2002-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 "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 //
       
    15 
       
    16 // EPOC includes
       
    17 #include <e32base.h>
       
    18 
       
    19 // Test system includes
       
    20 #include <testframework.h>
       
    21 #include "TSU_MmTsthStep21.h"
       
    22 #include "TSU_MmTsthSuite21.h"
       
    23 
       
    24 // ------------------------------------------------
       
    25 // RTSUMmTsthStep21 : generic test step for TSU_MMTSTH21
       
    26 
       
    27 // preamble
       
    28 TVerdict RTSUMmTsthStep21::OpenL()
       
    29 	{
       
    30 	iConsole = NULL;
       
    31 
       
    32 	iScheduler = new(ELeave)CActiveScheduler;
       
    33 	
       
    34 	//[install the active scheduler ]
       
    35 	CActiveScheduler::Install( iScheduler );
       
    36 	
       
    37 	return iTestStepResult = EPass;
       
    38 	}
       
    39 
       
    40 // postamble
       
    41 void RTSUMmTsthStep21::Close()
       
    42 	{
       
    43 	//[ Destroy the scheduler ]
       
    44 	delete iScheduler ;
       
    45 	iScheduler = NULL;
       
    46 	}
       
    47 
       
    48 // from MConsoleReader
       
    49 // process key input from console.
       
    50 void RTSUMmTsthStep21::InputReceived(TKeyCode /* aKeystroke*/)
       
    51 	{
       
    52 	// key not processed as yet - pending implementation of async request from client
       
    53 	// we would store it as : TInt theInputKey = STATIC_CAST(TInt, aKeystroke);
       
    54 		
       
    55 	//read from console again
       
    56 	iConsole->Read(*this);
       
    57 	}
       
    58 
       
    59 // Display general error.
       
    60 void RTSUMmTsthStep21::Error(TInt)
       
    61 	{
       
    62 	// stubbed; undefined input keys can be safely discarded
       
    63 	}