sl@0: sl@0: // Copyright (c) 2001-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: // TestPlayerUtils.h sl@0: // Header file: Basic tests. sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file TestPlayerUtils.h sl@0: */ sl@0: sl@0: #ifndef TESTPLAYERCAPS0012_H__ sl@0: #define TESTPLAYERCAPS0012_H__ sl@0: sl@0: sl@0: #include "TSI_MMFACLNT.h" sl@0: sl@0: sl@0: /** sl@0: * Load and initialise an audio file. sl@0: * sl@0: * @class CTestMmfAclntCaps0012 sl@0: * sl@0: */ sl@0: class CTestMmfAclntCaps0012 : public CTestMmfAclntStep, public MMdaAudioPlayerCallback sl@0: { sl@0: private: sl@0: enum InternalState sl@0: { sl@0: EWaitingForServer=0, sl@0: EInitPlayer, sl@0: EPlaying sl@0: }; sl@0: sl@0: sl@0: public: sl@0: static CTestMmfAclntCaps0012* NewL(const TDesC& aTestName, const TDesC& aSectionName, const TDesC& aKeyName); sl@0: static CTestMmfAclntCaps0012* NewLC(const TDesC& aTestName, const TDesC& aSectionName, const TDesC& aKeyName); sl@0: sl@0: ~CTestMmfAclntCaps0012(); sl@0: void Close(); sl@0: virtual TVerdict DoTestStepL(); sl@0: sl@0: void CreatePlayer(); sl@0: void BeginPlayback(); 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: void DoProcess(TInt aError); sl@0: sl@0: class CServerMonitor : public CActive sl@0: { sl@0: public: sl@0: static CServerMonitor* NewL(CTestMmfAclntCaps0012* aParent); sl@0: void ConstructL(); sl@0: void RunL(); sl@0: void DoCancel(); sl@0: sl@0: TRequestStatus& ActiveStatus(); sl@0: private: sl@0: CServerMonitor(CTestMmfAclntCaps0012* aParent); sl@0: private: sl@0: CTestMmfAclntCaps0012* iParent; sl@0: }; sl@0: sl@0: private: sl@0: CTestMmfAclntCaps0012(const TDesC& aTestName, const TDesC& aSectionName, const TDesC& aKeyName); sl@0: sl@0: private: sl@0: CMdaAudioPlayerUtility* iPlayer; sl@0: CServerMonitor* iServerMonitor; sl@0: TVerdict iVerdict; sl@0: sl@0: TBuf iSectName; // Section name for retrieving filename sl@0: TBuf iKeyName; // Key name for retrieving filename sl@0: InternalState iState; sl@0: }; sl@0: #endif // TESTPLAYERCAPS0012_H__