sl@0: // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef TESTVIDEOPLAYER_SUBTITLES_H sl@0: #define TESTVIDEOPLAYER_SUBTITLES_H sl@0: sl@0: #include "tsi_mmf_vclntavi_stepbase.h" sl@0: #include "u32hal.h" sl@0: sl@0: #define LOG_CALL(f) INFO_PRINTF1(_L(#f)); f sl@0: sl@0: class RTestVclnt2Subtitle; sl@0: sl@0: class CPlayTimer : public CTimer sl@0: { sl@0: public: sl@0: static CPlayTimer* NewL(RTestVclnt2Subtitle& aTestStep); sl@0: sl@0: protected: sl@0: void RunL(); sl@0: TInt RunError(TInt aError); sl@0: sl@0: private: sl@0: CPlayTimer(RTestVclnt2Subtitle& aTestStep); sl@0: sl@0: private: sl@0: RTestVclnt2Subtitle& iTestStep; sl@0: }; sl@0: sl@0: /** sl@0: * MM-MMF-VCLNTAVI-I-0600-CP sl@0: * MM-MMF-VCLNTAVI-I-0700-CP sl@0: */ sl@0: class RTestVclnt2Subtitle : public RTestVclnt2AviPlayerStep sl@0: { sl@0: public: sl@0: static RTestVclnt2Subtitle* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: sl@0: virtual void DoBeforePlaybackActionsL(); sl@0: virtual void DoDuringPlaybackActionsL(); sl@0: sl@0: void FailTest(TInt aError); sl@0: sl@0: protected: sl@0: RTestVclnt2Subtitle(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: sl@0: // from RTestStep sl@0: TVerdict DoTestStepPreambleL(); sl@0: TVerdict DoTestStepPostambleL(); sl@0: virtual TInt SetCacheSize(); sl@0: virtual TInt CheckCacheError(TInt aError); sl@0: virtual TInt RevertCacheSize(); sl@0: sl@0: void FsmL(TVclntTestPlayEvents aEventCode); sl@0: protected: sl@0: CPlayTimer* iPlayTimer; sl@0: }; sl@0: sl@0: /** sl@0: * MM-MMF-VCLNTAVI-I-0602-CP sl@0: */ sl@0: class RTestVclnt2SubtitleEnableDuringPlayback : public RTestVclnt2Subtitle sl@0: { sl@0: public: sl@0: static RTestVclnt2SubtitleEnableDuringPlayback* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: void DoBeforePlaybackActionsL(); sl@0: void DoDuringPlaybackActionsL(); sl@0: sl@0: private: sl@0: RTestVclnt2SubtitleEnableDuringPlayback(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: }; sl@0: sl@0: /** sl@0: * MM-MMF-VCLNTAVI-I-0603-CP sl@0: */ sl@0: class RTestVclnt2SubtitleDisableDuringPlayback : public RTestVclnt2Subtitle sl@0: { sl@0: public: sl@0: static RTestVclnt2SubtitleDisableDuringPlayback* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: void DoDuringPlaybackActionsL(); sl@0: sl@0: private: sl@0: RTestVclnt2SubtitleDisableDuringPlayback(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: }; sl@0: sl@0: /** sl@0: * MM-MMF-VCLNTAVI-I-0605-CP sl@0: */ sl@0: class RTestVclnt2SubtitleDisableTwice : public RTestVclnt2Subtitle sl@0: { sl@0: public: sl@0: static RTestVclnt2SubtitleDisableTwice* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: void DoBeforePlaybackActionsL(); sl@0: void DoDuringPlaybackActionsL(); sl@0: sl@0: private: sl@0: RTestVclnt2SubtitleDisableTwice(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: }; sl@0: sl@0: /** sl@0: * MM-MMF-VCLNTAVI-I-0606-CP sl@0: */ sl@0: class RTestVclnt2SubtitleWindowClipBefore : public RTestVclnt2Subtitle sl@0: { sl@0: public: sl@0: static RTestVclnt2SubtitleWindowClipBefore* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: void DoBeforePlaybackActionsL(); sl@0: sl@0: private: sl@0: RTestVclnt2SubtitleWindowClipBefore(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: }; sl@0: sl@0: /** sl@0: * MM-MMF-VCLNTAVI-I-0607-CP sl@0: */ sl@0: class RTestVclnt2SubtitleWindowClipDuring : public RTestVclnt2Subtitle sl@0: { sl@0: public: sl@0: static RTestVclnt2SubtitleWindowClipDuring* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: void DoDuringPlaybackActionsL(); sl@0: sl@0: private: sl@0: RTestVclnt2SubtitleWindowClipDuring(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: }; sl@0: sl@0: /** sl@0: * MM-MMF-VCLNTAVI-I-0608-CP sl@0: */ sl@0: class RTestVclnt2SubtitleRotateBefore : public RTestVclnt2Subtitle sl@0: { sl@0: public: sl@0: static RTestVclnt2SubtitleRotateBefore* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: void DoBeforePlaybackActionsL(); sl@0: sl@0: private: sl@0: RTestVclnt2SubtitleRotateBefore(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: }; sl@0: sl@0: /** sl@0: * MM-MMF-VCLNTAVI-I-0609-CP sl@0: */ sl@0: class RTestVclnt2SubtitleRotateDuring : public RTestVclnt2Subtitle sl@0: { sl@0: public: sl@0: static RTestVclnt2SubtitleRotateDuring* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: void DoDuringPlaybackActionsL(); sl@0: sl@0: private: sl@0: RTestVclnt2SubtitleRotateDuring(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: }; sl@0: sl@0: /** sl@0: * MM-MMF-VCLNTAVI-I-0613-CP sl@0: */ sl@0: class RTestVclnt2SubtitleRemoveDisplayDuring : public RTestVclnt2Subtitle sl@0: { sl@0: public: sl@0: static RTestVclnt2SubtitleRemoveDisplayDuring* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: void DoDuringPlaybackActionsL(); sl@0: sl@0: private: sl@0: RTestVclnt2SubtitleRemoveDisplayDuring(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: }; sl@0: sl@0: /** sl@0: * MM-MMF-VCLNTAVI-I-0701-CP sl@0: */ sl@0: class RTestVclnt2SubtitleNotAvailable : public RTestVclnt2Subtitle sl@0: { sl@0: public: sl@0: static RTestVclnt2SubtitleNotAvailable* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: void DoBeforePlaybackActionsL(); sl@0: sl@0: private: sl@0: RTestVclnt2SubtitleNotAvailable(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: }; sl@0: sl@0: /** sl@0: * MM-MMF-VCLNTAVI-I-0705-CP sl@0: */ sl@0: class RTestVclnt2SubtitleLanguage : public RTestVclnt2Subtitle sl@0: { sl@0: public: sl@0: static RTestVclnt2SubtitleLanguage* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: void DoBeforePlaybackActionsL(); sl@0: sl@0: private: sl@0: RTestVclnt2SubtitleLanguage(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: }; sl@0: sl@0: /** sl@0: * MM-MMF-VCLNTAVI-I-0610-CP sl@0: */ sl@0: class RTestVclnt2SubtitleRedraw: public RTestVclnt2Subtitle sl@0: { sl@0: public: sl@0: static RTestVclnt2SubtitleRedraw* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError, TBool aEnableSubtitles=ETrue); sl@0: void DoBeforePlaybackActionsL(); sl@0: void DoDuringPlaybackActionsL(); sl@0: sl@0: private: sl@0: RTestVclnt2SubtitleRedraw(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError, TBool aEnableSubtitles); sl@0: sl@0: private: sl@0: TBool iEnableSubtitles; sl@0: }; sl@0: sl@0: /** sl@0: * MM-MMF-VCLNTAVI-I-0611-CP sl@0: */ sl@0: class RTestVclnt2SubtitleRotateClipRedraw: public RTestVclnt2Subtitle sl@0: { sl@0: public: sl@0: static RTestVclnt2SubtitleRotateClipRedraw* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: void DoBeforePlaybackActionsL(); sl@0: void DoDuringPlaybackActionsL(); sl@0: sl@0: private: sl@0: RTestVclnt2SubtitleRotateClipRedraw(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: }; sl@0: sl@0: /** sl@0: * MM-MMF-VCLNTAVI-I-0708-CP sl@0: */ sl@0: class RTestVclnt2SubtitleMultipleWindows: public RTestVclnt2Subtitle sl@0: { sl@0: public: sl@0: static RTestVclnt2SubtitleMultipleWindows* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: void DoBeforePlaybackActionsL(); sl@0: sl@0: protected: sl@0: // from RTestStep sl@0: TVerdict DoTestStepPreambleL(); sl@0: TVerdict DoTestStepPostambleL(); sl@0: sl@0: private: sl@0: RTestVclnt2SubtitleMultipleWindows(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: sl@0: private: sl@0: RWindow* iSecondaryWin; sl@0: }; sl@0: sl@0: /** sl@0: * MM-MMF-VCLNTAVI-I-0707-CP sl@0: */ sl@0: class RTestVclnt2SubtitleEnableTwice: public RTestVclnt2Subtitle sl@0: { sl@0: public: sl@0: static RTestVclnt2SubtitleEnableTwice* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: void DoBeforePlaybackActionsL(); sl@0: sl@0: private: sl@0: RTestVclnt2SubtitleEnableTwice(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: }; sl@0: sl@0: /** sl@0: * MM-MMF-VCLNTAVI-I-0612-CP sl@0: */ sl@0: class RTestVclnt2SubtitleEnableDisableStress: public RTestVclnt2Subtitle sl@0: { sl@0: public: sl@0: static RTestVclnt2SubtitleEnableDisableStress* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: void DoBeforePlaybackActionsL(); sl@0: void DoDuringPlaybackActionsL(); sl@0: sl@0: private: sl@0: RTestVclnt2SubtitleEnableDisableStress(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: sl@0: private: sl@0: TBool iDisableNext; sl@0: TBool iExpectAvailable; sl@0: }; sl@0: sl@0: /** sl@0: * MM-MMF-VCLNTAVI-I-0706-CP sl@0: */ sl@0: class RTestVclnt2SubtitleAlloc: public RTestVclnt2Subtitle sl@0: { sl@0: public: sl@0: static RTestVclnt2SubtitleAlloc* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: sl@0: TVerdict DoTestStepPreambleL(); sl@0: TVerdict DoTestStepPostambleL(); sl@0: TVerdict DoTestStepL(); sl@0: sl@0: private: sl@0: RTestVclnt2SubtitleAlloc(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); sl@0: TVerdict PerformTestL(); sl@0: }; sl@0: sl@0: #endif //TESTVIDEOPLAYER_SUBTITLES_H