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.
16 #include "TestPlayerUtils.h"
17 #include "OpenFileByHandle7901.h"
21 CTestMmfAclntOpenFile7901::CTestMmfAclntOpenFile7901(const TDesC& aTestName, const TDesC& aSectName, TBool aNegative)
22 :CTestMmfAclntRecord(aTestName, aSectName, aNegative)
26 CTestMmfAclntOpenFile7901* CTestMmfAclntOpenFile7901::NewL(const TDesC& aTestName, const TDesC& aSectName, TBool aNegative)
28 CTestMmfAclntOpenFile7901* self = new (ELeave) CTestMmfAclntOpenFile7901(aTestName, aSectName, aNegative);
36 TVerdict CTestMmfAclntOpenFile7901::DoTestL(CMdaAudioRecorderUtility* aPlayer)
38 INFO_PRINTF1( _L("TestPlayerUtils : OpenFileL(RFile&)/Play"));
41 iError = KErrTimedOut;
45 User::LeaveIfError(fs.Connect());
46 CleanupClosePushL(fs);
47 User::LeaveIfError(fs.ShareProtected());
49 TBuf<KSizeBuf> filename;
53 if(!GetStringFromConfig(_L("SectionOne"), _L("PCM16"), filename1))
58 GetDriveName(filename);
59 filename.Append(filename1);
62 User::LeaveIfError( file.Open( fs, filename, EFileRead ) );
63 CleanupClosePushL(file);
65 TInt error = KErrNone;
66 TRAP(error,aPlayer->OpenFileL(file));
67 CActiveScheduler::Start();
71 // open file again for play
72 User::LeaveIfError( file.Open( fs, filename, EFileRead ) );
75 TRAP(error,aPlayer->OpenFileL(file));
76 CActiveScheduler::Start();
79 CleanupStack::PopAndDestroy(2, &fs);