classicui_plat/labels_api/tsrc/inc/testsdklabels.h
changeset 49 31c16e0c5e3e
equal deleted inserted replaced
40:7165f928e888 49:31c16e0c5e3e
       
     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 EIKLABEL.H, eikfnlab.h
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_TESTSDKLABELS_H
       
    21 #define C_TESTSDKLABELS_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( KtestsdklabelsLogPath, "\\logs\\testframework\\testsdklabels\\" ); 
       
    36 // Log file
       
    37 _LIT( KtestsdklabelsLogFile, "testsdklabels.txt" ); 
       
    38 _LIT( KtestsdklabelsLogFileWithTitle, "testsdklabels_[%S].txt" );
       
    39 
       
    40 /**
       
    41 *  CTestSDKLabels test class for STIF Test Framework TestScripter.
       
    42 *  @since S60 5.0
       
    43 */
       
    44 NONSHARABLE_CLASS(CTestSDKLabels) : public CScriptBase
       
    45     {
       
    46 public:  // Constructors and destructor
       
    47 
       
    48     /**
       
    49     * Two-phased constructor.
       
    50     */
       
    51     static CTestSDKLabels* NewL( CTestModuleIf& aTestModuleIf );
       
    52 
       
    53     /**
       
    54     * Destructor.
       
    55     */
       
    56     virtual ~CTestSDKLabels();
       
    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     CTestSDKLabels( CTestModuleIf& aTestModuleIf );
       
    74 
       
    75     /**
       
    76     * By default Symbian 2nd phase constructor is private.
       
    77     */
       
    78     void ConstructL();
       
    79 
       
    80     /**
       
    81     * Frees all resources allocated from test methods.
       
    82     * @since S60 5.0
       
    83     */
       
    84     void Delete();
       
    85     
       
    86     /**
       
    87      * Method used to log version of test class
       
    88      */
       
    89     void SendTestClassVersion();
       
    90 
       
    91 private: // Test eikfnlab.h
       
    92 /*                               class CEikFileNameLabel                    */
       
    93     /**
       
    94      * TestLCEikFileNameLabelL test function for testing the 
       
    95      *     CEikFileNameLabel function
       
    96      * @since S60 5.0
       
    97      * @param aItem never used
       
    98      * @return Symbian OS error code.
       
    99      */
       
   100     virtual TInt TestLCEikFileNameLabelL( CStifItemParser& aItem );
       
   101 
       
   102     /**
       
   103      * TestLDeconstructorL test function for testing the 
       
   104      *     ~CEikFileNameLabel function
       
   105      * @since S60 5.0
       
   106      * @param aItem never used
       
   107      * @return Symbian OS error code.
       
   108      */
       
   109     virtual TInt TestLDeconstructorL( CStifItemParser& aItem );
       
   110 
       
   111     /**
       
   112      * TestLConstructL test function for testing the 
       
   113      *     ConstructL function
       
   114      * @since S60 5.0
       
   115      * @param aItem never used
       
   116      * @return Symbian OS error code.
       
   117      */
       
   118     virtual TInt TestLConstructL( CStifItemParser& aItem );
       
   119 
       
   120     /**
       
   121      * TestLUpdateL test function for testing the 
       
   122      *     UpdateL function
       
   123      * @since S60 5.0
       
   124      * @param aItem never used
       
   125      * @return Symbian OS error code.
       
   126      */
       
   127 
       
   128     virtual TInt TestLUpdateL( CStifItemParser& aItem );
       
   129 
       
   130     /**
       
   131      * TestLGetColorUseListL test function for testing the 
       
   132      *     GetColorUseListL function
       
   133      * @since S60 5.0
       
   134      * @param aItem never used
       
   135      * @return Symbian OS error code.
       
   136      */
       
   137     virtual TInt TestLGetColorUseListL( CStifItemParser& aItem );
       
   138 
       
   139     /**
       
   140      * TestLHandleResourceChangeL test function for testing the 
       
   141      *     HandleResourceChange function
       
   142      * @since S60 5.0
       
   143      * @param aItem never used
       
   144      * @return Symbian OS error code.
       
   145      */
       
   146     virtual TInt TestLHandleResourceChangeL( CStifItemParser& aItem );
       
   147 
       
   148     /**
       
   149      * TestLMinimumSizeL test function for testing the 
       
   150      *     MinimumSize function
       
   151      * @since S60 5.0
       
   152      * @param aItem never used
       
   153      * @return Symbian OS error code.
       
   154      */
       
   155     virtual TInt TestLMinimumSizeL( CStifItemParser& aItem );
       
   156 
       
   157     /**
       
   158      * TestLHandlePointerEventL test function for testing the 
       
   159      *     HandlePointerEventL function
       
   160      * @since S60 5.0
       
   161      * @param aItem never used
       
   162      * @return Symbian OS error code.
       
   163      */
       
   164     virtual TInt TestLHandlePointerEventL( CStifItemParser& aItem );
       
   165     
       
   166     /**
       
   167      * TestLDrawL test function for testing the 
       
   168      *     Draw function
       
   169      * @since S60 5.0
       
   170      * @param aItem never used
       
   171      * @return Symbian OS error code.
       
   172      */
       
   173     virtual TInt TestLDrawL( CStifItemParser& aItem );
       
   174     
       
   175 private: // Test EIKLABEL.H
       
   176 /*                               class CEikLabel                            */
       
   177     /**
       
   178      * TestLabelDeconstructorL test function for testing the 
       
   179      *     CEikLabel function
       
   180      * @since S60 5.0
       
   181      * @param aItem never used
       
   182      * @return Symbian OS error code.
       
   183      */
       
   184     virtual TInt TestLabelDeconstructorL( CStifItemParser& aItem );
       
   185     
       
   186     /**
       
   187      * TestLabelCEikLabelL test function for testing the 
       
   188      *     CEikLabel function
       
   189      * @since S60 5.0
       
   190      * @param aItem never used
       
   191      * @return Symbian OS error code.
       
   192      */
       
   193     virtual TInt TestLabelCEikLabelL( CStifItemParser& aItem );
       
   194     
       
   195     /**
       
   196      * TestLabelSetLabelAlignmentL test function for testing the 
       
   197      *     SetLabelAlignment function
       
   198      * @since S60 5.0
       
   199      * @param aItem never used
       
   200      * @return Symbian OS error code.
       
   201      */
       
   202     virtual TInt TestLabelSetLabelAlignmentL( CStifItemParser& aItem );
       
   203     
       
   204     /**
       
   205      * TestLabelSetBrushStyleL test function for testing the 
       
   206      *     SetBrushStyle function
       
   207      * @since S60 5.0
       
   208      * @param aItem never used
       
   209      * @return Symbian OS error code.
       
   210      */
       
   211     virtual TInt TestLabelSetBrushStyleL( CStifItemParser& aItem );
       
   212     
       
   213     /**
       
   214      * TestLabelSetBrushStyleFromContextL test function for testing the 
       
   215      *     SetBrushStyleFromContext function
       
   216      * @since S60 5.0
       
   217      * @param aItem never used
       
   218      * @return Symbian OS error code.
       
   219      */
       
   220     virtual TInt TestLabelSetBrushStyleFromContextL( CStifItemParser& aItem );
       
   221     
       
   222     /**
       
   223      * TestLabelMinimumSizeL test function for testing the 
       
   224      *     MinimumSize function
       
   225      * @since S60 5.0
       
   226      * @param aItem never used
       
   227      * @return Symbian OS error code.
       
   228      */
       
   229     virtual TInt TestLabelMinimumSizeL( CStifItemParser& aItem );
       
   230     
       
   231     /**
       
   232      * TestLabelConstructFromResourceL test function for testing the 
       
   233      *     ConstructFromResourceL function
       
   234      * @since S60 5.0
       
   235      * @param aItem never used
       
   236      * @return Symbian OS error code.
       
   237      */
       
   238     virtual TInt TestLabelConstructFromResourceL( CStifItemParser& aItem );
       
   239     
       
   240     /**
       
   241      * TestLabelGetColorUseListL test function for testing the 
       
   242      *     GetColorUseListL function
       
   243      * @since S60 5.0
       
   244      * @param aItem never used
       
   245      * @return Symbian OS error code.
       
   246      */
       
   247     virtual TInt TestLabelGetColorUseListL( CStifItemParser& aItem );
       
   248     
       
   249     /**
       
   250      * TestLabelHandleResourceChangeL test function for testing the 
       
   251      *     HandleResourceChange function
       
   252      * @since S60 5.0
       
   253      * @param aItem never used
       
   254      * @return Symbian OS error code.
       
   255      */
       
   256     virtual TInt TestLabelHandleResourceChangeL( CStifItemParser& aItem );
       
   257     
       
   258     /**
       
   259      * TestLabelDrawL test function for testing the 
       
   260      *     Draw function
       
   261      * @since S60 5.0
       
   262      * @param aItem never used
       
   263      * @return Symbian OS error code.
       
   264      */
       
   265     virtual TInt TestLabelDrawL( CStifItemParser& aItem );
       
   266     
       
   267     /**
       
   268      * TestLabelSetTextL test function for testing the 
       
   269      *     SetTextL function
       
   270      * @since S60 5.0
       
   271      * @param aItem never used
       
   272      * @return Symbian OS error code.
       
   273      */
       
   274     virtual TInt TestLabelSetTextL( CStifItemParser& aItem );
       
   275     
       
   276     /**
       
   277      * TestLabelTextL test function for testing the 
       
   278      *     Text function
       
   279      * @since S60 5.0
       
   280      * @param aItem never used
       
   281      * @return Symbian OS error code.
       
   282      */
       
   283     virtual TInt TestLabelTextL( CStifItemParser& aItem );
       
   284     
       
   285     /**
       
   286      * TestLabelCropTextL test function for testing the 
       
   287      *     CropText function
       
   288      * @since S60 5.0
       
   289      * @param aItem never used
       
   290      * @return Symbian OS error code.
       
   291      */
       
   292     virtual TInt TestLabelCropTextL( CStifItemParser& aItem );
       
   293     
       
   294     /**
       
   295      * TestLabelSetBufferReserveLengthL test function for testing the 
       
   296      *     SetBufferReserveLengthL function
       
   297      * @since S60 5.0
       
   298      * @param aItem never used
       
   299      * @return Symbian OS error code.
       
   300      */
       
   301     virtual TInt TestLabelSetBufferReserveLengthL( CStifItemParser& aItem );
       
   302     
       
   303     /**
       
   304      * TestLabelSetFontL test function for testing the 
       
   305      *     SetFont function
       
   306      * @since S60 5.0
       
   307      * @param aItem never used
       
   308      * @return Symbian OS error code.
       
   309      */
       
   310     virtual TInt TestLabelSetFontL( CStifItemParser& aItem );
       
   311     
       
   312     /**
       
   313      * TestLabelFontL test function for testing the 
       
   314      *     Font function
       
   315      * @since S60 5.0
       
   316      * @param aItem never used
       
   317      * @return Symbian OS error code.
       
   318      */
       
   319     virtual TInt TestLabelFontL( CStifItemParser& aItem );
       
   320     
       
   321     /**
       
   322      * TestLabelSetEmphasisL test function for testing the 
       
   323      *     SetEmphasis function
       
   324      * @since S60 5.0
       
   325      * @param aItem never used
       
   326      * @return Symbian OS error code.
       
   327      */
       
   328     virtual TInt TestLabelSetEmphasisL( CStifItemParser& aItem );
       
   329     
       
   330     /**
       
   331      * TestLabelSetPixelGapBetweenLinesL test function for testing the 
       
   332      *     SetPixelGapBetweenLines function
       
   333      * @since S60 5.0
       
   334      * @param aItem never used
       
   335      * @return Symbian OS error code.
       
   336      */
       
   337     virtual TInt TestLabelSetPixelGapBetweenLinesL( CStifItemParser& aItem );
       
   338     
       
   339     /**
       
   340      * TestLabelPixelGapBetweenLinesL test function for testing the 
       
   341      *     PixelGapBetweenLines function
       
   342      * @since S60 5.0
       
   343      * @param aItem never used
       
   344      * @return Symbian OS error code.
       
   345      */
       
   346     virtual TInt TestLabelPixelGapBetweenLinesL( CStifItemParser& aItem );
       
   347     
       
   348     /**
       
   349      * TestLabelIsUnderlinedL test function for testing the 
       
   350      *     IsUnderlined function
       
   351      * @since S60 5.0
       
   352      * @param aItem never used
       
   353      * @return Symbian OS error code.
       
   354      */
       
   355     virtual TInt TestLabelIsUnderlinedL( CStifItemParser& aItem );
       
   356     
       
   357     /**
       
   358      * TestLabelSetUnderliningL test function for testing the 
       
   359      *     SetUnderlining function
       
   360      * @since S60 5.0
       
   361      * @param aItem never used
       
   362      * @return Symbian OS error code.
       
   363      */
       
   364     virtual TInt TestLabelSetUnderliningL( CStifItemParser& aItem );
       
   365     
       
   366     /**
       
   367      * TestLabelIsStrikethroughL test function for testing the 
       
   368      *     IsStrikethrough function
       
   369      * @since S60 5.0
       
   370      * @param aItem never used
       
   371      * @return Symbian OS error code.
       
   372      */
       
   373     virtual TInt TestLabelIsStrikethroughL( CStifItemParser& aItem );
       
   374     
       
   375     /**
       
   376      * TestLabelSetStrikethroughL test function for testing the 
       
   377      *     SetStrikethrough function
       
   378      * @since S60 5.0
       
   379      * @param aItem never used
       
   380      * @return Symbian OS error code.
       
   381      */
       
   382     virtual TInt TestLabelSetStrikethroughL( CStifItemParser& aItem );
       
   383     
       
   384     /**
       
   385      * TestLabelCalcMinimumSizeL test function for testing the 
       
   386      *     CalcMinimumSize function
       
   387      * @since S60 5.0
       
   388      * @param aItem never used
       
   389      * @return Symbian OS error code.
       
   390      */
       
   391     virtual TInt TestLabelCalcMinimumSizeL( CStifItemParser& aItem );
       
   392     
       
   393     /**
       
   394      * TestLabelNumberOfLinesL test function for testing the 
       
   395      *     NumberOfLines function
       
   396      * @since S60 5.0
       
   397      * @param aItem never used
       
   398      * @return Symbian OS error code.
       
   399      */
       
   400     virtual TInt TestLabelNumberOfLinesL( CStifItemParser& aItem );
       
   401     
       
   402     /**
       
   403      * TestLabelBufferReserveLengthL test function for testing the 
       
   404      *     BufferReserveLength function
       
   405      * @since S60 5.0
       
   406      * @param aItem never used
       
   407      * @return Symbian OS error code.
       
   408      */
       
   409     virtual TInt TestLabelBufferReserveLengthL( CStifItemParser& aItem );
       
   410     
       
   411     /**
       
   412      * TestLabelUseLogicalToVisualConversionL test function for testing the 
       
   413      *     UseLogicalToVisualConversion function
       
   414      * @since S60 5.0
       
   415      * @param aItem never used
       
   416      * @return Symbian OS error code.
       
   417      */
       
   418     virtual TInt TestLabelUseLogicalToVisualConversionL( CStifItemParser& aItem );
       
   419     
       
   420     /**
       
   421      * TestLabelLogicalToVisualConversionUsedL test function for testing the 
       
   422      *     LogicalToVisualConversionUsed function
       
   423      * @since S60 5.0
       
   424      * @param aItem never used
       
   425      * @return Symbian OS error code.
       
   426      */
       
   427     virtual TInt TestLabelLogicalToVisualConversionUsedL( CStifItemParser& aItem );
       
   428     
       
   429     /**
       
   430      * TestLabelEnablePictographsL test function for testing the 
       
   431      *     EnablePictographsL function
       
   432      * @since S60 5.0
       
   433      * @param aItem never used
       
   434      * @return Symbian OS error code.
       
   435      */
       
   436     virtual TInt TestLabelEnablePictographsL( CStifItemParser& aItem );
       
   437     
       
   438     /**
       
   439      * TestLabelDisablePictographsL test function for testing the 
       
   440      *     DisablePictographs function
       
   441      * @since S60 5.0
       
   442      * @param aItem never used
       
   443      * @return Symbian OS error code.
       
   444      */
       
   445     virtual TInt TestLabelDisablePictographsL( CStifItemParser& aItem );
       
   446     
       
   447     /**
       
   448      * TestLabelHandlePointerEventL test function for testing the 
       
   449      *     HandlePointerEventL function
       
   450      * @since S60 5.0
       
   451      * @param aItem never used
       
   452      * @return Symbian OS error code.
       
   453      */
       
   454     virtual TInt TestLabelHandlePointerEventL( CStifItemParser& aItem );
       
   455     
       
   456     /**
       
   457      * TestLabelWriteInternalStateL test function for testing the 
       
   458      *     WriteInternalStateL function
       
   459      * @since S60 5.0
       
   460      * @param aItem never used
       
   461      * @return Symbian OS error code.
       
   462      */
       
   463     virtual TInt TestLabelWriteInternalStateL( CStifItemParser& aItem );
       
   464     
       
   465 private:    // Data
       
   466 
       
   467     /**
       
   468      * ScreenSaver Property
       
   469      */
       
   470     TInt iOldScreenSaverProperty;
       
   471 
       
   472     // Resource file offset
       
   473     TInt iOffset;
       
   474     };
       
   475 
       
   476 #endif      // C_TESTSDKLABELS_H
       
   477 
       
   478 // End of File