0
|
1 |
|
|
2 |
// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
// All rights reserved.
|
|
4 |
// This component and the accompanying materials are made available
|
|
5 |
// under the terms of "Eclipse Public License v1.0"
|
|
6 |
// which accompanies this distribution, and is available
|
|
7 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
//
|
|
9 |
// Initial Contributors:
|
|
10 |
// Nokia Corporation - initial contribution.
|
|
11 |
//
|
|
12 |
// Contributors:
|
|
13 |
//
|
|
14 |
// Description:
|
|
15 |
// TestPlayerUtils.h
|
|
16 |
// Header file: Basic tests.
|
|
17 |
//
|
|
18 |
//
|
|
19 |
|
|
20 |
/**
|
|
21 |
@file TestPlayerUtils.h
|
|
22 |
*/
|
|
23 |
|
|
24 |
#ifndef TESTPLAYERCAPS0012_H__
|
|
25 |
#define TESTPLAYERCAPS0012_H__
|
|
26 |
|
|
27 |
|
|
28 |
#include "TSI_MMFACLNT.h"
|
|
29 |
|
|
30 |
|
|
31 |
/**
|
|
32 |
* Load and initialise an audio file.
|
|
33 |
*
|
|
34 |
* @class CTestMmfAclntCaps0012
|
|
35 |
*
|
|
36 |
*/
|
|
37 |
class CTestMmfAclntCaps0012 : public CTestMmfAclntStep, public MMdaAudioPlayerCallback
|
|
38 |
{
|
|
39 |
private:
|
|
40 |
enum InternalState
|
|
41 |
{
|
|
42 |
EWaitingForServer=0,
|
|
43 |
EInitPlayer,
|
|
44 |
EPlaying
|
|
45 |
};
|
|
46 |
|
|
47 |
|
|
48 |
public:
|
|
49 |
static CTestMmfAclntCaps0012* NewL(const TDesC& aTestName, const TDesC& aSectionName, const TDesC& aKeyName);
|
|
50 |
static CTestMmfAclntCaps0012* NewLC(const TDesC& aTestName, const TDesC& aSectionName, const TDesC& aKeyName);
|
|
51 |
|
|
52 |
~CTestMmfAclntCaps0012();
|
|
53 |
void Close();
|
|
54 |
virtual TVerdict DoTestStepL();
|
|
55 |
|
|
56 |
void CreatePlayer();
|
|
57 |
void BeginPlayback();
|
|
58 |
// from MMdaAudioPlayerCallback
|
|
59 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds &aDuration);
|
|
60 |
virtual void MapcPlayComplete(TInt aError);
|
|
61 |
|
|
62 |
void DoProcess(TInt aError);
|
|
63 |
|
|
64 |
class CServerMonitor : public CActive
|
|
65 |
{
|
|
66 |
public:
|
|
67 |
static CServerMonitor* NewL(CTestMmfAclntCaps0012* aParent);
|
|
68 |
void ConstructL();
|
|
69 |
void RunL();
|
|
70 |
void DoCancel();
|
|
71 |
|
|
72 |
TRequestStatus& ActiveStatus();
|
|
73 |
private:
|
|
74 |
CServerMonitor(CTestMmfAclntCaps0012* aParent);
|
|
75 |
private:
|
|
76 |
CTestMmfAclntCaps0012* iParent;
|
|
77 |
};
|
|
78 |
|
|
79 |
private:
|
|
80 |
CTestMmfAclntCaps0012(const TDesC& aTestName, const TDesC& aSectionName, const TDesC& aKeyName);
|
|
81 |
|
|
82 |
private:
|
|
83 |
CMdaAudioPlayerUtility* iPlayer;
|
|
84 |
CServerMonitor* iServerMonitor;
|
|
85 |
TVerdict iVerdict;
|
|
86 |
|
|
87 |
TBuf<KNameBufSize> iSectName; // Section name for retrieving filename
|
|
88 |
TBuf<KNameBufSize> iKeyName; // Key name for retrieving filename
|
|
89 |
InternalState iState;
|
|
90 |
};
|
|
91 |
#endif // TESTPLAYERCAPS0012_H__
|