sl@0: // Copyright (c) 2004-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: // The tests are for opening the audio file with TMMFileSource/TMMFileHandleSource sl@0: // and playing. sl@0: // Header file: Basic tests. sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file TestPlayerFileSource.h sl@0: */ sl@0: sl@0: #ifndef __TESTPLAYERFILESOURCE_H__ sl@0: #define __TESTPLAYERFILESOURCE_H__ sl@0: sl@0: sl@0: #include "TSI_MMFACLNT.h" sl@0: sl@0: // sl@0: // CTestMmfAclntFileSource sl@0: // sl@0: sl@0: /** sl@0: * Load and initialise an audio file. sl@0: * sl@0: * @class CTestMmfAclntFileSource sl@0: * sl@0: */ sl@0: class CTestMmfAclntFileSource : public CTestMmfAclntStep, public MMdaAudioPlayerCallback sl@0: { sl@0: public: sl@0: static CTestMmfAclntFileSource* NewL(const TDesC& aTestName, const TDesC& aSectName, sl@0: const TDesC& aKeyName, const TBool aPlay,const TInt aExpectedError); sl@0: sl@0: static CTestMmfAclntFileSource* NewLC(const TDesC& aTestName, const TDesC& aSectName, sl@0: const TDesC& aKeyName, const TBool aPlay, const TInt aExpectedError); sl@0: sl@0: virtual TVerdict DoTestStepL(); sl@0: sl@0: // from MMdaAudioPlayerCallback sl@0: virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration); sl@0: virtual void MapcPlayComplete(TInt aError); sl@0: sl@0: private: sl@0: CTestMmfAclntFileSource(const TDesC& aTestName, const TDesC& aSectName, sl@0: const TDesC& aKeyName,const TBool aPlay, const TInt aExpectedError); sl@0: sl@0: private: sl@0: TInt iError; sl@0: TBuf iSectName; // Section name for retrieving filename sl@0: TBuf iKeyName; // Key name for retrieving filename sl@0: TTimeIntervalMicroSeconds iDuration;// Stores duration of audio sl@0: const TBool iPlay; // Does this test require playing the audio sl@0: const TInt iExpectedError; // Is this a negative test sl@0: }; sl@0: sl@0: // sl@0: // CTestMmfAclntFileHandleSource sl@0: // sl@0: sl@0: /** sl@0: * Load and initialise an audio file. sl@0: * sl@0: * @class CTestMmfAclntFileHandleSource sl@0: * sl@0: */ sl@0: class CTestMmfAclntFileHandleSource : public CTestMmfAclntStep, public MMdaAudioPlayerCallback sl@0: { sl@0: public: sl@0: static CTestMmfAclntFileHandleSource* NewL(const TDesC& aTestName, const TDesC& aSectName, sl@0: const TDesC& aKeyName, const TBool aPlay, const TInt aExpectedError); sl@0: sl@0: static CTestMmfAclntFileHandleSource* NewLC(const TDesC& aTestName, const TDesC& aSectName, sl@0: const TDesC& aKeyName,const TBool aPlay, const TInt aExpectedError); sl@0: sl@0: virtual TVerdict DoTestStepL(); sl@0: sl@0: // from MMdaAudioPlayerCallback sl@0: virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration); sl@0: virtual void MapcPlayComplete(TInt aError); sl@0: sl@0: private: sl@0: CTestMmfAclntFileHandleSource(const TDesC& aTestName, const TDesC& aSectName, sl@0: const TDesC& aKeyName, const TBool aPlay, const TInt aExpectedError); sl@0: sl@0: private: sl@0: TInt iError; sl@0: TBuf iSectName; // Section name for retrieving filename sl@0: TBuf iKeyName; // Key name for retrieving filename sl@0: TTimeIntervalMicroSeconds iDuration;// Stores duration of audio sl@0: const TBool iPlay; // Does this test require playing the audio sl@0: const TInt iExpectedError; // Is this a negative test sl@0: }; sl@0: sl@0: #endif