classicui_pub/hotkeys_api/tsrc/inc/testsdkeikhkeyt.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2002 - 2007 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:  Test eikhkeyt.h
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_TESTSDKEIKHKEYT_H
       
    21 #define C_TESTSDKEIKHKEYT_H
       
    22 
       
    23 /*
       
    24  *   INCLUDES
       
    25  */
       
    26 #include <stiflogger.h>
       
    27 #include <testscripterinternal.h>
       
    28 #include <stiftestmodule.h>
       
    29 #include <testclassassert.h>
       
    30 
       
    31 /*
       
    32  * MACROS
       
    33  */
       
    34 #define TEST_CLASS_VERSION_MAJOR 0
       
    35 #define TEST_CLASS_VERSION_MINOR 0
       
    36 #define TEST_CLASS_VERSION_BUILD 0
       
    37 
       
    38 /*
       
    39  *  Logging path
       
    40  */
       
    41 _LIT( KtestsdkeikhkeytLogPath, "\\logs\\testframework\\testsdkeikhkeyt\\" ); 
       
    42 /*
       
    43  *  Log file
       
    44  */
       
    45 _LIT( KtestsdkeikhkeytLogFile, "testsdkeikhkeyt.txt" ); 
       
    46 _LIT( KtestsdkeikhkeytLogFileWithTitle, "testsdkeikhkeyt_[%S].txt" );
       
    47 
       
    48 /*
       
    49  * Class declare
       
    50  */
       
    51 class CTestSDKEIKHKEYT;
       
    52 
       
    53 // CLASS DECLARATION
       
    54 class CEikHotKeyTable;
       
    55 
       
    56 /**
       
    57 *  CTestSDKEIKHKEYT test class for STIF Test Framework TestScripter.
       
    58 */
       
    59 NONSHARABLE_CLASS(CTestSDKEIKHKEYT) : public CScriptBase
       
    60     {
       
    61 public:
       
    62 
       
    63     /**
       
    64     * Two-phased constructor.
       
    65     */
       
    66     static CTestSDKEIKHKEYT* NewL( CTestModuleIf& aTestModuleIf );
       
    67 
       
    68     /**
       
    69     * Destructor.
       
    70     */
       
    71     virtual ~CTestSDKEIKHKEYT();
       
    72 
       
    73 public: // New functions
       
    74 
       
    75 
       
    76 public:
       
    77 
       
    78     /**
       
    79     * From CScriptBase Runs a script line.
       
    80     * @param aItem Script line containing method name and parameters
       
    81     * @return Symbian OS error code
       
    82     */
       
    83     virtual TInt RunMethodL( CStifItemParser& aItem );
       
    84 private:
       
    85 
       
    86     /**
       
    87     * C++ default constructor.
       
    88     */
       
    89     CTestSDKEIKHKEYT( CTestModuleIf& aTestModuleIf );
       
    90 
       
    91     /**
       
    92     * By default Symbian 2nd phase constructor is private.
       
    93     */
       
    94     void ConstructL();
       
    95 
       
    96     /**
       
    97     * Frees all resources allocated from test methods.
       
    98     */
       
    99     void Delete();
       
   100 
       
   101     /**
       
   102     * Test methods are listed below. 
       
   103     */
       
   104     /**
       
   105      * TestEHKEYCEikHotKeyTable test function for testing the CEikHotKeyTable function
       
   106      * @since S60 5.0
       
   107      * @param aItem never used
       
   108      * @return Symbian OS error code.
       
   109      */
       
   110     virtual TInt TestEHKEYCEikHotKeyTableL( CStifItemParser& /*aItem*/ );
       
   111     /**
       
   112      * TestEHKEYAddItemL test function for testing the AddItemL function
       
   113      * @since S60 5.0
       
   114      * @param aItem never used
       
   115      * @return Symbian OS error code.
       
   116      */
       
   117     virtual TInt TestEHKEYAddItemL( CStifItemParser& /*aItem*/ );
       
   118     /**
       
   119      * TestEHKEYCommandIdFromHotKey test function for testing the CommandIdFromHotKey function
       
   120      * @since S60 5.0
       
   121      * @param aItem never used
       
   122      * @return Symbian OS error code.
       
   123      */
       
   124     virtual TInt TestEHKEYCommandIdFromHotKeyL( CStifItemParser& /*aItem*/ );
       
   125     /**
       
   126      * TestEHKEYHotKeyFromCommandId test function for testing the HotKeyFromCommandId function
       
   127      * @since S60 5.0
       
   128      * @param aItem never used
       
   129      * @return Symbian OS error code.
       
   130      */
       
   131     virtual TInt TestEHKEYHotKeyFromCommandIdL( CStifItemParser& /*aItem*/ );
       
   132     /**
       
   133      * TestEHKEYRemoveItem test function for testing the RemoveItem function
       
   134      * @since S60 5.0
       
   135      * @param aItem never used
       
   136      * @return Symbian OS error code.
       
   137      */
       
   138     virtual TInt TestEHKEYRemoveItemL( CStifItemParser& /*aItem*/ );
       
   139     /**
       
   140      * TestEHKEYConstructFromResourceL test function for testing the ConstructFromResourceL function
       
   141      * @since S60 5.0
       
   142      * @param aItem never used
       
   143      * @return Symbian OS error code.
       
   144      */
       
   145     virtual TInt TestEHKEYConstructFromResourceL( CStifItemParser& /*aItem*/ );
       
   146     /**
       
   147      * TestEHKEYReset test function for testing the Reset function
       
   148      * @since S60 5.0
       
   149      * @param aItem never used
       
   150      * @return Symbian OS error code.
       
   151      */
       
   152     virtual TInt TestEHKEYResetL( CStifItemParser& /*aItem*/ );
       
   153     /**
       
   154      * TestEHKEYDestructor test function for testing the ~CEikHotKeyTable function
       
   155      * @since S60 5.0
       
   156      * @param aItem never used
       
   157      * @return Symbian OS error code.
       
   158      */
       
   159     virtual TInt TestEHKEYDestructorL( CStifItemParser& /*aItem*/ );
       
   160 
       
   161     /**
       
   162      * Method used to log version of test class
       
   163      */
       
   164     void SendTestClassVersion();
       
   165 
       
   166     /**
       
   167      * Turn off ScreenSaver
       
   168      * @since S60 5.0
       
   169      * @return Symbian OS error code.
       
   170      */
       
   171     void TurnOffScreenSaver();
       
   172     
       
   173     /**
       
   174      * Restore ScreenSaver
       
   175      * @since S60 5.0
       
   176      * @return Symbian OS error code.
       
   177      */
       
   178     void RestoreScreenSaver();
       
   179 
       
   180 private: // Data
       
   181 
       
   182     /**
       
   183      * ScreenSaver Property
       
   184      */
       
   185     TInt iOldScreenSaverProperty;
       
   186 
       
   187     // Resource file offset
       
   188     TInt iOffset;
       
   189 
       
   190     };
       
   191 
       
   192 #endif
       
   193 
       
   194 /*
       
   195  * End of File
       
   196  */