os/mm/mmlibs/mmfw/tsrc/mmfintegrationtest/vclntavi/inc/testvideoplayer_secdisp.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // Header file: Video Player Tests.
    15 // 
    16 //
    17 
    18 #ifndef TESTVIDEOPLAYER_SECDISP_H
    19 #define TESTVIDEOPLAYER_SECDISP_H
    20 
    21 #include "tsi_mmf_vclntavi_stepbase.h"
    22 
    23 class CTestVclntAviPlayTimer;
    24 
    25 /**
    26  *
    27  * RTestVclntSetScrIdAndPlayBase
    28  *
    29  */
    30 class RTestVclntSetScrIdAndPlayBase : public RTestVclntAviPlayerStep
    31     {
    32 public:
    33     RTestVclntSetScrIdAndPlayBase(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TInt aScreenNumber);
    34     
    35     virtual void FsmL(TVclntTestPlayEvents aEventCode) = 0;
    36     // timer handling
    37     virtual void FinishedL();
    38     // Just to handle the behaviour of ARMV5
    39     virtual void MvpuoOpenComplete(TInt aError);
    40 protected:
    41     TInt iScreenNumber; // Stores screen number
    42     TInt iCurrentScreenNumber; // Stores currently active screen number
    43     };
    44 
    45 /**
    46  * Set the screen id and Play the video file.
    47  * Set the invalid screen id and Play the video file.
    48  *
    49  * RTestVclntSetScrIdAndPlayAviFile
    50  * MM-MMF-VCLNTAVI-I-0201-CP, MM-MMF-VCLNTAVI-I-0251-CP
    51  *
    52  */
    53 class RTestVclntSetScrIdAndPlayAviFile : public RTestVclntSetScrIdAndPlayBase
    54     {
    55 public:
    56     static RTestVclntSetScrIdAndPlayAviFile* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TInt aScreenNumber);
    57     virtual TVerdict DoTestStepL();
    58     virtual void FsmL(TVclntTestPlayEvents aEventCode);
    59 private:
    60     RTestVclntSetScrIdAndPlayAviFile(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TInt aScreenNumber);
    61     };
    62 
    63 
    64 /**
    65  * Set the screen id and Play video descriptor.
    66  *
    67  * RTestVclntSetScrIdAndPlayAviDes
    68  * MM-MMF-VCLNTAVI-I-0202-CP
    69  *
    70  */
    71 class RTestVclntSetScrIdAndPlayAviDes : public RTestVclntSetScrIdAndPlayBase
    72     {
    73 public:
    74     static RTestVclntSetScrIdAndPlayAviDes* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TInt aScreenNumber);
    75     virtual TVerdict DoTestStepL();
    76     virtual TVerdict DoTestStepPreambleL();
    77     virtual TVerdict DoTestStepPostambleL();
    78     virtual void FsmL(TVclntTestPlayEvents aEventCode);
    79 protected:
    80     HBufC8* iVideo;                        // Buffer for holding video descriptor data
    81 private:
    82     RTestVclntSetScrIdAndPlayAviDes(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TInt aScreenNumber) ;    
    83     } ;
    84 
    85 /**
    86  * Set the screen id and Play video from URL.
    87  *
    88  * RTestVclntSetScrIdAndPlayAviUrl
    89  * MM-MMF-VCLNTAVI-I-0203-CP
    90  *
    91  */
    92  
    93 class RTestVclntSetScrIdAndPlayAviUrl : public RTestVclntSetScrIdAndPlayBase
    94     {
    95 public:
    96     static RTestVclntSetScrIdAndPlayAviUrl* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TInt aScreenNumber);
    97     virtual TVerdict DoTestStepL();
    98     virtual void FsmL(TVclntTestPlayEvents aEventCode);
    99 private:
   100     RTestVclntSetScrIdAndPlayAviUrl(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TInt aScreenNumber);    
   101     };
   102     
   103 /**
   104  * Set the screen id and play video file, Stop.Again set the screen id and play.
   105  * Set the screen id after stop and play again.
   106  *
   107  * RTestVclntSetScrIdAndPlayStopAviFile
   108  * MM-MMF-VCLNTAVI-I-0204-CP, MM-MMF-VCLNTAVI-I-0206-CP
   109  *
   110  */
   111 class RTestVclntSetScrIdAndPlayStopAviFile : public RTestVclntSetScrIdAndPlayBase
   112     {
   113 public:
   114     static RTestVclntSetScrIdAndPlayStopAviFile* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TInt aScreenNumber, TInt aScreenNumber2);
   115     virtual TVerdict DoTestStepL();
   116     virtual void FsmL(TVclntTestPlayEvents aEventCode);
   117     
   118     // timer handling
   119     void FinishedL();
   120 protected:
   121     CTestVclntAviPlayTimer* iPlayTimer;
   122     TBool iRestarted;
   123     TInt iScreenNumber2; // Stores screen number
   124     TInt iCountNumber;
   125     TFileName iFilename2;
   126 private:
   127     RTestVclntSetScrIdAndPlayStopAviFile(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TInt aScreenNumber, TInt aScreenNumber2);    
   128     };
   129     
   130 /**
   131  * Set the screen id and play video file, Pause.Again set the screen id and play.
   132  * Set the screen ID after Pause and play again.
   133  *
   134  * RTestVclntSetScrIdAndPlayPauseAviFile
   135  * MM-MMF-VCLNTAVI-I-0205-CP, MM-MMF-VCLNTAVI-I-0207-CP
   136  *
   137  */
   138 class RTestVclntSetScrIdAndPlayPauseAviFile : public RTestVclntSetScrIdAndPlayBase
   139     {
   140 public:
   141     static RTestVclntSetScrIdAndPlayPauseAviFile* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TInt aScreenNumber, TInt aScreenNumber2);
   142     virtual TVerdict DoTestStepL();
   143     virtual void FsmL(TVclntTestPlayEvents aEventCode);
   144     
   145     // timer handling
   146     void FinishedL();
   147 protected:
   148     CTestVclntAviPlayTimer* iPlayTimer;
   149     TBool iRestarted;
   150     TInt iScreenNumber2; // Stores screen number
   151     TInt iCountNumber;
   152     TFileName iFilename2;
   153 private:
   154     RTestVclntSetScrIdAndPlayPauseAviFile(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TInt aScreenNumber, TInt aScreenNumber2);    
   155     };
   156     
   157 /**
   158  * Set screen ID after play complete first time and before open the second time.
   159  *
   160  * RTestVclntSetScrIdAfterPlayAndPlayAviFile
   161  * MM-MMF-VCLNTAVI-I-0208-CP
   162  *
   163  */
   164 class RTestVclntSetScrIdAfterPlayAndPlayAviFile : public RTestVclntSetScrIdAndPlayBase
   165     {
   166 public:
   167     static RTestVclntSetScrIdAfterPlayAndPlayAviFile* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TInt aScreenNumber);
   168     virtual TVerdict DoTestStepL();
   169     virtual void FsmL(TVclntTestPlayEvents aEventCode);
   170 protected:
   171     TInt iCountNumber;
   172 private:
   173     RTestVclntSetScrIdAfterPlayAndPlayAviFile(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TInt aScreenNumber);    
   174     };
   175     
   176 /**
   177  * Set screen ID after Open but before play
   178  *
   179  * RTestVclntSetScrIdAfterOpenAndPlayAviFile
   180  * MM-MMF-VCLNTAVI-I-0209-CP
   181  *
   182  */
   183 class RTestVclntSetScrIdAfterOpenAndPlayAviFile : public RTestVclntSetScrIdAndPlayBase
   184     {
   185 public:
   186     static RTestVclntSetScrIdAfterOpenAndPlayAviFile* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TInt aScreenNumber);
   187     virtual TVerdict DoTestStepL();
   188     virtual void FsmL(TVclntTestPlayEvents aEventCode);
   189 protected:
   190     TInt iCountNumber;
   191 private:
   192     RTestVclntSetScrIdAfterOpenAndPlayAviFile(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TInt aScreenNumber);    
   193     };
   194     
   195 /**
   196  * Set screen ID during Play
   197  *
   198  * RTestVclntSetScrIdDuringPlayAndPlayAviFile
   199  * MM-MMF-VCLNTAVI-I-0211-CP
   200  *
   201  */
   202 class RTestVclntSetScrIdDuringPlayAndPlayAviFile : public RTestVclntSetScrIdAndPlayBase
   203     {
   204 public:
   205     static RTestVclntSetScrIdDuringPlayAndPlayAviFile* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TInt aScreenNumber);
   206     virtual TVerdict DoTestStepL();
   207     virtual void FsmL(TVclntTestPlayEvents aEventCode);
   208 protected:
   209     TInt iCountNumber;
   210 private:
   211     RTestVclntSetScrIdDuringPlayAndPlayAviFile(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TInt aScreenNumber);    
   212     };
   213     
   214 /**
   215  * 
   216  * CTestVclntAviPlayTimer 
   217  * - Timer for those test classes requiring timed stop
   218  *
   219  */
   220 class CTestVclntAviPlayTimer : public CTimer
   221     {
   222 public:
   223     static CTestVclntAviPlayTimer* NewL(RTestVclntSetScrIdAndPlayBase* aParent, TTimeIntervalMicroSeconds32 aWaitTime);
   224     void Start();
   225 protected:
   226     TInt RunError(TInt aError);
   227     void RunL();
   228 private:
   229     CTestVclntAviPlayTimer(RTestVclntSetScrIdAndPlayBase* aParent, TTimeIntervalMicroSeconds32 aWaitTime);
   230     RTestVclntSetScrIdAndPlayBase* iParent;
   231     TTimeIntervalMicroSeconds32 iWaitTime;
   232     };                                              
   233 
   234 #endif //TESTVIDEOPLAYER_SECDISP_H