sl@0: // Copyright (c) 2002-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 __TSU_MMF_SRSSNK_H__ sl@0: #define __TSU_MMF_SRSSNK_H__ sl@0: sl@0: #include sl@0: sl@0: #include sl@0: #include sl@0: sl@0: #include "CmmfTestControllerUIDs.hrh" sl@0: #include sl@0: #include "TS_Codes.h" sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include "../../../../../mmplugins/mmfwplugins/src/Plugin/Format/MmfWAVFormat/mmfwavformat.h" sl@0: sl@0: const TInt KTestBufferSize = 1032; // 1024 + 8 sl@0: const TInt KTestDataSize = 51200; // 50K sl@0: const TInt KTestOverDataSize = KTestDataSize + 20; sl@0: sl@0: const TInt KTestReadSize = KTestBufferSize/2; sl@0: const TInt KTestOverReadSize = KTestBufferSize + 10; sl@0: sl@0: const TInt KTestWriteSize = KTestBufferSize/2; sl@0: const TInt KTestOverWriteSize = KTestBufferSize + 10; sl@0: sl@0: class CTestSuite; sl@0: class CTestSuite_MMF_SRSSNK; sl@0: sl@0: enum TSourceType sl@0: { sl@0: ESourceTypeDes, sl@0: ESourceTypeFile, sl@0: ESourceTypeFileHandle, sl@0: ESourceTypeAudio sl@0: }; sl@0: sl@0: enum TSinkType sl@0: { sl@0: ESinkTypeFile, sl@0: ESinkTypeFileHandle sl@0: }; sl@0: sl@0: sl@0: class TThreadData sl@0: { sl@0: public: sl@0: TThreadData() sl@0: : iFileSize(-1), iErr(KErrNone) sl@0: { } sl@0: sl@0: public: sl@0: CMMFFile* iFilePtr; sl@0: MAsyncEventHandler *iEventHandler; sl@0: TInt iFileSize; sl@0: TInt iErr; sl@0: }; sl@0: sl@0: const TUid KTestDummyUid = { -1 }; sl@0: class CMMFTestBuffer : public CMMFBuffer sl@0: { sl@0: public: sl@0: CMMFTestBuffer() sl@0: : CMMFBuffer(KTestDummyUid) sl@0: { } sl@0: sl@0: TUint BufferSize() const sl@0: { return 0; } sl@0: }; sl@0: sl@0: sl@0: MDataSink* CreateFileSinkL(TSinkType aSinkType, RFs& aFs, const TDesC& aFileName); sl@0: MDataSource* CreateFileSourceL(TSourceType aSourceType, RFs& aFs, const TDesC& aFileName); sl@0: MDataSource* CreateFileHandleSourceL(RFs& aFs, const TDesC& aFileName); sl@0: sl@0: class CMMFDummySource : public CBase, public MDataSource, public MAsyncEventHandler sl@0: { sl@0: public: sl@0: CMMFDummySource(); sl@0: sl@0: void SetExpectedEmptyCount(TInt aExpectedEmptyCount) sl@0: { iExpectedEmptyCount = aExpectedEmptyCount; } sl@0: sl@0: TBool BufferEmptiedOk() sl@0: { sl@0: TBool bufferEmptiedOk = iBufferEmptiedOk; sl@0: if (bufferEmptiedOk) sl@0: ResetBufferEmptiedOk(); sl@0: sl@0: return bufferEmptiedOk; sl@0: } sl@0: sl@0: void ResetBufferEmptiedOk() sl@0: { iBufferEmptiedOk = EFalse ; iEmptyCount = 0 ; iErrorCount = 0 ; iExpectedEmptyCount = 1; } sl@0: sl@0: // From MDataSource sl@0: TFourCC SourceDataTypeCode(TMediaId aMediaId); sl@0: void FillBufferL(CMMFBuffer* aBuffer, MDataSink* aConsumer, TMediaId aMediaId); sl@0: void BufferEmptiedL(CMMFBuffer* aBuffer); sl@0: TBool CanCreateSourceBuffer(); sl@0: CMMFBuffer* CreateSourceBufferL(TMediaId aMediaId, TBool &aReference); sl@0: sl@0: // MAsyncEventHandler sl@0: TInt SendEventToClient(const TMMFEvent& aEvent); sl@0: sl@0: TInt Error() sl@0: { ResetBufferEmptiedOk() ; return iError; } sl@0: sl@0: TInt ErrorCount() sl@0: { return iErrorCount; } sl@0: sl@0: void SetFillBuffer() sl@0: { iFillBuffer = ETrue; } sl@0: sl@0: void SetActiveScheduler() sl@0: { iActiveScheduler = CActiveScheduler::Current(); } sl@0: sl@0: void ClearActiveScheduler() sl@0: { iActiveScheduler = NULL; } sl@0: sl@0: CMMFBuffer* MmfBuffer() sl@0: { return iBuffer; } sl@0: sl@0: protected: sl@0: void ConstructSourceL(const TDesC8& aInitData); sl@0: sl@0: private: sl@0: TFourCC iSourceDataTypeCode; sl@0: TBool iBufferEmptiedOk; sl@0: sl@0: TInt iEmptyCount; sl@0: TInt iExpectedEmptyCount; sl@0: sl@0: CActiveScheduler *iActiveScheduler; sl@0: TInt iError; sl@0: TInt iErrorCount; sl@0: sl@0: TBool iFillBuffer; sl@0: sl@0: CMMFBuffer* iBuffer; // buffer returned in BufferEmptiedL callback sl@0: }; sl@0: sl@0: sl@0: class CMMFDummySink : public CBase, public MDataSink, public MAsyncEventHandler sl@0: { sl@0: public: sl@0: CMMFDummySink(); sl@0: sl@0: void SetExpectedFillCount(TInt aExpectedFillCount) sl@0: { iExpectedFillCount = aExpectedFillCount; } sl@0: sl@0: TBool BufferFilledOk() sl@0: { sl@0: TBool bufferFilledOk = iBufferFilledOk; sl@0: if (bufferFilledOk) sl@0: ResetBufferFilledOk(); sl@0: sl@0: return bufferFilledOk; sl@0: } sl@0: sl@0: void ResetBufferFilledOk() sl@0: { iBufferFilledOk = EFalse ; iFillCount = 0 ; iErrorCount = 0 ; iExpectedFillCount = 1; } sl@0: sl@0: void BufferFilledError(); sl@0: sl@0: // From MDataSink sl@0: TFourCC SinkDataTypeCode(TMediaId aMediaId); sl@0: void EmptyBufferL(CMMFBuffer* aBuffer, MDataSource* aSupplier, TMediaId aMediaId); sl@0: void BufferFilledL(CMMFBuffer* aBuffer); sl@0: TBool CanCreateSinkBuffer(); sl@0: CMMFBuffer* CreateSinkBufferL(TMediaId aMediaId, TBool &aReference); sl@0: sl@0: // MAsyncEventHandler sl@0: TInt SendEventToClient(const TMMFEvent& aEvent); sl@0: sl@0: TInt Error() sl@0: { ResetBufferFilledOk() ; return iError; } sl@0: sl@0: TInt ErrorCount() sl@0: { return iErrorCount; } sl@0: sl@0: CMMFBuffer* MmfBuffer() sl@0: { return iBuffer; } sl@0: sl@0: protected: sl@0: void ConstructSinkL(const TDesC8& aInitData); sl@0: sl@0: private: sl@0: TFourCC iSinkDataTypeCode; sl@0: TBool iBufferFilledOk; sl@0: sl@0: TInt iFillCount; sl@0: TInt iExpectedFillCount; sl@0: sl@0: CActiveScheduler *iActiveScheduler; sl@0: TInt iError; sl@0: TInt iErrorCount; sl@0: sl@0: CMMFBuffer* iBuffer; // buffer returned in BufferFilledL callback sl@0: }; sl@0: sl@0: class TTestStep sl@0: { sl@0: public: sl@0: TTestStep() sl@0: : iSource(NULL), iSink(NULL) sl@0: { } sl@0: sl@0: TTestStep(MDataSource* aSource) sl@0: : iSource(aSource), iSink(NULL) sl@0: { } sl@0: sl@0: TTestStep(MDataSink* aSink) sl@0: : iSource(NULL), iSink(aSink) sl@0: { } sl@0: sl@0: TTestStep(MDataSource* aSource, MDataSink* aSink) sl@0: : iSource(aSource), iSink(aSink) sl@0: { } sl@0: sl@0: virtual TVerdict DoTestStepL() = 0; sl@0: sl@0: virtual void DoTestPreambleL(); sl@0: virtual TVerdict DoTestPostambleL(TBool aCheck); sl@0: virtual TVerdict DoNegativeTestPostambleL(); sl@0: virtual MDataSource* CreateSourceL(TSourceType aSourceType, HBufC8* aDes); sl@0: sl@0: public: sl@0: MDataSource* iSource; sl@0: MDataSink* iSink; sl@0: }; sl@0: sl@0: sl@0: class TFileTestStep : public TTestStep sl@0: { sl@0: public: sl@0: TFileTestStep() sl@0: : iFileFailureExpected(EFalse) sl@0: { } sl@0: sl@0: TFileTestStep(MDataSource* aSource) sl@0: : TTestStep(aSource), iFileFailureExpected(EFalse) sl@0: { } sl@0: sl@0: TFileTestStep(MDataSink* aSink) sl@0: : TTestStep(aSink), iFileFailureExpected(EFalse) sl@0: { } sl@0: sl@0: TFileTestStep(MDataSource* aSource, MDataSink* aSink) sl@0: : TTestStep(aSource, aSink), iFileFailureExpected(EFalse) sl@0: { } sl@0: sl@0: TVerdict DoTestPostambleL(TBool aCheck); sl@0: sl@0: public: sl@0: TBool iFileFailureExpected; sl@0: }; sl@0: sl@0: class TReadBufferTestStep : public TFileTestStep sl@0: { sl@0: public: sl@0: TReadBufferTestStep(MDataSource* aSource, CMMFBuffer* aBuffer, TInt aPosition, const TDes8& aSourceDes) sl@0: : TFileTestStep(aSource), iBuffer(aBuffer), iPosition(aPosition), iSourceDes(aSourceDes), iAsynchronousRead(EFalse) sl@0: { InitRandomNumberGenerator(); } sl@0: sl@0: TReadBufferTestStep(MDataSource* aSource, CMMFBuffer* aBuffer, TInt aPosition, MDataSink* aSink, const TDes8& aSourceDes) sl@0: : TFileTestStep(aSource, aSink), iBuffer(aBuffer), iPosition(aPosition), iSourceDes(aSourceDes), iAsynchronousRead(EFalse) sl@0: { InitRandomNumberGenerator(); } sl@0: sl@0: void InitRandomNumberGenerator() sl@0: { sl@0: TTime seedTime; sl@0: seedTime.UniversalTime(); sl@0: iSeed = seedTime.Int64(); sl@0: } sl@0: sl@0: void SetPosition(TInt aPosition) sl@0: { iPosition = aPosition; } sl@0: sl@0: void SetAsynchronousRead(TBool aAsynchronousRead) sl@0: { iAsynchronousRead = aAsynchronousRead; } sl@0: sl@0: void RandomiseBuffer(); sl@0: TInt CheckBuffer(); sl@0: sl@0: public: sl@0: CMMFBuffer* iBuffer; sl@0: TInt64 iSeed; sl@0: sl@0: TInt iPosition; sl@0: const TDes8& iSourceDes; sl@0: sl@0: TBool iAsynchronousRead; sl@0: }; sl@0: sl@0: class TWriteBufferTestStep : public TFileTestStep sl@0: { sl@0: public: sl@0: TWriteBufferTestStep(MDataSink* aSink, CMMFBuffer* aBuffer) sl@0: : TFileTestStep(aSink), iBuffer(aBuffer), iPosition(0), iAsynchronousWrite(EFalse) sl@0: { InitRandomNumberGenerator(); } sl@0: sl@0: TWriteBufferTestStep(MDataSink* aSink, CMMFBuffer* aBuffer, TInt aPosition) sl@0: : TFileTestStep(aSink), iBuffer(aBuffer), iPosition(aPosition), iAsynchronousWrite(EFalse) sl@0: { InitRandomNumberGenerator(); } sl@0: sl@0: TWriteBufferTestStep(MDataSink* aSink, CMMFBuffer* aBuffer, MDataSource* aSource) sl@0: : TFileTestStep(aSource, aSink), iBuffer(aBuffer), iPosition(0), iAsynchronousWrite(EFalse) sl@0: { InitRandomNumberGenerator(); } sl@0: sl@0: TWriteBufferTestStep(MDataSink* aSink, CMMFBuffer* aBuffer, TInt aPosition, MDataSource* aSource) sl@0: : TFileTestStep(aSource, aSink), iBuffer(aBuffer), iPosition(aPosition), iAsynchronousWrite(EFalse) sl@0: { InitRandomNumberGenerator(); } sl@0: sl@0: void InitRandomNumberGenerator() sl@0: { sl@0: TTime seedTime; sl@0: seedTime.UniversalTime(); sl@0: iSeed = seedTime.Int64(); sl@0: } sl@0: sl@0: void SetPosition(TInt aPosition) sl@0: { iPosition = aPosition; } sl@0: sl@0: void SetAsynchronousWrite(TBool aAsynchronousWrite) sl@0: { iAsynchronousWrite = aAsynchronousWrite; } sl@0: sl@0: void RandomiseBuffer(); sl@0: sl@0: TVerdict DoTestPostambleL(TBool aCheck); sl@0: virtual TInt CheckDestinationL() = 0; sl@0: sl@0: public: sl@0: CMMFBuffer* iBuffer; sl@0: TInt64 iSeed; sl@0: sl@0: TInt iPosition; sl@0: TBool iAsynchronousWrite; sl@0: }; sl@0: sl@0: class TWriteBufferToDescriptorTestStep : public TWriteBufferTestStep sl@0: { sl@0: public: sl@0: TWriteBufferToDescriptorTestStep(MDataSink* aSink, CMMFBuffer* aBuffer, const TDes8& aDestinationDes, TDes8& aCopyOfDestinationDes) sl@0: : TWriteBufferTestStep(aSink, aBuffer), iDestinationDes(aDestinationDes), iCopyOfDestinationDes(aCopyOfDestinationDes) sl@0: { } sl@0: sl@0: TWriteBufferToDescriptorTestStep(MDataSink* aSink, CMMFBuffer* aBuffer, TInt aPosition, const TDes8& aDestinationDes, TDes8& aCopyOfDestinationDes) sl@0: : TWriteBufferTestStep(aSink, aBuffer, aPosition), iDestinationDes(aDestinationDes), iCopyOfDestinationDes(aCopyOfDestinationDes) sl@0: { } sl@0: sl@0: TWriteBufferToDescriptorTestStep(MDataSink* aSink, CMMFBuffer* aBuffer, MDataSource* aSource, const TDes8& aDestinationDes, TDes8& aCopyOfDestinationDes) sl@0: : TWriteBufferTestStep(aSink, aBuffer, aSource), iDestinationDes(aDestinationDes), iCopyOfDestinationDes(aCopyOfDestinationDes) sl@0: { } sl@0: sl@0: TWriteBufferToDescriptorTestStep(MDataSink* aSink, CMMFBuffer* aBuffer, TInt aPosition, MDataSource* aSource, const TDes8& aDestinationDes, TDes8& aCopyOfDestinationDes) sl@0: : TWriteBufferTestStep(aSink, aBuffer, aPosition, aSource), iDestinationDes(aDestinationDes), iCopyOfDestinationDes(aCopyOfDestinationDes) sl@0: { } sl@0: sl@0: TInt CheckDestinationL(); sl@0: sl@0: public: sl@0: const TDes8& iDestinationDes; sl@0: TDes8& iCopyOfDestinationDes; sl@0: }; sl@0: sl@0: class TWriteBufferToFileTestStep : public TWriteBufferTestStep sl@0: { sl@0: public: sl@0: TWriteBufferToFileTestStep(MDataSink* aSink, CMMFBuffer* aBuffer, RFs& aFsSession, const TFileName& aDestinationFileName, TDes8& aCopyOfDestinationDes) sl@0: : TWriteBufferTestStep(aSink, aBuffer), iFsSession(aFsSession), iDestinationFileName(aDestinationFileName), iCopyOfDestinationDes(aCopyOfDestinationDes) sl@0: { } sl@0: sl@0: TWriteBufferToFileTestStep(MDataSink* aSink, CMMFBuffer* aBuffer, TInt aPosition, RFs& aFsSession, const TFileName& aDestinationFileName, TDes8& aCopyOfDestinationDes) sl@0: : TWriteBufferTestStep(aSink, aBuffer, aPosition), iFsSession(aFsSession), iDestinationFileName(aDestinationFileName), iCopyOfDestinationDes(aCopyOfDestinationDes) sl@0: { } sl@0: sl@0: TWriteBufferToFileTestStep(MDataSink* aSink, CMMFBuffer* aBuffer, MDataSource* aSource, RFs& aFsSession, const TFileName& aDestinationFileName, TDes8& aCopyOfDestinationDes) sl@0: : TWriteBufferTestStep(aSink, aBuffer, aSource), iFsSession(aFsSession), iDestinationFileName(aDestinationFileName), iCopyOfDestinationDes(aCopyOfDestinationDes) sl@0: { } sl@0: sl@0: TWriteBufferToFileTestStep(MDataSink* aSink, CMMFBuffer* aBuffer, TInt aPosition, MDataSource* aSource, RFs& aFsSession, const TFileName& aDestinationFileName, TDes8& aCopyOfDestinationDes) sl@0: : TWriteBufferTestStep(aSink, aBuffer, aPosition, aSource), iFsSession(aFsSession), iDestinationFileName(aDestinationFileName), iCopyOfDestinationDes(aCopyOfDestinationDes) sl@0: { } sl@0: sl@0: TInt CheckDestinationL(); sl@0: void DoTestPreambleL(); sl@0: sl@0: public: sl@0: RFs& iFsSession; sl@0: const TFileName& iDestinationFileName; sl@0: TDes8& iCopyOfDestinationDes; sl@0: }; sl@0: sl@0: sl@0: class TNewSourceTestStep : public TFileTestStep sl@0: { sl@0: public: sl@0: TNewSourceTestStep(TUid aUid, TDesC8& aConfigDes) sl@0: : iUid(aUid), iConfigDes(&aConfigDes) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TUid iUid; sl@0: TDesC8* iConfigDes; sl@0: }; sl@0: sl@0: sl@0: class TSourceTypeTestStep : public TTestStep sl@0: { sl@0: public: sl@0: TSourceTypeTestStep(MDataSource* aSource, TUid aUid, TFourCC aFourCC, TBool aCanSetSourceDataType) sl@0: : TTestStep(aSource), iUid(aUid), iFourCC(aFourCC), iCanSetSourceDataType(aCanSetSourceDataType) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TUid iUid; sl@0: TFourCC iFourCC; sl@0: TBool iCanSetSourceDataType; sl@0: }; sl@0: sl@0: class TCanCreateSourceBufferTestStep : public TTestStep sl@0: { sl@0: public: sl@0: TCanCreateSourceBufferTestStep(MDataSource* aSource, TBool aCanCreateSourceBuffer) sl@0: : TTestStep(aSource), iCanCreateSourceBuffer(aCanCreateSourceBuffer) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TBool iCanCreateSourceBuffer; sl@0: }; sl@0: sl@0: class TSourceSampleConvertTestStep : public TTestStep sl@0: { sl@0: public: sl@0: TSourceSampleConvertTestStep(MDataSource* aSource, TBool aSourceSampleConvert) sl@0: : TTestStep(aSource), iSourceSampleConvert(aSourceSampleConvert) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TBool iSourceSampleConvert; sl@0: }; sl@0: sl@0: class TCreateSourceBuffer1TestStep : public TTestStep, public MAsyncEventHandler sl@0: { sl@0: public: sl@0: TCreateSourceBuffer1TestStep(TSourceType aSourceType, MDataSink* aSink, TUid aExpectedType, TBool aExpectedRef, TInt aExpectedMaxLength = 0) sl@0: : TTestStep(NULL, aSink), iSourceType(aSourceType), iExpectedType(aExpectedType), iExpectedRef(aExpectedRef), iExpectedMaxLength(aExpectedMaxLength) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: TInt SendEventToClient(const TMMFEvent& aEvent); sl@0: sl@0: public: sl@0: TSourceType iSourceType; sl@0: CMMFBuffer* iSinkBuffer; sl@0: TUid iExpectedType; sl@0: TBool iExpectedRef; sl@0: TInt iExpectedMaxLength; sl@0: }; sl@0: sl@0: class TCreateSourceBuffer2TestStep : public TTestStep, public MAsyncEventHandler sl@0: { sl@0: public: sl@0: TCreateSourceBuffer2TestStep(TSourceType aSourceType, MDataSink* aSink, CMMFBuffer* aSinkBuffer, TUid aExpectedType, TBool aExpectedRef, TInt aExpectedMaxLength = 0) sl@0: : TTestStep(NULL, aSink), iSourceType(aSourceType), iSinkBuffer(aSinkBuffer), iExpectedType(aExpectedType), iExpectedRef(aExpectedRef), iExpectedMaxLength(aExpectedMaxLength) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: TInt SendEventToClient(const TMMFEvent& aEvent); sl@0: sl@0: public: sl@0: TSourceType iSourceType; sl@0: CMMFBuffer* iSinkBuffer; sl@0: TUid iExpectedType; sl@0: TBool iExpectedRef; sl@0: TInt iExpectedMaxLength; sl@0: }; sl@0: sl@0: class TSourceThreadLogonTestStep : public TFileTestStep sl@0: { sl@0: public: sl@0: TSourceThreadLogonTestStep(MDataSource* aSource, MAsyncEventHandler* aEventHandler) sl@0: : TFileTestStep(aSource), iEventHandler(aEventHandler) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: MAsyncEventHandler* iEventHandler; sl@0: }; sl@0: sl@0: class TNegotiateSourceTestStep : public TTestStep sl@0: { sl@0: public: sl@0: TNegotiateSourceTestStep(MDataSource* aSource, MDataSink* aSink) sl@0: : TTestStep(aSource, aSink) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TFillBufferTestStep : public TReadBufferTestStep sl@0: { sl@0: public: sl@0: TFillBufferTestStep(MDataSource* aSource, CMMFBuffer* aBuffer, CMMFDummySink* aSink, const TDes8& aSourceDes, TUint aReadLength = 0) sl@0: : TReadBufferTestStep(aSource, aBuffer, 0, aSink, aSourceDes), iReadLength(aReadLength) sl@0: { } sl@0: sl@0: void SetReadLength(TInt aReadLength) sl@0: { iReadLength = aReadLength; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TInt iReadLength; sl@0: }; sl@0: sl@0: class TFillLastBufferTestStep : public TReadBufferTestStep sl@0: { sl@0: public: sl@0: TFillLastBufferTestStep(TUid aSourceUid, TDesC8& aConfigDes, CMMFDummySink* aSink, const TDes8& aSourceDes) sl@0: : TReadBufferTestStep(NULL, NULL, 0, aSink, aSourceDes), iSourceUid(aSourceUid), iConfigDes(aConfigDes) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TUid iSourceUid; sl@0: TDesC8 &iConfigDes; sl@0: }; sl@0: sl@0: class TReadLastBufferTestStep : public TReadBufferTestStep sl@0: { sl@0: public: sl@0: TReadLastBufferTestStep(CMMFClip* aClip, CMMFDummySink* aSink, const TDes8& aSourceDes) sl@0: : TReadBufferTestStep(aClip, NULL, 0, aSink, aSourceDes) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TReadLastBuffer2TestStep : public TReadBufferTestStep sl@0: { sl@0: public: sl@0: TReadLastBuffer2TestStep(CMMFClip* aClip, CMMFDummySink* aSink, const TDes8& aSourceDes) sl@0: : TReadBufferTestStep(aClip, NULL, 0, aSink, aSourceDes) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TReadLastBuffer3TestStep : public TReadBufferTestStep sl@0: { sl@0: public: sl@0: TReadLastBuffer3TestStep(CMMFClip* aClip, const TDes8& aSourceDes) sl@0: : TReadBufferTestStep(aClip, NULL, 0, NULL, aSourceDes) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: class TNewSinkTestStep : public TFileTestStep sl@0: { sl@0: public: sl@0: TNewSinkTestStep(TUid aUid, TDesC8& aConfigDes) sl@0: : iUid(aUid), iConfigDes(&aConfigDes) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TUid iUid; sl@0: TDesC8* iConfigDes; sl@0: }; sl@0: sl@0: sl@0: class TSinkTypeTestStep : public TTestStep sl@0: { sl@0: public: sl@0: TSinkTypeTestStep(MDataSink* aSink, TUid aUid, TFourCC aFourCC, TBool aCanSetSinkDataType) sl@0: : TTestStep(aSink), iUid(aUid), iFourCC(aFourCC), iCanSetSinkDataType(aCanSetSinkDataType) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TUid iUid; sl@0: TFourCC iFourCC; sl@0: TBool iCanSetSinkDataType; sl@0: }; sl@0: sl@0: class TCanCreateSinkBufferTestStep : public TTestStep sl@0: { sl@0: public: sl@0: TCanCreateSinkBufferTestStep(MDataSink* aSink, TBool aCanCreateSinkBuffer) sl@0: : TTestStep(aSink), iCanCreateSinkBuffer(aCanCreateSinkBuffer) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TBool iCanCreateSinkBuffer; sl@0: }; sl@0: sl@0: class TCreateSinkBufferTestStep0 : public TTestStep sl@0: { sl@0: public: sl@0: TCreateSinkBufferTestStep0(MDataSink* aSink, TUid aExpectedType, TBool aExpectedRef, TInt aExpectedMaxLength = 0, CMMFDummySource* aSource = NULL) sl@0: : TTestStep(aSource, aSink), iExpectedType(aExpectedType), iExpectedRef(aExpectedRef), iExpectedMaxLength(aExpectedMaxLength) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TUid iExpectedType; sl@0: TBool iExpectedRef; sl@0: CMMFFormatDecode* iFormat; sl@0: TInt iExpectedMaxLength; sl@0: }; sl@0: sl@0: class TCreateSinkBufferTestStep : public TTestStep sl@0: { sl@0: public: sl@0: TCreateSinkBufferTestStep(TUid aExpectedType, TBool aExpectedRef, CMMFFormatDecode* aFormat, sl@0: TInt aExpectedMaxLength = 0, CMMFDummySource* aSource = NULL) sl@0: : TTestStep(aSource, NULL), iExpectedType(aExpectedType), iExpectedRef(aExpectedRef), iFormat(aFormat), iExpectedMaxLength(aExpectedMaxLength) sl@0: { sl@0: } sl@0: sl@0: TVerdict DoTestPostambleL(TBool aCheck); sl@0: sl@0: public: sl@0: TUid iExpectedType; sl@0: TBool iExpectedRef; sl@0: CMMFFormatDecode* iFormat; sl@0: TInt iExpectedMaxLength; sl@0: }; sl@0: sl@0: class TCreateSinkBufferTestStep1 : public TCreateSinkBufferTestStep sl@0: { sl@0: public: sl@0: TCreateSinkBufferTestStep1(TUid aExpectedType, TBool aExpectedRef, CMMFFormatDecode* aFormat, sl@0: TInt aExpectedMaxLength = 0, CMMFDummySource* aSource = NULL) sl@0: : TCreateSinkBufferTestStep(aExpectedType, aExpectedRef, aFormat, aExpectedMaxLength, aSource) sl@0: { sl@0: } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TCreateSinkBufferTestStep2 : public TCreateSinkBufferTestStep sl@0: { sl@0: public: sl@0: TCreateSinkBufferTestStep2(TUid aExpectedType, TBool aExpectedRef, CMMFFormatDecode* aFormat, sl@0: TInt aExpectedMaxLength = 0, CMMFDummySource* aSource = NULL) sl@0: : TCreateSinkBufferTestStep(aExpectedType, aExpectedRef, aFormat, aExpectedMaxLength, aSource) sl@0: { sl@0: } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TCreateSinkBufferTestStep3 : public TCreateSinkBufferTestStep sl@0: { sl@0: public: sl@0: TCreateSinkBufferTestStep3(TUid aExpectedType, TBool aExpectedRef, CMMFFormatDecode* aFormat, sl@0: TInt aExpectedMaxLength = 0, CMMFDummySource* aSource = NULL) sl@0: : TCreateSinkBufferTestStep(aExpectedType, aExpectedRef, aFormat, aExpectedMaxLength, aSource) sl@0: { sl@0: } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TCreateSinkBufferTestStep4 : public TCreateSinkBufferTestStep sl@0: { sl@0: public: sl@0: TCreateSinkBufferTestStep4(TUid aExpectedType, TBool aExpectedRef, CMMFFormatDecode* aFormat, sl@0: TInt aExpectedMaxLength = 0, CMMFDummySource* aSource = NULL) sl@0: : TCreateSinkBufferTestStep(aExpectedType, aExpectedRef, aFormat, aExpectedMaxLength, aSource) sl@0: { sl@0: } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TSinkThreadLogonTestStep : public TFileTestStep sl@0: { sl@0: public: sl@0: TSinkThreadLogonTestStep(MDataSink* aSink, MAsyncEventHandler* aEventHandler) sl@0: : TFileTestStep(aSink), iEventHandler(aEventHandler) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: MAsyncEventHandler* iEventHandler; sl@0: }; sl@0: sl@0: class TNegotiateTestStep : public TTestStep sl@0: { sl@0: public: sl@0: TNegotiateTestStep(MDataSink* aSink, MDataSource* aSource) sl@0: : TTestStep(aSource, aSink) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TEmptyBufferTestStep : public TWriteBufferToDescriptorTestStep sl@0: { sl@0: public: sl@0: TEmptyBufferTestStep(MDataSink* aSink, CMMFBuffer* aBuffer, CMMFDummySource* aSource, const TDes8& aDestinationDes, TDes8& aCopyOfDestinationDes) sl@0: : TWriteBufferToDescriptorTestStep(aSink, aBuffer, aSource, aDestinationDes, aCopyOfDestinationDes), iWriteLength((aBuffer != NULL) ? aBuffer->BufferSize() : 0) sl@0: { } sl@0: sl@0: void SetWriteLength(TInt aWriteLength) sl@0: { iWriteLength = aWriteLength; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TInt iWriteLength; sl@0: }; sl@0: sl@0: sl@0: class TClipBytesFreeTestStep : public TFileTestStep sl@0: { sl@0: public: sl@0: TClipBytesFreeTestStep(CMMFClip* aClip, TInt64 aExpectedBytesFree) sl@0: : TFileTestStep(aClip, aClip), iExpectedBytesFree(aExpectedBytesFree) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TInt64 iExpectedBytesFree; sl@0: }; sl@0: sl@0: class TClipSizeTestStep : public TFileTestStep sl@0: { sl@0: public: sl@0: TClipSizeTestStep(CMMFClip* aClip, TInt aExpectedSize) sl@0: : TFileTestStep(aClip, aClip), iExpectedSize(aExpectedSize) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TInt iExpectedSize; sl@0: }; sl@0: sl@0: class TClipSetSizeTestStep : public TFileTestStep sl@0: { sl@0: public: sl@0: TClipSetSizeTestStep(CMMFClip* aClip, TBool aCanSetSize) sl@0: : TFileTestStep(aClip, aClip), iCanSetSize(aCanSetSize) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TBool iCanSetSize; sl@0: }; sl@0: sl@0: class TClipDeleteTestStep : public TFileTestStep sl@0: { sl@0: public: sl@0: TClipDeleteTestStep(CMMFClip* aClip) sl@0: : TFileTestStep(aClip, aClip) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TClipReadBufferTestStep : public TReadBufferTestStep sl@0: { sl@0: public: sl@0: TClipReadBufferTestStep(CMMFClip* aClip, CMMFBuffer* aBuffer, TInt aPosition, CMMFDummySink* aSink, const TDes8& aSourceDes, TUint aReadLength = 0) sl@0: : TReadBufferTestStep(aClip, aBuffer, aPosition, aSink, aSourceDes), iReadLength(aReadLength) sl@0: { } sl@0: sl@0: void SetReadLength(TInt aReadLength) sl@0: { iReadLength = aReadLength; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TInt iReadLength; sl@0: }; sl@0: sl@0: class TClipReadBuffer2TestStep : public TReadBufferTestStep sl@0: { sl@0: public: sl@0: TClipReadBuffer2TestStep(CMMFClip* aClip, CMMFBuffer* aBuffer, TInt aPosition, CMMFDummySink* aSink, const TDes8& aSourceDes, TUint aReadLength = 0) sl@0: : TReadBufferTestStep(aClip, aBuffer, aPosition, aSink, aSourceDes), iReadLength(aReadLength) sl@0: { } sl@0: sl@0: void SetReadLength(TInt aReadLength) sl@0: { iReadLength = aReadLength; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TInt iReadLength; sl@0: }; sl@0: sl@0: class TClipReadBuffer3TestStep : public TReadBufferTestStep sl@0: { sl@0: public: sl@0: TClipReadBuffer3TestStep(CMMFClip* aClip, CMMFBuffer* aBuffer, TInt aPosition, const TDes8& aSourceDes, TUint aReadLength = 0) sl@0: : TReadBufferTestStep(aClip, aBuffer, aPosition, aSourceDes), iReadLength(aReadLength) sl@0: { } sl@0: sl@0: void SetReadLength(TInt aReadLength) sl@0: { iReadLength = aReadLength; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TInt iReadLength; sl@0: }; sl@0: sl@0: class TClipReadBuffer4TestStep : public TReadBufferTestStep sl@0: { sl@0: public: sl@0: TClipReadBuffer4TestStep(CMMFClip* aClip, CMMFBuffer* aBuffer, TInt aPosition, CMMFDummySink* aSink, const TDes8& aSourceDes, TUint aReadLength = 0) sl@0: : TReadBufferTestStep(aClip, aBuffer, aPosition, aSink, aSourceDes), iReadLength(aReadLength), iExpectedReadLength(aReadLength) sl@0: { } sl@0: sl@0: void SetReadLength(TInt aReadLength) sl@0: { iReadLength = aReadLength; } sl@0: sl@0: void SetExpectedReadLength(TInt aExpectedReadLength) sl@0: { iExpectedReadLength = aExpectedReadLength; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TInt iReadLength; sl@0: TInt iExpectedReadLength; sl@0: }; sl@0: sl@0: sl@0: class TDescriptorClipWriteBufferTestStep : public TWriteBufferToDescriptorTestStep sl@0: { sl@0: public: sl@0: TDescriptorClipWriteBufferTestStep(CMMFClip* aClip, CMMFBuffer* aBuffer, TInt aPosition, CMMFDummySource* aSource, const TDes8& aDestinationDes, TDes8& aCopyOfDestinationDes, TUint aWriteLength = 0) sl@0: : TWriteBufferToDescriptorTestStep(aClip, aBuffer, aPosition, aSource, aDestinationDes, aCopyOfDestinationDes), iWriteLength(aWriteLength) sl@0: { } sl@0: sl@0: void SetWriteLength(TInt aWriteLength) sl@0: { iWriteLength = aWriteLength; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TInt iWriteLength; sl@0: }; sl@0: sl@0: class TDescriptorClipWriteBuffer2TestStep : public TWriteBufferToDescriptorTestStep sl@0: { sl@0: public: sl@0: TDescriptorClipWriteBuffer2TestStep(CMMFClip* aClip, CMMFBuffer* aBuffer, TInt aPosition, CMMFDummySource* aSource, const TDes8& aDestinationDes, TDes8& aCopyOfDestinationDes, TUint aWriteLength = 0) sl@0: : TWriteBufferToDescriptorTestStep(aClip, aBuffer, aPosition, aSource, aDestinationDes, aCopyOfDestinationDes), iWriteLength(aWriteLength) sl@0: { } sl@0: sl@0: void SetWriteLength(TInt aWriteLength) sl@0: { iWriteLength = aWriteLength; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TInt iWriteLength; sl@0: }; sl@0: sl@0: class TDescriptorClipWriteBuffer3TestStep : public TWriteBufferToDescriptorTestStep sl@0: { sl@0: public: sl@0: TDescriptorClipWriteBuffer3TestStep(CMMFClip* aClip, CMMFBuffer* aBuffer, TInt aPosition, const TDes8& aDestinationDes, TDes8& aCopyOfDestinationDes, TUint aWriteLength = 0) sl@0: : TWriteBufferToDescriptorTestStep(aClip, aBuffer, aPosition, aDestinationDes, aCopyOfDestinationDes), iWriteLength(aWriteLength) sl@0: { } sl@0: sl@0: void SetWriteLength(TInt aWriteLength) sl@0: { iWriteLength = aWriteLength; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TInt iWriteLength; sl@0: }; sl@0: sl@0: class TNewFileSourceTestStep : public TNewSourceTestStep sl@0: { sl@0: public: sl@0: TNewFileSourceTestStep(TUid aUid, TDesC8& aConfigDes) sl@0: : TNewSourceTestStep(aUid, aConfigDes) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TFileSourceThreadLogonTestStep : public TSourceThreadLogonTestStep sl@0: { sl@0: public: sl@0: TFileSourceThreadLogonTestStep(MDataSource* aSource, MAsyncEventHandler* aEventHandler, TInt aFileSize) sl@0: : TSourceThreadLogonTestStep(aSource, aEventHandler), iFileSize(aFileSize) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TInt iFileSize; sl@0: }; sl@0: sl@0: class TFileFillBufferTestStep : public TFillBufferTestStep sl@0: { sl@0: public: sl@0: TFileFillBufferTestStep(TSourceType aSourceType, TDesC& aFileName, CMMFBuffer* aBuffer, CMMFDummySink* aSink, const TDes8& aSourceDes, TUint aReadLength = 0) sl@0: : TFillBufferTestStep(NULL, aBuffer, aSink, aSourceDes, aReadLength), iFileName(aFileName), iSourceType(aSourceType) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TDesC& iFileName; sl@0: TSourceType iSourceType; sl@0: }; sl@0: sl@0: class TFileFillBuffer2TestStep : public TFileFillBufferTestStep sl@0: { sl@0: public: sl@0: TFileFillBuffer2TestStep(TSourceType aSourceType, TDesC& aFileName, CMMFBuffer* aBuffer, CMMFDummySink* aSink, const TDes8& aSourceDes) sl@0: : TFileFillBufferTestStep(aSourceType, aFileName, aBuffer, aSink, aSourceDes) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TFileFillBuffer3TestStep : public TFileFillBufferTestStep sl@0: { sl@0: public: sl@0: TFileFillBuffer3TestStep(TSourceType aSourceType, TDesC& aFileName, RPointerArray* aBufferArray, CMMFDummySink* aSink, const TDes8& aSourceDes, TInt aReadLength = 0) sl@0: : TFileFillBufferTestStep(aSourceType, aFileName, NULL, aSink, aSourceDes, aReadLength), iBufferArray(aBufferArray), iMaxRequestCount(20) sl@0: { } sl@0: sl@0: void SetMaxRequestCount(TInt aMaxRequestCount) sl@0: { iMaxRequestCount = aMaxRequestCount; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: RPointerArray* iBufferArray; sl@0: TInt iMaxRequestCount; sl@0: }; sl@0: sl@0: class TFileFillBuffer4TestStep : public TFillBufferTestStep sl@0: { sl@0: public: sl@0: TFileFillBuffer4TestStep(MDataSource* aSource, RPointerArray* aBufferArray, CMMFDummySink* aSink, const TDes8& aSourceDes, TInt aReadLength = 0) sl@0: : TFillBufferTestStep(aSource, NULL, aSink, aSourceDes, aReadLength), iBufferArray(aBufferArray), iMaxRequestCount(3) sl@0: { } sl@0: sl@0: void SetMaxRequestCount(TInt aMaxRequestCount) sl@0: { iMaxRequestCount = aMaxRequestCount; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: RPointerArray* iBufferArray; sl@0: TInt iMaxRequestCount; sl@0: }; sl@0: sl@0: class TFileReadBufferTestStep : public TClipReadBufferTestStep sl@0: { sl@0: public: sl@0: TFileReadBufferTestStep(TSourceType aSourceType, const TDesC& aFileName, CMMFBuffer* aBuffer, TInt aPosition, CMMFDummySink* aSink, const TDes8& aSourceDes, TUint aReadLength = 0) sl@0: : TClipReadBufferTestStep(NULL, aBuffer, aPosition, aSink, aSourceDes, aReadLength), iSourceType(aSourceType), iFileName(aFileName) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TSourceType iSourceType; sl@0: const TDesC& iFileName; sl@0: sl@0: }; sl@0: sl@0: class TFileReadBuffer2TestStep : public TClipReadBuffer2TestStep sl@0: { sl@0: public: sl@0: TFileReadBuffer2TestStep(TSourceType aSourceType, const TDesC& aFileName, CMMFBuffer* aBuffer, TInt aPosition, CMMFDummySink* aSink, const TDes8& aSourceDes, TUint aReadLength = 0) sl@0: : TClipReadBuffer2TestStep(NULL, aBuffer, aPosition, aSink, aSourceDes, aReadLength), iSourceType(aSourceType), iFileName(aFileName) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TSourceType iSourceType; sl@0: const TDesC& iFileName; sl@0: }; sl@0: sl@0: class TFileReadBuffer3TestStep : public TClipReadBuffer3TestStep sl@0: { sl@0: public: sl@0: TFileReadBuffer3TestStep(TSourceType aSourceType, const TDesC& aFileName, CMMFBuffer* aBuffer, TInt aPosition, const TDes8& aSourceDes, TUint aReadLength = 0) sl@0: : TClipReadBuffer3TestStep(NULL, aBuffer, aPosition, aSourceDes, aReadLength), iSourceType(aSourceType), iFileName(aFileName) sl@0: { } sl@0: sl@0: void SetReadLength(TInt aReadLength) sl@0: { iReadLength = aReadLength; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TSourceType iSourceType; sl@0: const TDesC& iFileName; sl@0: }; sl@0: sl@0: class TFileReadBuffer4TestStep : public TClipReadBuffer4TestStep sl@0: { sl@0: public: sl@0: TFileReadBuffer4TestStep(TSourceType aSourceType, const TDesC& aFileName, CMMFBuffer* aBuffer, TInt aPosition, CMMFDummySink* aSink, const TDes8& aSourceDes, TUint aReadLength = 0) sl@0: : TClipReadBuffer4TestStep(NULL, aBuffer, aPosition, aSink, aSourceDes, aReadLength), iSourceType(aSourceType), iFileName(aFileName) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TSourceType iSourceType; sl@0: const TDesC& iFileName; sl@0: }; sl@0: sl@0: class TFileReadBuffer5TestStep : public TClipReadBuffer4TestStep sl@0: { sl@0: public: sl@0: TFileReadBuffer5TestStep(TSourceType aSourceType, const TDesC& aFileName, RPointerArray* aBufferArray, TInt aPosition, CMMFDummySink* aSink, const TDes8& aSourceDes, TUint aReadLength = 0) sl@0: : TClipReadBuffer4TestStep(NULL, NULL, aPosition, aSink, aSourceDes, aReadLength), iSourceType(aSourceType), iFileName(aFileName), iBufferArray(aBufferArray), iMaxRequestCount(20) sl@0: { } sl@0: sl@0: void SetMaxRequestCount(TInt aMaxRequestCount) sl@0: { iMaxRequestCount = aMaxRequestCount; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TSourceType iSourceType; sl@0: const TDesC& iFileName; sl@0: RPointerArray* iBufferArray; sl@0: TInt iMaxRequestCount; sl@0: }; sl@0: sl@0: class TFileReadBuffer6TestStep : public TClipReadBuffer4TestStep sl@0: { sl@0: public: sl@0: TFileReadBuffer6TestStep(TSourceType aSourceType, const TDesC& aFileName, RPointerArray* aBufferArray, TInt aPosition, CMMFDummySink* aSink, const TDes8& aSourceDes, TUint aReadLength = 0) sl@0: : TClipReadBuffer4TestStep(NULL, NULL, aPosition, aSink, aSourceDes, aReadLength), iSourceType(aSourceType), iFileName(aFileName), iBufferArray(aBufferArray), iMaxRequestCount(20) sl@0: { } sl@0: sl@0: void SetMaxRequestCount(TInt aMaxRequestCount) sl@0: { iMaxRequestCount = aMaxRequestCount; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TSourceType iSourceType; sl@0: const TDesC& iFileName; sl@0: RPointerArray* iBufferArray; sl@0: TInt iMaxRequestCount; sl@0: }; sl@0: sl@0: class TFileReadBuffer7TestStep : public TClipReadBuffer4TestStep sl@0: { sl@0: public: sl@0: TFileReadBuffer7TestStep(CMMFClip* aSource, RPointerArray* aBufferArray, TInt aPosition, CMMFDummySink* aSink, const TDes8& aSourceDes, TUint aReadLength = 0) sl@0: : TClipReadBuffer4TestStep(aSource, NULL, aPosition, aSink, aSourceDes, aReadLength), iBufferArray(aBufferArray), iMaxRequestCount(3) sl@0: { } sl@0: sl@0: void SetMaxRequestCount(TInt aMaxRequestCount) sl@0: { iMaxRequestCount = aMaxRequestCount; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: RPointerArray* iBufferArray; sl@0: TInt iMaxRequestCount; sl@0: }; sl@0: sl@0: class TFileReadBuffer8TestStep : public TClipReadBuffer4TestStep sl@0: { sl@0: public: sl@0: TFileReadBuffer8TestStep(CMMFClip* aSource, RPointerArray* aBufferArray, TInt aPosition, CMMFDummySink* aSink, const TDes8& aSourceDes, TUint aReadLength = 0) sl@0: : TClipReadBuffer4TestStep(aSource, NULL, aPosition, aSink, aSourceDes, aReadLength), iBufferArray(aBufferArray), iMaxRequestCount(3) sl@0: { } sl@0: sl@0: void SetMaxRequestCount(TInt aMaxRequestCount) sl@0: { iMaxRequestCount = aMaxRequestCount; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: RPointerArray* iBufferArray; sl@0: TInt iMaxRequestCount; sl@0: }; sl@0: sl@0: sl@0: class TNewFileSinkTestStep : public TNewSinkTestStep sl@0: { sl@0: public: sl@0: TNewFileSinkTestStep(TUid aUid, TDesC8& aConfigDes) sl@0: : TNewSinkTestStep(aUid, aConfigDes) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TFileSinkSetSizeTestStep : public TClipSetSizeTestStep sl@0: { sl@0: public: sl@0: TFileSinkSetSizeTestStep(CMMFClip* aClip, TBool aCanSetSize) sl@0: : TClipSetSizeTestStep(aClip, aCanSetSize) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TFileSinkThreadLogonTestStep : public TSinkThreadLogonTestStep sl@0: { sl@0: public: sl@0: TFileSinkThreadLogonTestStep(MDataSink* aSink, MAsyncEventHandler* aEventHandler, TInt aFileSize) sl@0: : TSinkThreadLogonTestStep(aSink, aEventHandler), iFileSize(aFileSize) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TInt iFileSize; sl@0: }; sl@0: sl@0: class TFileEmptyBufferTestStep : public TWriteBufferToFileTestStep sl@0: { sl@0: public: sl@0: TFileEmptyBufferTestStep(MDataSink* aSink, CMMFBuffer* aBuffer, CMMFDummySource* aSource, RFs& aFsSession, const TFileName& aDestinationFile, TDes8& aCopyOfDestinationDes) sl@0: : TWriteBufferToFileTestStep(aSink, aBuffer, aSource, aFsSession, aDestinationFile, aCopyOfDestinationDes), iWriteLength((aBuffer != NULL) ? aBuffer->BufferSize() : 0) sl@0: { } sl@0: sl@0: void SetWriteLength(TInt aWriteLength) sl@0: { iWriteLength = aWriteLength; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TInt iWriteLength; sl@0: }; sl@0: sl@0: class TFileEmptyBuffer2TestStep : public TFileEmptyBufferTestStep sl@0: { sl@0: public: sl@0: TFileEmptyBuffer2TestStep(TSinkType aSinkType, CMMFBuffer* aBuffer, CMMFDummySource* aSource, RFs& aFsSession, const TFileName& aDestinationFile, TDes8& aCopyOfDestinationDes) sl@0: : TFileEmptyBufferTestStep(NULL, aBuffer, aSource, aFsSession, aDestinationFile, aCopyOfDestinationDes), iSinkType(aSinkType) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: protected: sl@0: TSinkType iSinkType; sl@0: }; sl@0: sl@0: class TFileEmptyBuffer3TestStep : public TFileEmptyBuffer2TestStep sl@0: { sl@0: public: sl@0: TFileEmptyBuffer3TestStep(TSinkType aSinkType, CMMFBuffer* aBuffer, CMMFDummySource* aSource, RFs& aFsSession, const TFileName& aDestinationFile, TDes8& aCopyOfDestinationDes) sl@0: : TFileEmptyBuffer2TestStep(aSinkType, aBuffer, aSource, aFsSession, aDestinationFile, aCopyOfDestinationDes) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: void DoTestPreambleL(); sl@0: TVerdict DoTestPostambleL(TBool aCheck); sl@0: }; sl@0: sl@0: class TFileEmptyBuffer4TestStep : public TFileEmptyBuffer3TestStep sl@0: { sl@0: public: sl@0: TFileEmptyBuffer4TestStep(TSinkType aSinkType, RPointerArray* aBufferArray, CMMFDummySource* aSource, RFs& aFsSession, const TFileName& aDestinationFile, TDes8& aCopyOfDestinationDes) sl@0: : TFileEmptyBuffer3TestStep(aSinkType, NULL, aSource, aFsSession, aDestinationFile, aCopyOfDestinationDes), iBufferArray(aBufferArray), iMaxRequestCount(20) sl@0: { } sl@0: sl@0: void SetMaxRequestCount(TInt aMaxRequestCount) sl@0: { iMaxRequestCount = aMaxRequestCount; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: void DoTestPreambleL(); sl@0: TVerdict DoTestPostambleL(TBool aCheck); sl@0: sl@0: public: sl@0: RPointerArray* iBufferArray; sl@0: TInt iMaxRequestCount; sl@0: }; sl@0: sl@0: class TFileEmptyBuffer5TestStep : public TFileEmptyBuffer4TestStep sl@0: { sl@0: public: sl@0: TFileEmptyBuffer5TestStep(TSinkType aSinkType, RPointerArray* aBufferArray, CMMFDummySource* aSource, RFs& aFsSession, const TFileName& aDestinationFile, TDes8& aCopyOfDestinationDes) sl@0: : TFileEmptyBuffer4TestStep(aSinkType, aBufferArray, aSource, aFsSession, aDestinationFile, aCopyOfDestinationDes) sl@0: { } sl@0: sl@0: TInt CheckDestinationL(); sl@0: }; sl@0: sl@0: class TFileEmptyBuffer6TestStep : public TFileEmptyBufferTestStep sl@0: { sl@0: public: sl@0: TFileEmptyBuffer6TestStep(MDataSink* aSink, RPointerArray* aBufferArray, CMMFDummySource* aSource, RFs& aFsSession, const TFileName& aDestinationFile, TDes8& aCopyOfDestinationDes) sl@0: : TFileEmptyBufferTestStep(aSink, NULL, aSource, aFsSession, aDestinationFile, aCopyOfDestinationDes), iBufferArray(aBufferArray), iMaxRequestCount(3) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: TInt CheckDestinationL(); sl@0: sl@0: public: sl@0: RPointerArray* iBufferArray; sl@0: TInt iMaxRequestCount; sl@0: }; sl@0: sl@0: class TFileWriteBufferTestStep : public TWriteBufferToFileTestStep sl@0: { sl@0: public: sl@0: TFileWriteBufferTestStep(CMMFClip* aClip, CMMFBuffer* aBuffer, TInt aPosition, CMMFDummySource* aSource, RFs& aFsSession, const TFileName& aDestinationFileName, TDes8& aCopyOfDestinationDes, TUint aWriteLength = 0) sl@0: : TWriteBufferToFileTestStep(aClip, aBuffer, aPosition, aSource, aFsSession, aDestinationFileName, aCopyOfDestinationDes), iWriteLength(aWriteLength) sl@0: { iAsynchronousWrite = ETrue; } sl@0: sl@0: void SetWriteLength(TInt aWriteLength) sl@0: { iWriteLength = aWriteLength; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TInt iWriteLength; sl@0: }; sl@0: sl@0: class TFileWriteBuffer2TestStep : public TFileWriteBufferTestStep sl@0: { sl@0: public: sl@0: TFileWriteBuffer2TestStep(CMMFClip* aClip, CMMFBuffer* aBuffer, TInt aPosition, CMMFDummySource* aSource, RFs& aFsSession, const TFileName& aDestinationFileName, TDes8& aCopyOfDestinationDes, TUint aWriteLength = 0) sl@0: : TFileWriteBufferTestStep(aClip, aBuffer, aPosition, aSource, aFsSession, aDestinationFileName, aCopyOfDestinationDes, aWriteLength) sl@0: { iAsynchronousWrite = ETrue; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TFileWriteBuffer3TestStep : public TFileWriteBufferTestStep sl@0: { sl@0: public: sl@0: TFileWriteBuffer3TestStep(CMMFClip* aClip, CMMFBuffer* aBuffer, TInt aPosition, RFs& aFsSession, const TFileName& aDestinationFileName, TDes8& aCopyOfDestinationDes, TUint aWriteLength = 0) sl@0: : TFileWriteBufferTestStep(aClip, aBuffer, aPosition, NULL, aFsSession, aDestinationFileName, aCopyOfDestinationDes, aWriteLength) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TFileWriteBuffer4TestStep : public TWriteBufferToFileTestStep sl@0: { sl@0: public: sl@0: TFileWriteBuffer4TestStep(TSinkType aSinkType, TDesC& aFileName, CMMFBuffer* aBuffer, TInt aPosition, CMMFDummySource* aSource, RFs& aFsSession, const TFileName& aDestinationFileName, TDes8& aCopyOfDestinationDes, TUint aWriteLength = 0) sl@0: : TWriteBufferToFileTestStep(NULL, aBuffer, aPosition, aSource, aFsSession, aDestinationFileName, aCopyOfDestinationDes), iWriteLength(aWriteLength), iSinkType(aSinkType), iFileName(aFileName) sl@0: { iAsynchronousWrite = ETrue; } sl@0: sl@0: void SetWriteLength(TInt aWriteLength) sl@0: { iWriteLength = aWriteLength; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TInt iWriteLength; sl@0: TSinkType iSinkType; sl@0: TDesC& iFileName; sl@0: }; sl@0: sl@0: class TFileWriteBuffer5TestStep : public TFileWriteBuffer4TestStep sl@0: { sl@0: public: sl@0: TFileWriteBuffer5TestStep(TSinkType aSinkType, TDesC& aFileName, CMMFBuffer* aBuffer, TInt aPosition, CMMFDummySource* aSource, RFs& aFsSession, const TFileName& aDestinationFileName, TDes8& aCopyOfDestinationDes, TUint aWriteLength = 0) sl@0: : TFileWriteBuffer4TestStep(aSinkType, aFileName, aBuffer, aPosition, aSource, aFsSession, aDestinationFileName, aCopyOfDestinationDes, aWriteLength) sl@0: { } sl@0: sl@0: TInt CheckDestinationL(); sl@0: TVerdict DoNegativeTestPostambleL(); sl@0: }; sl@0: sl@0: class TFileWriteBuffer6TestStep : public TWriteBufferToFileTestStep sl@0: { sl@0: public: sl@0: TFileWriteBuffer6TestStep(TSinkType aSinkType, TDesC& aFileName, CMMFBuffer* aBuffer, TInt aPosition, CMMFDummySource* aSource, RFs& aFsSession, const TFileName& aDestinationFileName, TDes8& aCopyOfDestinationDes, TUint aWriteLength = 0) sl@0: : TWriteBufferToFileTestStep(NULL, aBuffer, aPosition, aSource, aFsSession, aDestinationFileName, aCopyOfDestinationDes), iWriteLength(aWriteLength), iSinkType(aSinkType), iFileName(aFileName) sl@0: { } sl@0: sl@0: void SetWriteLength(TInt aWriteLength) sl@0: { iWriteLength = aWriteLength; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TInt iWriteLength; sl@0: TSinkType iSinkType; sl@0: TDesC& iFileName; sl@0: }; sl@0: sl@0: class TFileWriteBuffer7TestStep : public TWriteBufferToFileTestStep sl@0: { sl@0: public: sl@0: TFileWriteBuffer7TestStep(TSinkType aSinkType, TDesC& aFileName, CMMFBuffer* aBuffer, TInt aPosition, RFs& aFsSession, const TFileName& aDestinationFileName, TDes8& aCopyOfDestinationDes, TUint aWriteLength = 0) sl@0: : TWriteBufferToFileTestStep(NULL, aBuffer, aPosition, aFsSession, aDestinationFileName, aCopyOfDestinationDes),iSinkType(aSinkType), iFileName(aFileName), iWriteLength(aWriteLength) sl@0: { } sl@0: sl@0: void SetWriteLength(TInt aWriteLength) sl@0: { iWriteLength = aWriteLength; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TSinkType iSinkType; sl@0: TDesC& iFileName; sl@0: TInt iWriteLength; sl@0: }; sl@0: sl@0: class TFileWriteBuffer8TestStep : public TWriteBufferToFileTestStep sl@0: { sl@0: public: sl@0: TFileWriteBuffer8TestStep(TSinkType aSinkType, TDesC& aFileName, RPointerArray* aBufferArray, TInt aPosition, CMMFDummySource* aSource, RFs& aFsSession, const TFileName& aDestinationFileName, TDes8& aCopyOfDestinationDes, TUint aWriteLength = 0) sl@0: : TWriteBufferToFileTestStep(NULL, NULL, aPosition, aSource, aFsSession, aDestinationFileName, aCopyOfDestinationDes), iSinkType(aSinkType), iFileName(aFileName), iWriteLength(aWriteLength), iBufferArray(aBufferArray), iMaxRequestCount(20) sl@0: { } sl@0: sl@0: void SetWriteLength(TInt aWriteLength) sl@0: { iWriteLength = aWriteLength; } sl@0: sl@0: void SetMaxRequestCount(TInt aMaxRequestCount) sl@0: { iMaxRequestCount = aMaxRequestCount; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TSinkType iSinkType; sl@0: TDesC& iFileName; sl@0: TInt iWriteLength; sl@0: RPointerArray* iBufferArray; sl@0: TInt iMaxRequestCount; sl@0: }; sl@0: sl@0: class TFileWriteBuffer9TestStep : public TWriteBufferToFileTestStep sl@0: { sl@0: public: sl@0: TFileWriteBuffer9TestStep(TSinkType aSinkType, TDesC& aFileName, RPointerArray* aBufferArray, TInt aPosition, CMMFDummySource* aSource, RFs& aFsSession, const TFileName& aDestinationFileName, TDes8& aCopyOfDestinationDes, TUint aWriteLength = 0) sl@0: : TWriteBufferToFileTestStep(NULL, NULL, aPosition, aSource, aFsSession, aDestinationFileName, aCopyOfDestinationDes), iFileName(aFileName), iWriteLength(aWriteLength), iBufferArray(aBufferArray), iMaxRequestCount(20), iSinkType(aSinkType) sl@0: { } sl@0: sl@0: void SetWriteLength(TInt aWriteLength) sl@0: { iWriteLength = aWriteLength; } sl@0: sl@0: void SetMaxRequestCount(TInt aMaxRequestCount) sl@0: { iMaxRequestCount = aMaxRequestCount; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: TDesC& iFileName; sl@0: TInt iWriteLength; sl@0: RPointerArray* iBufferArray; sl@0: TInt iMaxRequestCount; sl@0: TSinkType iSinkType; sl@0: }; sl@0: sl@0: class TFileWriteBuffer10TestStep : public TFileWriteBuffer8TestStep sl@0: { sl@0: public: sl@0: TFileWriteBuffer10TestStep(TSinkType aSinkType, TDesC& aFileName, RPointerArray* aBufferArray, TInt aPosition, CMMFDummySource* aSource, RFs& aFsSession, const TFileName& aDestinationFileName, TDes8& aCopyOfDestinationDes, TUint aWriteLength = 0) sl@0: : TFileWriteBuffer8TestStep(aSinkType, aFileName, aBufferArray, aPosition, aSource, aFsSession, aDestinationFileName, aCopyOfDestinationDes, aWriteLength) sl@0: { iMaxRequestCount = 3; } sl@0: sl@0: TInt CheckDestinationL(); sl@0: }; sl@0: sl@0: class TFileWriteBuffer11TestStep : public TFileWriteBuffer9TestStep sl@0: { sl@0: public: sl@0: TFileWriteBuffer11TestStep(TSinkType aSinkType, TDesC& aFileName, RPointerArray* aBufferArray, TInt aPosition, CMMFDummySource* aSource, RFs& aFsSession, const TFileName& aDestinationFileName, TDes8& aCopyOfDestinationDes, TUint aWriteLength = 0) sl@0: : TFileWriteBuffer9TestStep(aSinkType, aFileName, aBufferArray, aPosition, aSource, aFsSession, aDestinationFileName, aCopyOfDestinationDes, aWriteLength) sl@0: { iMaxRequestCount = 3; } sl@0: sl@0: TInt CheckDestinationL(); sl@0: }; sl@0: sl@0: class TFileWriteBuffer12TestStep : public TWriteBufferToFileTestStep sl@0: { sl@0: public: sl@0: TFileWriteBuffer12TestStep(MDataSink* aSink, RPointerArray* aBufferArray, TInt aPosition, CMMFDummySource* aSource, RFs& aFsSession, const TFileName& aDestinationFileName, TDes8& aCopyOfDestinationDes, TUint aWriteLength = 0) sl@0: : TWriteBufferToFileTestStep(aSink, NULL, aPosition, aSource, aFsSession, aDestinationFileName, aCopyOfDestinationDes), iWriteLength(aWriteLength), iBufferArray(aBufferArray), iMaxRequestCount(3) sl@0: { ASSERT(iBufferArray->Count() == 5); } sl@0: sl@0: void SetWriteLength(TInt aWriteLength) sl@0: { iWriteLength = aWriteLength; } sl@0: sl@0: void SetMaxRequestCount(TInt aMaxRequestCount) sl@0: { iMaxRequestCount = aMaxRequestCount; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: TInt CheckDestinationL(); sl@0: sl@0: public: sl@0: TInt iWriteLength; sl@0: sl@0: RPointerArray* iBufferArray; sl@0: TInt iMaxRequestCount; sl@0: }; sl@0: sl@0: class TFileWriteBuffer13TestStep : public TWriteBufferToFileTestStep sl@0: { sl@0: public: sl@0: TFileWriteBuffer13TestStep(MDataSink* aSink, RPointerArray* aBufferArray, TInt aPosition, CMMFDummySource* aSource, RFs& aFsSession, const TFileName& aDestinationFileName, TDes8& aCopyOfDestinationDes, TUint aWriteLength = 0) sl@0: : TWriteBufferToFileTestStep(aSink, NULL, aPosition, aSource, aFsSession, aDestinationFileName, aCopyOfDestinationDes), iWriteLength(aWriteLength), iBufferArray(aBufferArray), iMaxRequestCount(3) sl@0: { ASSERT(iBufferArray->Count() == 5); } sl@0: sl@0: void SetWriteLength(TInt aWriteLength) sl@0: { iWriteLength = aWriteLength; } sl@0: sl@0: void SetMaxRequestCount(TInt aMaxRequestCount) sl@0: { iMaxRequestCount = aMaxRequestCount; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: TInt CheckDestinationL(); sl@0: sl@0: public: sl@0: TInt iWriteLength; sl@0: sl@0: RPointerArray* iBufferArray; sl@0: TInt iMaxRequestCount; sl@0: }; sl@0: sl@0: class TAudioInputCreateSourceBuffer1TestStep : public TTestStep sl@0: { sl@0: public: sl@0: TAudioInputCreateSourceBuffer1TestStep(CMMFAudioInput* aSource) sl@0: : TTestStep(aSource) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TAudioInputCreateSourceBuffer2TestStep : public TTestStep sl@0: { sl@0: public: sl@0: TAudioInputCreateSourceBuffer2TestStep(CMMFAudioInput* aSource, CMMFBuffer* aSinkBuffer) sl@0: : TTestStep(aSource), iSinkBuffer(aSinkBuffer) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: CMMFBuffer* iSinkBuffer; sl@0: }; sl@0: sl@0: class TAudioInputFillBufferTestStep : public TTestStep sl@0: { sl@0: public: sl@0: TAudioInputFillBufferTestStep(MDataSource* aSource, CMMFBuffer* aBuffer, CMMFDummySink* aSink) sl@0: : TTestStep(aSource, aSink), iBuffer(aBuffer) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: CMMFBuffer* iBuffer; sl@0: }; sl@0: sl@0: class TAudioInputFillBuffer2TestStep : public TAudioInputFillBufferTestStep sl@0: { sl@0: public: sl@0: TAudioInputFillBuffer2TestStep(MDataSource* aSource, CMMFBuffer* aBuffer, CMMFDummySink* aSink) sl@0: : TAudioInputFillBufferTestStep(aSource, aBuffer, aSink) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TAudioInputFillBuffer3TestStep : public TAudioInputFillBufferTestStep sl@0: { sl@0: public: sl@0: TAudioInputFillBuffer3TestStep(MDataSource* aSource, CMMFBuffer* aBuffer, CMMFDummySink* aSink) sl@0: : TAudioInputFillBufferTestStep(aSource, aBuffer, aSink) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TAudioInputFillBuffer4TestStep : public TAudioInputFillBufferTestStep sl@0: { sl@0: public: sl@0: TAudioInputFillBuffer4TestStep(CMMFBuffer* aBuffer, CMMFDummySink* aSink) sl@0: : TAudioInputFillBufferTestStep(NULL, aBuffer, aSink) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TAudioInputFillBuffer5TestStep : public TAudioInputFillBufferTestStep sl@0: { sl@0: public: sl@0: TAudioInputFillBuffer5TestStep(CMMFBuffer* aBuffer, CMMFDummySink* aSink) sl@0: : TAudioInputFillBufferTestStep(NULL, aBuffer, aSink) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TAudioInputFillBuffer6TestStep : public TAudioInputFillBufferTestStep sl@0: { sl@0: public: sl@0: TAudioInputFillBuffer6TestStep(CMMFBuffer* aBuffer, CMMFDummySink* aSink) sl@0: : TAudioInputFillBufferTestStep(NULL, aBuffer, aSink) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TAudioInputFillBuffer7TestStep : public TAudioInputFillBufferTestStep sl@0: { sl@0: public: sl@0: TAudioInputFillBuffer7TestStep(CMMFBuffer* aBuffer, CMMFDummySink* aSink) sl@0: : TAudioInputFillBufferTestStep(NULL, aBuffer, aSink) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TAudioInputFillBuffer8TestStep : public TAudioInputFillBufferTestStep sl@0: { sl@0: public: sl@0: TAudioInputFillBuffer8TestStep(CMMFBuffer* aBuffer, CMMFDummySink* aSink) sl@0: : TAudioInputFillBufferTestStep(NULL, aBuffer, aSink) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: class TAudioOutputEmptyBufferTestStep : public TTestStep sl@0: { sl@0: public: sl@0: TAudioOutputEmptyBufferTestStep(MDataSink* aSink, CMMFBuffer* aBuffer, CMMFDummySource* aSource) sl@0: : TTestStep(aSource, aSink), iBuffer(aBuffer), iAsynchronousWrite(EFalse) sl@0: { } sl@0: sl@0: void SetAsynchronousWrite() sl@0: { iAsynchronousWrite = ETrue; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: CMMFBuffer* iBuffer; sl@0: TBool iAsynchronousWrite; sl@0: }; sl@0: sl@0: class TAudioOutputEmptyBuffer2TestStep : public TAudioOutputEmptyBufferTestStep sl@0: { sl@0: public: sl@0: TAudioOutputEmptyBuffer2TestStep(MDataSink* aSink, CMMFBuffer* aBuffer, CMMFDummySource* aSource) sl@0: : TAudioOutputEmptyBufferTestStep(aSink, aBuffer, aSource) sl@0: { iAsynchronousWrite = ETrue; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TAudioOutputEmptyBuffer3TestStep : public TAudioOutputEmptyBufferTestStep sl@0: { sl@0: public: sl@0: TAudioOutputEmptyBuffer3TestStep(MDataSink* aSink, CMMFBuffer* aBuffer, CMMFDummySource* aSource) sl@0: : TAudioOutputEmptyBufferTestStep(aSink, aBuffer, aSource) sl@0: { iAsynchronousWrite = ETrue; } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TAudioOutputEmptyBuffer4TestStep : public TAudioOutputEmptyBufferTestStep sl@0: { sl@0: public: sl@0: TAudioOutputEmptyBuffer4TestStep(CMMFBuffer* aBuffer, CMMFDummySource* aSource, MDataSource& aRealFormat) sl@0: : TAudioOutputEmptyBufferTestStep(NULL, aBuffer, aSource), iRealFormat(aRealFormat) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: MDataSource& iRealFormat; sl@0: }; sl@0: sl@0: class TAudioOutputEmptyBuffer5TestStep : public TAudioOutputEmptyBufferTestStep sl@0: { sl@0: public: sl@0: TAudioOutputEmptyBuffer5TestStep(CMMFBuffer* aBuffer, CMMFDummySource* aSource, MDataSource& aRealFormat) sl@0: : TAudioOutputEmptyBufferTestStep(NULL, aBuffer, aSource), iRealFormat(aRealFormat) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: MDataSource& iRealFormat; sl@0: }; sl@0: sl@0: class TAudioOutputEmptyBuffer6TestStep : public TAudioOutputEmptyBufferTestStep sl@0: { sl@0: public: sl@0: TAudioOutputEmptyBuffer6TestStep(CMMFBuffer* aBuffer, CMMFDummySource* aSource, MDataSource& aRealFormat) sl@0: : TAudioOutputEmptyBufferTestStep(NULL, aBuffer, aSource), iRealFormat(aRealFormat) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: sl@0: public: sl@0: MDataSource& iRealFormat; sl@0: }; sl@0: sl@0: class TPrimeStopTestStep : public TFileTestStep sl@0: { sl@0: public: sl@0: TPrimeStopTestStep() sl@0: { } sl@0: sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: class TPrimeStopSinkTestStep : public TFileTestStep sl@0: { sl@0: public: sl@0: TPrimeStopSinkTestStep() sl@0: { } sl@0: sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * CTestStep_MMF_SRSSNK, which is the base class for all sl@0: * the SelfTest suite test steps. sl@0: * sl@0: * @lib "TSU_MMF_SRSSNK.lib" sl@0: * sl@0: * @xxxx sl@0: * sl@0: */ sl@0: const TInt KErrFileFail = -12345; sl@0: class CTestStep_MMF_SRSSNK : public CTestStep sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK(TBool aIsAllocTest = ETrue); sl@0: ~CTestStep_MMF_SRSSNK(); sl@0: static void CleanUp(TAny *aPtr); sl@0: inline void SetTestSuite(const CTestSuite_MMF_SRSSNK* aTestSuite); sl@0: sl@0: void DoTestStep(TTestStep& aTestStep, TPtrC aTestDescription, TInt aExpectedTestResult, TInt aHeapCellCount = 0); sl@0: void DoTestStepWithAllocFail(TTestStep& aTestStep, TPtrC aTestDescription, TInt aExpectedTestResult, TInt aHeapCellCount = 0); sl@0: void DoTestStepWithFileFail(TFileTestStep& aTestStep, TPtrC aTestDescription, TInt aExpectedTestResult, TInt aHeapCellCount = 0); sl@0: void DoTestStepWithAllocAndFileFail(TFileTestStep& aTestStep, TPtrC aTestDescription, TInt aExpectedTestResult); sl@0: sl@0: void DoTest(TTestStep& aTestStep, TPtrC aTestDescription, TInt aExpectedTestResult, TInt aHeapCellCount = 0); sl@0: void DoFileTest(TFileTestStep& aTestStep, TPtrC aTestDescription, TInt aExpectedTestResult); sl@0: void DoFileTestWithoutAllocFail(TFileTestStep& aTestStep, TPtrC aTestDescription, TInt aExpectedTestResult, TInt aHeapCellCount); sl@0: sl@0: // from CTestStep sl@0: public: sl@0: TVerdict OpenL(); sl@0: sl@0: protected: sl@0: void CopyFileL(RFs& aFs, const TDesC& aOld, const TDesC& aNew); sl@0: sl@0: void OpenFileL(const TDesC& aFileName, TInt aMode, TBool aShareProtected=EFalse); sl@0: void CloseFile(); sl@0: sl@0: void DeleteFileSinkL(TSinkType aSinkType, RFs& aFs, TDesC& aFileName); sl@0: sl@0: sl@0: protected: sl@0: // pointer to suite which owns this test sl@0: const CTestSuite_MMF_SRSSNK* iMMFBaseClTestSuite; sl@0: sl@0: TVerdict iTestResult; sl@0: TBool iIsAllocTest; sl@0: TBool iFileFailureTestingEnabled; sl@0: RFile iFile; sl@0: RFs iFs; sl@0: }; sl@0: sl@0: inline void CTestStep_MMF_SRSSNK::SetTestSuite(const CTestSuite_MMF_SRSSNK* aTestSuite) sl@0: { sl@0: iMMFBaseClTestSuite = aTestSuite; sl@0: } sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0001 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0001(); sl@0: ~CTestStep_MMF_SRSSNK_U_0001(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0002 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0002(); sl@0: ~CTestStep_MMF_SRSSNK_U_0002(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0003 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0003(); sl@0: ~CTestStep_MMF_SRSSNK_U_0003(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0004 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0004(); sl@0: ~CTestStep_MMF_SRSSNK_U_0004(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0005 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0005(); sl@0: ~CTestStep_MMF_SRSSNK_U_0005(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0006 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0006(); sl@0: ~CTestStep_MMF_SRSSNK_U_0006(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0007 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0007(); sl@0: ~CTestStep_MMF_SRSSNK_U_0007(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0008 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0008(); sl@0: ~CTestStep_MMF_SRSSNK_U_0008(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0009 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0009(); sl@0: ~CTestStep_MMF_SRSSNK_U_0009(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0010 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0010(); sl@0: ~CTestStep_MMF_SRSSNK_U_0010(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0011 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0011(); sl@0: ~CTestStep_MMF_SRSSNK_U_0011(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0012 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0012(); sl@0: ~CTestStep_MMF_SRSSNK_U_0012(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0013 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0013(); sl@0: ~CTestStep_MMF_SRSSNK_U_0013(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0014 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0014(); sl@0: ~CTestStep_MMF_SRSSNK_U_0014(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0015 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0015(); sl@0: ~CTestStep_MMF_SRSSNK_U_0015(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0101 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0101(); sl@0: ~CTestStep_MMF_SRSSNK_U_0101(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0102 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0102(); sl@0: ~CTestStep_MMF_SRSSNK_U_0102(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0103 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0103(); sl@0: ~CTestStep_MMF_SRSSNK_U_0103(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0104 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0104(); sl@0: ~CTestStep_MMF_SRSSNK_U_0104(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_FileSourceMisc : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_FileSourceMisc(TSourceType aSourceType); sl@0: ~CTestStep_MMF_SRSSNK_FileSourceMisc(); sl@0: virtual TVerdict DoTestStepL(); sl@0: private: sl@0: TSourceType iSourceType; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_FileFillBuffer : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_FileFillBuffer(TSourceType aSourceType); sl@0: ~CTestStep_MMF_SRSSNK_FileFillBuffer(); sl@0: virtual TVerdict DoTestStepL(); sl@0: private: sl@0: TSourceType iSourceType; sl@0: }; sl@0: sl@0: sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0107 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0107(); sl@0: ~CTestStep_MMF_SRSSNK_U_0107(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_FileReadBuffer : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_FileReadBuffer(TSourceType aSourceType); sl@0: ~CTestStep_MMF_SRSSNK_FileReadBuffer(); sl@0: virtual TVerdict DoTestStepL(); sl@0: private: sl@0: TSourceType iSourceType; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0109 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0109(); sl@0: ~CTestStep_MMF_SRSSNK_U_0109(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_FileSinkMisc : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_FileSinkMisc(TSinkType aSinkType); sl@0: ~CTestStep_MMF_SRSSNK_FileSinkMisc(); sl@0: virtual TVerdict DoTestStepL(); sl@0: private: sl@0: TSinkType iSinkType; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_FileEmptyBuffer : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_FileEmptyBuffer(TSinkType aSinkType); sl@0: ~CTestStep_MMF_SRSSNK_FileEmptyBuffer(); sl@0: virtual TVerdict DoTestStepL(); sl@0: sl@0: private: sl@0: TSinkType iSinkType; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0112 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0112(); sl@0: ~CTestStep_MMF_SRSSNK_U_0112(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_FileWriteBuffer : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_FileWriteBuffer(TSinkType aSinkType); sl@0: ~CTestStep_MMF_SRSSNK_FileWriteBuffer(); sl@0: virtual TVerdict DoTestStepL(); sl@0: sl@0: private: sl@0: TSinkType iSinkType; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0114 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0114(); sl@0: ~CTestStep_MMF_SRSSNK_U_0114(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0115 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0115(); sl@0: ~CTestStep_MMF_SRSSNK_U_0115(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_FileEvaluateIntent : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_FileEvaluateIntent(TSourceType aSourceType); sl@0: ~CTestStep_MMF_SRSSNK_FileEvaluateIntent(); sl@0: virtual TVerdict DoTestStepL(); sl@0: private: sl@0: TSourceType iSourceType; sl@0: TSinkType iSinkType; sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_FileExecuteIntent : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_FileExecuteIntent(TSourceType aSourceType); sl@0: ~CTestStep_MMF_SRSSNK_FileExecuteIntent(); sl@0: virtual TVerdict DoTestStepL(); sl@0: private: sl@0: TSourceType iSourceType; sl@0: TSinkType iSinkType; sl@0: }; sl@0: sl@0: sl@0: /* sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_FileIsProtected : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_FileIsProtected(TSourceType aSourceType); sl@0: ~CTestStep_MMF_SRSSNK_FileIsProtected(); sl@0: virtual TVerdict DoTestStepL(); sl@0: private: sl@0: TSourceType iSourceType; sl@0: TSinkType iSinkType; sl@0: }; sl@0: sl@0: /* sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0119 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0119(); sl@0: ~CTestStep_MMF_SRSSNK_U_0119(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0201 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0201(); sl@0: ~CTestStep_MMF_SRSSNK_U_0201(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0202 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0202(); sl@0: ~CTestStep_MMF_SRSSNK_U_0202(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0203 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0203(); sl@0: ~CTestStep_MMF_SRSSNK_U_0203(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0204 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0204(); sl@0: ~CTestStep_MMF_SRSSNK_U_0204(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0205 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0205(); sl@0: ~CTestStep_MMF_SRSSNK_U_0205(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0206 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0206(); sl@0: ~CTestStep_MMF_SRSSNK_U_0206(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0207 : public CTestStep_MMF_SRSSNK, public MDevSoundObserver sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0207(); sl@0: ~CTestStep_MMF_SRSSNK_U_0207(); sl@0: virtual TVerdict DoTestStepL(); sl@0: sl@0: // from MDevSoundObserver sl@0: virtual void InitializeComplete(TInt aError); sl@0: virtual void ToneFinished(TInt /*aError*/) {}; sl@0: virtual void BufferToBeFilled(CMMFBuffer* /*aBuffer*/) {}; sl@0: virtual void PlayError(TInt /*aError*/) {}; sl@0: virtual void BufferToBeEmptied(CMMFBuffer* /*aBuffer*/) {}; sl@0: virtual void RecordError(TInt /*aError*/) {}; sl@0: virtual void ConvertError(TInt /*aError*/) {}; sl@0: virtual void DeviceMessage(TUid /*aMessageType*/, const TDesC8& /*aMsg*/) {}; sl@0: virtual void SendEventToClient(const TMMFEvent& /*aEvent*/) {}; sl@0: CMMFAudioInput* iSource; // not owned by CTestStep_MMF_SRSSNK_U_0207, but transient sl@0: TInt iError; sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0208 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0208(); sl@0: ~CTestStep_MMF_SRSSNK_U_0208(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0209 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0209(); sl@0: ~CTestStep_MMF_SRSSNK_U_0209(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0210 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0210(); sl@0: ~CTestStep_MMF_SRSSNK_U_0210(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0211 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0211(); sl@0: ~CTestStep_MMF_SRSSNK_U_0211(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /** sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0212 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0212(); sl@0: ~CTestStep_MMF_SRSSNK_U_0212(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /* sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0301 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0301(); sl@0: ~CTestStep_MMF_SRSSNK_U_0301(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /* sl@0: * sl@0: * sl@0: */ sl@0: class CTestStep_MMF_SRSSNK_U_0302 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0302(); sl@0: ~CTestStep_MMF_SRSSNK_U_0302(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: /* Testing of the Source and Sink sl@0: * sl@0: * sl@0: */ sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0400 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0400(); sl@0: ~CTestStep_MMF_SRSSNK_U_0400(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0405 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0405(); sl@0: ~CTestStep_MMF_SRSSNK_U_0405(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0406 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0406(); sl@0: ~CTestStep_MMF_SRSSNK_U_0406(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0407 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0407(); sl@0: ~CTestStep_MMF_SRSSNK_U_0407(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0408 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0408(); sl@0: ~CTestStep_MMF_SRSSNK_U_0408(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0409 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0409(); sl@0: ~CTestStep_MMF_SRSSNK_U_0409(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0410 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0410(); sl@0: ~CTestStep_MMF_SRSSNK_U_0410(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0411 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0411(); sl@0: ~CTestStep_MMF_SRSSNK_U_0411(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0412 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0412(); sl@0: ~CTestStep_MMF_SRSSNK_U_0412(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0413 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0413(); sl@0: ~CTestStep_MMF_SRSSNK_U_0413(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0414 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0414(); sl@0: ~CTestStep_MMF_SRSSNK_U_0414(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0415 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0415(); sl@0: ~CTestStep_MMF_SRSSNK_U_0415(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0416 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0416(); sl@0: ~CTestStep_MMF_SRSSNK_U_0416(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0417 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0417(); sl@0: ~CTestStep_MMF_SRSSNK_U_0417(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0418 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0418(); sl@0: ~CTestStep_MMF_SRSSNK_U_0418(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0419 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0419(); sl@0: ~CTestStep_MMF_SRSSNK_U_0419(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0420 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0420(); sl@0: ~CTestStep_MMF_SRSSNK_U_0420(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0421 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0421(); sl@0: ~CTestStep_MMF_SRSSNK_U_0421(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: /* sl@0: * sl@0: * Sinks sl@0: * sl@0: */ sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0500 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0500(); sl@0: ~CTestStep_MMF_SRSSNK_U_0500(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0505 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0505(); sl@0: ~CTestStep_MMF_SRSSNK_U_0505(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0506 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0506(); sl@0: ~CTestStep_MMF_SRSSNK_U_0506(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0507 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0507(); sl@0: ~CTestStep_MMF_SRSSNK_U_0507(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0508 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0508(); sl@0: ~CTestStep_MMF_SRSSNK_U_0508(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0509 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0509(); sl@0: ~CTestStep_MMF_SRSSNK_U_0509(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0510 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0510(); sl@0: ~CTestStep_MMF_SRSSNK_U_0510(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0511 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0511(); sl@0: ~CTestStep_MMF_SRSSNK_U_0511(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0512 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0512(); sl@0: ~CTestStep_MMF_SRSSNK_U_0512(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0513 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0513(); sl@0: ~CTestStep_MMF_SRSSNK_U_0513(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0514 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0514(); sl@0: ~CTestStep_MMF_SRSSNK_U_0514(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0515 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0515(); sl@0: ~CTestStep_MMF_SRSSNK_U_0515(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0516 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0516(); sl@0: ~CTestStep_MMF_SRSSNK_U_0516(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0517 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0517(); sl@0: ~CTestStep_MMF_SRSSNK_U_0517(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0518 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0518(); sl@0: ~CTestStep_MMF_SRSSNK_U_0518(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: sl@0: class CTestStep_MMF_SRSSNK_U_0519 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0519(); sl@0: ~CTestStep_MMF_SRSSNK_U_0519(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: sl@0: class CTestStep_MMF_SRSSNK_MultipleStop : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_MultipleStop(); // U_520 sl@0: ~CTestStep_MMF_SRSSNK_MultipleStop(); sl@0: virtual TVerdict DoTestStepL(); sl@0: private: sl@0: TSourceType iSourceType; sl@0: }; sl@0: sl@0: // INC085391: CMMFFile::iFilePath and iFileDrive should be initialised for KMMFileHandleSource sl@0: class CTestStep_MMF_SRSSNK_U_0600 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0600(); sl@0: ~CTestStep_MMF_SRSSNK_U_0600(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: //CR0854 - Provide access to the file data via the CData object sl@0: class CTestStep_MMF_SRSSNK_U_0521 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0521(); sl@0: ~CTestStep_MMF_SRSSNK_U_0521(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: //CR0854 - Provide access to the file data via the CData object sl@0: class CTestStep_MMF_SRSSNK_U_0522 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0522(); sl@0: ~CTestStep_MMF_SRSSNK_U_0522(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: // PDEF102849: Invalid Remaining Space value obtained for E:\ (memory card) sl@0: class CTestStep_MMF_SRSSNK_U_0523 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0523(); sl@0: ~CTestStep_MMF_SRSSNK_U_0523(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: //PDEF137282 - Answering VoIP call doesn't work sl@0: class CTestStep_MMF_SRSSNK_U_0524 : public CTestStep_MMF_SRSSNK sl@0: { sl@0: public: sl@0: CTestStep_MMF_SRSSNK_U_0524(); sl@0: ~CTestStep_MMF_SRSSNK_U_0524(); sl@0: virtual TVerdict DoTestStepL(); sl@0: }; sl@0: sl@0: class TCreateSourceBuffer3TestStep : public TTestStep, public MAsyncEventHandler sl@0: { sl@0: public: sl@0: TCreateSourceBuffer3TestStep(TSourceType aSourceType, MDataSink* aSink, TUid aExpectedType, TBool aExpectedRef, TInt aExpectedMaxLength = 0) sl@0: : TTestStep(NULL, aSink), iSourceType(aSourceType), iExpectedType(aExpectedType), iExpectedRef(aExpectedRef), iExpectedMaxLength(aExpectedMaxLength) sl@0: { } sl@0: sl@0: TVerdict DoTestStepL(); sl@0: TInt SendEventToClient(const TMMFEvent& aEvent); sl@0: sl@0: public: sl@0: TSourceType iSourceType; sl@0: CMMFBuffer* iSinkBuffer; sl@0: TUid iExpectedType; sl@0: TBool iExpectedRef; sl@0: TInt iExpectedMaxLength; sl@0: }; sl@0: sl@0: #endif /* __TSU_MMF_SRSSNK_H__ */ sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: