stif/TestCombiner/inc/TestKeywords.h
changeset 0 a03f92240627
child 16 8f8df8006c40
equal deleted inserted replaced
-1:000000000000 0:a03f92240627
       
     1 /*
       
     2 * Copyright (c) 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: This file contains the keywords for the TestCombiner 
       
    15 * module.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef TESTKEYWORDS_H
       
    20 #define TESTKEYWORDS_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <StifTestInterface.h>
       
    25 
       
    26 // CONSTANTS
       
    27 // None
       
    28 
       
    29 // MACROS
       
    30 // None
       
    31 
       
    32 // DATA TYPES
       
    33 typedef TPtrC (*KeywordFunc)( TInt aKeyword );
       
    34 
       
    35 // FUNCTION PROTOTYPES
       
    36 // None
       
    37 
       
    38 // FORWARD DECLARATIONS
       
    39 // None
       
    40 
       
    41 // CLASS DECLARATION
       
    42 
       
    43 // DESCRIPTION
       
    44 // Test Combiner Keyword class
       
    45 class TTCKeywords 
       
    46     {
       
    47     public: // Enumerations
       
    48         // Keyword enum
       
    49         enum TKeywords
       
    50             {
       
    51             ETitle,
       
    52             ERun,
       
    53             ECancel,
       
    54             EPause,
       
    55             EResume,
       
    56             EComplete,
       
    57             ERequest,
       
    58             EWait,
       
    59             ERelease,
       
    60             ESet,
       
    61             EUnset,
       
    62             ETimeout,
       
    63             EPriority,
       
    64             EPrint,
       
    65             EAllocate,
       
    66             EFree,
       
    67             ERemote,
       
    68             ESendReceive,
       
    69             ECancelIfError,
       
    70             EMeasurement,
       
    71             ELoop,
       
    72             EEndLoop,
       
    73             EPauseCombiner,  
       
    74             };
       
    75 
       
    76         // run keyword optional arguments
       
    77         enum TRunOptArgs
       
    78             {
       
    79             EExpect,
       
    80             ETestid,
       
    81             EIni,
       
    82             ECategory,
       
    83             ECaseTimeout,
       
    84             ECaseTitle,
       
    85             };
       
    86 
       
    87         // pause keyword optional arguments
       
    88         enum TPauseOptArgs
       
    89             {
       
    90             ETime,
       
    91             };
       
    92 
       
    93         // event keywords optional arguments
       
    94         enum TEventOptArgs
       
    95             {
       
    96             EState,
       
    97             };
       
    98 
       
    99         // priorities
       
   100         enum TPriority
       
   101             {
       
   102             EPriHigh,
       
   103             EPriNormal,
       
   104             EPriLow,
       
   105             };
       
   106 
       
   107     private: // Enumerations
       
   108 
       
   109     public: // Constructors and destructor
       
   110 
       
   111     public: // Constructors and destructor
       
   112 
       
   113     public: // New functions
       
   114 
       
   115         /**
       
   116         * Returns a string desrciptor corresponding to keyword number. 
       
   117         */
       
   118         static TPtrC Keyword( TInt aKeyword );
       
   119 
       
   120         /**
       
   121         * Returns a string desrciptor corresponding to run keyword 
       
   122         * optional argument number. 
       
   123         */
       
   124         static TPtrC RunOptArg( TInt aArg );
       
   125 
       
   126         /**
       
   127         * Returns a string desrciptor corresponding to pause keyword 
       
   128         * optional argument number. 
       
   129         */
       
   130         static TPtrC PauseOptArg( TInt aArg );
       
   131 
       
   132         /**
       
   133         * Returns a string desrciptor corresponding to event keywords 
       
   134         * optional argument number. 
       
   135         */
       
   136         static TPtrC EventOptArg( TInt aArg );
       
   137 
       
   138         /**
       
   139         * Returns a string desrciptor corresponding to priority 
       
   140         * enum value. 
       
   141         */
       
   142         static TPtrC Priority( TInt aArg );
       
   143 
       
   144         /**
       
   145         * Returns a keyword enum corresponding to keyword 
       
   146         * string descriptor. 
       
   147         */
       
   148         static TInt Parse( TDesC& aKeyword, KeywordFunc aFunc );
       
   149 
       
   150         /**
       
   151         * Returns result category description. 
       
   152         */
       
   153         static TPtrC ResultCategory( TInt aArg );
       
   154 
       
   155         /**
       
   156         * Returns result category type. 
       
   157         */
       
   158         static TFullTestResult::TCaseExecutionResult 
       
   159             GetResultCategory( TDesC& aCategory );
       
   160 
       
   161     public: // Functions from base classes
       
   162 
       
   163     protected:  // New functions
       
   164 
       
   165     protected:  // Functions from base classes
       
   166 
       
   167     private:    // New functions
       
   168 
       
   169     public:     // Data
       
   170      
       
   171     protected:  // Data
       
   172 
       
   173     private:    // Data
       
   174 
       
   175     public:     // Friend classes
       
   176 
       
   177     protected:  // Friend classes
       
   178 
       
   179     private:    // Friend classes
       
   180 
       
   181     };
       
   182 
       
   183 #endif        // TESTKEYWORDS_H  
       
   184 
       
   185 // End of File