classicui_plat/findutil_api/tsrc/inc/testdomfindutil.h
changeset 33 b3425bf29f82
equal deleted inserted replaced
21:558113899881 33:b3425bf29f82
       
     1 /*
       
     2 * Copyright (c) 2002 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 the License "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:    test findutil.h
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef C_TESTDOMFINDUTIL_H
       
    23 #define C_TESTDOMFINDUTIL_H
       
    24 
       
    25 //  INCLUDES
       
    26 #include <stiflogger.h>
       
    27 #include <testscripterinternal.h>
       
    28 #include <stiftestmodule.h>
       
    29 #include <testclassassert.h>
       
    30 
       
    31 // MACROS
       
    32 #define TEST_CLASS_VERSION_MAJOR 0
       
    33 #define TEST_CLASS_VERSION_MINOR 0
       
    34 #define TEST_CLASS_VERSION_BUILD 0
       
    35 
       
    36 // Logging path
       
    37 _LIT( KtestdomfindutilLogPath, "\\logs\\testframework\\testdomfindutil\\" ); 
       
    38 // Log file
       
    39 _LIT( KtestdomfindutilLogFile, "testdomfindutil.txt" ); 
       
    40 _LIT( KtestdomfindutilLogFileWithTitle, "testdomfindutil_[%S].txt" );
       
    41 
       
    42 /**
       
    43 *  CTestDOMFindUtil test class for STIF Test Framework TestScripter.
       
    44 *  @since S60 5.0
       
    45 */
       
    46 NONSHARABLE_CLASS( CTestDOMFindUtil ) : public CScriptBase
       
    47     {
       
    48 public:  // Constructors and destructor
       
    49 
       
    50     /**
       
    51     * Two-phased constructor.
       
    52     */
       
    53     static CTestDOMFindUtil* NewL( CTestModuleIf& aTestModuleIf );
       
    54 
       
    55     /**
       
    56     * Destructor.
       
    57     */
       
    58     virtual ~CTestDOMFindUtil();
       
    59 
       
    60 public: // Functions from base classes
       
    61 
       
    62     /**
       
    63     * From CScriptBase Runs a script line.
       
    64     * @since S60 5.0
       
    65     * @param aItem Script line containing method name and parameters
       
    66     * @return Symbian OS error code
       
    67     */
       
    68     virtual TInt RunMethodL( CStifItemParser& aItem );
       
    69 
       
    70 private:
       
    71 
       
    72     /**
       
    73     * C++ default constructor.
       
    74     */
       
    75     CTestDOMFindUtil( CTestModuleIf& aTestModuleIf );
       
    76 
       
    77     /**
       
    78     * By default Symbian 2nd phase constructor is private.
       
    79     */
       
    80     void ConstructL();
       
    81 
       
    82     /**
       
    83      * Method used to log version of test class
       
    84      */
       
    85     void SendTestClassVersion();
       
    86 
       
    87         /**
       
    88      * Turn off ScreenSaver
       
    89      * @since S60 5.0
       
    90      * @return Symbian OS error code.
       
    91      */
       
    92     void TurnOffScreenSaver();
       
    93 
       
    94     /**
       
    95      * Restore ScreenSaver
       
    96      * @since S60 5.0
       
    97      * @return Symbian OS error code.
       
    98      */
       
    99     void RestoreScreenSaver();
       
   100 
       
   101 private: // test functions of MFindUtil class
       
   102 
       
   103     /**
       
   104     * test MatchRefineL method.
       
   105     * @since S60 5.0
       
   106     * @param aItem Script line containing parameters.
       
   107     * @return Symbian OS error code.
       
   108     */
       
   109     virtual TInt TestMatchRefineL( CStifItemParser& aItem );
       
   110 
       
   111     /**
       
   112     * test Match method.
       
   113     * @since S60 5.0
       
   114     * @param aItem Script line containing parameters.
       
   115     * @return Symbian OS error code.
       
   116     */
       
   117     virtual TInt TestMatchL( CStifItemParser& aItem );
       
   118 
       
   119     /**
       
   120     * test IsWordValidForMatching method.
       
   121     * @since S60 5.0
       
   122     * @param aItem Script line containing parameters.
       
   123     * @return Symbian OS error code.
       
   124     */
       
   125     virtual TInt TestIsWordValidForMatchingL( CStifItemParser& aItem );
       
   126 
       
   127     /**
       
   128     * test MatchAdaptiveRefineL method.
       
   129     * @since S60 5.0
       
   130     * @param aItem Script line containing parameters.
       
   131     * @return Symbian OS error code.
       
   132     */
       
   133     virtual TInt TestMatchAdaptiveRefineL( CStifItemParser& aItem );
       
   134 
       
   135 private: // test functions of CFindUtil class
       
   136 
       
   137     /**
       
   138     * test NewL method.
       
   139     * @since S60 5.0
       
   140     * @param aItem never used.
       
   141     * @return Symbian OS error code.
       
   142     */
       
   143     virtual TInt TestNewL( CStifItemParser& aItem );
       
   144 
       
   145 private:    // Data
       
   146 
       
   147     /**
       
   148      * ScreenSaver Property
       
   149      */
       
   150     TInt iOldScreenSaverProperty;
       
   151 
       
   152     };
       
   153 
       
   154 #endif      // C_TESTDOMFINDUTIL_H
       
   155 
       
   156 // End of File