Update contrib.
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // The tests are for opening the audio file with TMMFileSource/TMMFileHandleSource
16 // Header file: Basic tests.
21 @file TestPlayerFileSource.h
24 #ifndef __TESTPLAYERFILESOURCE_H__
25 #define __TESTPLAYERFILESOURCE_H__
28 #include "TSI_MMFACLNT.h"
31 // CTestMmfAclntFileSource
35 * Load and initialise an audio file.
37 * @class CTestMmfAclntFileSource
40 class CTestMmfAclntFileSource : public CTestMmfAclntStep, public MMdaAudioPlayerCallback
43 static CTestMmfAclntFileSource* NewL(const TDesC& aTestName, const TDesC& aSectName,
44 const TDesC& aKeyName, const TBool aPlay,const TInt aExpectedError);
46 static CTestMmfAclntFileSource* NewLC(const TDesC& aTestName, const TDesC& aSectName,
47 const TDesC& aKeyName, const TBool aPlay, const TInt aExpectedError);
49 virtual TVerdict DoTestStepL();
51 // from MMdaAudioPlayerCallback
52 virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
53 virtual void MapcPlayComplete(TInt aError);
56 CTestMmfAclntFileSource(const TDesC& aTestName, const TDesC& aSectName,
57 const TDesC& aKeyName,const TBool aPlay, const TInt aExpectedError);
61 TBuf<KNameBufSize> iSectName; // Section name for retrieving filename
62 TBuf<KNameBufSize> iKeyName; // Key name for retrieving filename
63 TTimeIntervalMicroSeconds iDuration;// Stores duration of audio
64 const TBool iPlay; // Does this test require playing the audio
65 const TInt iExpectedError; // Is this a negative test
69 // CTestMmfAclntFileHandleSource
73 * Load and initialise an audio file.
75 * @class CTestMmfAclntFileHandleSource
78 class CTestMmfAclntFileHandleSource : public CTestMmfAclntStep, public MMdaAudioPlayerCallback
81 static CTestMmfAclntFileHandleSource* NewL(const TDesC& aTestName, const TDesC& aSectName,
82 const TDesC& aKeyName, const TBool aPlay, const TInt aExpectedError);
84 static CTestMmfAclntFileHandleSource* NewLC(const TDesC& aTestName, const TDesC& aSectName,
85 const TDesC& aKeyName,const TBool aPlay, const TInt aExpectedError);
87 virtual TVerdict DoTestStepL();
89 // from MMdaAudioPlayerCallback
90 virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
91 virtual void MapcPlayComplete(TInt aError);
94 CTestMmfAclntFileHandleSource(const TDesC& aTestName, const TDesC& aSectName,
95 const TDesC& aKeyName, const TBool aPlay, const TInt aExpectedError);
99 TBuf<KNameBufSize> iSectName; // Section name for retrieving filename
100 TBuf<KNameBufSize> iKeyName; // Key name for retrieving filename
101 TTimeIntervalMicroSeconds iDuration;// Stores duration of audio
102 const TBool iPlay; // Does this test require playing the audio
103 const TInt iExpectedError; // Is this a negative test