mmmw_plat/thumbnail_engine_api/tsrc/inc/tnetest.h
changeset 53 eabc8c503852
equal deleted inserted replaced
48:a493a607b5bf 53:eabc8c503852
       
     1 /*
       
     2 * Copyright (c) 2010 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:  API test automation for thumbnail engine
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef TNETEST_H
       
    20 #define TNETEST_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <e32std.h>
       
    25 #include <e32debug.h>
       
    26 #include <eikapp.h>
       
    27 #include <eikdoc.h>
       
    28 #include <w32std.H>
       
    29 #include <StifItemParser.h>
       
    30 #include <StifLogger.h>//logging in STIF
       
    31 #include <TestScripterInternal.h>
       
    32 #include <StifTestModule.h>
       
    33 #include <Stiftestinterface.h>
       
    34 #include <tnevideoclipinfo.h> // Thumbnail Main API
       
    35 // #include "TimeoutController.h"
       
    36 
       
    37 
       
    38 
       
    39 
       
    40 
       
    41 const TInt KErrTimeoutController = -2007;		// Unexpected notification
       
    42 _LIT(KTagId, " ");
       
    43 // FORWARD DECLARATIONS
       
    44 class CTneTestClass;
       
    45 
       
    46 
       
    47 // CLASS DECLARATION
       
    48 
       
    49 /**
       
    50 *  CTneTestClass test class for STIF Test Framework TestScripter.
       
    51 *
       
    52 *  @lib RadioUtilityTestClass.lib
       
    53 *  @since Series60_3_2
       
    54 */
       
    55 NONSHARABLE_CLASS(CTneTestClass) : public CScriptBase, 
       
    56 										public MTNEVideoClipInfoObserver,
       
    57                     public MTNEVideoClipThumbObserver
       
    58                    // public MTimeoutObserver   later
       
    59     {
       
    60     public:  // Constructors and destructor
       
    61 
       
    62      
       
    63         static CTneTestClass* NewL( CTestModuleIf& aTestModuleIf );
       
    64         
       
    65        
       
    66        
       
    67 
       
    68         /**
       
    69         * Destructor.
       
    70         */
       
    71         virtual ~CTneTestClass();
       
    72 
       
    73 
       
    74     
       
    75 
       
    76     public: // Functions from base classes
       
    77 
       
    78         /**
       
    79         * From CScriptBase Runs a script line.
       
    80         * @since 3.2
       
    81         * @param aItem Script line containing method name and parameters
       
    82         * @return Symbian OS error code
       
    83         */
       
    84         virtual TInt RunMethodL( CStifItemParser& aItem );
       
    85 
       
    86 	    
       
    87       
       
    88       
       
    89       // From MTimeoutObserver
       
    90 	    /**
       
    91 	    * @since 3.2
       
    92 	    * @param none
       
    93 	    * Review if all the expected events have ocurred once the time is over
       
    94 	    */
       
    95 	   // void HandleTimeout(TInt error);
       
    96 
       
    97 	    
       
    98         
       
    99    
       
   100 
       
   101     private:
       
   102 
       
   103         /**
       
   104         * C++ default constructor.
       
   105         */
       
   106         CTneTestClass( CTestModuleIf& aTestModuleIf );
       
   107 
       
   108         /**
       
   109         * By default Symbian 2nd phase constructor is private.
       
   110         */
       
   111         void ConstructL();
       
   112         
       
   113        TInt	FindFileName(CStifItemParser& aItem) ;
       
   114 
       
   115         // Prohibit copy constructor if not deriving from CBase.
       
   116         // Prohibit assigment operator if not deriving from CBase.
       
   117 
       
   118         //Timeout function
       
   119         //later
       
   120        // TInt SetTimeout( CStifItemParser& aItem );
       
   121 
       
   122 //logic to open TNE instance 
       
   123 
       
   124 // NewL File name 
       
   125 		  TInt TNENewLFileNameL(CStifItemParser& aItem);
       
   126 // Newl File handle		  
       
   127 		  TInt TNENewLFileHandleL(CStifItemParser& aItem);
       
   128 // NewLC File name      
       
   129       TInt TNENewLCFileNameL(CStifItemParser& aItem);
       
   130 // NewLC File handle        
       
   131       TInt TNENewLCFileHandleL(CStifItemParser& aItem);
       
   132 
       
   133       // Thumbnail Specific from TneVideoClipInfo
       
   134       
       
   135       TInt CTneTestClass::GetThumb( CStifItemParser& aItem) ;
       
   136 	   
       
   137 	    // from TNEVideoClipInfoObserver
       
   138 	    
       
   139 	     void NotifyVideoClipInfoReady( CTNEVideoClipInfo& aInfo, TInt aError );
       
   140 	    
       
   141 	    void NotifyVideoClipThumbCompleted( CTNEVideoClipInfo& aInfo, TInt aError, CFbsBitmap* aThumb );
       
   142 /*
       
   143 		TInt StartMonitor( CStifItemParser& aItem );
       
   144 		TInt StopMonitor( CStifItemParser& aItem );
       
   145         TInt IsRadioOn( CStifItemParser& aItem );
       
   146 		TInt CreateFactory( CStifItemParser& aItem );
       
   147 		TInt CreateUtility( CStifItemParser& aItem );
       
   148 		
       
   149 	*/
       
   150 
       
   151 
       
   152     
       
   153 
       
   154     private:    // Data
       
   155         
       
   156     // reference to TestModuleIf
       
   157     CTestModuleIf& iTestModuleIf;
       
   158     //CStifLogger* iLog;
       
   159     
       
   160     // Active object with a timer to timeout the test case   later
       
   161   //  CSimpleTimeout * iTimeoutController;
       
   162 
       
   163     // Indicates if the test case use a normal exit reason
       
   164     TBool iNormalExitReason;
       
   165 
       
   166    //Thumbnail Engine
       
   167         CTNEVideoClipInfo* iTNEVideoClipInfo;
       
   168     /* I think we can depend on user input for this 
       
   169     
       
   170         TInt iThumbnailFrameIndex;
       
   171         TSize iThumbnailSize;
       
   172         TDisplayMode iDisplayMode;
       
   173         TBool iEnhance;
       
   174     */
       
   175        TFileName iFileName;
       
   176       
       
   177        RWsSession 			       iWS;
       
   178        RFs                    iFs;       
       
   179         
       
   180 
       
   181   
       
   182     };
       
   183 
       
   184 #endif
       
   185 
       
   186 // End of File