|
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 TESTPLAYERCAPS_H__ |
|
25 #define TESTPLAYERCAPS_H__ |
|
26 |
|
27 |
|
28 //#include "TSI_MMFACLNT.h" |
|
29 #include "TSI_MMF_SDEVSOUND_STEP.h" |
|
30 |
|
31 const TInt KMaxSvrMessageSize = 256; |
|
32 |
|
33 /** |
|
34 * Load and initialise an audio file. |
|
35 * |
|
36 * @class CTestMmfAclntCaps |
|
37 * |
|
38 */ |
|
39 class CTestMmfAclntCaps : public CTestStepSDevSound, public MMdaAudioPlayerCallback |
|
40 { |
|
41 private: |
|
42 enum InternalState |
|
43 { |
|
44 EWaitingForServer=0, |
|
45 EInitPlayer, |
|
46 EPlaying |
|
47 }; |
|
48 |
|
49 |
|
50 public: |
|
51 static CTestMmfAclntCaps* NewL(const TDesC& aTestName, const TDesC& aSectionName, const TDesC& aKeyName); |
|
52 static CTestMmfAclntCaps* NewLC(const TDesC& aTestName, const TDesC& aSectionName, const TDesC& aKeyName); |
|
53 |
|
54 ~CTestMmfAclntCaps(); |
|
55 virtual TVerdict DoTestStepL(); |
|
56 |
|
57 void CreatePlayer(); |
|
58 void BeginPlayback(); |
|
59 // from MMdaAudioPlayerCallback |
|
60 virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds &aDuration); |
|
61 virtual void MapcPlayComplete(TInt aError); |
|
62 |
|
63 void DoProcess(TInt aError); |
|
64 |
|
65 class CServerMonitor : public CActive |
|
66 { |
|
67 public: |
|
68 static CServerMonitor* NewL(CTestMmfAclntCaps* aParent); |
|
69 void ConstructL(); |
|
70 void RunL(); |
|
71 void DoCancel(); |
|
72 |
|
73 TRequestStatus& ActiveStatus(); |
|
74 private: |
|
75 CServerMonitor(CTestMmfAclntCaps* aParent); |
|
76 private: |
|
77 CTestMmfAclntCaps* iParent; |
|
78 }; |
|
79 |
|
80 private: |
|
81 CTestMmfAclntCaps(const TDesC& aTestName, const TDesC& aSectionName, const TDesC& aKeyName); |
|
82 |
|
83 private: |
|
84 CMdaAudioPlayerUtility* iPlayer; |
|
85 CServerMonitor* iServerMonitor; |
|
86 TVerdict iVerdict; |
|
87 |
|
88 TBuf<KNameBufSize> iSectName; // Section name for retrieving filename |
|
89 TBuf<KNameBufSize> iKeyName; // Key name for retrieving filename |
|
90 InternalState iState; |
|
91 }; |
|
92 #endif |