srsf/tsrc/public/basic/ttsutilitytest/inc/ttsutilitytest.h
branchRCL_3
changeset 19 e36f3802f733
parent 0 bf1d17376201
equal deleted inserted replaced
18:cad71a31b7fc 19:e36f3802f733
       
     1 /*
       
     2 * Copyright (c) 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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef TTSUTILITYTEST_H
       
    20 #define TTSUTILITYTEST_h
       
    21 
       
    22 //  INCLUDES
       
    23 #include <stiflogger.h>
       
    24 #include <testscripterinternal.h>
       
    25 #include <stiftestmodule.h>
       
    26 
       
    27 #include <nssttsutility.h>
       
    28 
       
    29 
       
    30 // MACROS
       
    31 
       
    32 // Logging path
       
    33 _LIT( KttsutilitytestLogPath, "\\logs\\testframework\\ttsutilitytest\\" ); 
       
    34 // Log file
       
    35 _LIT( KttsutilitytestLogFile, "ttsutilitytest.txt" ); 
       
    36 _LIT( KttsutilitytestLogFileWithTitle, "ttsutilitytest_[%S].txt" );
       
    37 
       
    38 
       
    39 // FORWARD DECLARATIONS
       
    40 class Cttsutilitytest;
       
    41 
       
    42 
       
    43 // CLASS DECLARATION
       
    44 
       
    45 /**
       
    46 *
       
    47 */
       
    48 NONSHARABLE_CLASS(Cttsutilitytest) : public CScriptBase, 
       
    49                                               public MTtsClientUtilityObserver
       
    50     {
       
    51     public:  // Constructors and destructor
       
    52 
       
    53         /**
       
    54         * Two-phased constructor.
       
    55         */
       
    56         static Cttsutilitytest* NewL( CTestModuleIf& aTestModuleIf );
       
    57 
       
    58         /**
       
    59         * Destructor.
       
    60         */
       
    61         virtual ~Cttsutilitytest();
       
    62 
       
    63     public: // Functions from base classes
       
    64 
       
    65         /**
       
    66         * From CScriptBase Runs a script line.
       
    67         * @param aItem Script line containing method name and parameters
       
    68         * @return Symbian OS error code
       
    69         */
       
    70         virtual TInt RunMethodL( CStifItemParser& aItem );
       
    71 
       
    72     private: 
       
    73     
       
    74         void MapcInitComplete( TInt aError, const TTimeIntervalMicroSeconds &aDuration );
       
    75         
       
    76         void MapcPlayComplete( TInt aError );
       
    77         
       
    78         void MapcCustomCommandEvent( TInt /*aEvent*/, TInt /*aError*/ ) {};
       
    79 
       
    80     private:
       
    81 
       
    82         /**
       
    83         * C++ default constructor.
       
    84         */
       
    85         Cttsutilitytest( CTestModuleIf& aTestModuleIf );
       
    86 
       
    87         /**
       
    88         * By default Symbian 2nd phase constructor is private.
       
    89         */
       
    90         void ConstructL();
       
    91 
       
    92         /**
       
    93         * Frees all resources allocated from test methods.
       
    94         */
       
    95         void Delete();
       
    96 
       
    97         /**
       
    98         * Test methods are listed below. 
       
    99         */
       
   100         virtual TInt CreateTtsUtilityL();
       
   101         virtual TInt DestroyTtsUtilityL();
       
   102         
       
   103         virtual TInt StyleSettingsL();
       
   104         virtual TInt PlaybackPropertiesL();
       
   105         
       
   106         virtual TInt Play();
       
   107         virtual TInt Pause();
       
   108         virtual TInt Stop();
       
   109         
       
   110         virtual TInt OpenDesL       ( CStifItemParser& aItem );
       
   111         virtual TInt OpenDes8L      ( CStifItemParser& aItem );
       
   112         virtual TInt OpenFileL      ( CStifItemParser& aItem );
       
   113         virtual TInt OpenParsedTextL( CStifItemParser& aItem );
       
   114         
       
   115         virtual TInt OpenAndPlayDesL       ( CStifItemParser& aItem );
       
   116         virtual TInt OpenAndPlayDes8L      ( CStifItemParser& aItem );
       
   117         virtual TInt OpenAndPlayFileL      ( CStifItemParser& aItem );
       
   118         virtual TInt OpenAndPlayParsedTextL( CStifItemParser& aItem );
       
   119         
       
   120         virtual TInt SynthesisToFileL( CStifItemParser& aItem );
       
   121         
       
   122         virtual TInt CustomCommandsL();
       
   123         virtual TInt CustomCommands2L();
       
   124         
       
   125         /*
       
   126         * Other functions
       
   127         */ 
       
   128         TUid OpenPluginL();
       
   129 
       
   130     private:
       
   131         
       
   132         CTtsUtility*                iTtsUtility;
       
   133         CTtsParsedText*             iParsedText;
       
   134         TTtsSegment                 iSegment; 
       
   135         TTtsStyle                   iStyle;
       
   136         
       
   137         RFs                         iFs;
       
   138         RFile                       iFile;
       
   139 
       
   140     };
       
   141 
       
   142 #endif      // TTSUTILITYTEST_h
       
   143 
       
   144 // End of File