classicui_plat/toolbar_api/tsrc/inc/testsdktoolbar.h
changeset 45 667edd0b8678
equal deleted inserted replaced
37:89c890c70182 45:667edd0b8678
       
     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 AknToolbar.h,akntoolbarextension.h and AknToolbarObserver.h
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_TESTSDKTOOLBAR_H
       
    21 #define C_TESTSDKTOOLBAR_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <stiflogger.h>
       
    25 #include <testscripterinternal.h>
       
    26 #include <stiftestmodule.h>
       
    27 #include <testclassassert.h>
       
    28 
       
    29 // MACROS
       
    30 #define TEST_CLASS_VERSION_MAJOR 0
       
    31 #define TEST_CLASS_VERSION_MINOR 0
       
    32 #define TEST_CLASS_VERSION_BUILD 0
       
    33 
       
    34 // Logging path
       
    35 _LIT( KTestSDKToolbarLogPath, "\\logs\\testframework\\testsdktoolbar\\" ); 
       
    36 // Log file
       
    37 _LIT( KTestSDKToolbarLogFile, "testsdktoolbar.txt" ); 
       
    38 _LIT( KTestSDKToolbarLogFileWithTitle, "testsdktoolbar_[%S].txt" );
       
    39 
       
    40 /**
       
    41 *  CTestSDKToolbar test class for STIF Test Framework TestScripter.
       
    42 *  @since S60 5.0
       
    43 */
       
    44 NONSHARABLE_CLASS( CTestSDKToolbar ) : public CScriptBase
       
    45     {
       
    46 public:  // Constructors and destructor
       
    47 
       
    48     /**
       
    49     * Two-phased constructor.
       
    50     */
       
    51     static CTestSDKToolbar* NewL( CTestModuleIf& aTestModuleIf );
       
    52 
       
    53     /**
       
    54     * Destructor.
       
    55     */
       
    56     virtual ~CTestSDKToolbar();
       
    57 
       
    58 public: // Functions from base classes
       
    59 
       
    60     /**
       
    61     * From CScriptBase Runs a script line.
       
    62     * @since S60 5.0
       
    63     * @param aItem Script line containing method name and parameters
       
    64     * @return Symbian OS error code
       
    65     */
       
    66     virtual TInt RunMethodL( CStifItemParser& aItem );
       
    67 
       
    68 private:
       
    69 
       
    70     /**
       
    71     * C++ default constructor.
       
    72     */
       
    73     CTestSDKToolbar( CTestModuleIf& aTestModuleIf );
       
    74 
       
    75     /**
       
    76     * By default Symbian 2nd phase constructor is private.
       
    77     */
       
    78     void ConstructL();
       
    79 
       
    80     /**
       
    81      * Method used to log version of test class
       
    82      */
       
    83     void SendTestClassVersion();
       
    84 
       
    85 private: // Test Methods in akntoolbar.h
       
    86 
       
    87     /**
       
    88     * test NewL function of AknToolbar
       
    89     * @since S60 5.0
       
    90     * @param aItem never used.
       
    91     * @return Symbian OS error code.
       
    92     */
       
    93     virtual TInt TestToolbarNewL( CStifItemParser& aItem );
       
    94 
       
    95     /**
       
    96     * test NewLC function of AknToolbar
       
    97     * @since S60 5.0
       
    98     * @param aItem never used.
       
    99     * @return Symbian OS error code.
       
   100     */
       
   101     virtual TInt TestToolbarNewLCL( CStifItemParser& aItem );
       
   102 
       
   103     /**
       
   104     * test CountComponentControls function of AknToolbar
       
   105     * @since S60 5.0
       
   106     * @param aItem never used.
       
   107     * @return Symbian OS error code.
       
   108     */
       
   109     virtual TInt TestToolbarCountComponentControlsL( CStifItemParser& aItem );
       
   110 
       
   111     /**
       
   112     * test ComponentControl function of AknToolbar
       
   113     * @since S60 5.0
       
   114     * @param aItem never used.
       
   115     * @return Symbian OS error code.
       
   116     */
       
   117     virtual TInt TestToolbarComponentControlL( CStifItemParser& aItem );
       
   118 
       
   119     /**
       
   120     * test HandlePointerEventL function of AknToolbar
       
   121     * @since S60 5.0
       
   122     * @param aItem never used.
       
   123     * @return Symbian OS error code.
       
   124     */
       
   125     virtual TInt TestToolbarHandlePointerEventL( CStifItemParser& aItem );
       
   126 
       
   127     /**
       
   128     * test HandleResourceChange function of AknToolbar
       
   129     * @since S60 5.0
       
   130     * @param aItem never used.
       
   131     * @return Symbian OS error code.
       
   132     */
       
   133     virtual TInt TestToolbarHandleResourceChangeL( CStifItemParser& aItem );
       
   134 
       
   135     /**
       
   136     * test HandleControlEventL function of AknToolbar
       
   137     * @since S60 5.0
       
   138     * @param aItem never used.
       
   139     * @return Symbian OS error code.
       
   140     */
       
   141     virtual TInt TestToolbarHandleControlEventL( CStifItemParser& aItem );
       
   142 
       
   143     /**
       
   144     * test PositionChanged function of AknToolbar
       
   145     * @since S60 5.0
       
   146     * @param aItem never used.
       
   147     * @return Symbian OS error code.
       
   148     */
       
   149     virtual TInt TestToolbarPositionChangedL( CStifItemParser& aItem );
       
   150 
       
   151     /**
       
   152     * test ProcessCommandL function of AknToolbar
       
   153     * @since S60 5.0
       
   154     * @param aItem never used.
       
   155     * @return Symbian OS error code.
       
   156     */
       
   157     virtual TInt TestToolbarProcessCommandL( CStifItemParser& aItem );
       
   158 
       
   159     /**
       
   160     * test SetDimmed function of AknToolbar
       
   161     * @since S60 5.0
       
   162     * @param aItem never used.
       
   163     * @return Symbian OS error code.
       
   164     */
       
   165     virtual TInt TestToolbarSetDimmedL( CStifItemParser& aItem );
       
   166 
       
   167     /**
       
   168     * test OfferKeyEventL function of AknToolbar
       
   169     * @since S60 5.0
       
   170     * @param aItem never used.
       
   171     * @return Symbian OS error code.
       
   172     */
       
   173     virtual TInt TestToolbarOfferKeyEventL( CStifItemParser& aItem );
       
   174 
       
   175     /**
       
   176     * test InputCapabilities function of AknToolbar
       
   177     * @since S60 5.0
       
   178     * @param aItem never used.
       
   179     * @return Symbian OS error code.
       
   180     */
       
   181     virtual TInt TestToolbarInputCapabilitiesL( CStifItemParser& aItem );
       
   182 
       
   183     /**
       
   184     * test Draw function of AknToolbar
       
   185     * @since S60 5.0
       
   186     * @param aItem never used.
       
   187     * @return Symbian OS error code.
       
   188     */
       
   189     virtual TInt TestToolbarDrawL( CStifItemParser& aItem );
       
   190 
       
   191     /**
       
   192     * test ControlOrNull function of AknToolbar
       
   193     * @since S60 5.0
       
   194     * @param aItem never used.
       
   195     * @return Symbian OS error code.
       
   196     */
       
   197     virtual TInt TestToolbarControlOrNullL( CStifItemParser& aItem );
       
   198 
       
   199     /**
       
   200     * test SetToolbarVisibility function of AknToolbar
       
   201     * @since S60 5.0
       
   202     * @param aItem never used.
       
   203     * @return Symbian OS error code.
       
   204     */
       
   205     virtual TInt TestToolbarSetToolbarVisibilityL( CStifItemParser& aItem );
       
   206 
       
   207     /**
       
   208     * test SetItemDimmed function of AknToolbar
       
   209     * @since S60 5.0
       
   210     * @param aItem never used.
       
   211     * @return Symbian OS error code.
       
   212     */
       
   213     virtual TInt TestToolbarSetItemDimmedL( CStifItemParser& aItem );
       
   214 
       
   215     /**
       
   216     * test HideItem function of AknToolbar
       
   217     * @since S60 5.0
       
   218     * @param aItem never used.
       
   219     * @return Symbian OS error code.
       
   220     */
       
   221     virtual TInt TestToolbarHideItemL( CStifItemParser& aItem );
       
   222 
       
   223     /**
       
   224     * test SetToolbarObserver function of AknToolbar
       
   225     * @since S60 5.0
       
   226     * @param aItem never used.
       
   227     * @return Symbian OS error code.
       
   228     */
       
   229     virtual TInt TestToolbarSetToolbarObserverL( CStifItemParser& aItem );
       
   230 
       
   231     /**
       
   232     * test ToolbarObserver function of AknToolbar
       
   233     * @since S60 5.0
       
   234     * @param aItem never used.
       
   235     * @return Symbian OS error code.
       
   236     */
       
   237     virtual TInt TestToolbarToolbarObserverL( CStifItemParser& aItem );
       
   238 
       
   239     /**
       
   240     * test AddItemL function of AknToolbar
       
   241     * @since S60 5.0
       
   242     * @param aItem never used.
       
   243     * @return Symbian OS error code.
       
   244     */
       
   245     virtual TInt TestToolbarAddItemL( CStifItemParser& aItem );
       
   246 
       
   247     /**
       
   248     * test RemoveItem function of AknToolbar
       
   249     * @since S60 5.0
       
   250     * @param aItem never used.
       
   251     * @return Symbian OS error code.
       
   252     */
       
   253     virtual TInt TestToolbarRemoveItemL( CStifItemParser& aItem );
       
   254 
       
   255     /**
       
   256     * test IsSupportedItemType function of AknToolbar
       
   257     * @since S60 5.0
       
   258     * @param aItem never used.
       
   259     * @return Symbian OS error code.
       
   260     */
       
   261     virtual TInt TestToolbarIsSupportedItemTypeL( CStifItemParser& aItem );
       
   262 
       
   263     /**
       
   264     * test SetInitialFocusedItem function of AknToolbar
       
   265     * @since S60 5.0
       
   266     * @param aItem never used.
       
   267     * @return Symbian OS error code.
       
   268     */
       
   269     virtual TInt TestToolbarSetInitialFocusedItemL( CStifItemParser& aItem );
       
   270 
       
   271     /**
       
   272     * test SetEmphasis function of AknToolbar
       
   273     * @since S60 5.0
       
   274     * @param aItem never used.
       
   275     * @return Symbian OS error code.
       
   276     */
       
   277     virtual TInt TestToolbarSetEmphasisL( CStifItemParser& aItem );
       
   278 
       
   279     /**
       
   280     * test IsShown function of AknToolbar
       
   281     * @since S60 5.0
       
   282     * @param aItem never used.
       
   283     * @return Symbian OS error code.
       
   284     */
       
   285     virtual TInt TestToolbarIsShownL( CStifItemParser& aItem );
       
   286 
       
   287     /**
       
   288     * test SetWithSliding function of AknToolbar
       
   289     * @since S60 5.0
       
   290     * @param aItem never used.
       
   291     * @return Symbian OS error code.
       
   292     */
       
   293     virtual TInt TestToolbarSetWithSlidingL( CStifItemParser& aItem );
       
   294 
       
   295     /**
       
   296     * test SetCloseOnCommand function of AknToolbar
       
   297     * @since S60 5.0
       
   298     * @param aItem never used.
       
   299     * @return Symbian OS error code.
       
   300     */
       
   301     virtual TInt TestToolbarSetCloseOnCommandL( CStifItemParser& aItem );
       
   302 
       
   303     /**
       
   304     * test SetCloseOnAllCommands function of AknToolbar
       
   305     * @since S60 5.0
       
   306     * @param aItem never used.
       
   307     * @return Symbian OS error code.
       
   308     */
       
   309     virtual TInt TestToolbarSetCloseOnAllCommandsL( CStifItemParser& aItem );
       
   310 
       
   311     /**
       
   312     * test SetOrientation function of AknToolbar
       
   313     * @since S60 5.0
       
   314     * @param aItem never used.
       
   315     * @return Symbian OS error code.
       
   316     */
       
   317     virtual TInt TestToolbarSetOrientationL( CStifItemParser& aItem );
       
   318 
       
   319     /**
       
   320     * test UpdateBackground function of AknToolbar
       
   321     * @since S60 5.0
       
   322     * @param aItem never used.
       
   323     * @return Symbian OS error code.
       
   324     */
       
   325     virtual TInt TestToolbarUpdateBackgroundL( CStifItemParser& aItem );
       
   326 
       
   327     /**
       
   328     * test DisableToolbarL function of AknToolbar
       
   329     * @since S60 5.0
       
   330     * @param aItem never used.
       
   331     * @return Symbian OS error code.
       
   332     */
       
   333     virtual TInt TestToolbarDisableToolbarL( CStifItemParser& aItem );
       
   334 
       
   335     /**
       
   336     * test IsToolbarDisabled function of AknToolbar
       
   337     * @since S60 5.0
       
   338     * @param aItem never used.
       
   339     * @return Symbian OS error code.
       
   340     */
       
   341     virtual TInt TestToolbarIsToolbarDisabledL( CStifItemParser& aItem );
       
   342 
       
   343     /**
       
   344     * test SetFocusedItemL function of AknToolbar
       
   345     * @since S60 5.0
       
   346     * @param aItem never used.
       
   347     * @return Symbian OS error code.
       
   348     */
       
   349     virtual TInt TestToolbarSetFocusedItemL( CStifItemParser& aItem );
       
   350 
       
   351     /**
       
   352     * test FocusedItem function of AknToolbar
       
   353     * @since S60 5.0
       
   354     * @param aItem never used.
       
   355     * @return Symbian OS error code.
       
   356     */
       
   357     virtual TInt TestToolbarFocusedItemL( CStifItemParser& aItem );
       
   358 
       
   359     /**
       
   360     * test EventModifiers function of AknToolbar
       
   361     * @since S60 5.0
       
   362     * @param aItem never used.
       
   363     * @return Symbian OS error code.
       
   364     */
       
   365     virtual TInt TestToolbarEventModifiersL( CStifItemParser& aItem );
       
   366 
       
   367     /**
       
   368     * test ToolbarFlags function of AknToolbar
       
   369     * @since S60 5.0
       
   370     * @param aItem never used.
       
   371     * @return Symbian OS error code.
       
   372     */
       
   373     virtual TInt TestToolbarToolbarFlagsL( CStifItemParser& aItem );
       
   374 
       
   375     /**
       
   376     * test SetSoftkeyResourceIdL function of AknToolbar
       
   377     * @since S60 5.0
       
   378     * @param aItem never used.
       
   379     * @return Symbian OS error code.
       
   380     */
       
   381     virtual TInt TestToolbarSetSoftkeyResourceIdL( CStifItemParser& aItem );
       
   382 
       
   383     /**
       
   384     * test ToolbarExtension function of AknToolbar
       
   385     * @since S60 5.0
       
   386     * @param aItem never used.
       
   387     * @return Symbian OS error code.
       
   388     */
       
   389     virtual TInt TestToolbarToolbarExtensionL( CStifItemParser& aItem );
       
   390 
       
   391     /**
       
   392     * test HideItemsAndDrawOnlyBackground function of AknToolbar
       
   393     * @since S60 5.0
       
   394     * @param aItem never used.
       
   395     * @return Symbian OS error code.
       
   396     */
       
   397     virtual TInt TestToolbarHideItemsAndDrawOnlyBackgroundL( CStifItemParser& aItem );
       
   398 
       
   399     /**
       
   400     * test SizeChanged function of AknToolbar
       
   401     * @since S60 5.0
       
   402     * @param aItem never used.
       
   403     * @return Symbian OS error code.
       
   404     */
       
   405     virtual TInt TestToolbarSizeChangedL( CStifItemParser& aItem );
       
   406 
       
   407     /**
       
   408     * test FocusChanged function of AknToolbar
       
   409     * @since S60 5.0
       
   410     * @param aItem never used.
       
   411     * @return Symbian OS error code.
       
   412     */
       
   413     virtual TInt TestToolbarFocusChangedL( CStifItemParser& aItem );
       
   414 
       
   415     /**
       
   416     * test ExtensionInterface function of AknToolbar
       
   417     * @since S60 5.0
       
   418     * @param aItem never used.
       
   419     * @return Symbian OS error code.
       
   420     */
       
   421     virtual TInt TestToolbarExtensionInterfaceL( CStifItemParser& aItem );
       
   422 
       
   423     /**
       
   424     * test MopSupplyObject function of AknToolbar
       
   425     * @since S60 5.0
       
   426     * @param aItem never used.
       
   427     * @return Symbian OS error code.
       
   428     */
       
   429     virtual TInt TestToolbarMopSupplyObjectL( CStifItemParser& aItem );
       
   430 
       
   431 private: // Test Methods in akntoolbarextension.h
       
   432 
       
   433     /**
       
   434     * test NewL function of AknToolbarExtension
       
   435     * @since S60 5.0
       
   436     * @param aItem never used.
       
   437     * @return Symbian OS error code.
       
   438     */
       
   439     virtual TInt TestToolbarExtNewL( CStifItemParser& aItem );
       
   440 
       
   441     /**
       
   442     * test NewLC function of AknToolbarExtension
       
   443     * @since S60 5.0
       
   444     * @param aItem never used.
       
   445     * @return Symbian OS error code.
       
   446     */
       
   447     virtual TInt TestToolbarExtNewLCL( CStifItemParser& aItem );
       
   448 
       
   449     /**
       
   450     * test AddItemL function of AknToolbarExtension
       
   451     * @since S60 5.0
       
   452     * @param aItem never used.
       
   453     * @return Symbian OS error code.
       
   454     */
       
   455     virtual TInt TestToolbarExtAddItemL( CStifItemParser& aItem );
       
   456 
       
   457     /**
       
   458     * test ControlOrNull function of AknToolbarExtension
       
   459     * @since S60 5.0
       
   460     * @param aItem never used.
       
   461     * @return Symbian OS error code.
       
   462     */
       
   463     virtual TInt TestToolbarExtControlOrNullL( CStifItemParser& aItem );
       
   464 
       
   465     /**
       
   466     * test RemoveItemL function of AknToolbarExtension
       
   467     * @since S60 5.0
       
   468     * @param aItem never used.
       
   469     * @return Symbian OS error code.
       
   470     */
       
   471     virtual TInt TestToolbarExtRemoveItemL( CStifItemParser& aItem );
       
   472 
       
   473     /**
       
   474     * test SetShown function of AknToolbarExtension
       
   475     * @since S60 5.0
       
   476     * @param aItem never used.
       
   477     * @return Symbian OS error code.
       
   478     */
       
   479     virtual TInt TestToolbarExtSetShownL( CStifItemParser& aItem );
       
   480 
       
   481     /**
       
   482     * test IsShown function of AknToolbarExtension
       
   483     * @since S60 5.0
       
   484     * @param aItem never used.
       
   485     * @return Symbian OS error code.
       
   486     */
       
   487     virtual TInt TestToolbarExtIsShownL( CStifItemParser& aItem );
       
   488 
       
   489     /**
       
   490     * test SetItemDimmed function of AknToolbarExtension
       
   491     * @since S60 5.0
       
   492     * @param aItem never used.
       
   493     * @return Symbian OS error code.
       
   494     */
       
   495     virtual TInt TestToolbarExtSetItemDimmedL( CStifItemParser& aItem );
       
   496 
       
   497     /**
       
   498     * test HideItemL function of AknToolbarExtension
       
   499     * @since S60 5.0
       
   500     * @param aItem never used.
       
   501     * @return Symbian OS error code.
       
   502     */
       
   503     virtual TInt TestToolbarExtHideItemL( CStifItemParser& aItem );
       
   504 
       
   505 private: // Test Methods in akntoolbarobserver.h
       
   506 
       
   507     /**
       
   508     * test DynInitToolbarL function of AknToolbarObserver
       
   509     * @since S60 5.0
       
   510     * @param aItem never used.
       
   511     * @return Symbian OS error code.
       
   512     */
       
   513     virtual TInt TestToolbarObserverDynInitToolbarL( CStifItemParser& aItem );
       
   514 
       
   515     /**
       
   516     * test DynInitToolbarL function of AknToolbarObserver
       
   517     * @since S60 5.0
       
   518     * @param aItem never used.
       
   519     * @return Symbian OS error code.
       
   520     */
       
   521     virtual TInt TestToolbarObserverReservedL( CStifItemParser& aItem );
       
   522 
       
   523     /**
       
   524     * test DynInitToolbarL function of AknToolbarObserver
       
   525     * @since S60 5.0
       
   526     * @param aItem never used.
       
   527     * @return Symbian OS error code.
       
   528     */
       
   529     virtual TInt TestToolbarObserverReservedTwoL( CStifItemParser& aItem );
       
   530 
       
   531 private:    // Data
       
   532 
       
   533     /**
       
   534      * ScreenSaver Property
       
   535      */
       
   536     TInt iOldScreenSaverProperty;
       
   537 
       
   538     // Resource file offset
       
   539     TInt iOffset;
       
   540     };
       
   541 
       
   542 #endif      // C_TESTSDKTOOLBAR_H
       
   543 
       
   544 // End of File