uiacceltk/hitchcock/tsrc/alfperfapp/inc/alfperfapptestcaseselectionview.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:  alfperfapp test case selection view class definition.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_ALFPERFAPPTESTCASESELECTIONVIEW_H
       
    20 #define C_ALFPERFAPPTESTCASESELECTIONVIEW_H
       
    21 
       
    22 #include <aknview.h>
       
    23 #include <coecntrl.h>
       
    24 #include <eiksbobs.h>
       
    25 
       
    26 #include "alfperfappmodel.h"
       
    27 #include "alfperfappconstants.h"
       
    28 
       
    29 class CEikRichTextEditor;
       
    30 class CEikScrollBarFrame;
       
    31 class CAlfPerfAppModel;
       
    32 
       
    33 /**
       
    34  *  CAlfPerfAppTestCaseSelectionView view class.
       
    35  */
       
    36 class CAlfPerfAppTestCaseSelectionView : public CAknView
       
    37     {
       
    38 public:
       
    39 
       
    40     static CAlfPerfAppTestCaseSelectionView* NewLC( CAlfPerfAppModel& aModel );
       
    41     ~CAlfPerfAppTestCaseSelectionView();
       
    42     
       
    43     /*
       
    44      * Calculates time difference between current and previous.
       
    45      * @param aCurrent current timestamp (ms).
       
    46      * @param aPrevious previous timestamp (ms).
       
    47      * @return time difference (0xFFFFFFFF in case of overflow).
       
    48      */
       
    49     static TUint32 DeltaFromCurrentToPrevious( 
       
    50         TUint32 aCurrent, TUint32 aPrevious );
       
    51 
       
    52 private:
       
    53 
       
    54     CAlfPerfAppTestCaseSelectionView( CAlfPerfAppModel& aModel );
       
    55     void ConstructL();
       
    56 
       
    57     /**
       
    58      * Run all test cases.
       
    59      */
       
    60     void CmdRunAllL();
       
    61 
       
    62     /**
       
    63      * Run all test cases in continuous loop
       
    64      */
       
    65     void CmdRunAllContinuouslyL();
       
    66     
       
    67     /**
       
    68      * Run all tests from a suite.
       
    69      * @param aSuiteIndex index to suite.
       
    70      */
       
    71     void CmdRunAllFromSuiteL( TInt aSuiteIndex );
       
    72 
       
    73     /**
       
    74      * Runs one test case.
       
    75      * @param aSuiteIndex index to suite.
       
    76      * @param aTestCaseIndex test case index inside suite.
       
    77      */	
       
    78     void CmdRunTestCaseL( TInt aSuiteIndex, TInt aTestCaseIndex );
       
    79     
       
    80     void DisplayResultsL();
       
    81 
       
    82 private:
       
    83 
       
    84     // From base class CAknView
       
    85     virtual TUid Id() const;
       
    86     virtual void DoActivateL(
       
    87         const TVwsViewId& aPrevViewId,
       
    88         TUid aCustomMessageId,
       
    89         const TDesC8& aCustomMessage );
       
    90     virtual void DoDeactivate();
       
    91     virtual void HandleCommandL( TInt aCommand );
       
    92     virtual void RestoreMenuL( CCoeControl* aMenuControl, TInt aResourceId,
       
    93         TMenuType aType );
       
    94     virtual void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);  
       
    95     
       
    96     CAlfPerfAppModel::TTestCaseResultItem ResultItemFromLine(TBuf<KAlfPerfAppMaxCharsInLine>& aLine);
       
    97     TBuf8<KAlfPerfAppMaxCharsInLine> getLineFromTargetFile();                      
       
    98 
       
    99     void ResetContainerL();
       
   100     
       
   101 private:
       
   102 
       
   103     /**
       
   104      * Reference to model.
       
   105      * Not owned.
       
   106      */
       
   107     CAlfPerfAppModel& iModel;
       
   108     
       
   109     /**
       
   110      * Container control class.
       
   111      */
       
   112     class CContainer;
       
   113     
       
   114     /**
       
   115      * Container object.
       
   116      */
       
   117     CContainer* iContainer;
       
   118     
       
   119     /**
       
   120      * Current resource id.
       
   121      */
       
   122     TInt iResourceId;
       
   123     };
       
   124 
       
   125 #endif // C_ALFPERFAPPTESTCASESELECTIONVIEW_H
       
   126