classicui_pub/searchfield_api/tsrc/inc/testsdksearchfield.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:  ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_TESTSDKSEARCHFIELD_H
       
    21 #define C_TESTSDKSEARCHFIELD_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <stiflogger.h>
       
    25 #include <testscripterinternal.h>
       
    26 #include <stiftestmodule.h>
       
    27 #include <testclassassert.h>
       
    28 
       
    29 class CAknSearchField;
       
    30 class CTestSDKSearchFieldContainer;
       
    31 class CTestSDKSFView;
       
    32 class CTestSDKSFASTObserver;
       
    33 
       
    34 // MACROS
       
    35 #define TEST_CLASS_VERSION_MAJOR 0
       
    36 #define TEST_CLASS_VERSION_MINOR 0
       
    37 #define TEST_CLASS_VERSION_BUILD 0
       
    38 
       
    39 // Logging path
       
    40 _LIT( KtestsdksearchfieldLogPath, "\\logs\\testframework\\testsdksearchfield\\" ); 
       
    41 // Log file
       
    42 _LIT( KtestsdksearchfieldLogFile, "testsdksearchfield.txt" ); 
       
    43 _LIT( KtestsdksearchfieldLogFileWithTitle, "testsdksearchfield_[%S].txt" );
       
    44 
       
    45 /**
       
    46 *  Ctestsdksearchfield test class for STIF Test Framework TestScripter.
       
    47 *  @since S60 5.0
       
    48 */
       
    49 NONSHARABLE_CLASS(CTestSDKSearchField) : public CScriptBase
       
    50     {
       
    51 public:  // Constructors and destructor
       
    52 
       
    53     /**
       
    54     * Two-phased constructor.
       
    55     */
       
    56     static CTestSDKSearchField* NewL( CTestModuleIf& aTestModuleIf );
       
    57 
       
    58     /**
       
    59     * Destructor.
       
    60     */
       
    61     virtual ~CTestSDKSearchField();
       
    62 
       
    63 public: // Functions from base classes
       
    64 
       
    65     /**
       
    66     * From CScriptBase Runs a script line.
       
    67     * @since S60 5.0
       
    68     * @param aItem Script line containing method name and parameters
       
    69     * @return Symbian OS error code
       
    70     */
       
    71     virtual TInt RunMethodL( CStifItemParser& aItem );
       
    72 
       
    73 private:
       
    74 
       
    75     /**
       
    76     * C++ default constructor.
       
    77     */
       
    78     CTestSDKSearchField( CTestModuleIf& aTestModuleIf );
       
    79 
       
    80     /**
       
    81     * By default Symbian 2nd phase constructor is private.
       
    82     */
       
    83     void ConstructL();
       
    84 
       
    85     /**
       
    86     * Frees all resources allocated from test methods.
       
    87     * @since S60 5.0
       
    88     */
       
    89     void Delete();
       
    90 
       
    91     /**
       
    92      * Method used to log version of test class
       
    93      */
       
    94     void SendTestClassVersion();
       
    95     
       
    96         /**
       
    97      * Turn off ScreenSaver
       
    98      * @since S60 5.0
       
    99      * @return Symbian OS error code.
       
   100      */
       
   101     void TurnOffScreenSaver();
       
   102 
       
   103     /**
       
   104      * Restore ScreenSaver
       
   105      * @since S60 5.0
       
   106      * @return Symbian OS error code.
       
   107      */
       
   108     void RestoreScreenSaver();
       
   109 
       
   110     //[TestMethods]
       
   111 private://aknsfld.h
       
   112     /**
       
   113      * TestSFNewL test function for testing the NewL function
       
   114      * @since S60 5.0
       
   115      * @param aItem never used
       
   116      * @return Symbian OS error code.
       
   117      */
       
   118     virtual TInt TestSFNewL( CStifItemParser& aItem );
       
   119     
       
   120     /**
       
   121      * TestSFDelete test function for testing the destructor function
       
   122      * @since S60 5.0
       
   123      * @param aItem never used
       
   124      * @return Symbian OS error code.
       
   125      */
       
   126     virtual TInt TestSFDelete( CStifItemParser& aItem );
       
   127     
       
   128     /**
       
   129      * TestSFTextLength test function for testing the TextLength function
       
   130      * @since S60 5.0
       
   131      * @param aItem never used
       
   132      * @return Symbian OS error code.
       
   133      */
       
   134     virtual TInt TestSFTextLength( CStifItemParser& aItem );
       
   135     
       
   136     /**
       
   137      * TestSFGetSearchText test function for testing the GetSearchText function
       
   138      * @since S60 5.0
       
   139      * @param aItem never used
       
   140      * @return Symbian OS error code.
       
   141      */
       
   142     virtual TInt TestSFGetSearchText( CStifItemParser& aItem );
       
   143     
       
   144     /**
       
   145      * TestSFSetSearchTextL test function for testing the SetSearchTextL function
       
   146      * @since S60 5.0
       
   147      * @param aItem never used
       
   148      * @return Symbian OS error code.
       
   149      */
       
   150     virtual TInt TestSFSetSearchTextL( CStifItemParser& aItem );
       
   151     
       
   152     /**
       
   153      * TestSFSelectSearchTextL test function for testing the SelectSearchTextL function
       
   154      * @since S60 5.0
       
   155      * @param aItem never used
       
   156      * @return Symbian OS error code.
       
   157      */
       
   158     virtual TInt TestSFSelectSearchTextL( CStifItemParser& aItem );
       
   159     
       
   160     /**
       
   161      * TestSFResetL test function for testing the ResetL function
       
   162      * @since S60 5.0
       
   163      * @param aItem never used
       
   164      * @return Symbian OS error code.
       
   165      */
       
   166     virtual TInt TestSFResetL( CStifItemParser& aItem );
       
   167     
       
   168     /**
       
   169      * TestSFSetInfoTextL test function for testing the SetInfoTextL function
       
   170      * @since S60 5.0
       
   171      * @param aItem never used
       
   172      * @return Symbian OS error code.
       
   173      */
       
   174     virtual TInt TestSFSetInfoTextL( CStifItemParser& aItem );
       
   175     
       
   176     /**
       
   177      * TestSFClipboardL test function for testing the ClipboardL function
       
   178      * @since S60 5.0
       
   179      * @param aItem never used
       
   180      * @return Symbian OS error code.
       
   181      */
       
   182     virtual TInt TestSFClipboardL( CStifItemParser& aItem );
       
   183     
       
   184     /**
       
   185      * TestSFSearchFieldStyle test function for testing the SearchFieldStyle function
       
   186      * @since S60 5.0
       
   187      * @param aItem never used
       
   188      * @return Symbian OS error code.
       
   189      */
       
   190     virtual TInt TestSFSearchFieldStyle( CStifItemParser& aItem );
       
   191     
       
   192     /**
       
   193      * TestSFSetSkinEnabledL test function for testing the SetSkinEnabledL function
       
   194      * @since S60 5.0
       
   195      * @param aItem never used
       
   196      * @return Symbian OS error code.
       
   197      */
       
   198     virtual TInt TestSFSetSkinEnabledL( CStifItemParser& aItem );
       
   199     
       
   200     /**
       
   201      * TestSFOfferKeyEventL test function for testing the OfferKeyEventL function
       
   202      * @since S60 5.0
       
   203      * @param aItem never used
       
   204      * @return Symbian OS error code.
       
   205      */
       
   206     virtual TInt TestSFOfferKeyEventL( CStifItemParser& aItem );
       
   207     
       
   208     /**
       
   209      * TestSFMinimumSize test function for testing the MinimumSize function
       
   210      * @since S60 5.0
       
   211      * @param aItem never used
       
   212      * @return Symbian OS error code.
       
   213      */
       
   214     virtual TInt TestSFMinimumSize( CStifItemParser& aItem );
       
   215     
       
   216     /**
       
   217      * TestSFMakeVisible test function for testing the MakeVisible function
       
   218      * @since S60 5.0
       
   219      * @param aItem never used
       
   220      * @return Symbian OS error code.
       
   221      */
       
   222     virtual TInt TestSFMakeVisible( CStifItemParser& aItem );
       
   223     
       
   224     /**
       
   225      * TestSFSetLinePos test function for testing the SetLinePos function
       
   226      * @since S60 5.0
       
   227      * @param aItem never used
       
   228      * @return Symbian OS error code.
       
   229      */
       
   230     virtual TInt TestSFSetLinePos( CStifItemParser& aItem );
       
   231     
       
   232     /**
       
   233      * TestSFEditor test function for testing the Editor function
       
   234      * @since S60 5.0
       
   235      * @param aItem never used
       
   236      * @return Symbian OS error code.
       
   237      */
       
   238     virtual TInt TestSFEditor( CStifItemParser& aItem );
       
   239     
       
   240     /**
       
   241      * TestSFSetAdaptiveGridChars test function for testing the SetAdaptiveGridChars function
       
   242      * @since S60 5.0
       
   243      * @param aItem never used
       
   244      * @return Symbian OS error code.
       
   245      */
       
   246     virtual TInt TestSFSetAdaptiveGridChars( CStifItemParser& aItem );
       
   247     
       
   248     /**
       
   249      * TestSFShowAdaptiveSearchGrid test function for testing the ShowAdaptiveSearchGrid function
       
   250      * @since S60 5.0
       
   251      * @param aItem never used
       
   252      * @return Symbian OS error code.
       
   253      */
       
   254     virtual TInt TestSFShowAdaptiveSearchGrid( CStifItemParser& aItem );
       
   255     
       
   256     /**
       
   257      * TestSFSetListColumnFilterFlags test function for testing the SetListColumnFilterFlags function
       
   258      * @since S60 5.0
       
   259      * @param aItem never used
       
   260      * @return Symbian OS error code.
       
   261      */
       
   262     virtual TInt TestSFSetListColumnFilterFlagsL( CStifItemParser& aItem );
       
   263     
       
   264     /**
       
   265      * TestSFListColumnFilterFlags test function for testing the ListColumnFilterFlags function
       
   266      * @since S60 5.0
       
   267      * @param aItem never used
       
   268      * @return Symbian OS error code.
       
   269      */
       
   270     virtual TInt TestSFListColumnFilterFlags( CStifItemParser& aItem );
       
   271     
       
   272     /**
       
   273      * TestSFAddAdaptiveSearchTextObserverL test function for testing the AddAdaptiveSearchTextObserverL function
       
   274      * @since S60 5.0
       
   275      * @param aItem never used
       
   276      * @return Symbian OS error code.
       
   277      */
       
   278     virtual TInt TestSFAddAdaptiveSearchTextObserverL( CStifItemParser& aItem );
       
   279     
       
   280     /**
       
   281      * TestSFRemoveAdaptiveSearchTextObserver test function for testing the RemoveAdaptiveSearchTextObserver function
       
   282      * @since S60 5.0
       
   283      * @param aItem never used
       
   284      * @return Symbian OS error code.
       
   285      */
       
   286     virtual TInt TestSFRemoveAdaptiveSearchTextObserver( CStifItemParser& aItem );
       
   287 
       
   288     /**
       
   289      * TestSFAdaptiveSearchEnabled test function for testing the AdaptiveSearchEnabled function
       
   290      * @since S60 5.0
       
   291      * @param aItem never used
       
   292      * @return Symbian OS error code.
       
   293      */
       
   294     virtual TInt TestSFAdaptiveSearchEnabled( CStifItemParser& aItem );
       
   295 
       
   296     /**
       
   297      * TestSFLanguageChanged test function for testing the LanguageChanged function
       
   298      * @since S60 5.0
       
   299      * @param aItem never used
       
   300      * @return Symbian OS error code.
       
   301      */
       
   302     virtual TInt TestSFLanguageChanged( CStifItemParser& aItem );
       
   303 private:    // Data
       
   304 
       
   305     /**
       
   306      * ScreenSaver Property
       
   307      */
       
   308     TInt iOldScreenSaverProperty;
       
   309     
       
   310     /**
       
   311      * CAknSearchField instance
       
   312      */
       
   313     CAknSearchField* iSearchField;
       
   314     
       
   315     /**
       
   316      * Own, for initialize container
       
   317      */
       
   318     CTestSDKSFView* iTestSDKSFView;
       
   319 
       
   320     /**
       
   321      * Own, for initialize container
       
   322      */
       
   323     CTestSDKSearchFieldContainer* iTestSDKSearchFieldContainer;
       
   324 
       
   325     /**
       
   326      * Not own, for set observer
       
   327      */
       
   328     CTestSDKSFASTObserver* iObserver;
       
   329     };
       
   330 
       
   331 #endif      // C_TESTSDKSEARCHFIELD_H
       
   332 
       
   333 // End of File