videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/inc/videoplaybackcontrolstest.h
changeset 0 96612d01cf9f
child 1 6711b85517b7
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2008 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 Harness for VideoPlaybackControls
       
    15 *
       
    16 */
       
    17 
       
    18 // Version : %version: ou1cpsw#8 %
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef VIDEOPLAYBACKCONTROLSTEST_H
       
    24 #define VIDEOPLAYBACKCONTROLSTEST_H
       
    25 
       
    26 //  INCLUDES
       
    27 #include <W32STD.H>
       
    28 #include <StifLogger.h>
       
    29 #include <StifTestModule.h>
       
    30 #include <TestScripterInternal.h>
       
    31 
       
    32 #include "mpxvpbc_stub.h"
       
    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 #ifdef __WINSCW__
       
    41 _LIT( KVideoPlaybackControlsTestLogPath, 
       
    42       "\\logs\\testframework\\VideoPlaybackViewControlsTest\\" );
       
    43 #else 
       
    44 _LIT( KVideoPlaybackControlsTestLogPath, 
       
    45       "e:\\logs\\testframework\\VideoPlaybackViewControlsTest\\" );
       
    46 #endif
       
    47 
       
    48 // Log file
       
    49 _LIT( KVideoPlaybackControlsTestLogFile, 
       
    50                     "VideoPlaybackControlsTest.txt" ); 
       
    51 _LIT( KVideoPlaybackControlsTestLogFileWithTitle, 
       
    52                     "VideoPlaybackControlsTest_[%S].txt" );
       
    53 
       
    54 // FORWARD DECLARATIONS
       
    55 class CMPXVideoPlaybackControlsController;
       
    56 
       
    57 // CLASS DECLARATION
       
    58 
       
    59 /**
       
    60 *  CVideoPlaybackControlsTest test class for STIF Test Framework TestScripter.
       
    61 *
       
    62 *  @lib ?library
       
    63 *  @since ?Series60_version
       
    64 */
       
    65 NONSHARABLE_CLASS(CVideoPlaybackControlsTest) : public CScriptBase
       
    66 {
       
    67 public:  // Constructors and destructor
       
    68 
       
    69     /**
       
    70      * Two-phased constructor.
       
    71      */
       
    72     static CVideoPlaybackControlsTest* NewL( CTestModuleIf& aTestModuleIf );
       
    73 
       
    74     /**
       
    75      * Destructor.
       
    76      */
       
    77     virtual ~CVideoPlaybackControlsTest();
       
    78 
       
    79 public: // New functions
       
    80 
       
    81     /**
       
    82      * ?member_description.
       
    83      * @param ?arg1 ?description
       
    84      * @return ?description
       
    85      */
       
    86     //?type ?member_function( ?type ?arg1 );
       
    87 
       
    88 public: // Functions from base classes
       
    89 
       
    90     /**
       
    91      * From CScriptBase Runs a script line.
       
    92      * @param aItem Script line containing method name and parameters
       
    93      * @return Symbian OS error code
       
    94      */
       
    95     virtual TInt RunMethodL( CStifItemParser& aItem );
       
    96 
       
    97 protected:  // New functions
       
    98 
       
    99     /**
       
   100      * ?member_description.
       
   101      * @param ?arg1 ?description
       
   102      * @return ?description
       
   103      */
       
   104     //?type ?member_function( ?type ?arg1 );
       
   105 
       
   106 protected:  // Functions from base classes
       
   107 
       
   108     /**
       
   109      * From ?base_class ?member_description
       
   110      */
       
   111     //?type ?member_function();
       
   112 
       
   113 private:
       
   114 
       
   115     /**
       
   116      * C++ default constructor.
       
   117      */
       
   118     CVideoPlaybackControlsTest( CTestModuleIf& aTestModuleIf );
       
   119 
       
   120     /**
       
   121      * By default Symbian 2nd phase constructor is private.
       
   122      */
       
   123     void ConstructL();
       
   124 
       
   125     // Prohibit copy constructor if not deriving from CBase.
       
   126     // ?classname( const ?classname& );
       
   127     // Prohibit assigment operator if not deriving from CBase.
       
   128     // ?classname& operator=( const ?classname& );
       
   129 
       
   130     /**
       
   131     * Frees all resources allocated from test methods.
       
   132     */
       
   133     void Delete();
       
   134 
       
   135     /**
       
   136     * Method used to log version of test class
       
   137     */
       
   138     void SendTestClassVersion();
       
   139 
       
   140     /**
       
   141     * Create controls
       
   142     * @return Symbian OS error code.
       
   143     */
       
   144     virtual TInt CreateControls( CStifItemParser&  aItem );
       
   145 
       
   146     /**
       
   147     * Delete controls
       
   148     * @return Symbian OS error code.
       
   149     */
       
   150     virtual TInt DeleteControls();
       
   151     /**
       
   152     * Test HandleEventL(EMPXControlCmdSetAspectRatio)
       
   153     * @return Symbian OS error code.
       
   154     */
       
   155     virtual TInt SetAspectRatio( CStifItemParser&  aItem );
       
   156 
       
   157     /**
       
   158     * Test HandleEventL(EMPXControlCmdSetVolume)
       
   159     * @return Symbian OS error code.
       
   160     */
       
   161     virtual TInt SetVolume( CStifItemParser&  aItem );
       
   162 
       
   163     /**
       
   164     * Test HandleEventL(EMPXControlCmdSetDuration)
       
   165     * @return Symbian OS error code.
       
   166     */
       
   167     virtual TInt SetDuration( CStifItemParser&  aItem );
       
   168 
       
   169     /**
       
   170     * Issue pointer event
       
   171     * @return Symbian OS error code.
       
   172     */
       
   173     virtual TInt PointerEvent( CStifItemParser&  aItem );
       
   174     
       
   175     /**
       
   176     * Issue pointer event
       
   177     * @return Symbian OS error code.
       
   178     */
       
   179     virtual TInt KeyEvent( CStifItemParser&  aItem );    
       
   180 
       
   181     /**
       
   182     * Check return value is expected value or not
       
   183     * @return Symbian OS error code.
       
   184     */
       
   185     virtual TInt ExpectedResult( CStifItemParser&  aItem );
       
   186 
       
   187     /**
       
   188     * Set state
       
   189     * @return Symbian OS error code.
       
   190     */
       
   191     virtual TInt SetState( CStifItemParser&  aItem );
       
   192 
       
   193     /**
       
   194     * Add default file details
       
   195     * @return Symbian OS error code.
       
   196     */
       
   197     virtual TInt AddDefaultFileDetails();
       
   198 
       
   199     /**
       
   200     * Add audio only file details
       
   201     * @return Symbian OS error code.
       
   202     */
       
   203     virtual TInt AddAudioOnlyFileDetails();
       
   204 
       
   205     /**
       
   206     * Create controller
       
   207     */
       
   208     void CreateController( const TDesC& aFileName, TInt aMode );
       
   209 
       
   210     void TapOnScreen( TPointerEvent::TType aType, TPoint aPosition );
       
   211 
       
   212     TInt ParseType( TDesC& aTypeName, TPointerEvent::TType& aType );
       
   213 
       
   214     TFileName GetFileNameAndPath( TDesC& aFileName );
       
   215 
       
   216     virtual TInt SetDownLoadSize(CStifItemParser&  aItem );
       
   217     
       
   218     virtual TInt SetDownLoadPostion(CStifItemParser&  aItem );
       
   219 
       
   220     virtual TInt UpdateDownloadPosition( CStifItemParser&  aItem );
       
   221 
       
   222     virtual TInt SetDownLoadPaused();
       
   223     
       
   224     virtual TInt ClearDownLoadPaused();
       
   225     
       
   226     virtual TInt TvOutConnected();
       
   227     
       
   228     virtual TInt TvOutDisconnected();
       
   229     
       
   230     virtual TInt HandleErrors();
       
   231 
       
   232     virtual TInt SoftkeyPressed( CStifItemParser&  aItem );
       
   233 
       
   234     virtual TInt ShowControls();
       
   235 
       
   236     virtual TInt ToggleVisibility();
       
   237 
       
   238     virtual TInt HandleBackgroundEvnet();
       
   239     
       
   240     virtual TInt ShowMediaDetailsViewer();
       
   241     
       
   242     virtual TInt CloseMediaDetailsViewer();
       
   243 
       
   244     //[TestMethods] - Do not remove
       
   245 
       
   246 public:     
       
   247     // Data
       
   248     // ?one_line_short_description_of_data
       
   249     //?data_declaration;
       
   250 
       
   251 protected:  
       
   252     // Data
       
   253     // ?one_line_short_description_of_data
       
   254     //?data_declaration;
       
   255 
       
   256 private:    
       
   257     // Data    
       
   258     // ?one_line_short_description_of_data
       
   259     //?data_declaration;
       
   260 
       
   261     // Reserved pointer for future extension
       
   262     //TAny* iReserved;
       
   263 
       
   264 public:     
       
   265     // Friend classes
       
   266     //?friend_class_declaration;
       
   267     CMPXVideoPlaybackControlsController* iController;    
       
   268 
       
   269 protected:  
       
   270     // Friend classes
       
   271     //?friend_class_declaration;
       
   272 
       
   273 private:    
       
   274     // Friend classes
       
   275     //?friend_class_declaration;
       
   276     CMPXVideoPlaybackContainer*          iContainer;
       
   277     RWsSession                           iWsSession;
       
   278 };
       
   279 
       
   280 #endif      // VIDEOPLAYBACKCONTROLSTEST_H
       
   281 
       
   282 // End of File