sl@0
|
1 |
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// Header file: Declaration for Various Classes used for Audio Resource Notification tests.
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
/**
|
sl@0
|
19 |
@file TestAudioClientUtilitiesARN.h
|
sl@0
|
20 |
*/
|
sl@0
|
21 |
|
sl@0
|
22 |
#ifndef TESTAUDIOCLIENTUTILITIESARN_H
|
sl@0
|
23 |
#define TESTAUDIOCLIENTUTILITIESARN_H
|
sl@0
|
24 |
|
sl@0
|
25 |
#include "mdaaudiosampleplayer.h"
|
sl@0
|
26 |
#include "mdaaudiosampleeditor.h"
|
sl@0
|
27 |
#include "mdaaudiooutputstream.h"
|
sl@0
|
28 |
#include "TestPlayerUtils.h"
|
sl@0
|
29 |
#include "TestRecorder.h"
|
sl@0
|
30 |
#include "TSI_MMFACLNT.h"
|
sl@0
|
31 |
#include <mmf/common/mmfaudio.h>
|
sl@0
|
32 |
|
sl@0
|
33 |
//------------------------------------------------------------------------------
|
sl@0
|
34 |
//********************PREQ 797 - Audio Resource Notification********************
|
sl@0
|
35 |
//------------------------------------------------------------------------------
|
sl@0
|
36 |
|
sl@0
|
37 |
/**
|
sl@0
|
38 |
* stopActiveScheduler
|
sl@0
|
39 |
*/
|
sl@0
|
40 |
static TInt stopActiveScheduler(TAny*)
|
sl@0
|
41 |
{
|
sl@0
|
42 |
CActiveScheduler::Stop();
|
sl@0
|
43 |
return KErrNone;
|
sl@0
|
44 |
}
|
sl@0
|
45 |
|
sl@0
|
46 |
//
|
sl@0
|
47 |
//Declarations//
|
sl@0
|
48 |
//
|
sl@0
|
49 |
|
sl@0
|
50 |
//
|
sl@0
|
51 |
//Custom Error Codes & CONST Declarations.
|
sl@0
|
52 |
//
|
sl@0
|
53 |
const TInt KErrUser = -1000;
|
sl@0
|
54 |
const TInt KErrBadResult = (KErrUser - 1);
|
sl@0
|
55 |
const TInt KMicroSecsInOneSec = 1000000;
|
sl@0
|
56 |
const TUint KSampleRate8000Hz = 8000;
|
sl@0
|
57 |
|
sl@0
|
58 |
//
|
sl@0
|
59 |
//Forward class declarations
|
sl@0
|
60 |
//
|
sl@0
|
61 |
class CCallbackTimer;
|
sl@0
|
62 |
class CTestMdaAudioPlayerCallbackSupport;
|
sl@0
|
63 |
class CTestMdaAudioRecorderCallbackSupport;
|
sl@0
|
64 |
class CTestMdaAudioOutputStreamCallbackSupport;
|
sl@0
|
65 |
class CTestMdaAudioMultiClientCallbackSupport;
|
sl@0
|
66 |
|
sl@0
|
67 |
//------------------------------------------------------------------------------
|
sl@0
|
68 |
//******************PREQ 797 - Audio Player Test Declarations*******************
|
sl@0
|
69 |
//------------------------------------------------------------------------------
|
sl@0
|
70 |
class CMultiEventChecker: public CBase
|
sl@0
|
71 |
{
|
sl@0
|
72 |
public:
|
sl@0
|
73 |
// MultiEvent checker utility enums
|
sl@0
|
74 |
enum TClientUtilityType
|
sl@0
|
75 |
{
|
sl@0
|
76 |
EAudioPlayer = 0,
|
sl@0
|
77 |
EAudioRecorder,
|
sl@0
|
78 |
EAudioStream
|
sl@0
|
79 |
};
|
sl@0
|
80 |
public:
|
sl@0
|
81 |
static CMultiEventChecker* NewL();
|
sl@0
|
82 |
TBool CheckFsm(TInt aClientNumber, TClientUtilityType aClientType,TInt aEventCode, TInt aError=KErrNone,CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
83 |
void StopTest();
|
sl@0
|
84 |
void SetExpectedState(TInt aState);
|
sl@0
|
85 |
void SetExpectedEvent(TInt aClientNumber, TInt aEvent,TInt aError,CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
86 |
void RegisterClientEventToMonitor(TInt aClientNumber, TInt aEventCode, TInt aError, TInt aState,CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
87 |
void EnableMultipleEventMonitor()
|
sl@0
|
88 |
{
|
sl@0
|
89 |
iMonitorMultipleEvents = ETrue;
|
sl@0
|
90 |
}
|
sl@0
|
91 |
void DisableMultipleEventMonitor()
|
sl@0
|
92 |
{
|
sl@0
|
93 |
iMonitorMultipleEvents = EFalse;
|
sl@0
|
94 |
}
|
sl@0
|
95 |
TBool IsMutipleEventMonitorEnabled()
|
sl@0
|
96 |
{
|
sl@0
|
97 |
return iMonitorMultipleEvents;
|
sl@0
|
98 |
}
|
sl@0
|
99 |
TInt NextState()
|
sl@0
|
100 |
{
|
sl@0
|
101 |
return iNextState;
|
sl@0
|
102 |
}
|
sl@0
|
103 |
TBool IsMonitoringFinished();
|
sl@0
|
104 |
protected:
|
sl@0
|
105 |
void ConstructL();
|
sl@0
|
106 |
CMultiEventChecker();
|
sl@0
|
107 |
//Register client events to monitor
|
sl@0
|
108 |
TInt iExpectedEvent;
|
sl@0
|
109 |
TInt iExpectedError;
|
sl@0
|
110 |
CMdaAudioClipUtility::TState iExpectedRecorderState;
|
sl@0
|
111 |
TInt iNextState;
|
sl@0
|
112 |
TFixedArray <TInt, 4> iClientEventsToMonitor;
|
sl@0
|
113 |
TFixedArray <TInt, 4> iClientError;
|
sl@0
|
114 |
TFixedArray <TInt, 4> iFsmStateforClient;
|
sl@0
|
115 |
TInt iClientsRegistered;
|
sl@0
|
116 |
TBool iMonitorMultipleEvents;
|
sl@0
|
117 |
};
|
sl@0
|
118 |
|
sl@0
|
119 |
//
|
sl@0
|
120 |
//BASE CLASS DECLARATIONS//
|
sl@0
|
121 |
//
|
sl@0
|
122 |
|
sl@0
|
123 |
/**
|
sl@0
|
124 |
* Observer class to identify and pass events to the test step class
|
sl@0
|
125 |
*
|
sl@0
|
126 |
* @class MTestAudioPlayerCallback
|
sl@0
|
127 |
*
|
sl@0
|
128 |
*/
|
sl@0
|
129 |
class MTestAudioPlayerCallback
|
sl@0
|
130 |
{
|
sl@0
|
131 |
public :
|
sl@0
|
132 |
virtual void MapcInitCompleteTest(TInt aError, const TTimeIntervalMicroSeconds& aDuration, CTestMdaAudioPlayerCallbackSupport& aMdaAudioPlayerCallbackSupport) = 0;
|
sl@0
|
133 |
virtual void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestMdaAudioPlayerCallbackSupport& aMdaAudioPlayerCallbackSupport) = 0;
|
sl@0
|
134 |
virtual void MapcPlayCompleteTest(TInt aError, CTestMdaAudioPlayerCallbackSupport& aMdaAudioPlayerCallbackSupport) = 0;
|
sl@0
|
135 |
};
|
sl@0
|
136 |
|
sl@0
|
137 |
/**
|
sl@0
|
138 |
* Support class to pass the events to the test step class using the MTestAudioPlayerCallback
|
sl@0
|
139 |
*
|
sl@0
|
140 |
* @class CTestMdaAudioPlayerCallbackSupport
|
sl@0
|
141 |
*
|
sl@0
|
142 |
*/
|
sl@0
|
143 |
class CTestMdaAudioPlayerCallbackSupport : public CBase, public MMdaAudioPlayerCallback, public MMMFAudioResourceNotificationCallback
|
sl@0
|
144 |
{
|
sl@0
|
145 |
public :
|
sl@0
|
146 |
static CTestMdaAudioPlayerCallbackSupport* NewL(MTestAudioPlayerCallback& aCallback);
|
sl@0
|
147 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
sl@0
|
148 |
virtual void MapcPlayComplete(TInt aError);
|
sl@0
|
149 |
virtual void MarncResourceAvailable(TUid aNotificationEventId, const TDesC8& aNotificationData);
|
sl@0
|
150 |
protected:
|
sl@0
|
151 |
CTestMdaAudioPlayerCallbackSupport(MTestAudioPlayerCallback& aCallback);
|
sl@0
|
152 |
void ConstructL();
|
sl@0
|
153 |
private :
|
sl@0
|
154 |
MTestAudioPlayerCallback& iCallback;
|
sl@0
|
155 |
};
|
sl@0
|
156 |
|
sl@0
|
157 |
|
sl@0
|
158 |
/**
|
sl@0
|
159 |
* Base Class for ARN functionality for most ARN audio player tests
|
sl@0
|
160 |
*
|
sl@0
|
161 |
* @class CTestMmfAclntAudioPlayerARN
|
sl@0
|
162 |
*
|
sl@0
|
163 |
*/
|
sl@0
|
164 |
class CTestMmfAclntAudioPlayerARN : public CTestMmfAclntStep, public MTestAudioPlayerCallback
|
sl@0
|
165 |
{
|
sl@0
|
166 |
public:
|
sl@0
|
167 |
// Enum to describe the current state.
|
sl@0
|
168 |
enum TMmfAudioPlayerState
|
sl@0
|
169 |
{
|
sl@0
|
170 |
EStateBegin = 0,
|
sl@0
|
171 |
EStateOpenPlayer1,
|
sl@0
|
172 |
EStateOpenPlayer2,
|
sl@0
|
173 |
EStateOpenPlayer3,
|
sl@0
|
174 |
EStatePlaying1,
|
sl@0
|
175 |
EStatePlaying2,
|
sl@0
|
176 |
EStatePlaying3,
|
sl@0
|
177 |
EStateEndPlay1,
|
sl@0
|
178 |
EStateEndPlay2,
|
sl@0
|
179 |
EStateEndPlay3,
|
sl@0
|
180 |
EStateErrInUsePlayer1,
|
sl@0
|
181 |
EStateErrInUsePlayer2,
|
sl@0
|
182 |
EStateErrInUsePlayer3,
|
sl@0
|
183 |
EStateNotifiedPlayer1,
|
sl@0
|
184 |
EStateNotifiedPlayer2,
|
sl@0
|
185 |
EStateNotifiedPlayer3,
|
sl@0
|
186 |
EStateErrInUsePlayer1A,
|
sl@0
|
187 |
EStateNotifiedPlayer1A,
|
sl@0
|
188 |
EStatePlaying2A,
|
sl@0
|
189 |
EStateEndPlay2A
|
sl@0
|
190 |
};
|
sl@0
|
191 |
|
sl@0
|
192 |
// Enum to decide which Event has occured.
|
sl@0
|
193 |
enum TMmfAudioPlayerEvents
|
sl@0
|
194 |
{
|
sl@0
|
195 |
EIdlePlayer = 0,
|
sl@0
|
196 |
EMapcInitComplete1,
|
sl@0
|
197 |
EMapcInitComplete2,
|
sl@0
|
198 |
EMapcInitComplete3,
|
sl@0
|
199 |
EMapcPlayComplete1,
|
sl@0
|
200 |
EMapcPlayComplete2,
|
sl@0
|
201 |
EMapcPlayComplete3,
|
sl@0
|
202 |
EMarncResourceAvailable1,
|
sl@0
|
203 |
EMarncResourceAvailable2,
|
sl@0
|
204 |
EMarncResourceAvailable3
|
sl@0
|
205 |
};
|
sl@0
|
206 |
public :
|
sl@0
|
207 |
// Constructor
|
sl@0
|
208 |
CTestMmfAclntAudioPlayerARN(const TDesC& aTestName, const TDesC& aSectName);
|
sl@0
|
209 |
// Virtual methods for Preamble and Postamble.
|
sl@0
|
210 |
virtual TVerdict DoTestStepPreambleL();
|
sl@0
|
211 |
virtual TVerdict DoTestStepPostambleL();
|
sl@0
|
212 |
// Virtual function to access test specific methods
|
sl@0
|
213 |
virtual TVerdict DoTestStepL();
|
sl@0
|
214 |
// Pure function to access test specific methods
|
sl@0
|
215 |
virtual TVerdict DoTestL()=0;
|
sl@0
|
216 |
// from MTestAudioPlayerCallback
|
sl@0
|
217 |
virtual void MapcInitCompleteTest(TInt aError, const TTimeIntervalMicroSeconds& aDuration, CTestMdaAudioPlayerCallbackSupport& aMdaAudioPlayerCallbackSupport);
|
sl@0
|
218 |
virtual void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestMdaAudioPlayerCallbackSupport& aMdaAudioPlayerCallbackSupport);
|
sl@0
|
219 |
virtual void MapcPlayCompleteTest(TInt aError, CTestMdaAudioPlayerCallbackSupport& aMdaAudioPlayerCallbackSupport);
|
sl@0
|
220 |
// Centralised State Handler
|
sl@0
|
221 |
virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError)=0;
|
sl@0
|
222 |
virtual TBool FsmCheck(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
223 |
protected :
|
sl@0
|
224 |
// StateInit Function
|
sl@0
|
225 |
void StateInit();
|
sl@0
|
226 |
// StateChange Function
|
sl@0
|
227 |
void StateChange(TMmfAudioPlayerState aState, TMmfAudioPlayerEvents aExpectedEvent, TInt aExpectedError=KErrNone);
|
sl@0
|
228 |
protected :
|
sl@0
|
229 |
// CMdaAudioPlayerUtility instances
|
sl@0
|
230 |
CMdaAudioPlayerUtility* iTestAudioPlayer1;
|
sl@0
|
231 |
CMdaAudioPlayerUtility* iTestAudioPlayer2;
|
sl@0
|
232 |
CMdaAudioPlayerUtility* iTestAudioPlayer3;
|
sl@0
|
233 |
// CTestMdaAudioPlayerCallbackSupport instances
|
sl@0
|
234 |
CTestMdaAudioPlayerCallbackSupport* iMdaAudioPlayerCallbackSupport1;
|
sl@0
|
235 |
CTestMdaAudioPlayerCallbackSupport* iMdaAudioPlayerCallbackSupport2;
|
sl@0
|
236 |
CTestMdaAudioPlayerCallbackSupport* iMdaAudioPlayerCallbackSupport3;
|
sl@0
|
237 |
// Other class variable declarations
|
sl@0
|
238 |
TBuf<KSizeBuf> iFilename1;
|
sl@0
|
239 |
TBuf<KSizeBuf> iFilename2;
|
sl@0
|
240 |
TBuf<KSizeBuf> iFilename3;
|
sl@0
|
241 |
TTimeIntervalMicroSeconds iPosition;
|
sl@0
|
242 |
TTimeIntervalMicroSeconds iDuration;
|
sl@0
|
243 |
TInt iError;
|
sl@0
|
244 |
TMmfAudioPlayerState iState;
|
sl@0
|
245 |
TRequestStatus iRequestStatus;
|
sl@0
|
246 |
CCallBackTimer* iCallBackTimer;
|
sl@0
|
247 |
TMmfAudioPlayerEvents iExpectedEvent;
|
sl@0
|
248 |
TInt iExpectedError;
|
sl@0
|
249 |
TMmfAudioPlayerEvents iEventOccured;
|
sl@0
|
250 |
TBuf<KNameBufSize> iSectName; // Section name for retrieving filename
|
sl@0
|
251 |
CMultiEventChecker* iEventChecker;
|
sl@0
|
252 |
};
|
sl@0
|
253 |
|
sl@0
|
254 |
//
|
sl@0
|
255 |
//POSITIVE TESTS//
|
sl@0
|
256 |
//
|
sl@0
|
257 |
|
sl@0
|
258 |
/**
|
sl@0
|
259 |
* Register for notification, but make no request to play audio.
|
sl@0
|
260 |
*
|
sl@0
|
261 |
* @class CTestMmfAclntARN8101
|
sl@0
|
262 |
*
|
sl@0
|
263 |
*/
|
sl@0
|
264 |
class CTestMmfAclntARN8101 : public CTestMmfAclntAudioPlayerARN
|
sl@0
|
265 |
{
|
sl@0
|
266 |
public:
|
sl@0
|
267 |
static CTestMmfAclntARN8101* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
268 |
virtual TVerdict DoTestL();
|
sl@0
|
269 |
virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
270 |
|
sl@0
|
271 |
protected:
|
sl@0
|
272 |
CTestMmfAclntARN8101( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
273 |
TVerdict PerformTestL();
|
sl@0
|
274 |
};
|
sl@0
|
275 |
|
sl@0
|
276 |
/**
|
sl@0
|
277 |
* Register (b4 play, after Open) and Receive Notification of a Resource Available Event.
|
sl@0
|
278 |
* (when audio resource is currently unavailable and then available)
|
sl@0
|
279 |
*
|
sl@0
|
280 |
* @class CTestMmfAclntARN8102
|
sl@0
|
281 |
*
|
sl@0
|
282 |
*/
|
sl@0
|
283 |
class CTestMmfAclntARN8102 : public CTestMmfAclntAudioPlayerARN
|
sl@0
|
284 |
{
|
sl@0
|
285 |
public:
|
sl@0
|
286 |
static CTestMmfAclntARN8102* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
287 |
virtual TVerdict DoTestL();
|
sl@0
|
288 |
virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
289 |
|
sl@0
|
290 |
protected:
|
sl@0
|
291 |
CTestMmfAclntARN8102( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
292 |
TVerdict PerformTestL();
|
sl@0
|
293 |
};
|
sl@0
|
294 |
|
sl@0
|
295 |
/**
|
sl@0
|
296 |
* Register (at the time of Play) and Receive Notification of a Resource Available Event.
|
sl@0
|
297 |
* (when audio resource is currently available and subsequently unavailable, and then available)
|
sl@0
|
298 |
|
sl@0
|
299 |
*
|
sl@0
|
300 |
* @class CTestMmfAclntARN8103
|
sl@0
|
301 |
*
|
sl@0
|
302 |
*/
|
sl@0
|
303 |
class CTestMmfAclntARN8103 : public CTestMmfAclntAudioPlayerARN
|
sl@0
|
304 |
{
|
sl@0
|
305 |
public:
|
sl@0
|
306 |
static CTestMmfAclntARN8103* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
307 |
virtual TVerdict DoTestL();
|
sl@0
|
308 |
virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
309 |
virtual TBool FsmCheck(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
310 |
|
sl@0
|
311 |
protected:
|
sl@0
|
312 |
CTestMmfAclntARN8103( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
313 |
TVerdict PerformTestL();
|
sl@0
|
314 |
};
|
sl@0
|
315 |
|
sl@0
|
316 |
/**
|
sl@0
|
317 |
* Registration (b4 File Open) and Cancellation of the notification request
|
sl@0
|
318 |
*
|
sl@0
|
319 |
* @class CTestMmfAclntARN8104
|
sl@0
|
320 |
*
|
sl@0
|
321 |
*/
|
sl@0
|
322 |
class CTestMmfAclntARN8104 : public CTestMmfAclntAudioPlayerARN
|
sl@0
|
323 |
{
|
sl@0
|
324 |
public:
|
sl@0
|
325 |
static CTestMmfAclntARN8104* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
326 |
virtual TVerdict DoTestL();
|
sl@0
|
327 |
virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
328 |
|
sl@0
|
329 |
protected:
|
sl@0
|
330 |
CTestMmfAclntARN8104( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
331 |
TVerdict PerformTestL();
|
sl@0
|
332 |
};
|
sl@0
|
333 |
|
sl@0
|
334 |
/**
|
sl@0
|
335 |
* Register (after Play Error) and Get the actual position from where the paused audio can be resumed.
|
sl@0
|
336 |
* Low priority client is played first.
|
sl@0
|
337 |
*
|
sl@0
|
338 |
* @class CTestMmfAclntARN8105
|
sl@0
|
339 |
*
|
sl@0
|
340 |
*/
|
sl@0
|
341 |
class CTestMmfAclntARN8105 : public CTestMmfAclntAudioPlayerARN
|
sl@0
|
342 |
{
|
sl@0
|
343 |
public:
|
sl@0
|
344 |
static CTestMmfAclntARN8105* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
345 |
virtual TVerdict DoTestL();
|
sl@0
|
346 |
virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
347 |
virtual TBool FsmCheck(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
348 |
|
sl@0
|
349 |
protected:
|
sl@0
|
350 |
CTestMmfAclntARN8105( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
351 |
TVerdict PerformTestL();
|
sl@0
|
352 |
|
sl@0
|
353 |
private:
|
sl@0
|
354 |
TTimeIntervalMicroSeconds iPositionStop;
|
sl@0
|
355 |
TTimeIntervalMicroSeconds iPositionResume;
|
sl@0
|
356 |
};
|
sl@0
|
357 |
|
sl@0
|
358 |
/**
|
sl@0
|
359 |
* Register (after Play Error) and Get the actual position from where the paused audio can be resumed.
|
sl@0
|
360 |
* High priority client is played first.
|
sl@0
|
361 |
*
|
sl@0
|
362 |
* @class CTestMmfAclntARN8106
|
sl@0
|
363 |
*
|
sl@0
|
364 |
*/
|
sl@0
|
365 |
class CTestMmfAclntARN8106 : public CTestMmfAclntAudioPlayerARN
|
sl@0
|
366 |
{
|
sl@0
|
367 |
public:
|
sl@0
|
368 |
static CTestMmfAclntARN8106* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
369 |
virtual TVerdict DoTestL();
|
sl@0
|
370 |
virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
371 |
virtual TBool FsmCheck(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
372 |
|
sl@0
|
373 |
protected:
|
sl@0
|
374 |
CTestMmfAclntARN8106( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
375 |
TVerdict PerformTestL();
|
sl@0
|
376 |
|
sl@0
|
377 |
private:
|
sl@0
|
378 |
TTimeIntervalMicroSeconds iPositionStop;
|
sl@0
|
379 |
TTimeIntervalMicroSeconds iPositionResume;
|
sl@0
|
380 |
};
|
sl@0
|
381 |
|
sl@0
|
382 |
/**
|
sl@0
|
383 |
* Client does not need to Re-register for the same event when the event is received
|
sl@0
|
384 |
* i.e API is not one shot.
|
sl@0
|
385 |
*
|
sl@0
|
386 |
* @class CTestMmfAclntARN8107
|
sl@0
|
387 |
*
|
sl@0
|
388 |
*/
|
sl@0
|
389 |
class CTestMmfAclntARN8107 : public CTestMmfAclntAudioPlayerARN
|
sl@0
|
390 |
{
|
sl@0
|
391 |
public:
|
sl@0
|
392 |
static CTestMmfAclntARN8107* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
393 |
virtual TVerdict DoTestL();
|
sl@0
|
394 |
virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
395 |
virtual TBool FsmCheck(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
396 |
|
sl@0
|
397 |
protected:
|
sl@0
|
398 |
CTestMmfAclntARN8107( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
399 |
TVerdict PerformTestL();
|
sl@0
|
400 |
};
|
sl@0
|
401 |
|
sl@0
|
402 |
/**
|
sl@0
|
403 |
* High priority client plays with repeats and low priority client doesn't get resources
|
sl@0
|
404 |
*
|
sl@0
|
405 |
* @class CTestMmfAclntARN8109
|
sl@0
|
406 |
*
|
sl@0
|
407 |
*/
|
sl@0
|
408 |
class CTestMmfAclntARN8109 : public CTestMmfAclntAudioPlayerARN
|
sl@0
|
409 |
{
|
sl@0
|
410 |
public:
|
sl@0
|
411 |
static CTestMmfAclntARN8109* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
412 |
virtual TVerdict DoTestL();
|
sl@0
|
413 |
virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
414 |
virtual TBool FsmCheck(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
415 |
|
sl@0
|
416 |
// from MTestAudioPlayerCallback
|
sl@0
|
417 |
virtual void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestMdaAudioPlayerCallbackSupport& aMdaAudioPlayerCallbackSupport);
|
sl@0
|
418 |
virtual void MapcPlayCompleteTest(TInt aError, CTestMdaAudioPlayerCallbackSupport& aMdaAudioPlayerCallbackSupport);
|
sl@0
|
419 |
|
sl@0
|
420 |
protected:
|
sl@0
|
421 |
CTestMmfAclntARN8109( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
422 |
TVerdict PerformTestL();
|
sl@0
|
423 |
TBool TimeComparison(const TUint aActual, const TUint aExpected, const TUint aDeviation);
|
sl@0
|
424 |
private:
|
sl@0
|
425 |
TTime iStart;
|
sl@0
|
426 |
TTime iStop;
|
sl@0
|
427 |
TInt iDuration;
|
sl@0
|
428 |
TUint iActualDuration;
|
sl@0
|
429 |
TBool iPlayComplete2;
|
sl@0
|
430 |
TBool iResourceAvailable1;
|
sl@0
|
431 |
};
|
sl@0
|
432 |
|
sl@0
|
433 |
|
sl@0
|
434 |
|
sl@0
|
435 |
/**
|
sl@0
|
436 |
* Call WillResumePlay()
|
sl@0
|
437 |
*
|
sl@0
|
438 |
* @class CTestMmfAclntARN8108
|
sl@0
|
439 |
*
|
sl@0
|
440 |
*/
|
sl@0
|
441 |
class CTestMmfAclntARN8108 : public CTestMmfAclntAudioPlayerARN
|
sl@0
|
442 |
{
|
sl@0
|
443 |
public:
|
sl@0
|
444 |
static CTestMmfAclntARN8108* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
445 |
virtual TVerdict DoTestL();
|
sl@0
|
446 |
virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
447 |
virtual void DecideFsmState(TInt aClientNumber,CMultiEventChecker::TClientUtilityType aClientType, TInt aEventCode, TInt aError=KErrNone);
|
sl@0
|
448 |
protected:
|
sl@0
|
449 |
TVerdict HandleStateOpenPlayer1();
|
sl@0
|
450 |
TVerdict HandleStateOpenPlayer3();
|
sl@0
|
451 |
TVerdict HandleStateOpenPlayer2();
|
sl@0
|
452 |
TVerdict HandleStateErrInUsePlayer1();
|
sl@0
|
453 |
TVerdict HandleStateErrInUsePlayer3();
|
sl@0
|
454 |
TVerdict HandleStateNotifiedPlayer1();
|
sl@0
|
455 |
TVerdict HandleStateNotifiedPlayer3();
|
sl@0
|
456 |
TVerdict HandleStatePlaying1();
|
sl@0
|
457 |
CTestMmfAclntARN8108( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
458 |
void InitTest();
|
sl@0
|
459 |
void StartTestL();
|
sl@0
|
460 |
TVerdict PerformTestL();
|
sl@0
|
461 |
typedef TVerdict (CTestMmfAclntARN8108::*fp)();
|
sl@0
|
462 |
TFixedArray<fp,30> iStateHandlers;
|
sl@0
|
463 |
};
|
sl@0
|
464 |
|
sl@0
|
465 |
/**
|
sl@0
|
466 |
* Dont register for ARN, get pre-empted and then resume from same position.
|
sl@0
|
467 |
* Test case for DevCR KEVN-7T5EHA
|
sl@0
|
468 |
* @class CTestMmfAclntARN8110
|
sl@0
|
469 |
*
|
sl@0
|
470 |
*/
|
sl@0
|
471 |
class CTestMmfAclntARN8110 : public CTestMmfAclntAudioPlayerARN
|
sl@0
|
472 |
{
|
sl@0
|
473 |
public:
|
sl@0
|
474 |
static CTestMmfAclntARN8110* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
475 |
virtual TVerdict DoTestL();
|
sl@0
|
476 |
virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
477 |
|
sl@0
|
478 |
protected:
|
sl@0
|
479 |
CTestMmfAclntARN8110( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
480 |
TVerdict PerformTestL();
|
sl@0
|
481 |
TTimeIntervalMicroSeconds iPlayer1Pos;
|
sl@0
|
482 |
};
|
sl@0
|
483 |
|
sl@0
|
484 |
/**
|
sl@0
|
485 |
* Dont register for ARN, get pre-empted, stop and chk if position is reset, start play again.
|
sl@0
|
486 |
* Test case for DevCR KEVN-7T5EHA
|
sl@0
|
487 |
* @class CTestMmfAclntARN8111
|
sl@0
|
488 |
*
|
sl@0
|
489 |
*/
|
sl@0
|
490 |
class CTestMmfAclntARN8111 : public CTestMmfAclntAudioPlayerARN
|
sl@0
|
491 |
{
|
sl@0
|
492 |
public:
|
sl@0
|
493 |
static CTestMmfAclntARN8111* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
494 |
virtual TVerdict DoTestL();
|
sl@0
|
495 |
virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
496 |
|
sl@0
|
497 |
protected:
|
sl@0
|
498 |
CTestMmfAclntARN8111( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
499 |
TVerdict PerformTestL();
|
sl@0
|
500 |
TTimeIntervalMicroSeconds iPlayer1Pos;
|
sl@0
|
501 |
};
|
sl@0
|
502 |
|
sl@0
|
503 |
/**
|
sl@0
|
504 |
* Play higher priority first, then start playing low priority
|
sl@0
|
505 |
* Test case for DevCR KEVN-7T5EHA
|
sl@0
|
506 |
* @class CTestMmfAclntARN8112
|
sl@0
|
507 |
*
|
sl@0
|
508 |
*/
|
sl@0
|
509 |
class CTestMmfAclntARN8112 : public CTestMmfAclntAudioPlayerARN
|
sl@0
|
510 |
{
|
sl@0
|
511 |
public:
|
sl@0
|
512 |
static CTestMmfAclntARN8112* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
513 |
virtual TVerdict DoTestL();
|
sl@0
|
514 |
virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
515 |
|
sl@0
|
516 |
protected:
|
sl@0
|
517 |
CTestMmfAclntARN8112( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
518 |
TVerdict PerformTestL();
|
sl@0
|
519 |
TTimeIntervalMicroSeconds iPlayer1Pos;
|
sl@0
|
520 |
};
|
sl@0
|
521 |
//
|
sl@0
|
522 |
//NEGATIVE TESTS//
|
sl@0
|
523 |
//
|
sl@0
|
524 |
|
sl@0
|
525 |
/**
|
sl@0
|
526 |
* Register for notification with an unsupported event type.
|
sl@0
|
527 |
*
|
sl@0
|
528 |
* @class CTestMmfAclntARN1301
|
sl@0
|
529 |
*
|
sl@0
|
530 |
*/
|
sl@0
|
531 |
class CTestMmfAclntARN1301 : public CTestMmfAclntAudioPlayerARN
|
sl@0
|
532 |
{
|
sl@0
|
533 |
public:
|
sl@0
|
534 |
static CTestMmfAclntARN1301* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
535 |
virtual TVerdict DoTestL();
|
sl@0
|
536 |
virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
537 |
|
sl@0
|
538 |
protected:
|
sl@0
|
539 |
CTestMmfAclntARN1301( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
540 |
TVerdict PerformTestL();
|
sl@0
|
541 |
};
|
sl@0
|
542 |
|
sl@0
|
543 |
/**
|
sl@0
|
544 |
* Cancel the request for notification with an unsupported event type.
|
sl@0
|
545 |
*
|
sl@0
|
546 |
* @class CTestMmfAclntARN1302
|
sl@0
|
547 |
*
|
sl@0
|
548 |
*/
|
sl@0
|
549 |
class CTestMmfAclntARN1302 : public CTestMmfAclntAudioPlayerARN
|
sl@0
|
550 |
{
|
sl@0
|
551 |
public:
|
sl@0
|
552 |
static CTestMmfAclntARN1302* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
553 |
virtual TVerdict DoTestL();
|
sl@0
|
554 |
virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
555 |
|
sl@0
|
556 |
protected:
|
sl@0
|
557 |
CTestMmfAclntARN1302( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
558 |
TVerdict PerformTestL();
|
sl@0
|
559 |
};
|
sl@0
|
560 |
|
sl@0
|
561 |
/**
|
sl@0
|
562 |
* Cancel when no resource Notification is requested.
|
sl@0
|
563 |
*
|
sl@0
|
564 |
* @class CTestMmfAclntARN1303
|
sl@0
|
565 |
*
|
sl@0
|
566 |
*/
|
sl@0
|
567 |
class CTestMmfAclntARN1303 : public CTestMmfAclntAudioPlayerARN
|
sl@0
|
568 |
{
|
sl@0
|
569 |
public:
|
sl@0
|
570 |
static CTestMmfAclntARN1303* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
571 |
virtual TVerdict DoTestL();
|
sl@0
|
572 |
virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
573 |
|
sl@0
|
574 |
protected:
|
sl@0
|
575 |
CTestMmfAclntARN1303( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
576 |
TVerdict PerformTestL();
|
sl@0
|
577 |
};
|
sl@0
|
578 |
|
sl@0
|
579 |
/**
|
sl@0
|
580 |
* Multiple Registration for notification for the same event type.
|
sl@0
|
581 |
*
|
sl@0
|
582 |
* @class CTestMmfAclntARN1304
|
sl@0
|
583 |
*
|
sl@0
|
584 |
*/
|
sl@0
|
585 |
class CTestMmfAclntARN1304 : public CTestMmfAclntAudioPlayerARN
|
sl@0
|
586 |
{
|
sl@0
|
587 |
public:
|
sl@0
|
588 |
static CTestMmfAclntARN1304* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
589 |
virtual TVerdict DoTestL();
|
sl@0
|
590 |
virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
|
sl@0
|
591 |
|
sl@0
|
592 |
protected:
|
sl@0
|
593 |
CTestMmfAclntARN1304( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
594 |
TVerdict PerformTestL();
|
sl@0
|
595 |
};
|
sl@0
|
596 |
|
sl@0
|
597 |
//------------------------------------------------------------------------------
|
sl@0
|
598 |
//*****************PREQ 797 - Audio Recorder Test Declarations******************
|
sl@0
|
599 |
//------------------------------------------------------------------------------
|
sl@0
|
600 |
|
sl@0
|
601 |
//
|
sl@0
|
602 |
//ENUM DECLARATIONS//
|
sl@0
|
603 |
//
|
sl@0
|
604 |
|
sl@0
|
605 |
// Enum to decide which Event has occured.
|
sl@0
|
606 |
enum TMmfAudioRecorderEvents
|
sl@0
|
607 |
{
|
sl@0
|
608 |
EIdleRecorder = 0,
|
sl@0
|
609 |
EMoscoStateChange1,
|
sl@0
|
610 |
EMoscoStateChange2,
|
sl@0
|
611 |
EMoscoStateChange3,
|
sl@0
|
612 |
EMarncResourceAvailableRec1,
|
sl@0
|
613 |
EMarncResourceAvailableRec2,
|
sl@0
|
614 |
EMarncResourceAvailableRec3
|
sl@0
|
615 |
};
|
sl@0
|
616 |
|
sl@0
|
617 |
//
|
sl@0
|
618 |
//BASE CLASS DECLARATIONS//
|
sl@0
|
619 |
//
|
sl@0
|
620 |
|
sl@0
|
621 |
/**
|
sl@0
|
622 |
* Observer class to identify and pass events to the test step class
|
sl@0
|
623 |
*
|
sl@0
|
624 |
* @class MTestAudioRecorderCallback
|
sl@0
|
625 |
*
|
sl@0
|
626 |
*/
|
sl@0
|
627 |
class MTestAudioRecorderCallback
|
sl@0
|
628 |
{
|
sl@0
|
629 |
public :
|
sl@0
|
630 |
virtual void MoscoStateChangeEventTest(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode, CTestMdaAudioRecorderCallbackSupport& aMdaAudioRecorderCallbackSupport) = 0;
|
sl@0
|
631 |
virtual void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestMdaAudioRecorderCallbackSupport& aMdaAudioRecorderCallbackSupport) = 0;
|
sl@0
|
632 |
};
|
sl@0
|
633 |
|
sl@0
|
634 |
/**
|
sl@0
|
635 |
* Support class to pass the events to the test step class using the MTestAudioRecorderCallback
|
sl@0
|
636 |
*
|
sl@0
|
637 |
* @class CTestMdaAudioRecorderCallbackSupport
|
sl@0
|
638 |
*
|
sl@0
|
639 |
*/
|
sl@0
|
640 |
class CTestMdaAudioRecorderCallbackSupport : public CBase, public MMdaObjectStateChangeObserver, public MMMFAudioResourceNotificationCallback
|
sl@0
|
641 |
{
|
sl@0
|
642 |
public :
|
sl@0
|
643 |
static CTestMdaAudioRecorderCallbackSupport* NewL(MTestAudioRecorderCallback& aCallback);
|
sl@0
|
644 |
virtual void MoscoStateChangeEvent(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode);
|
sl@0
|
645 |
virtual void MarncResourceAvailable(TUid aNotificationEventId, const TDesC8& aNotificationData);
|
sl@0
|
646 |
protected:
|
sl@0
|
647 |
CTestMdaAudioRecorderCallbackSupport(MTestAudioRecorderCallback& aCallback);
|
sl@0
|
648 |
void ConstructL();
|
sl@0
|
649 |
private :
|
sl@0
|
650 |
MTestAudioRecorderCallback& iCallback;
|
sl@0
|
651 |
};
|
sl@0
|
652 |
|
sl@0
|
653 |
/**
|
sl@0
|
654 |
* Base Class for ARN functionality for most ARN audio recorder tests
|
sl@0
|
655 |
*
|
sl@0
|
656 |
* @class CTestMmfAclntRecordARN
|
sl@0
|
657 |
*
|
sl@0
|
658 |
*/
|
sl@0
|
659 |
class CTestMmfAclntRecordARN : public CTestMmfAclntStep, public MTestAudioRecorderCallback
|
sl@0
|
660 |
{
|
sl@0
|
661 |
public:
|
sl@0
|
662 |
// Constructor
|
sl@0
|
663 |
CTestMmfAclntRecordARN(const TDesC& aTestName, const TDesC& aSectName);
|
sl@0
|
664 |
// Virtual methods for Preamble and Postamble.
|
sl@0
|
665 |
virtual TVerdict DoTestStepPreambleL();
|
sl@0
|
666 |
virtual TVerdict DoTestStepPostambleL();
|
sl@0
|
667 |
// Virtual function to access test specific methods
|
sl@0
|
668 |
virtual TVerdict DoTestStepL();
|
sl@0
|
669 |
// Pure function to access test specific methods
|
sl@0
|
670 |
virtual TVerdict DoTestL()=0;
|
sl@0
|
671 |
// from MTestAudioRecorderCallback
|
sl@0
|
672 |
void MoscoStateChangeEventTest(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode, CTestMdaAudioRecorderCallbackSupport& aMdaAudioRecorderCallbackSupport);
|
sl@0
|
673 |
void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestMdaAudioRecorderCallbackSupport& aMdaAudioRecorderCallbackSupport);
|
sl@0
|
674 |
// Centralised State Handler
|
sl@0
|
675 |
virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone)=0;
|
sl@0
|
676 |
virtual TBool FsmCheck(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
|
sl@0
|
677 |
protected:
|
sl@0
|
678 |
// StateInit Function
|
sl@0
|
679 |
void StateInit();
|
sl@0
|
680 |
// StateChange Function
|
sl@0
|
681 |
void StateChange(TMmfAudioRecorderEvents aExpectedEvent, CMdaAudioClipUtility::TState aExpectedRecorderState, TInt aExpectedError=KErrNone);
|
sl@0
|
682 |
protected :
|
sl@0
|
683 |
// CMdaAudioRecorderUtility instances
|
sl@0
|
684 |
CMdaAudioRecorderUtility* iTestAudioRecorder1;
|
sl@0
|
685 |
CMdaAudioRecorderUtility* iTestAudioRecorder2;
|
sl@0
|
686 |
CMdaAudioRecorderUtility* iTestAudioRecorder3;
|
sl@0
|
687 |
// CTestMdaAudioRecorderCallbackSupport instances
|
sl@0
|
688 |
CTestMdaAudioRecorderCallbackSupport* iMdaAudioRecorderCallbackSupport1;
|
sl@0
|
689 |
CTestMdaAudioRecorderCallbackSupport* iMdaAudioRecorderCallbackSupport2;
|
sl@0
|
690 |
CTestMdaAudioRecorderCallbackSupport* iMdaAudioRecorderCallbackSupport3;
|
sl@0
|
691 |
// Other class variable declarations
|
sl@0
|
692 |
TBuf<KSizeBuf> iFilename1;
|
sl@0
|
693 |
TBuf<KSizeBuf> iFilename2;
|
sl@0
|
694 |
TBuf<KSizeBuf> iFilename3;
|
sl@0
|
695 |
TInt iError;
|
sl@0
|
696 |
TInt iState;
|
sl@0
|
697 |
TRequestStatus iRequestStatus;
|
sl@0
|
698 |
CCallBackTimer* iCallBackTimer;
|
sl@0
|
699 |
TMmfAudioRecorderEvents iExpectedEvent;
|
sl@0
|
700 |
CMdaAudioClipUtility::TState iExpectedRecorderState;
|
sl@0
|
701 |
TInt iExpectedError;
|
sl@0
|
702 |
TTimeIntervalMicroSeconds iDuration;
|
sl@0
|
703 |
TTimeIntervalMicroSeconds iPosition;
|
sl@0
|
704 |
TMmfAudioRecorderEvents iEventOccured;
|
sl@0
|
705 |
TBuf<KNameBufSize> iSectName; // Section name for retrieving filename
|
sl@0
|
706 |
};
|
sl@0
|
707 |
|
sl@0
|
708 |
//
|
sl@0
|
709 |
//POSITIVE TESTS//
|
sl@0
|
710 |
//
|
sl@0
|
711 |
|
sl@0
|
712 |
/**
|
sl@0
|
713 |
* Register for notification, but make no request to play audio.
|
sl@0
|
714 |
*
|
sl@0
|
715 |
* @class CTestMmfAclntARN8011
|
sl@0
|
716 |
*
|
sl@0
|
717 |
*/
|
sl@0
|
718 |
class CTestMmfAclntARN8011 : public CTestMmfAclntRecordARN
|
sl@0
|
719 |
{
|
sl@0
|
720 |
public:
|
sl@0
|
721 |
static CTestMmfAclntARN8011* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
722 |
virtual TVerdict DoTestL();
|
sl@0
|
723 |
virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
|
sl@0
|
724 |
|
sl@0
|
725 |
protected:
|
sl@0
|
726 |
CTestMmfAclntARN8011( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
727 |
TVerdict PerformTestL();
|
sl@0
|
728 |
};
|
sl@0
|
729 |
|
sl@0
|
730 |
|
sl@0
|
731 |
/**
|
sl@0
|
732 |
* Register (b4 play, after Open) and Receive Notification of a Resource Available Event.
|
sl@0
|
733 |
* (when audio resource is currently unavailable and then available)
|
sl@0
|
734 |
*
|
sl@0
|
735 |
* @class CTestMmfAclntARN8012
|
sl@0
|
736 |
*
|
sl@0
|
737 |
*/
|
sl@0
|
738 |
class CTestMmfAclntARN8012 : public CTestMmfAclntRecordARN
|
sl@0
|
739 |
{
|
sl@0
|
740 |
public:
|
sl@0
|
741 |
static CTestMmfAclntARN8012* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
742 |
virtual TVerdict DoTestL();
|
sl@0
|
743 |
virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
|
sl@0
|
744 |
|
sl@0
|
745 |
protected:
|
sl@0
|
746 |
CTestMmfAclntARN8012( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
747 |
TVerdict PerformTestL();
|
sl@0
|
748 |
};
|
sl@0
|
749 |
|
sl@0
|
750 |
/**
|
sl@0
|
751 |
* Register (at the time of Play) and Receive Notification of a Resource Available Event.
|
sl@0
|
752 |
* (when audio resource is currently available and subsequently unavailable, and then available)
|
sl@0
|
753 |
*
|
sl@0
|
754 |
* @class CTestMmfAclntARN8013
|
sl@0
|
755 |
*
|
sl@0
|
756 |
*/
|
sl@0
|
757 |
class CTestMmfAclntARN8013 : public CTestMmfAclntRecordARN
|
sl@0
|
758 |
{
|
sl@0
|
759 |
public:
|
sl@0
|
760 |
static CTestMmfAclntARN8013* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
761 |
virtual TVerdict DoTestL();
|
sl@0
|
762 |
virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
|
sl@0
|
763 |
|
sl@0
|
764 |
protected:
|
sl@0
|
765 |
CTestMmfAclntARN8013( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
766 |
TVerdict PerformTestL();
|
sl@0
|
767 |
};
|
sl@0
|
768 |
|
sl@0
|
769 |
/**
|
sl@0
|
770 |
* Registration (b4 File Open) and Cancellation of the notification request
|
sl@0
|
771 |
*
|
sl@0
|
772 |
* @class CTestMmfAclntARN8014
|
sl@0
|
773 |
*
|
sl@0
|
774 |
*/
|
sl@0
|
775 |
class CTestMmfAclntARN8014 : public CTestMmfAclntRecordARN
|
sl@0
|
776 |
{
|
sl@0
|
777 |
public:
|
sl@0
|
778 |
static CTestMmfAclntARN8014* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
779 |
virtual TVerdict DoTestL();
|
sl@0
|
780 |
virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
|
sl@0
|
781 |
|
sl@0
|
782 |
protected:
|
sl@0
|
783 |
CTestMmfAclntARN8014( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
784 |
TVerdict PerformTestL();
|
sl@0
|
785 |
};
|
sl@0
|
786 |
|
sl@0
|
787 |
/**
|
sl@0
|
788 |
* Get the actual position from where the paused audio can be resumed.
|
sl@0
|
789 |
*
|
sl@0
|
790 |
* @class CTestMmfAclntARN8015
|
sl@0
|
791 |
*
|
sl@0
|
792 |
*/
|
sl@0
|
793 |
class CTestMmfAclntARN8015 : public CTestMmfAclntRecordARN
|
sl@0
|
794 |
{
|
sl@0
|
795 |
public:
|
sl@0
|
796 |
static CTestMmfAclntARN8015* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
797 |
virtual TVerdict DoTestL();
|
sl@0
|
798 |
virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
|
sl@0
|
799 |
virtual TBool FsmCheck(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
|
sl@0
|
800 |
|
sl@0
|
801 |
protected:
|
sl@0
|
802 |
CTestMmfAclntARN8015( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
803 |
TVerdict PerformTestL();
|
sl@0
|
804 |
|
sl@0
|
805 |
private:
|
sl@0
|
806 |
TTimeIntervalMicroSeconds iPositionStop;
|
sl@0
|
807 |
TTimeIntervalMicroSeconds iPositionResume;
|
sl@0
|
808 |
};
|
sl@0
|
809 |
|
sl@0
|
810 |
/**
|
sl@0
|
811 |
* Call WillResumePlay()
|
sl@0
|
812 |
*
|
sl@0
|
813 |
* @class CTestMmfAclntARN8016
|
sl@0
|
814 |
*
|
sl@0
|
815 |
*/
|
sl@0
|
816 |
class CTestMmfAclntARN8016 : public CTestMmfAclntRecordARN
|
sl@0
|
817 |
{
|
sl@0
|
818 |
public:
|
sl@0
|
819 |
static CTestMmfAclntARN8016* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
820 |
virtual TVerdict DoTestL();
|
sl@0
|
821 |
virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
|
sl@0
|
822 |
virtual TBool FsmCheck(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
|
sl@0
|
823 |
|
sl@0
|
824 |
protected:
|
sl@0
|
825 |
CTestMmfAclntARN8016( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
826 |
TVerdict PerformTestL();
|
sl@0
|
827 |
|
sl@0
|
828 |
private:
|
sl@0
|
829 |
TTimeIntervalMicroSeconds iPositionStop;
|
sl@0
|
830 |
TTimeIntervalMicroSeconds iPositionResume;
|
sl@0
|
831 |
};
|
sl@0
|
832 |
|
sl@0
|
833 |
|
sl@0
|
834 |
//
|
sl@0
|
835 |
//NEGATIVE TESTS//
|
sl@0
|
836 |
//
|
sl@0
|
837 |
|
sl@0
|
838 |
/**
|
sl@0
|
839 |
* Register for notification with an unsupported event type.
|
sl@0
|
840 |
*
|
sl@0
|
841 |
* @class CTestMmfAclntARN1311
|
sl@0
|
842 |
*
|
sl@0
|
843 |
*/
|
sl@0
|
844 |
class CTestMmfAclntARN1311 : public CTestMmfAclntRecordARN
|
sl@0
|
845 |
{
|
sl@0
|
846 |
public:
|
sl@0
|
847 |
static CTestMmfAclntARN1311* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
848 |
virtual TVerdict DoTestL();
|
sl@0
|
849 |
virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
|
sl@0
|
850 |
|
sl@0
|
851 |
protected:
|
sl@0
|
852 |
CTestMmfAclntARN1311( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
853 |
TVerdict PerformTestL();
|
sl@0
|
854 |
};
|
sl@0
|
855 |
|
sl@0
|
856 |
/**
|
sl@0
|
857 |
* Cancel the request for notification with an unsupported event type.
|
sl@0
|
858 |
*
|
sl@0
|
859 |
* @class CTestMmfAclntARN1312
|
sl@0
|
860 |
*
|
sl@0
|
861 |
*/
|
sl@0
|
862 |
class CTestMmfAclntARN1312 : public CTestMmfAclntRecordARN
|
sl@0
|
863 |
{
|
sl@0
|
864 |
public:
|
sl@0
|
865 |
static CTestMmfAclntARN1312* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
866 |
virtual TVerdict DoTestL();
|
sl@0
|
867 |
virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
|
sl@0
|
868 |
|
sl@0
|
869 |
protected:
|
sl@0
|
870 |
CTestMmfAclntARN1312( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
871 |
TVerdict PerformTestL();
|
sl@0
|
872 |
};
|
sl@0
|
873 |
|
sl@0
|
874 |
/**
|
sl@0
|
875 |
* Cancel when no resource Notification is requested.
|
sl@0
|
876 |
*
|
sl@0
|
877 |
* @class CTestMmfAclntARN1313
|
sl@0
|
878 |
*
|
sl@0
|
879 |
*/
|
sl@0
|
880 |
class CTestMmfAclntARN1313 : public CTestMmfAclntRecordARN
|
sl@0
|
881 |
{
|
sl@0
|
882 |
public:
|
sl@0
|
883 |
static CTestMmfAclntARN1313* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
884 |
virtual TVerdict DoTestL();
|
sl@0
|
885 |
virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
|
sl@0
|
886 |
|
sl@0
|
887 |
protected:
|
sl@0
|
888 |
CTestMmfAclntARN1313( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
889 |
TVerdict PerformTestL();
|
sl@0
|
890 |
};
|
sl@0
|
891 |
|
sl@0
|
892 |
/**
|
sl@0
|
893 |
* Multiple Registration for notification for the same event type.
|
sl@0
|
894 |
*
|
sl@0
|
895 |
* @class CTestMmfAclntARN1314
|
sl@0
|
896 |
*
|
sl@0
|
897 |
*/
|
sl@0
|
898 |
class CTestMmfAclntARN1314 : public CTestMmfAclntRecordARN
|
sl@0
|
899 |
{
|
sl@0
|
900 |
public:
|
sl@0
|
901 |
static CTestMmfAclntARN1314* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
902 |
virtual TVerdict DoTestL();
|
sl@0
|
903 |
virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
|
sl@0
|
904 |
|
sl@0
|
905 |
protected:
|
sl@0
|
906 |
CTestMmfAclntARN1314( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
907 |
TVerdict PerformTestL();
|
sl@0
|
908 |
};
|
sl@0
|
909 |
|
sl@0
|
910 |
|
sl@0
|
911 |
//------------------------------------------------------------------------------
|
sl@0
|
912 |
//***************PREQ 797 - Audio OutputStream Test Declarations****************
|
sl@0
|
913 |
//------------------------------------------------------------------------------
|
sl@0
|
914 |
|
sl@0
|
915 |
//
|
sl@0
|
916 |
//ENUM DECLARATIONS//
|
sl@0
|
917 |
//
|
sl@0
|
918 |
|
sl@0
|
919 |
_LIT(KStreamRawFile1,"c:\\AclntITestData\\test.raw");
|
sl@0
|
920 |
_LIT(KStreamRawFile2,"c:\\AclntITestData\\test2.raw");
|
sl@0
|
921 |
_LIT(KStreamRawFile3,"c:\\AclntITestData\\test3.raw");
|
sl@0
|
922 |
|
sl@0
|
923 |
// Enum to decide which Event has occured.
|
sl@0
|
924 |
enum TMmfAudioOutputStreamEvents
|
sl@0
|
925 |
{
|
sl@0
|
926 |
EIdleOutputStream = 0,
|
sl@0
|
927 |
EMaoscOpenComplete1,
|
sl@0
|
928 |
EMaoscOpenComplete2,
|
sl@0
|
929 |
EMaoscOpenComplete3,
|
sl@0
|
930 |
EMaoscBufferCopied1,
|
sl@0
|
931 |
EMaoscBufferCopied2,
|
sl@0
|
932 |
EMaoscBufferCopied3,
|
sl@0
|
933 |
EMaoscPlayComplete1,
|
sl@0
|
934 |
EMaoscPlayComplete2,
|
sl@0
|
935 |
EMaoscPlayComplete3,
|
sl@0
|
936 |
EMarncResourceAvailableOS1,
|
sl@0
|
937 |
EMarncResourceAvailableOS2,
|
sl@0
|
938 |
EMarncResourceAvailableOS3,
|
sl@0
|
939 |
};
|
sl@0
|
940 |
|
sl@0
|
941 |
enum TFsmOutputStreamState
|
sl@0
|
942 |
{
|
sl@0
|
943 |
EStateIdle = 0,
|
sl@0
|
944 |
EStateOpening1,
|
sl@0
|
945 |
EStateOpening2,
|
sl@0
|
946 |
EStateOpening3,
|
sl@0
|
947 |
EStateOpenComplete1,
|
sl@0
|
948 |
EStateOpenComplete2,
|
sl@0
|
949 |
EStateOpenComplete3,
|
sl@0
|
950 |
EStateStreaming1,
|
sl@0
|
951 |
EStateStreaming2,
|
sl@0
|
952 |
EStateStreaming3,
|
sl@0
|
953 |
EStateResumeStreaming1,
|
sl@0
|
954 |
EStateResumeStreaming2,
|
sl@0
|
955 |
EStateResumeStreaming3,
|
sl@0
|
956 |
EStateBufferCopied1,
|
sl@0
|
957 |
EStateBufferCopied2,
|
sl@0
|
958 |
EStateBufferCopied3,
|
sl@0
|
959 |
EStateStreamingComplete1,
|
sl@0
|
960 |
EStateStreamingComplete1ErrInUse,
|
sl@0
|
961 |
EStateStreamingComplete1ErrUnderflow,
|
sl@0
|
962 |
EStateStreamingComplete2,
|
sl@0
|
963 |
EStateStreamingComplete2ErrInUse,
|
sl@0
|
964 |
EStateStreamingComplete2ErrUnderflow,
|
sl@0
|
965 |
EStateStreamingComplete3,
|
sl@0
|
966 |
EStateStreamingComplete3ErrInUse,
|
sl@0
|
967 |
EStateStreamingComplete3ErrUnderflow,
|
sl@0
|
968 |
EStateResourceAvailableOS1,
|
sl@0
|
969 |
EStateResourceAvailableOS2,
|
sl@0
|
970 |
EStateResourceAvailableOS3,
|
sl@0
|
971 |
EStateMonitoringEvents,
|
sl@0
|
972 |
EStateFinished
|
sl@0
|
973 |
};
|
sl@0
|
974 |
|
sl@0
|
975 |
//
|
sl@0
|
976 |
//BASE CLASS DECLARATIONS//
|
sl@0
|
977 |
//
|
sl@0
|
978 |
|
sl@0
|
979 |
/**
|
sl@0
|
980 |
* Observer class to identify and pass events to the test step class
|
sl@0
|
981 |
*
|
sl@0
|
982 |
* @class MTestAudioOutputStreamCallback
|
sl@0
|
983 |
*
|
sl@0
|
984 |
*/
|
sl@0
|
985 |
class MTestAudioOutputStreamCallback
|
sl@0
|
986 |
{
|
sl@0
|
987 |
public :
|
sl@0
|
988 |
virtual void MaoscOpenCompleteTest(TInt aError, CTestMdaAudioOutputStreamCallbackSupport& aMdaAudioOutputStreamCallbackSupport) = 0;
|
sl@0
|
989 |
virtual void MaoscBufferCopiedTest(TInt aError, const TDesC8& aBuffer, CTestMdaAudioOutputStreamCallbackSupport& aMdaAudioOutputStreamCallbackSupport) = 0;
|
sl@0
|
990 |
virtual void MaoscPlayCompleteTest(TInt aError, CTestMdaAudioOutputStreamCallbackSupport& aMdaAudioOutputStreamCallbackSupport) = 0;
|
sl@0
|
991 |
virtual void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestMdaAudioOutputStreamCallbackSupport& aMdaAudioOutputStreamCallbackSupport) = 0;
|
sl@0
|
992 |
};
|
sl@0
|
993 |
|
sl@0
|
994 |
/**
|
sl@0
|
995 |
* Support class to pass the events to the test step class using the MTestAudioOutputStreamCallback
|
sl@0
|
996 |
*
|
sl@0
|
997 |
* @class CTestMdaAudioOutputStreamCallbackSupport
|
sl@0
|
998 |
*
|
sl@0
|
999 |
*/
|
sl@0
|
1000 |
class CTestMdaAudioOutputStreamCallbackSupport : public CBase, public MMdaAudioOutputStreamCallback, public MMMFAudioResourceNotificationCallback
|
sl@0
|
1001 |
{
|
sl@0
|
1002 |
public :
|
sl@0
|
1003 |
static CTestMdaAudioOutputStreamCallbackSupport* NewL(MTestAudioOutputStreamCallback& aCallback);
|
sl@0
|
1004 |
virtual void MaoscOpenComplete(TInt aError);
|
sl@0
|
1005 |
virtual void MaoscBufferCopied(TInt aError, const TDesC8& aBuffer);
|
sl@0
|
1006 |
virtual void MaoscPlayComplete(TInt aError);
|
sl@0
|
1007 |
virtual void MarncResourceAvailable(TUid aNotificationEventId, const TDesC8& aNotificationData);
|
sl@0
|
1008 |
protected:
|
sl@0
|
1009 |
CTestMdaAudioOutputStreamCallbackSupport(MTestAudioOutputStreamCallback& aCallback);
|
sl@0
|
1010 |
void ConstructL();
|
sl@0
|
1011 |
private :
|
sl@0
|
1012 |
MTestAudioOutputStreamCallback& iCallback;
|
sl@0
|
1013 |
};
|
sl@0
|
1014 |
|
sl@0
|
1015 |
|
sl@0
|
1016 |
/**
|
sl@0
|
1017 |
* Base Class for ARN functionality for most ARN Audio Output Stream tests
|
sl@0
|
1018 |
*
|
sl@0
|
1019 |
* @class CTestStepAudioOutputStreamARN
|
sl@0
|
1020 |
*
|
sl@0
|
1021 |
*/
|
sl@0
|
1022 |
class CTestStepAudioOutputStreamARN : public CTestMmfAclntStep, public MTestAudioOutputStreamCallback
|
sl@0
|
1023 |
{
|
sl@0
|
1024 |
public:
|
sl@0
|
1025 |
// Virtual methods for Preamble and Postamble.
|
sl@0
|
1026 |
virtual enum TVerdict DoTestStepPreambleL();
|
sl@0
|
1027 |
virtual enum TVerdict DoTestStepPostambleL();
|
sl@0
|
1028 |
// Virtual function to access test specific methods
|
sl@0
|
1029 |
virtual TVerdict DoTestStepL();
|
sl@0
|
1030 |
// Pure function to access test specific methods
|
sl@0
|
1031 |
virtual TVerdict DoTestL()=0;
|
sl@0
|
1032 |
// from MTestAudioOutputStreamCallback
|
sl@0
|
1033 |
virtual void MaoscOpenCompleteTest(TInt aError, CTestMdaAudioOutputStreamCallbackSupport& aMdaAudioOutputStreamCallbackSupport);
|
sl@0
|
1034 |
virtual void MaoscBufferCopiedTest(TInt aError, const TDesC8& aBuffer, CTestMdaAudioOutputStreamCallbackSupport& aMdaAudioOutputStreamCallbackSupport);
|
sl@0
|
1035 |
virtual void MaoscPlayCompleteTest(TInt aError, CTestMdaAudioOutputStreamCallbackSupport& aMdaAudioOutputStreamCallbackSupport);
|
sl@0
|
1036 |
virtual void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestMdaAudioOutputStreamCallbackSupport& aMdaAudioOutputStreamCallbackSupport);
|
sl@0
|
1037 |
// Centralised State Handler
|
sl@0
|
1038 |
virtual void FsmL(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone)=0;
|
sl@0
|
1039 |
virtual TBool FsmCheck(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone);
|
sl@0
|
1040 |
protected:
|
sl@0
|
1041 |
// Constructor
|
sl@0
|
1042 |
CTestStepAudioOutputStreamARN(const TDesC& aTestName);
|
sl@0
|
1043 |
// StateInit Function
|
sl@0
|
1044 |
void StateInit();
|
sl@0
|
1045 |
// StateChange Function
|
sl@0
|
1046 |
void StateChange(TMmfAudioOutputStreamEvents aExpectedEvent, TInt aExpectedError=KErrNone);
|
sl@0
|
1047 |
// CMdaAudioOutputStream instances
|
sl@0
|
1048 |
CMdaAudioOutputStream* iTestAudioOutputStream1;
|
sl@0
|
1049 |
CMdaAudioOutputStream* iTestAudioOutputStream2;
|
sl@0
|
1050 |
CMdaAudioOutputStream* iTestAudioOutputStream3;
|
sl@0
|
1051 |
// CTestMdaAudioOutputStreamCallbackSupport instances
|
sl@0
|
1052 |
CTestMdaAudioOutputStreamCallbackSupport* iMdaAudioOutputStreamCallbackSupport1;
|
sl@0
|
1053 |
CTestMdaAudioOutputStreamCallbackSupport* iMdaAudioOutputStreamCallbackSupport2;
|
sl@0
|
1054 |
CTestMdaAudioOutputStreamCallbackSupport* iMdaAudioOutputStreamCallbackSupport3;
|
sl@0
|
1055 |
// Other class variable declarations
|
sl@0
|
1056 |
RFs iFs;
|
sl@0
|
1057 |
RFile iFile1;
|
sl@0
|
1058 |
RFile iFile2;
|
sl@0
|
1059 |
RFile iFile3;
|
sl@0
|
1060 |
TInt iFileSize1;
|
sl@0
|
1061 |
TInt iFileSize2;
|
sl@0
|
1062 |
TInt iFileSize3;
|
sl@0
|
1063 |
RBuf8 iBuf1;
|
sl@0
|
1064 |
RBuf8 iBuf2;
|
sl@0
|
1065 |
RBuf8 iBuf3;
|
sl@0
|
1066 |
TInt iError;
|
sl@0
|
1067 |
TTimeIntervalMicroSeconds iPosition;
|
sl@0
|
1068 |
TInt iState;
|
sl@0
|
1069 |
TRequestStatus iRequestStatus;
|
sl@0
|
1070 |
CCallBackTimer* iCallBackTimer;
|
sl@0
|
1071 |
TMmfAudioOutputStreamEvents iExpectedEvent;
|
sl@0
|
1072 |
TInt iExpectedError;
|
sl@0
|
1073 |
TMmfAudioOutputStreamEvents iEventOccured;
|
sl@0
|
1074 |
};
|
sl@0
|
1075 |
|
sl@0
|
1076 |
|
sl@0
|
1077 |
class CFsmAudioOutputStreamClient;
|
sl@0
|
1078 |
/**
|
sl@0
|
1079 |
* Base Class for ARN functionality for most ARN Audio Output Stream tests
|
sl@0
|
1080 |
*
|
sl@0
|
1081 |
* @class CTestStepAudioOutputStreamARN2
|
sl@0
|
1082 |
*
|
sl@0
|
1083 |
*/
|
sl@0
|
1084 |
class CTestStepAudioOutputStreamARN2 : public CTestMmfAclntStep
|
sl@0
|
1085 |
{
|
sl@0
|
1086 |
public:
|
sl@0
|
1087 |
enum TFsmAosState
|
sl@0
|
1088 |
{
|
sl@0
|
1089 |
EStateIdle = 0,
|
sl@0
|
1090 |
EStateOpenComplete1,
|
sl@0
|
1091 |
EStateOpenComplete2,
|
sl@0
|
1092 |
EStateOpenComplete3,
|
sl@0
|
1093 |
EStateStreaming1,
|
sl@0
|
1094 |
EStateStreaming2,
|
sl@0
|
1095 |
EStateStreaming3,
|
sl@0
|
1096 |
EStateResumeStreaming1,
|
sl@0
|
1097 |
EStateResumeStreaming2,
|
sl@0
|
1098 |
EStateResumeStreaming3,
|
sl@0
|
1099 |
EStateBufferCopied1,
|
sl@0
|
1100 |
EStateBufferCopied2,
|
sl@0
|
1101 |
EStateBufferCopied3,
|
sl@0
|
1102 |
EStateStreamingComplete1,
|
sl@0
|
1103 |
EStateStreamingComplete1ErrInUse,
|
sl@0
|
1104 |
EStateStreamingComplete1ErrUnderflow,
|
sl@0
|
1105 |
EStateStreamingComplete2,
|
sl@0
|
1106 |
EStateStreamingComplete2ErrInUse,
|
sl@0
|
1107 |
EStateStreamingComplete2ErrUnderflow,
|
sl@0
|
1108 |
EStateStreamingComplete3,
|
sl@0
|
1109 |
EStateStreamingComplete3ErrInUse,
|
sl@0
|
1110 |
EStateStreamingComplete3ErrUnderflow,
|
sl@0
|
1111 |
EStateResourceAvailableOS1,
|
sl@0
|
1112 |
EStateResourceAvailableOS2,
|
sl@0
|
1113 |
EStateResourceAvailableOS3,
|
sl@0
|
1114 |
EStateMonitoringEvents,
|
sl@0
|
1115 |
EStateFinished,
|
sl@0
|
1116 |
};
|
sl@0
|
1117 |
public:
|
sl@0
|
1118 |
virtual enum TVerdict DoTestStepPreambleL();
|
sl@0
|
1119 |
virtual enum TVerdict DoTestStepPostambleL();
|
sl@0
|
1120 |
virtual TVerdict DoTestStepL();
|
sl@0
|
1121 |
virtual TVerdict DoTestL()=0;
|
sl@0
|
1122 |
virtual void Fsm(TInt aClientNumber,TInt aEventCode, TInt aError=KErrNone)=0;
|
sl@0
|
1123 |
virtual TBool FsmCheck(TInt aClientNumber, TInt aEventCode, TInt aError);
|
sl@0
|
1124 |
void StopTest();
|
sl@0
|
1125 |
protected:
|
sl@0
|
1126 |
CTestStepAudioOutputStreamARN2(const TDesC& aTestName);
|
sl@0
|
1127 |
void StateChange(TFsmAosState aState);
|
sl@0
|
1128 |
void SetExpectedEvent(TInt aClientNumber, TInt aEvent,TInt aError);
|
sl@0
|
1129 |
//Register client events to monitor
|
sl@0
|
1130 |
void RegisterClientEventToMonitor(TInt aClientnumber, TInt aEventCode, TInt aError, TFsmAosState aFsmState);
|
sl@0
|
1131 |
TBool IsMonitoringFinished();
|
sl@0
|
1132 |
protected:
|
sl@0
|
1133 |
TInt iExpectedEvent;
|
sl@0
|
1134 |
TInt iExpectedError;
|
sl@0
|
1135 |
TFsmAosState iState;
|
sl@0
|
1136 |
TFixedArray <CFsmAudioOutputStreamClient*, 4> iClientList;
|
sl@0
|
1137 |
TFixedArray <TInt, 4> iClientEventsToMonitor;
|
sl@0
|
1138 |
TFixedArray <TInt, 4> iClientError;
|
sl@0
|
1139 |
TFixedArray <TFsmAosState, 4> iFsmStateforClient;
|
sl@0
|
1140 |
TInt iClientsRegistered;
|
sl@0
|
1141 |
RFs iFs;
|
sl@0
|
1142 |
TFixedArray<RFile,4> iFileHandle;
|
sl@0
|
1143 |
TFixedArray<TInt, 4> iFileSize;
|
sl@0
|
1144 |
TFixedArray<RBuf8, 4> iBuf;
|
sl@0
|
1145 |
TInt iError;
|
sl@0
|
1146 |
TTimeIntervalMicroSeconds iPosition;
|
sl@0
|
1147 |
TRequestStatus iRequestStatus;
|
sl@0
|
1148 |
CCallBackTimer* iCallBackTimer;
|
sl@0
|
1149 |
};
|
sl@0
|
1150 |
|
sl@0
|
1151 |
class CFsmAudioOutputStreamClient : public CBase,public MMdaAudioOutputStreamCallback, public MMMFAudioResourceNotificationCallback
|
sl@0
|
1152 |
{
|
sl@0
|
1153 |
public:
|
sl@0
|
1154 |
// Enum to decide which Event has occured.
|
sl@0
|
1155 |
enum TMmfAosStreamEvents
|
sl@0
|
1156 |
{
|
sl@0
|
1157 |
EIdleOutputStream = 0,
|
sl@0
|
1158 |
EAudioOuputStreamOpenComplete,
|
sl@0
|
1159 |
EAudioOutputStreamBufferCopied,
|
sl@0
|
1160 |
EAudioOutputStreamPlayComplete,
|
sl@0
|
1161 |
EAudioOutputStreamResourceAvailable,
|
sl@0
|
1162 |
};
|
sl@0
|
1163 |
public:
|
sl@0
|
1164 |
CFsmAudioOutputStreamClient(TInt aClientNumber,TInt aPriority,TMdaPriorityPreference aPref,CTestStepAudioOutputStreamARN2* aParent );
|
sl@0
|
1165 |
~CFsmAudioOutputStreamClient();
|
sl@0
|
1166 |
static CFsmAudioOutputStreamClient* NewL(TInt aClientNumber, TInt aPriority,TMdaPriorityPreference aPref, CTestStepAudioOutputStreamARN2* aParent);
|
sl@0
|
1167 |
//Callback handlers
|
sl@0
|
1168 |
void MaoscOpenComplete(TInt aError);
|
sl@0
|
1169 |
void MaoscPlayComplete(TInt aError);
|
sl@0
|
1170 |
void MaoscBufferCopied(TInt aError, const TDesC8& aBuffer);
|
sl@0
|
1171 |
void MarncResourceAvailable(TUid aNotificationEventId, const TDesC8& aNotificationData);
|
sl@0
|
1172 |
|
sl@0
|
1173 |
void TestOpen();
|
sl@0
|
1174 |
TInt TestRegisterAsClient();
|
sl@0
|
1175 |
TInt TestWrite(const TDesC8 &aData);
|
sl@0
|
1176 |
const TTimeIntervalMicroSeconds& GetCurrentPosition();
|
sl@0
|
1177 |
TTimeIntervalMicroSeconds& GetResumedPosition();
|
sl@0
|
1178 |
TInt BytesPlayed();
|
sl@0
|
1179 |
private:
|
sl@0
|
1180 |
void ConstructL();
|
sl@0
|
1181 |
private:
|
sl@0
|
1182 |
TMmfAosStreamEvents iEvent;
|
sl@0
|
1183 |
TInt iError;
|
sl@0
|
1184 |
TInt iClientNumber;
|
sl@0
|
1185 |
TInt iPriority;
|
sl@0
|
1186 |
TMdaPriorityPreference iPref;
|
sl@0
|
1187 |
CMdaAudioOutputStream* iMmfAudioOutputStream;
|
sl@0
|
1188 |
CTestStepAudioOutputStreamARN2* iParent;
|
sl@0
|
1189 |
TTimeIntervalMicroSeconds iResumedPosition;
|
sl@0
|
1190 |
};
|
sl@0
|
1191 |
//
|
sl@0
|
1192 |
//POSITIVE TESTS//
|
sl@0
|
1193 |
//
|
sl@0
|
1194 |
|
sl@0
|
1195 |
/**
|
sl@0
|
1196 |
* Register for notification, but make no request to play audio.
|
sl@0
|
1197 |
*
|
sl@0
|
1198 |
* @class CTestMmfAclntARN8021
|
sl@0
|
1199 |
*
|
sl@0
|
1200 |
*/
|
sl@0
|
1201 |
class CTestMmfAclntARN8021 : public CTestStepAudioOutputStreamARN
|
sl@0
|
1202 |
{
|
sl@0
|
1203 |
public:
|
sl@0
|
1204 |
static CTestMmfAclntARN8021* NewL( const TDesC& aTestName );
|
sl@0
|
1205 |
virtual TVerdict DoTestL();
|
sl@0
|
1206 |
virtual void FsmL(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone);
|
sl@0
|
1207 |
|
sl@0
|
1208 |
protected:
|
sl@0
|
1209 |
CTestMmfAclntARN8021( const TDesC& aTestName );
|
sl@0
|
1210 |
TVerdict PerformTestL();
|
sl@0
|
1211 |
};
|
sl@0
|
1212 |
|
sl@0
|
1213 |
|
sl@0
|
1214 |
/**
|
sl@0
|
1215 |
* Register (b4 play, after Open) and Receive Notification of a Resource Available Event.
|
sl@0
|
1216 |
* (when audio resource is currently unavailable and then available)
|
sl@0
|
1217 |
*
|
sl@0
|
1218 |
* @class CTestMmfAclntARN8022
|
sl@0
|
1219 |
*
|
sl@0
|
1220 |
*/
|
sl@0
|
1221 |
class CTestMmfAclntARN8022 : public CTestStepAudioOutputStreamARN2
|
sl@0
|
1222 |
{
|
sl@0
|
1223 |
public:
|
sl@0
|
1224 |
static CTestMmfAclntARN8022* NewL( const TDesC& aTestName );
|
sl@0
|
1225 |
virtual TVerdict DoTestL();
|
sl@0
|
1226 |
void Fsm(TInt aClientNumber,TInt aEventCode, TInt aError=KErrNone);
|
sl@0
|
1227 |
|
sl@0
|
1228 |
protected:
|
sl@0
|
1229 |
CTestMmfAclntARN8022( const TDesC& aTestName );
|
sl@0
|
1230 |
TVerdict PerformTestL();
|
sl@0
|
1231 |
private:
|
sl@0
|
1232 |
void InitTest();
|
sl@0
|
1233 |
void StartTestL();
|
sl@0
|
1234 |
TVerdict HandleStateStreaming2();
|
sl@0
|
1235 |
TVerdict HandleStateStreamingComplete1ErrInUse();
|
sl@0
|
1236 |
TVerdict HandleStateResourceAvailableOS1();
|
sl@0
|
1237 |
TVerdict HandleStateStreamingComplete2ErrUnderflow();
|
sl@0
|
1238 |
TVerdict HandleStateOpenComplete2();
|
sl@0
|
1239 |
TVerdict HandleStateOpenComplete1();
|
sl@0
|
1240 |
private:
|
sl@0
|
1241 |
typedef TVerdict (CTestMmfAclntARN8022::*fp)();//Function pointer for a StateHandler
|
sl@0
|
1242 |
TFixedArray<fp,30> iStateHandlers;
|
sl@0
|
1243 |
};
|
sl@0
|
1244 |
|
sl@0
|
1245 |
/**
|
sl@0
|
1246 |
* Register (at the time of Play) and Receive Notification of a Resource Available Event.
|
sl@0
|
1247 |
* (when audio resource is currently available and subsequently unavailable, and then available)
|
sl@0
|
1248 |
*
|
sl@0
|
1249 |
* @class CTestMmfAclntARN8023
|
sl@0
|
1250 |
*
|
sl@0
|
1251 |
*/
|
sl@0
|
1252 |
class CTestMmfAclntARN8023 : public CTestStepAudioOutputStreamARN2
|
sl@0
|
1253 |
{
|
sl@0
|
1254 |
public:
|
sl@0
|
1255 |
static CTestMmfAclntARN8023* NewL( const TDesC& aTestName );
|
sl@0
|
1256 |
virtual TVerdict DoTestL();
|
sl@0
|
1257 |
void Fsm(TInt aClientNumber,TInt aEventCode, TInt aError=KErrNone);
|
sl@0
|
1258 |
|
sl@0
|
1259 |
protected:
|
sl@0
|
1260 |
CTestMmfAclntARN8023( const TDesC& aTestName );
|
sl@0
|
1261 |
TVerdict PerformTestL();
|
sl@0
|
1262 |
private:
|
sl@0
|
1263 |
void InitTest();
|
sl@0
|
1264 |
void StartTestL();
|
sl@0
|
1265 |
TVerdict HandleStateStreaming1();
|
sl@0
|
1266 |
TVerdict HandleStateStreaming2();
|
sl@0
|
1267 |
TVerdict HandleStateStreamingComplete1ErrInUse();
|
sl@0
|
1268 |
TVerdict HandleStateResourceAvailableOS1();
|
sl@0
|
1269 |
TVerdict HandleStateStreamingComplete2ErrUnderflow();
|
sl@0
|
1270 |
TVerdict HandleStateOpenComplete2();
|
sl@0
|
1271 |
TVerdict HandleStateOpenComplete1();
|
sl@0
|
1272 |
private:
|
sl@0
|
1273 |
typedef TVerdict (CTestMmfAclntARN8023::*fp)();
|
sl@0
|
1274 |
TFixedArray<fp,30> iStateHandlers;
|
sl@0
|
1275 |
};
|
sl@0
|
1276 |
|
sl@0
|
1277 |
/**
|
sl@0
|
1278 |
* Registration (b4 File Open) and Cancellation of the notification request
|
sl@0
|
1279 |
*
|
sl@0
|
1280 |
* @class CTestMmfAclntARN8024
|
sl@0
|
1281 |
*
|
sl@0
|
1282 |
*/
|
sl@0
|
1283 |
class CTestMmfAclntARN8024 : public CTestStepAudioOutputStreamARN
|
sl@0
|
1284 |
{
|
sl@0
|
1285 |
public:
|
sl@0
|
1286 |
static CTestMmfAclntARN8024* NewL( const TDesC& aTestName );
|
sl@0
|
1287 |
virtual TVerdict DoTestL();
|
sl@0
|
1288 |
virtual void FsmL(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone);
|
sl@0
|
1289 |
|
sl@0
|
1290 |
protected:
|
sl@0
|
1291 |
CTestMmfAclntARN8024( const TDesC& aTestName );
|
sl@0
|
1292 |
TVerdict PerformTestL();
|
sl@0
|
1293 |
};
|
sl@0
|
1294 |
|
sl@0
|
1295 |
/**
|
sl@0
|
1296 |
* Get the actual position from where the paused audio can be resumed.
|
sl@0
|
1297 |
*
|
sl@0
|
1298 |
* @class CTestMmfAclntARN8025
|
sl@0
|
1299 |
*
|
sl@0
|
1300 |
*/
|
sl@0
|
1301 |
class CTestMmfAclntARN8025 : public CTestStepAudioOutputStreamARN2
|
sl@0
|
1302 |
{
|
sl@0
|
1303 |
public:
|
sl@0
|
1304 |
static CTestMmfAclntARN8025* NewL( const TDesC& aTestName );
|
sl@0
|
1305 |
virtual TVerdict DoTestL();
|
sl@0
|
1306 |
void Fsm(TInt aClientNumber,TInt aEventCode, TInt aError=KErrNone);
|
sl@0
|
1307 |
|
sl@0
|
1308 |
protected:
|
sl@0
|
1309 |
CTestMmfAclntARN8025( const TDesC& aTestName );
|
sl@0
|
1310 |
TVerdict PerformTestL();
|
sl@0
|
1311 |
private:
|
sl@0
|
1312 |
void InitTest();
|
sl@0
|
1313 |
void StartTestL();
|
sl@0
|
1314 |
TVerdict HandleStateStreaming1();
|
sl@0
|
1315 |
TVerdict HandleStateStreaming2();
|
sl@0
|
1316 |
TVerdict HandleStateStreamingComplete1ErrInUse();
|
sl@0
|
1317 |
TVerdict HandleStateResourceAvailableOS1();
|
sl@0
|
1318 |
TVerdict HandleStateStreamingComplete2ErrUnderflow();
|
sl@0
|
1319 |
TVerdict HandleStateOpenComplete2();
|
sl@0
|
1320 |
TVerdict HandleStateOpenComplete1();
|
sl@0
|
1321 |
private:
|
sl@0
|
1322 |
typedef TVerdict (CTestMmfAclntARN8025::*fp)();
|
sl@0
|
1323 |
TFixedArray<fp,30> iStateHandlers;
|
sl@0
|
1324 |
TTimeIntervalMicroSeconds iPositionStop;
|
sl@0
|
1325 |
TTimeIntervalMicroSeconds iPositionResume;
|
sl@0
|
1326 |
};
|
sl@0
|
1327 |
|
sl@0
|
1328 |
/**
|
sl@0
|
1329 |
* Call WillResumePlay()
|
sl@0
|
1330 |
*
|
sl@0
|
1331 |
* @class CTestMmfAclntARN8026
|
sl@0
|
1332 |
*
|
sl@0
|
1333 |
*/
|
sl@0
|
1334 |
class CTestMmfAclntARN8026 : public CTestStepAudioOutputStreamARN
|
sl@0
|
1335 |
{
|
sl@0
|
1336 |
public:
|
sl@0
|
1337 |
static CTestMmfAclntARN8026* NewL( const TDesC& aTestName );
|
sl@0
|
1338 |
virtual TVerdict DoTestL();
|
sl@0
|
1339 |
virtual void FsmL(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone);
|
sl@0
|
1340 |
virtual TBool FsmCheck(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone);
|
sl@0
|
1341 |
|
sl@0
|
1342 |
protected:
|
sl@0
|
1343 |
CTestMmfAclntARN8026( const TDesC& aTestName );
|
sl@0
|
1344 |
TVerdict PerformTestL();
|
sl@0
|
1345 |
};
|
sl@0
|
1346 |
|
sl@0
|
1347 |
|
sl@0
|
1348 |
//
|
sl@0
|
1349 |
//NEGATIVE TESTS//
|
sl@0
|
1350 |
//
|
sl@0
|
1351 |
|
sl@0
|
1352 |
/**
|
sl@0
|
1353 |
* Register for notification with an unsupported event type.
|
sl@0
|
1354 |
*
|
sl@0
|
1355 |
* @class CTestMmfAclntARN1321
|
sl@0
|
1356 |
*
|
sl@0
|
1357 |
*/
|
sl@0
|
1358 |
class CTestMmfAclntARN1321 : public CTestStepAudioOutputStreamARN
|
sl@0
|
1359 |
{
|
sl@0
|
1360 |
public:
|
sl@0
|
1361 |
static CTestMmfAclntARN1321* NewL( const TDesC& aTestName );
|
sl@0
|
1362 |
virtual TVerdict DoTestL();
|
sl@0
|
1363 |
virtual void FsmL(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone);
|
sl@0
|
1364 |
|
sl@0
|
1365 |
protected:
|
sl@0
|
1366 |
CTestMmfAclntARN1321( const TDesC& aTestName );
|
sl@0
|
1367 |
TVerdict PerformTestL();
|
sl@0
|
1368 |
};
|
sl@0
|
1369 |
|
sl@0
|
1370 |
/**
|
sl@0
|
1371 |
* Cancel the request for notification with an unsupported event type.
|
sl@0
|
1372 |
*
|
sl@0
|
1373 |
* @class CTestMmfAclntARN1322
|
sl@0
|
1374 |
*
|
sl@0
|
1375 |
*/
|
sl@0
|
1376 |
class CTestMmfAclntARN1322 : public CTestStepAudioOutputStreamARN
|
sl@0
|
1377 |
{
|
sl@0
|
1378 |
public:
|
sl@0
|
1379 |
static CTestMmfAclntARN1322* NewL( const TDesC& aTestName );
|
sl@0
|
1380 |
virtual TVerdict DoTestL();
|
sl@0
|
1381 |
virtual void FsmL(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone);
|
sl@0
|
1382 |
|
sl@0
|
1383 |
protected:
|
sl@0
|
1384 |
CTestMmfAclntARN1322( const TDesC& aTestName );
|
sl@0
|
1385 |
TVerdict PerformTestL();
|
sl@0
|
1386 |
};
|
sl@0
|
1387 |
|
sl@0
|
1388 |
/**
|
sl@0
|
1389 |
* Cancel when no resource Notification is requested.
|
sl@0
|
1390 |
*
|
sl@0
|
1391 |
* @class CTestMmfAclntARN1323
|
sl@0
|
1392 |
*
|
sl@0
|
1393 |
*/
|
sl@0
|
1394 |
class CTestMmfAclntARN1323 : public CTestStepAudioOutputStreamARN
|
sl@0
|
1395 |
{
|
sl@0
|
1396 |
public:
|
sl@0
|
1397 |
static CTestMmfAclntARN1323* NewL( const TDesC& aTestName );
|
sl@0
|
1398 |
virtual TVerdict DoTestL();
|
sl@0
|
1399 |
virtual void FsmL(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone);
|
sl@0
|
1400 |
|
sl@0
|
1401 |
protected:
|
sl@0
|
1402 |
CTestMmfAclntARN1323( const TDesC& aTestName );
|
sl@0
|
1403 |
TVerdict PerformTestL();
|
sl@0
|
1404 |
};
|
sl@0
|
1405 |
|
sl@0
|
1406 |
/**
|
sl@0
|
1407 |
* Multiple Registration for notification for the same event type.
|
sl@0
|
1408 |
*
|
sl@0
|
1409 |
* @class CTestMmfAclntARN1324
|
sl@0
|
1410 |
*
|
sl@0
|
1411 |
*/
|
sl@0
|
1412 |
class CTestMmfAclntARN1324 : public CTestStepAudioOutputStreamARN
|
sl@0
|
1413 |
{
|
sl@0
|
1414 |
public:
|
sl@0
|
1415 |
static CTestMmfAclntARN1324* NewL( const TDesC& aTestName );
|
sl@0
|
1416 |
virtual TVerdict DoTestL();
|
sl@0
|
1417 |
virtual void FsmL(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone);
|
sl@0
|
1418 |
|
sl@0
|
1419 |
protected:
|
sl@0
|
1420 |
CTestMmfAclntARN1324( const TDesC& aTestName );
|
sl@0
|
1421 |
TVerdict PerformTestL();
|
sl@0
|
1422 |
};
|
sl@0
|
1423 |
|
sl@0
|
1424 |
|
sl@0
|
1425 |
//------------------------------------------------------------------------------
|
sl@0
|
1426 |
//**************PREQ 797 - Multiple Audio Client Test Declarations**************
|
sl@0
|
1427 |
//------------------------------------------------------------------------------
|
sl@0
|
1428 |
|
sl@0
|
1429 |
|
sl@0
|
1430 |
//
|
sl@0
|
1431 |
//BASE CLASS DECLARATIONS//
|
sl@0
|
1432 |
//
|
sl@0
|
1433 |
|
sl@0
|
1434 |
/**
|
sl@0
|
1435 |
* Observer class to identify and pass events to the test step class
|
sl@0
|
1436 |
*
|
sl@0
|
1437 |
* @class MTestAudioResourceNotificationCallback
|
sl@0
|
1438 |
*
|
sl@0
|
1439 |
*/
|
sl@0
|
1440 |
class MTestAudioResourceNotificationCallback
|
sl@0
|
1441 |
{
|
sl@0
|
1442 |
public :
|
sl@0
|
1443 |
virtual void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestMdaAudioMultiClientCallbackSupport& aMdaAudioMultiClientCallbackSupport) = 0;
|
sl@0
|
1444 |
};
|
sl@0
|
1445 |
|
sl@0
|
1446 |
/**
|
sl@0
|
1447 |
* Support class to pass the events to the test step class using the MTestAudioResourceNotificationCallback
|
sl@0
|
1448 |
*
|
sl@0
|
1449 |
* @class CTestMdaAudioMultiClientCallbackSupport
|
sl@0
|
1450 |
*
|
sl@0
|
1451 |
*/
|
sl@0
|
1452 |
class CTestMdaAudioMultiClientCallbackSupport : public CBase, public MMMFAudioResourceNotificationCallback
|
sl@0
|
1453 |
{
|
sl@0
|
1454 |
public :
|
sl@0
|
1455 |
static CTestMdaAudioMultiClientCallbackSupport* NewL(MTestAudioResourceNotificationCallback& aCallback);
|
sl@0
|
1456 |
virtual void MarncResourceAvailable(TUid aNotificationEventId, const TDesC8& aNotificationData);
|
sl@0
|
1457 |
protected:
|
sl@0
|
1458 |
CTestMdaAudioMultiClientCallbackSupport(MTestAudioResourceNotificationCallback& aCallback);
|
sl@0
|
1459 |
void ConstructL();
|
sl@0
|
1460 |
private :
|
sl@0
|
1461 |
MTestAudioResourceNotificationCallback& iCallback;
|
sl@0
|
1462 |
};
|
sl@0
|
1463 |
|
sl@0
|
1464 |
/**
|
sl@0
|
1465 |
* Base Class for ARN functionality for most ARN multiple client tests
|
sl@0
|
1466 |
*
|
sl@0
|
1467 |
* @class CTestMmfAclntMultiClientARN
|
sl@0
|
1468 |
*
|
sl@0
|
1469 |
*/
|
sl@0
|
1470 |
class CTestMmfAclntMultiClientARN : public CTestMmfAclntStep, public MMdaAudioPlayerCallback, public MMdaObjectStateChangeObserver, public MMdaAudioOutputStreamCallback, public MTestAudioResourceNotificationCallback
|
sl@0
|
1471 |
{
|
sl@0
|
1472 |
public:
|
sl@0
|
1473 |
// Enum to decide which Event has occured.
|
sl@0
|
1474 |
enum TMmfAudioMultiClientEvents
|
sl@0
|
1475 |
{
|
sl@0
|
1476 |
EIdleMulti = 0,
|
sl@0
|
1477 |
EMapcInitComplete,
|
sl@0
|
1478 |
EMapcPlayComplete,
|
sl@0
|
1479 |
EMoscoStateChangeEvent,
|
sl@0
|
1480 |
EMaoscOpenComplete,
|
sl@0
|
1481 |
EMaoscBufferCopied,
|
sl@0
|
1482 |
EMaoscPlayComplete,
|
sl@0
|
1483 |
EMarncResourceAvailablePlayer,
|
sl@0
|
1484 |
EMarncResourceAvailableRecorder,
|
sl@0
|
1485 |
EMarncResourceAvailableOS,
|
sl@0
|
1486 |
EImproperEvent
|
sl@0
|
1487 |
};
|
sl@0
|
1488 |
|
sl@0
|
1489 |
// Enum to decide on state
|
sl@0
|
1490 |
enum TMmfAudioMultiClientStates
|
sl@0
|
1491 |
{
|
sl@0
|
1492 |
EStateApInitComplete,
|
sl@0
|
1493 |
EStateApPlayComplete,
|
sl@0
|
1494 |
EStateApPlayCompleteKErrInUse,
|
sl@0
|
1495 |
EStateApResourceAvailable,
|
sl@0
|
1496 |
EStateRecoderOpen,
|
sl@0
|
1497 |
EStateRecoderPlaying,
|
sl@0
|
1498 |
EStateRecorderResumePlay,
|
sl@0
|
1499 |
EStateRecorderPlayComplete,
|
sl@0
|
1500 |
EStateRecorderrelease,
|
sl@0
|
1501 |
EStateAosOpenComplete,
|
sl@0
|
1502 |
EStateAosBufferCopiedKErrInUse,
|
sl@0
|
1503 |
EStateAosPlayCompleteKErrInUse,
|
sl@0
|
1504 |
EStateAosResourceAvailable
|
sl@0
|
1505 |
};
|
sl@0
|
1506 |
public:
|
sl@0
|
1507 |
// Constructor
|
sl@0
|
1508 |
CTestMmfAclntMultiClientARN(const TDesC& aTestName, const TDesC& aSectName);
|
sl@0
|
1509 |
// Virtual methods for Preamble and Postamble.
|
sl@0
|
1510 |
virtual TVerdict DoTestStepPreambleL();
|
sl@0
|
1511 |
virtual TVerdict DoTestStepPostambleL();
|
sl@0
|
1512 |
// Virtual function to access test specific methods
|
sl@0
|
1513 |
virtual TVerdict DoTestStepL();
|
sl@0
|
1514 |
// Pure function to access test specific methods
|
sl@0
|
1515 |
virtual TVerdict DoTestL()=0;
|
sl@0
|
1516 |
// from MMdaAudioPlayerCallback
|
sl@0
|
1517 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
sl@0
|
1518 |
virtual void MapcPlayComplete(TInt aError);
|
sl@0
|
1519 |
// from MMdaObjectStateChangeObserver
|
sl@0
|
1520 |
virtual void MoscoStateChangeEvent(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode);
|
sl@0
|
1521 |
// from MTestAudioOutputStreamCallback
|
sl@0
|
1522 |
virtual void MaoscOpenComplete(TInt aError);
|
sl@0
|
1523 |
virtual void MaoscBufferCopied(TInt aError, const TDesC8& aBuffer);
|
sl@0
|
1524 |
virtual void MaoscPlayComplete(TInt aError);
|
sl@0
|
1525 |
// from MTestAudioResourceNotificationCallback
|
sl@0
|
1526 |
virtual void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestMdaAudioMultiClientCallbackSupport& aMdaAudioMultiClientCallbackSupport);
|
sl@0
|
1527 |
// Centralised State Handler
|
sl@0
|
1528 |
virtual void FsmL(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady)=0;
|
sl@0
|
1529 |
virtual TBool FsmCheck(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
1530 |
protected:
|
sl@0
|
1531 |
// StateInit Function
|
sl@0
|
1532 |
void StateInit();
|
sl@0
|
1533 |
// StateChange Function
|
sl@0
|
1534 |
void StateChange(TMmfAudioMultiClientEvents aExpectedEvent, TInt aExpectedError=KErrNone, CMdaAudioClipUtility::TState aExpectedRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
1535 |
// Audio Client Utilities declaration
|
sl@0
|
1536 |
CMdaAudioPlayerUtility* iTestAudioPlayer;
|
sl@0
|
1537 |
CMdaAudioRecorderUtility* iTestAudioRecorder;
|
sl@0
|
1538 |
CMdaAudioOutputStream* iTestAudioOutputStream;
|
sl@0
|
1539 |
// CTestMdaAudioMultiClientCallbackSupport instances
|
sl@0
|
1540 |
CTestMdaAudioMultiClientCallbackSupport* iMdaAudioPlayerCallbackSupport;
|
sl@0
|
1541 |
CTestMdaAudioMultiClientCallbackSupport* iMdaAudioRecorderCallbackSupport;
|
sl@0
|
1542 |
CTestMdaAudioMultiClientCallbackSupport* iMdaAudioOutputStreamCallbackSupport;
|
sl@0
|
1543 |
// Variables to hold the file names
|
sl@0
|
1544 |
TBuf<KSizeBuf> iFilenamePlayer;
|
sl@0
|
1545 |
TBuf<KSizeBuf> iFilenameRecorder;
|
sl@0
|
1546 |
TBuf<KSizeBuf> iFilenameOutputStream;
|
sl@0
|
1547 |
// Common Class Variables
|
sl@0
|
1548 |
TInt iError;
|
sl@0
|
1549 |
TInt iState;
|
sl@0
|
1550 |
TRequestStatus iRequestStatus;
|
sl@0
|
1551 |
CCallBackTimer* iCallBackTimer;
|
sl@0
|
1552 |
// for checking the expected states
|
sl@0
|
1553 |
TMmfAudioMultiClientEvents iExpectedEvent;
|
sl@0
|
1554 |
CMdaAudioClipUtility::TState iExpectedRecorderState;
|
sl@0
|
1555 |
TInt iExpectedError;
|
sl@0
|
1556 |
TMmfAudioMultiClientEvents iEventOccured;
|
sl@0
|
1557 |
// for Checking the duration
|
sl@0
|
1558 |
TTimeIntervalMicroSeconds iDuration;
|
sl@0
|
1559 |
TTimeIntervalMicroSeconds iPosition;
|
sl@0
|
1560 |
// for iAudioOutputStream
|
sl@0
|
1561 |
RFs iFs;
|
sl@0
|
1562 |
RFile iFile;
|
sl@0
|
1563 |
TInt iFileSize;
|
sl@0
|
1564 |
RBuf8 iBuf;
|
sl@0
|
1565 |
TBuf<KNameBufSize> iSectName; // Section name for retrieving filename
|
sl@0
|
1566 |
CMultiEventChecker* iEventChecker;
|
sl@0
|
1567 |
};
|
sl@0
|
1568 |
|
sl@0
|
1569 |
//
|
sl@0
|
1570 |
//POSITIVE TESTS//
|
sl@0
|
1571 |
//
|
sl@0
|
1572 |
|
sl@0
|
1573 |
/**
|
sl@0
|
1574 |
* Receipt of Notification (on deleting the Audio Play Client instance of a Notified Client)
|
sl@0
|
1575 |
* of a Resource Available Event.
|
sl@0
|
1576 |
*
|
sl@0
|
1577 |
* @class CTestMmfAclntARN9001
|
sl@0
|
1578 |
*
|
sl@0
|
1579 |
*/
|
sl@0
|
1580 |
class CTestMmfAclntARN9001 : public CTestMmfAclntMultiClientARN
|
sl@0
|
1581 |
{
|
sl@0
|
1582 |
public:
|
sl@0
|
1583 |
static CTestMmfAclntARN9001* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
1584 |
virtual TVerdict DoTestL();
|
sl@0
|
1585 |
virtual void FsmL(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
1586 |
virtual TBool FsmCheck(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
1587 |
|
sl@0
|
1588 |
protected:
|
sl@0
|
1589 |
CTestMmfAclntARN9001( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
1590 |
TVerdict PerformTestL();
|
sl@0
|
1591 |
};
|
sl@0
|
1592 |
|
sl@0
|
1593 |
|
sl@0
|
1594 |
/**
|
sl@0
|
1595 |
* Receipt of Notification (on completion of play of a Notifed Client) of a Resource Available Event.
|
sl@0
|
1596 |
*
|
sl@0
|
1597 |
* @class CTestMmfAclntARN9002
|
sl@0
|
1598 |
*
|
sl@0
|
1599 |
*/
|
sl@0
|
1600 |
class CTestMmfAclntARN9002 : public CTestMmfAclntMultiClientARN
|
sl@0
|
1601 |
{
|
sl@0
|
1602 |
public:
|
sl@0
|
1603 |
static CTestMmfAclntARN9002* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
1604 |
virtual TVerdict DoTestL();
|
sl@0
|
1605 |
virtual void FsmL(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
1606 |
virtual void DecideFsmState(TInt aClientNumber,CMultiEventChecker::TClientUtilityType aClientType, TInt aEventCode, TInt aError=KErrNone,CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
1607 |
|
sl@0
|
1608 |
protected:
|
sl@0
|
1609 |
CTestMmfAclntARN9002( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
1610 |
TVerdict PerformTestL();
|
sl@0
|
1611 |
private:
|
sl@0
|
1612 |
void InitTest();
|
sl@0
|
1613 |
void StartTestL();
|
sl@0
|
1614 |
TVerdict HandleStateApInitComplete();
|
sl@0
|
1615 |
TVerdict HandleStateRecorderOpen();
|
sl@0
|
1616 |
TVerdict HandleStateRecorderPlaying();
|
sl@0
|
1617 |
TVerdict HandleApPlayCompleteKErrInUse();
|
sl@0
|
1618 |
TVerdict HandleStateAosOpenComplete();
|
sl@0
|
1619 |
TVerdict HandleStateAosBufferCopiedKErrInUse();
|
sl@0
|
1620 |
TVerdict HandleStateAosPlayCompleteKErrInUse();
|
sl@0
|
1621 |
TVerdict HandleStateRecorderrelease();
|
sl@0
|
1622 |
TVerdict HandleStateApResourceAvailable();
|
sl@0
|
1623 |
TVerdict HandleStateApPlayComplete();
|
sl@0
|
1624 |
TVerdict HandleStateAosResourceAvailable();
|
sl@0
|
1625 |
typedef TVerdict (CTestMmfAclntARN9002::*fp)();//Function pointer for a StateHandler
|
sl@0
|
1626 |
TFixedArray<fp,30> iStateHandlers;
|
sl@0
|
1627 |
};
|
sl@0
|
1628 |
|
sl@0
|
1629 |
/**
|
sl@0
|
1630 |
* Receipt of Notification (on stopping play of a Notitifed Client) of a Resource Available Event.
|
sl@0
|
1631 |
*
|
sl@0
|
1632 |
* @class CTestMmfAclntARN9003
|
sl@0
|
1633 |
*
|
sl@0
|
1634 |
*/
|
sl@0
|
1635 |
class CTestMmfAclntARN9003 : public CTestMmfAclntMultiClientARN
|
sl@0
|
1636 |
{
|
sl@0
|
1637 |
public:
|
sl@0
|
1638 |
static CTestMmfAclntARN9003* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
1639 |
virtual TVerdict DoTestL();
|
sl@0
|
1640 |
virtual void FsmL(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
1641 |
protected:
|
sl@0
|
1642 |
CTestMmfAclntARN9003( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
1643 |
TVerdict PerformTestL();
|
sl@0
|
1644 |
};
|
sl@0
|
1645 |
|
sl@0
|
1646 |
/**
|
sl@0
|
1647 |
* Receipt of Notification (chronological order for equal priority clients) of a Resource Available Event.
|
sl@0
|
1648 |
*
|
sl@0
|
1649 |
* @class CTestMmfAclntARN9004
|
sl@0
|
1650 |
*
|
sl@0
|
1651 |
*/
|
sl@0
|
1652 |
class CTestMmfAclntARN9004 : public CTestMmfAclntMultiClientARN
|
sl@0
|
1653 |
{
|
sl@0
|
1654 |
public:
|
sl@0
|
1655 |
static CTestMmfAclntARN9004* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
1656 |
virtual TVerdict DoTestL();
|
sl@0
|
1657 |
virtual void FsmL(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
1658 |
virtual TBool FsmCheck(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
1659 |
|
sl@0
|
1660 |
protected:
|
sl@0
|
1661 |
CTestMmfAclntARN9004( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
1662 |
TVerdict PerformTestL();
|
sl@0
|
1663 |
};
|
sl@0
|
1664 |
|
sl@0
|
1665 |
/**
|
sl@0
|
1666 |
* Non Receipt of Notification (on calling WillResumePlay() of a notified client)
|
sl@0
|
1667 |
* of a Resource Available Event.
|
sl@0
|
1668 |
*
|
sl@0
|
1669 |
* @class CTestMmfAclntARN9005
|
sl@0
|
1670 |
*
|
sl@0
|
1671 |
*/
|
sl@0
|
1672 |
class CTestMmfAclntARN9005 : public CTestMmfAclntMultiClientARN
|
sl@0
|
1673 |
{
|
sl@0
|
1674 |
public:
|
sl@0
|
1675 |
static CTestMmfAclntARN9005* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
1676 |
virtual TVerdict DoTestL();
|
sl@0
|
1677 |
virtual void FsmL(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
1678 |
virtual void DecideFsmState(TInt aClientNumber,CMultiEventChecker::TClientUtilityType aClientType, TInt aEventCode, TInt aError=KErrNone,CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
1679 |
protected:
|
sl@0
|
1680 |
CTestMmfAclntARN9005( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
1681 |
TVerdict PerformTestL();
|
sl@0
|
1682 |
private:
|
sl@0
|
1683 |
void InitTest();
|
sl@0
|
1684 |
void StartTestL();
|
sl@0
|
1685 |
TVerdict HandleStateApInitComplete();
|
sl@0
|
1686 |
TVerdict HandleStateRecorderOpen();
|
sl@0
|
1687 |
TVerdict HandleStateRecorderPlaying();
|
sl@0
|
1688 |
TVerdict HandleApPlayCompleteKErrInUse();
|
sl@0
|
1689 |
TVerdict HandleStateAosOpenComplete();
|
sl@0
|
1690 |
TVerdict HandleStateAosBufferCopiedKErrInUse();
|
sl@0
|
1691 |
TVerdict HandleStateAosPlayCompleteKErrInUse();
|
sl@0
|
1692 |
TVerdict HandleStateRecorderrelease();
|
sl@0
|
1693 |
TVerdict HandleStateApResourceAvailable();
|
sl@0
|
1694 |
TVerdict HandleStateApPlayComplete();
|
sl@0
|
1695 |
TVerdict HandleStateAosResourceAvailable();
|
sl@0
|
1696 |
typedef TVerdict (CTestMmfAclntARN9005::*fp)();//Function pointer for a StateHandler
|
sl@0
|
1697 |
TFixedArray<fp,30> iStateHandlers;
|
sl@0
|
1698 |
};
|
sl@0
|
1699 |
|
sl@0
|
1700 |
/**
|
sl@0
|
1701 |
* Receipt of Notification (on timeout of a notified client, 1 sec assumed, call
|
sl@0
|
1702 |
* WillResumePlay() after 1 second) of a Resource Available Event.
|
sl@0
|
1703 |
*
|
sl@0
|
1704 |
* @class CTestMmfAclntARN9006
|
sl@0
|
1705 |
*
|
sl@0
|
1706 |
*/
|
sl@0
|
1707 |
class CTestMmfAclntARN9006 : public CTestMmfAclntMultiClientARN
|
sl@0
|
1708 |
{
|
sl@0
|
1709 |
public:
|
sl@0
|
1710 |
static CTestMmfAclntARN9006* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
1711 |
virtual TVerdict DoTestL();
|
sl@0
|
1712 |
virtual void FsmL(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
1713 |
virtual void DecideFsmState(TInt aClientNumber,CMultiEventChecker::TClientUtilityType aClientType, TInt aEventCode, TInt aError=KErrNone,CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
1714 |
protected:
|
sl@0
|
1715 |
CTestMmfAclntARN9006( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
1716 |
TVerdict PerformTestL();
|
sl@0
|
1717 |
private:
|
sl@0
|
1718 |
void InitTest();
|
sl@0
|
1719 |
void StartTestL();
|
sl@0
|
1720 |
TVerdict HandleStateApInitComplete();
|
sl@0
|
1721 |
TVerdict HandleStateRecorderOpen();
|
sl@0
|
1722 |
TVerdict HandleStateRecorderPlaying();
|
sl@0
|
1723 |
TVerdict HandleApPlayCompleteKErrInUse();
|
sl@0
|
1724 |
TVerdict HandleStateAosOpenComplete();
|
sl@0
|
1725 |
TVerdict HandleStateAosBufferCopiedKErrInUse();
|
sl@0
|
1726 |
TVerdict HandleStateAosPlayCompleteKErrInUse();
|
sl@0
|
1727 |
TVerdict HandleStateRecorderrelease();
|
sl@0
|
1728 |
TVerdict HandleStateApResourceAvailable();
|
sl@0
|
1729 |
TVerdict HandleStateAosResourceAvailable();
|
sl@0
|
1730 |
typedef TVerdict (CTestMmfAclntARN9006::*fp)();//Function pointer for a StateHandler
|
sl@0
|
1731 |
TFixedArray<fp,30> iStateHandlers;
|
sl@0
|
1732 |
};
|
sl@0
|
1733 |
|
sl@0
|
1734 |
/**
|
sl@0
|
1735 |
* Receipt of Notification (on cancellation of the notification of a client that has
|
sl@0
|
1736 |
* requested for notification) of a Resource Available Event. [Cancel before receipt of Notification]
|
sl@0
|
1737 |
*
|
sl@0
|
1738 |
* @class CTestMmfAclntARN9007
|
sl@0
|
1739 |
*
|
sl@0
|
1740 |
*/
|
sl@0
|
1741 |
class CTestMmfAclntARN9007 : public CTestMmfAclntMultiClientARN
|
sl@0
|
1742 |
{
|
sl@0
|
1743 |
public:
|
sl@0
|
1744 |
static CTestMmfAclntARN9007* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
1745 |
virtual TVerdict DoTestL();
|
sl@0
|
1746 |
virtual void FsmL(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
1747 |
virtual TBool FsmCheck(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
1748 |
|
sl@0
|
1749 |
protected:
|
sl@0
|
1750 |
CTestMmfAclntARN9007( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
1751 |
TVerdict PerformTestL();
|
sl@0
|
1752 |
};
|
sl@0
|
1753 |
|
sl@0
|
1754 |
/**
|
sl@0
|
1755 |
* Receipt of Notification (on cancellation of notification of a client that has just
|
sl@0
|
1756 |
* received notification) of a Resource Available Event. [Cancel after receipt of Notification]
|
sl@0
|
1757 |
*
|
sl@0
|
1758 |
* @class CTestMmfAclntARN9008
|
sl@0
|
1759 |
*
|
sl@0
|
1760 |
*/
|
sl@0
|
1761 |
class CTestMmfAclntARN9008 : public CTestMmfAclntMultiClientARN
|
sl@0
|
1762 |
{
|
sl@0
|
1763 |
public:
|
sl@0
|
1764 |
static CTestMmfAclntARN9008* NewL( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
1765 |
virtual TVerdict DoTestL();
|
sl@0
|
1766 |
virtual void FsmL(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
1767 |
virtual void DecideFsmState(TInt aClientNumber,CMultiEventChecker::TClientUtilityType aClientType, TInt aEventCode, TInt aError=KErrNone,CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
|
sl@0
|
1768 |
|
sl@0
|
1769 |
protected:
|
sl@0
|
1770 |
CTestMmfAclntARN9008( const TDesC& aTestName, const TDesC& aSectName );
|
sl@0
|
1771 |
TVerdict PerformTestL();
|
sl@0
|
1772 |
private:
|
sl@0
|
1773 |
void InitTest();
|
sl@0
|
1774 |
void StartTestL();
|
sl@0
|
1775 |
TVerdict HandleStateApInitComplete();
|
sl@0
|
1776 |
TVerdict HandleStateApPlayComplete();
|
sl@0
|
1777 |
TVerdict HandleStateRecorderOpen();
|
sl@0
|
1778 |
TVerdict HandleStateRecorderPlaying();
|
sl@0
|
1779 |
TVerdict HandleStateRecorderResumePlay();
|
sl@0
|
1780 |
TVerdict HandleApPlayCompleteKErrInUse();
|
sl@0
|
1781 |
TVerdict HandleStateAosOpenComplete();
|
sl@0
|
1782 |
TVerdict HandleStateAosBufferCopiedKErrInUse();
|
sl@0
|
1783 |
TVerdict HandleStateAosPlayCompleteKErrInUse();
|
sl@0
|
1784 |
TVerdict HandleStateRecorderrelease();
|
sl@0
|
1785 |
TVerdict HandleStateApResourceAvailable();
|
sl@0
|
1786 |
TVerdict HandleStateAosResourceAvailable();
|
sl@0
|
1787 |
TVerdict HandleStateRecorderPlayComplete();
|
sl@0
|
1788 |
typedef TVerdict (CTestMmfAclntARN9008::*fp)();//Function pointer for a StateHandler
|
sl@0
|
1789 |
TFixedArray<fp,30> iStateHandlers;
|
sl@0
|
1790 |
};
|
sl@0
|
1791 |
|
sl@0
|
1792 |
#endif
|