First public contribution.
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.
16 #include "TestPlayerUtils.h"
17 #include "OpenFileByHandle7804.h"
21 CTestMmfAclntOpenFile7804::CTestMmfAclntOpenFile7804(const TDesC& aTestName, const TDesC& aSectName)
22 : CTestMmfAclntAudioPlayerUtil(aTestName, aSectName)
25 CTestMmfAclntOpenFile7804* CTestMmfAclntOpenFile7804::NewL(const TDesC& aTestName, const TDesC& aSectName)
27 CTestMmfAclntOpenFile7804* self = new (ELeave) CTestMmfAclntOpenFile7804(aTestName, aSectName);
34 TVerdict CTestMmfAclntOpenFile7804::DoTestL(CMdaAudioPlayerUtility* aPlayer)
36 return( PerformTestL( aPlayer ) );
39 TVerdict CTestMmfAclntOpenFile7804::PerformTestL(CMdaAudioPlayerUtility* aPlayer)
41 INFO_PRINTF1( _L("TestPlayerUtils : OpenFileL(RFile&)/Play"));
48 User::LeaveIfError(fs.Connect());
49 CleanupClosePushL(fs);
50 User::LeaveIfError(fs.ShareProtected());
52 TBuf<KSizeBuf> filename;
56 if(!GetStringFromConfig(_L("SectionOne"), _L("PCMU16BE"), filename1))
61 GetDriveName(filename);
62 filename.Append(filename1);
64 User::LeaveIfError( file.Open( fs, filename, EFileRead ) );
65 CleanupClosePushL(file);
67 aPlayer->OpenFileL(file);
68 CActiveScheduler::Start();
70 if (iError == KErrNone)
73 CActiveScheduler::Start();
76 if (iError == KErrNone)
82 CleanupStack::PopAndDestroy(2, &fs);