uiacceltk/hitchcock/tsrc/alfperfapp/inc/alfperfappsuitetestcase.h
changeset 0 15bf7259bb7c
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     1 /*
       
     2 * Copyright (c) 2008 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 *
       
    16 */
       
    17 
       
    18 #ifndef __ALFPERFAPPSUITETESTCASE_H__
       
    19 #define __ALFPERFAPPSUITETESTCASE_H__
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32base.h>
       
    23 #include "alfperfapptestcase.h"
       
    24 
       
    25 // FORWARD DECLARTIONS
       
    26 class CAlfPerfAppSuiteTestCaseControl;
       
    27 
       
    28 // CLASS DECLARATION
       
    29 class CAlfPerfAppSuiteTestCase : public CAlfPerfAppTestCase
       
    30     {
       
    31 	public: // Construction & destruction
       
    32 		
       
    33 		/**
       
    34 		 * Construction
       
    35 		 * @param aCaseId Testcase id.
       
    36 		 */
       
    37 	    static CAlfPerfAppSuiteTestCase* NewL( TInt aCaseId, TInt aSequenceIndex);
       
    38 	    
       
    39 		/**
       
    40 		 * Destructor.
       
    41 		 */	    
       
    42 	    virtual ~CAlfPerfAppSuiteTestCase();
       
    43 	    
       
    44 	private: // Construction
       
    45 	    
       
    46 		/**
       
    47 		 * C++ constructor.
       
    48 		 */		
       
    49 		CAlfPerfAppSuiteTestCase( TInt aCaseId, TInt aSequenceIndex );
       
    50 		
       
    51 		/**
       
    52 		 * Second phase constructor.
       
    53 		 */
       
    54 	    void ConstructL();	    
       
    55 		
       
    56 	public: // from CAlfPerfAppTestCase
       
    57 	    /**
       
    58 	     * Starts set up phase.
       
    59 	     * @param aEnv reference to alf environment instance.
       
    60 	     * @param aVisibleArea visible area.
       
    61 	     * @param aStatus request status that needs to be completed when
       
    62 	     *                test case is ready to be executed.
       
    63 	     */
       
    64 	    void SetupL( 
       
    65 	        CAlfEnv& aEnv, 
       
    66 	        const TRect& aVisibleArea, 
       
    67 	        TRequestStatus& aStatus );
       
    68 
       
    69 	    /**
       
    70 	     * Starts test case execution.
       
    71 	     * @param aStatus request status that needs to be completed when
       
    72 	     *                execution is finished.
       
    73 	     */
       
    74 	    void ExecuteL( TRequestStatus& aStatus );
       
    75 
       
    76 	    /** 
       
    77 	     * Tears down. 
       
    78 	     */
       
    79 	    void TearDown();
       
    80 
       
    81 	    /**
       
    82 	     * Handles visible area changes.
       
    83 	     * @param aRect new visible area rect.
       
    84 	     */
       
    85 	    void HandleVisibleAreaChange( const TRect& aRect );
       
    86 	    virtual TInt CaseID();
       
    87 	    
       
    88 	public: // New functions
       
    89 		
       
    90 		/**
       
    91 		 * Tests if a testcase is supported.
       
    92 		 * @param aCaseId Testcase id.
       
    93 		 * @return ETrue if supported.
       
    94 		 */
       
    95 		static TBool IsSupported( TInt aCaseId );
       
    96 
       
    97 		/**
       
    98 		 * sends request completion after successful loading of all textures
       
    99 		 * @param aErrorCode err code of texture loading.
       
   100 		 */
       
   101 		void ImagesLoaded( TInt aErrorCode );
       
   102 
       
   103 	private:
       
   104 	
       
   105 	    /**
       
   106 	     * Test case of which execution this instance was created.
       
   107 	     */ 
       
   108 	    TInt iCaseId;
       
   109 	
       
   110 	    /**
       
   111 	     * Alf environment.
       
   112 	     * Not owned.
       
   113 	     */
       
   114 	    CAlfEnv* iEnv;
       
   115 	    
       
   116 	    /**
       
   117 	     * Testcase control
       
   118 	     */
       
   119 	    CAlfPerfAppSuiteTestCaseControl* iControl;
       
   120 
       
   121 	    /**
       
   122 	     * Testcase state change status. To indicate end of Setup state.
       
   123 	     */
       
   124 	    TRequestStatus* iStatus;
       
   125     };
       
   126 
       
   127 #endif // __ALFPERFAPPSUITETESTCASE_H__
       
   128 
       
   129 // end of file
       
   130