sl@0: 
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: // Header file: Basic  tests.
sl@0: // 
sl@0: //
sl@0: 
sl@0: /**
sl@0:  @file OpenFileByHandle7906.h
sl@0: */
sl@0: 
sl@0: #ifndef OPENFILEBYHANDLE7906_H__
sl@0: #define OPENFILEBYHANDLE7906_H__
sl@0: 
sl@0: #include "TestRecorder.h"
sl@0: #include "TSI_MMFACLNT.h"
sl@0: 
sl@0: /** 
sl@0:  * Open new file.
sl@0:  *
sl@0:  * @class CTestMmfAclntOpenFile7906
sl@0:  * 
sl@0:  */
sl@0: 
sl@0: class CTestMmfAclntOpenFile7906 :  public CTestMmfAclntCodecTest,
sl@0: 								   public MMdaObjectStateChangeObserver,
sl@0: 								   public MMdaAudioPlayerCallback,
sl@0: 								   public MMdaAudioOutputStreamCallback
sl@0: 	{
sl@0: public:
sl@0: 	static CTestMmfAclntOpenFile7906* NewL( const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, const TTestFormat aFormat = ENone, const TBool aCreateFile = EFalse );
sl@0: 	static CTestMmfAclntOpenFile7906* NewLC( const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, const TTestFormat aFormat = ENone, const TBool aCreateFile = EFalse );
sl@0: 	virtual TVerdict DoTestStepL();
sl@0: 	virtual TVerdict DoTestStepPreambleL();
sl@0: 	virtual void MoscoStateChangeEvent( CBase* aObject, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode );
sl@0: 
sl@0: 	// from MMdaAudioPlayerCallback
sl@0: public:
sl@0: 	virtual void MapcInitComplete( TInt aError, const TTimeIntervalMicroSeconds& aDuration );
sl@0: 	virtual void MapcPlayComplete( TInt aError );
sl@0: 
sl@0: 	// from MMdaAudioOutputStreamCallback
sl@0: public:
sl@0: 	virtual void MaoscOpenComplete( TInt aError );
sl@0: 	virtual void MaoscBufferCopied( TInt aError, const TDesC8& aBuffer );
sl@0: 	virtual void MaoscPlayComplete( TInt aError );
sl@0: 
sl@0: private:
sl@0: 	CTestMmfAclntOpenFile7906( const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, const TTestFormat aFormat = ENone, const TBool aCreateFile = EFalse );
sl@0: 	
sl@0: private:
sl@0: 	TInt iError;
sl@0: 	TBool iCreateFile;
sl@0: 	TBuf<KNameBufSize> iSectName;			// Section name for retrieving filename
sl@0: 	TBuf<KNameBufSize> iKeyName;			// Key name for retrieving filename
sl@0: 	} ;
sl@0: 
sl@0: 
sl@0: #endif	// OPENFILEBYHANDLE7906_H__