0
|
1 |
// Copyright (c) 2002-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".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// This file contains testing steps for the Unit
|
|
15 |
// test of the MMF 'Deprecated' Audio Clients.
|
|
16 |
// Tests opening sounds of various formats
|
|
17 |
// from a file with various parameters and constructor calls
|
|
18 |
//
|
|
19 |
//
|
|
20 |
|
|
21 |
|
|
22 |
#ifndef TESTSTEPCONVERT_H
|
|
23 |
#define TESTSTEPCONVERT_H
|
|
24 |
|
|
25 |
|
|
26 |
/**
|
|
27 |
*
|
|
28 |
* Alloc Failure New Convert utility
|
|
29 |
*
|
|
30 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
31 |
*
|
|
32 |
* @xxxx
|
|
33 |
*
|
|
34 |
*/
|
|
35 |
class CTestStepConvertAllocFailNew : public CTestStepUnitMMFAudClient,
|
|
36 |
public MMdaObjectStateChangeObserver
|
|
37 |
{
|
|
38 |
public:
|
|
39 |
static CTestStepConvertAllocFailNew* NewL();
|
|
40 |
CTestStepConvertAllocFailNew();
|
|
41 |
~CTestStepConvertAllocFailNew();
|
|
42 |
virtual TVerdict DoTestStepL();
|
|
43 |
|
|
44 |
// from MMdaObjectStateChangeObserver
|
|
45 |
void MoscoStateChangeEvent(CBase* /*aObject*/, TInt /*aPreviousState*/, TInt /*aCurrentState*/, TInt /*aErrorcCode*/);
|
|
46 |
|
|
47 |
private:
|
|
48 |
TInt iError;
|
|
49 |
CMdaAudioConvertUtility* iConvert;
|
|
50 |
};
|
|
51 |
|
|
52 |
/**
|
|
53 |
*
|
|
54 |
* Alloc Failure New Convert utility
|
|
55 |
*
|
|
56 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
57 |
*
|
|
58 |
* @xxxx
|
|
59 |
*
|
|
60 |
*/
|
|
61 |
class CTestStepConvertNew : public CTestStepUnitMMFAudClient,
|
|
62 |
public MMdaObjectStateChangeObserver
|
|
63 |
{
|
|
64 |
public:
|
|
65 |
static CTestStepConvertNew* NewL();
|
|
66 |
CTestStepConvertNew();
|
|
67 |
~CTestStepConvertNew();
|
|
68 |
virtual TVerdict DoTestStepL();
|
|
69 |
|
|
70 |
// from MMdaObjectStateChangeObserver
|
|
71 |
void MoscoStateChangeEvent(CBase* /*aObject*/, TInt /*aPreviousState*/, TInt /*aCurrentState*/, TInt /*aErrorcCode*/);
|
|
72 |
|
|
73 |
private:
|
|
74 |
TInt iError;
|
|
75 |
CMdaAudioConvertUtility* iConvert;
|
|
76 |
};
|
|
77 |
|
|
78 |
/**
|
|
79 |
*
|
|
80 |
* Test Open
|
|
81 |
*
|
|
82 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
83 |
*
|
|
84 |
* @xxxx
|
|
85 |
*
|
|
86 |
*/
|
|
87 |
class CTestStepConvertAllocFailOpen : public CTestStepUnitMMFAudClient,
|
|
88 |
public MMdaObjectStateChangeObserver
|
|
89 |
{
|
|
90 |
public:
|
|
91 |
static CTestStepConvertAllocFailOpen* NewL();
|
|
92 |
CTestStepConvertAllocFailOpen();
|
|
93 |
~CTestStepConvertAllocFailOpen();
|
|
94 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
95 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
96 |
virtual TVerdict DoTestStepL();
|
|
97 |
|
|
98 |
// from MMdaObjectStateChangeObserver
|
|
99 |
void MoscoStateChangeEvent(CBase* /*aObject*/, TInt /*aPreviousState*/, TInt /*aCurrentState*/, TInt /*aErrorcCode*/);
|
|
100 |
|
|
101 |
private:
|
|
102 |
void OpenAndStartSchedulerL();
|
|
103 |
|
|
104 |
private:
|
|
105 |
TInt iError;
|
|
106 |
CMdaAudioConvertUtility* iConvert;
|
|
107 |
TPtrC iFileName2;
|
|
108 |
};
|
|
109 |
|
|
110 |
/**
|
|
111 |
*
|
|
112 |
* Test Open
|
|
113 |
*
|
|
114 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
115 |
*
|
|
116 |
* @xxxx
|
|
117 |
*
|
|
118 |
*/
|
|
119 |
class CTestStepConvertOpen : public CTestStepUnitMMFAudClient,
|
|
120 |
public MMdaObjectStateChangeObserver
|
|
121 |
{
|
|
122 |
public:
|
|
123 |
static CTestStepConvertOpen* NewL();
|
|
124 |
CTestStepConvertOpen();
|
|
125 |
~CTestStepConvertOpen();
|
|
126 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
127 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
128 |
virtual TVerdict DoTestStepL();
|
|
129 |
|
|
130 |
// from MMdaObjectStateChangeObserver
|
|
131 |
void MoscoStateChangeEvent(CBase* /*aObject*/, TInt /*aPreviousState*/, TInt /*aCurrentState*/, TInt /*aErrorcCode*/);
|
|
132 |
|
|
133 |
private:
|
|
134 |
//void OpenFileStartSchedulerL();
|
|
135 |
TVerdict TestPlayL();
|
|
136 |
TVerdict TestRecordL();
|
|
137 |
TVerdict CompareFilesL(const TDesC& aCreatedFilename, const TDesC& aExpectedFilename, TInt aLength);
|
|
138 |
|
|
139 |
private:
|
|
140 |
TInt iError;
|
|
141 |
CMdaAudioConvertUtility* iConvert;
|
|
142 |
TPtrC iFileName2;
|
|
143 |
};
|
|
144 |
|
|
145 |
/**
|
|
146 |
*
|
|
147 |
* Test Open
|
|
148 |
*
|
|
149 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
150 |
*
|
|
151 |
* @xxxx
|
|
152 |
*
|
|
153 |
*/
|
|
154 |
class CTestStepConvertOpenLocFormat : public CTestStepUnitMMFAudClient,
|
|
155 |
public MMdaObjectStateChangeObserver
|
|
156 |
{
|
|
157 |
public:
|
|
158 |
static CTestStepConvertOpenLocFormat* NewL();
|
|
159 |
CTestStepConvertOpenLocFormat();
|
|
160 |
~CTestStepConvertOpenLocFormat();
|
|
161 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
162 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
163 |
virtual TVerdict DoTestStepL();
|
|
164 |
|
|
165 |
// from MMdaObjectStateChangeObserver
|
|
166 |
void MoscoStateChangeEvent(CBase* /*aObject*/, TInt /*aPreviousState*/, TInt /*aCurrentState*/, TInt /*aErrorcCode*/);
|
|
167 |
|
|
168 |
private:
|
|
169 |
//void OpenFileStartSchedulerL();
|
|
170 |
|
|
171 |
private:
|
|
172 |
TInt iError;
|
|
173 |
CMdaAudioConvertUtility* iConvert;
|
|
174 |
TPtrC iFileName2;
|
|
175 |
TMdaClipLocation* iClipLocationSrc;
|
|
176 |
TMdaAuClipFormat iAuClipFormat;
|
|
177 |
TMdaPcm16BitAuCodec iAu16bitCodec;
|
|
178 |
TMdaWavClipFormat iWavClipFormat;
|
|
179 |
TBool iHasStartedConverting;
|
|
180 |
TBool iHasFinishedConverting;
|
|
181 |
};
|
|
182 |
|
|
183 |
/**
|
|
184 |
*
|
|
185 |
* Test Open
|
|
186 |
*
|
|
187 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
188 |
*
|
|
189 |
* @xxxx
|
|
190 |
*
|
|
191 |
*/
|
|
192 |
class CTestStepConvertOpenLocFormat2 : public CTestStepUnitMMFAudClient,
|
|
193 |
public MMdaObjectStateChangeObserver
|
|
194 |
{
|
|
195 |
public:
|
|
196 |
static CTestStepConvertOpenLocFormat2* NewL();
|
|
197 |
CTestStepConvertOpenLocFormat2();
|
|
198 |
~CTestStepConvertOpenLocFormat2();
|
|
199 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
200 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
201 |
virtual TVerdict DoTestStepL();
|
|
202 |
|
|
203 |
// from MMdaObjectStateChangeObserver
|
|
204 |
void MoscoStateChangeEvent(CBase* /*aObject*/, TInt /*aPreviousState*/, TInt /*aCurrentState*/, TInt /*aErrorcCode*/);
|
|
205 |
|
|
206 |
private:
|
|
207 |
//void OpenFileStartSchedulerL();
|
|
208 |
|
|
209 |
private:
|
|
210 |
TInt iError;
|
|
211 |
CMdaAudioConvertUtility* iConvert;
|
|
212 |
CFileMan* iFileMan;
|
|
213 |
TPtrC iFileName2;
|
|
214 |
TMdaClipLocation* iClipLocationSrc;
|
|
215 |
TMdaClipLocation* iClipLocationTrgt;
|
|
216 |
TMdaAuClipFormat iAuClipFormat;
|
|
217 |
TMdaWavClipFormat iWavClipFormat;
|
|
218 |
};
|
|
219 |
|
|
220 |
|
|
221 |
/**
|
|
222 |
*
|
|
223 |
* Test Open
|
|
224 |
*
|
|
225 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
226 |
*
|
|
227 |
* @xxxx
|
|
228 |
*
|
|
229 |
*/
|
|
230 |
class CTestStepConvertOpenLocFormat3 : public CTestStepUnitMMFAudClient,
|
|
231 |
public MMdaObjectStateChangeObserver
|
|
232 |
{
|
|
233 |
public:
|
|
234 |
static CTestStepConvertOpenLocFormat3* NewL();
|
|
235 |
CTestStepConvertOpenLocFormat3();
|
|
236 |
~CTestStepConvertOpenLocFormat3();
|
|
237 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
238 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
239 |
virtual TVerdict DoTestStepL();
|
|
240 |
|
|
241 |
// from MMdaObjectStateChangeObserver
|
|
242 |
void MoscoStateChangeEvent(CBase* /*aObject*/, TInt /*aPreviousState*/, TInt /*aCurrentState*/, TInt /*aErrorcCode*/);
|
|
243 |
|
|
244 |
private:
|
|
245 |
//void OpenFileStartSchedulerL();
|
|
246 |
|
|
247 |
private:
|
|
248 |
TInt iError;
|
|
249 |
CMdaAudioConvertUtility* iConvert;
|
|
250 |
CFileMan* iFileMan;
|
|
251 |
TPtrC iFileName2;
|
|
252 |
TPtrC iFileNameWav1;
|
|
253 |
TPtrC iFileNameWav2;
|
|
254 |
|
|
255 |
TMdaClipLocation* iClipLocationSrc;
|
|
256 |
TMdaClipLocation* iClipLocationTrgt;
|
|
257 |
|
|
258 |
TMdaRawAudioClipFormat iRawClipFormat;
|
|
259 |
TMdaU8PcmRawAudioCodec iRawAudioCodec;
|
|
260 |
TMdaSL16RawAudioCodec iRawAudio16Codec;
|
|
261 |
|
|
262 |
TMdaWavClipFormat iWavClipFormat;
|
|
263 |
TMdaPcmWavCodec iWavAudioPcmCodec;
|
|
264 |
TMdaMulawWavCodec iWavAudioulawCodec;
|
|
265 |
|
|
266 |
};
|
|
267 |
|
|
268 |
/**
|
|
269 |
*
|
|
270 |
* Test Open
|
|
271 |
*
|
|
272 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
273 |
*
|
|
274 |
* @xxxx
|
|
275 |
*
|
|
276 |
*/
|
|
277 |
class CTestStepConvertOpenLocFormat4 : public CTestStepUnitMMFAudClient,
|
|
278 |
public MMdaObjectStateChangeObserver
|
|
279 |
{
|
|
280 |
public:
|
|
281 |
static CTestStepConvertOpenLocFormat4* NewL();
|
|
282 |
CTestStepConvertOpenLocFormat4();
|
|
283 |
~CTestStepConvertOpenLocFormat4();
|
|
284 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
285 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
286 |
virtual TVerdict DoTestStepL();
|
|
287 |
|
|
288 |
// from MMdaObjectStateChangeObserver
|
|
289 |
void MoscoStateChangeEvent(CBase* /*aObject*/, TInt /*aPreviousState*/, TInt /*aCurrentState*/, TInt /*aErrorcCode*/);
|
|
290 |
|
|
291 |
private:
|
|
292 |
//void OpenFileStartSchedulerL();
|
|
293 |
|
|
294 |
private:
|
|
295 |
TInt iError;
|
|
296 |
CMdaAudioConvertUtility* iConvert;
|
|
297 |
CFileMan* iFileMan;
|
|
298 |
TMdaClipLocation* iClipLocationSrc;
|
|
299 |
|
|
300 |
TMdaClipLocation* iClipLocationTrgtDes;
|
|
301 |
RPointerArray<TDes8> iBuffer;
|
|
302 |
|
|
303 |
TMdaRawAudioClipFormat iRawClipFormat;
|
|
304 |
TMdaU8PcmRawAudioCodec iRawAudioCodec;
|
|
305 |
TMdaSL16RawAudioCodec iRawAudio16Codec;
|
|
306 |
|
|
307 |
TMdaWavClipFormat iWavClipFormat;
|
|
308 |
TMdaPcmWavCodec iWavAudioPcmCodec;
|
|
309 |
TMdaMulawWavCodec iWavAudioulawCodec;
|
|
310 |
|
|
311 |
};
|
|
312 |
|
|
313 |
/**
|
|
314 |
*
|
|
315 |
* Test Open
|
|
316 |
*
|
|
317 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
318 |
*
|
|
319 |
* @xxxx
|
|
320 |
*
|
|
321 |
*/
|
|
322 |
/*
|
|
323 |
class CTestStepConvertType : public CTestStepUnitMMFAudClient,
|
|
324 |
public MMdaObjectStateChangeObserver
|
|
325 |
{
|
|
326 |
public:
|
|
327 |
static CTestStepConvertType* NewL();
|
|
328 |
CTestStepConvertType();
|
|
329 |
~CTestStepConvertType();
|
|
330 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
331 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
332 |
virtual TVerdict DoTestStepL();
|
|
333 |
*/
|
|
334 |
// from MMdaObjectStateChangeObserver */
|
|
335 |
//void MoscoStateChangeEvent(CBase* /*aObject*/, TInt /*aPreviousState*/, TInt /*aCurrentState*/, TInt /*aErrorcCode*/);
|
|
336 |
/*
|
|
337 |
private:
|
|
338 |
//void OpenFileStartSchedulerL();
|
|
339 |
|
|
340 |
private:
|
|
341 |
TInt iError;
|
|
342 |
CMdaAudioConvertUtility* iConvert;
|
|
343 |
TPtrC iFileName2;
|
|
344 |
CMdaAudioType* iAudioType;
|
|
345 |
};
|
|
346 |
*/
|
|
347 |
|
|
348 |
/**
|
|
349 |
*
|
|
350 |
* Test Open
|
|
351 |
*
|
|
352 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
353 |
*
|
|
354 |
* @xxxx
|
|
355 |
*
|
|
356 |
*/
|
|
357 |
/*
|
|
358 |
class CTestStepConvertAllocFailType : public CTestStepUnitMMFAudClient,
|
|
359 |
public MMdaObjectStateChangeObserver
|
|
360 |
{
|
|
361 |
public:
|
|
362 |
static CTestStepConvertAllocFailType* NewL();
|
|
363 |
CTestStepConvertAllocFailType();
|
|
364 |
~CTestStepConvertAllocFailType();
|
|
365 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
366 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
367 |
virtual TVerdict DoTestStepL();
|
|
368 |
|
|
369 |
// from MMdaObjectStateChangeObserver
|
|
370 |
*/ // void MoscoStateChangeEvent(CBase* /*aObject*/, TInt /*aPreviousState*/, TInt /*aCurrentState*/, TInt /*aErrorcCode*/);
|
|
371 |
/*
|
|
372 |
private:
|
|
373 |
//void OpenFileStartSchedulerL();
|
|
374 |
|
|
375 |
private:
|
|
376 |
TInt iError;
|
|
377 |
CMdaAudioConvertUtility* iConvert;
|
|
378 |
TPtrC iFileName2;
|
|
379 |
};
|
|
380 |
*/
|
|
381 |
|
|
382 |
/**
|
|
383 |
*
|
|
384 |
* GetImplementationInfo
|
|
385 |
*
|
|
386 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
387 |
*
|
|
388 |
* @xxxx
|
|
389 |
*
|
|
390 |
*/
|
|
391 |
class CTestStepConvertGetImplementationInfo : public CTestStepUnitMMFAudClient,
|
|
392 |
public MMdaObjectStateChangeObserver
|
|
393 |
{
|
|
394 |
public:
|
|
395 |
static CTestStepConvertGetImplementationInfo* NewL();
|
|
396 |
CTestStepConvertGetImplementationInfo();
|
|
397 |
~CTestStepConvertGetImplementationInfo();
|
|
398 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
399 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
400 |
virtual TVerdict DoTestStepL();
|
|
401 |
|
|
402 |
// from MMdaObjectStateChangeObserver
|
|
403 |
void MoscoStateChangeEvent(CBase* /*aObject*/, TInt /*aPreviousState*/, TInt /*aCurrentState*/, TInt /*aErrorcCode*/);
|
|
404 |
|
|
405 |
private:
|
|
406 |
TInt iError;
|
|
407 |
CMdaAudioConvertUtility* iConvert;
|
|
408 |
TMdaClipLocation* iClipLocationSrc;
|
|
409 |
TMdaClipLocation* iClipLocationDest;
|
|
410 |
TInt iNum;
|
|
411 |
TBool iHasStartedConverting;
|
|
412 |
TBool iHasFinishedConverting;
|
|
413 |
TPtrC iFileName2;
|
|
414 |
};
|
|
415 |
|
|
416 |
|
|
417 |
/**
|
|
418 |
*
|
|
419 |
* SendCustomCommandSync
|
|
420 |
*
|
|
421 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
422 |
*
|
|
423 |
* @xxxx
|
|
424 |
*
|
|
425 |
*/
|
|
426 |
class CTestStepConvertSendCustomCommandSync : public CTestStepUnitMMFAudClient,
|
|
427 |
public MMdaObjectStateChangeObserver
|
|
428 |
{
|
|
429 |
public:
|
|
430 |
static CTestStepConvertSendCustomCommandSync* NewL();
|
|
431 |
CTestStepConvertSendCustomCommandSync();
|
|
432 |
~CTestStepConvertSendCustomCommandSync();
|
|
433 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
434 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
435 |
virtual TVerdict DoTestStepL();
|
|
436 |
|
|
437 |
// from MMdaObjectStateChangeObserver
|
|
438 |
void MoscoStateChangeEvent(CBase* /*aObject*/, TInt /*aPreviousState*/, TInt /*aCurrentState*/, TInt /*aErrorcCode*/);
|
|
439 |
|
|
440 |
private:
|
|
441 |
TInt iError;
|
|
442 |
CMdaAudioConvertUtility* iConvert;
|
|
443 |
TInt iNum;
|
|
444 |
TBool iHasStartedConverting;
|
|
445 |
TBool iHasFinishedConverting;
|
|
446 |
TMdaClipLocation* iClipLocationSrc;
|
|
447 |
TMdaClipLocation* iClipLocationTrgt;
|
|
448 |
TPtrC iFileName2;
|
|
449 |
};
|
|
450 |
|
|
451 |
|
|
452 |
/**
|
|
453 |
*
|
|
454 |
* SendCustomCommandAsync
|
|
455 |
*
|
|
456 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
457 |
*
|
|
458 |
* @xxxx
|
|
459 |
*
|
|
460 |
*/
|
|
461 |
class CTestStepConvertSendCustomCommandAsync : public CTestStepUnitMMFAudClient,
|
|
462 |
public MMdaObjectStateChangeObserver
|
|
463 |
{
|
|
464 |
public:
|
|
465 |
static CTestStepConvertSendCustomCommandAsync* NewL();
|
|
466 |
CTestStepConvertSendCustomCommandAsync();
|
|
467 |
~CTestStepConvertSendCustomCommandAsync();
|
|
468 |
void Close();
|
|
469 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
470 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
471 |
virtual TVerdict DoTestStepL();
|
|
472 |
|
|
473 |
// from MMdaObjectStateChangeObserver
|
|
474 |
void MoscoStateChangeEvent(CBase* /*aObject*/, TInt /*aPreviousState*/, TInt /*aCurrentState*/, TInt /*aErrorcCode*/);
|
|
475 |
|
|
476 |
class CAsyncObserver : public CActive
|
|
477 |
{
|
|
478 |
public:
|
|
479 |
CAsyncObserver() : CActive(EPriorityStandard) {CActiveScheduler::Add(this);}
|
|
480 |
void RunL()
|
|
481 |
{
|
|
482 |
CActiveScheduler::Stop();
|
|
483 |
}
|
|
484 |
void DoCancel(){;}
|
|
485 |
TRequestStatus& ActiveStatus(){SetActive();return iStatus;}
|
|
486 |
};
|
|
487 |
|
|
488 |
|
|
489 |
private:
|
|
490 |
TInt iError;
|
|
491 |
CMdaAudioConvertUtility* iConvert;
|
|
492 |
TMdaClipLocation* iClipLocationSrc;
|
|
493 |
TMdaClipLocation* iClipLocationTrgt;
|
|
494 |
|
|
495 |
CAsyncObserver* iAsyncObserver;
|
|
496 |
TInt iNum;
|
|
497 |
TBool iHasStartedConverting;
|
|
498 |
TBool iHasFinishedConverting;
|
|
499 |
TPtrC iFileName2;
|
|
500 |
};
|
|
501 |
|
|
502 |
/**
|
|
503 |
*
|
|
504 |
* CheckImplementationInfo
|
|
505 |
*
|
|
506 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
507 |
*
|
|
508 |
* @xxxx
|
|
509 |
*
|
|
510 |
*/
|
|
511 |
class CTestStepConvertCheckImplementationInfo : public CTestStepUnitMMFAudClient,
|
|
512 |
public MMdaObjectStateChangeObserver
|
|
513 |
{
|
|
514 |
public:
|
|
515 |
static CTestStepConvertCheckImplementationInfo* NewL();
|
|
516 |
CTestStepConvertCheckImplementationInfo();
|
|
517 |
~CTestStepConvertCheckImplementationInfo();
|
|
518 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
519 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
520 |
virtual TVerdict DoTestStepL();
|
|
521 |
|
|
522 |
// from MMdaObjectStateChangeObserver
|
|
523 |
void MoscoStateChangeEvent(CBase* /*aObject*/, TInt /*aPreviousState*/, TInt /*aCurrentState*/, TInt /*aErrorcCode*/);
|
|
524 |
|
|
525 |
private:
|
|
526 |
TInt iError;
|
|
527 |
CMdaAudioConvertUtility* iConvert;
|
|
528 |
TMdaClipLocation* iClipLocationSrc;
|
|
529 |
TMdaClipLocation* iClipLocationDest;
|
|
530 |
TInt iNum;
|
|
531 |
TBool iHasStartedConverting;
|
|
532 |
TBool iHasFinishedConverting;
|
|
533 |
TPtrC iFileName2;
|
|
534 |
};
|
|
535 |
|
|
536 |
class MConvAudioObserver
|
|
537 |
{
|
|
538 |
public:
|
|
539 |
//* Signal completion of test with associated error
|
|
540 |
virtual void ConvertComplete(TInt aError) = 0;
|
|
541 |
};
|
|
542 |
|
|
543 |
class CConvertAudio : public CBase,
|
|
544 |
public MMdaObjectStateChangeObserver
|
|
545 |
{
|
|
546 |
public:
|
|
547 |
static CConvertAudio* NewL(MConvAudioObserver* aObserver);
|
|
548 |
|
|
549 |
virtual ~CConvertAudio();
|
|
550 |
|
|
551 |
void ConvertL(const TDesC& aFromFileName, const TDesC& aToFileName);
|
|
552 |
|
|
553 |
// from MMdaObjectStateChangeObserver
|
|
554 |
void MoscoStateChangeEvent(CBase* aObject, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode);
|
|
555 |
|
|
556 |
protected:
|
|
557 |
CConvertAudio(MConvAudioObserver* aObserver);
|
|
558 |
void ConstructL();
|
|
559 |
|
|
560 |
virtual void OnOpenL();
|
|
561 |
|
|
562 |
protected:
|
|
563 |
MConvAudioObserver*const iObserver;
|
|
564 |
CMdaAudioConvertUtility* iUtility;
|
|
565 |
};
|
|
566 |
|
|
567 |
class RTestStepConvertAudio : public RAsyncTestStep,
|
|
568 |
public MConvAudioObserver
|
|
569 |
{
|
|
570 |
public:
|
|
571 |
static RTestStepConvertAudio* NewL(const TDesC& aStepName,
|
|
572 |
const TDesC& aFromFileName,
|
|
573 |
const TDesC& aToFileName,
|
|
574 |
const TDesC& aReferenceFileName);
|
|
575 |
|
|
576 |
// from RAsyncTestStep
|
|
577 |
virtual void KickoffTestL();
|
|
578 |
void CloseTest();
|
|
579 |
|
|
580 |
// from MConvAudioObserver
|
|
581 |
void ConvertComplete(TInt aError);
|
|
582 |
TBool CheckConversionL();
|
|
583 |
protected:
|
|
584 |
RTestStepConvertAudio(const TDesC& aStepName,
|
|
585 |
const TDesC& aFromFileName,
|
|
586 |
const TDesC& aToFileName,
|
|
587 |
const TDesC& aReferenceFileName);
|
|
588 |
|
|
589 |
TFileName iFromFileName;
|
|
590 |
TFileName iToFileName;
|
|
591 |
TFileName iReferenceFileName;
|
|
592 |
CConvertAudio* iConverter;
|
|
593 |
RFs iFs;
|
|
594 |
};
|
|
595 |
|
|
596 |
class CConvertPanic : public CConvertAudio
|
|
597 |
{
|
|
598 |
public:
|
|
599 |
static CConvertPanic* NewL(MConvAudioObserver* aObserver);
|
|
600 |
|
|
601 |
virtual ~CConvertPanic();
|
|
602 |
protected:
|
|
603 |
void OnOpenL();
|
|
604 |
CConvertPanic(MConvAudioObserver* aObserver);
|
|
605 |
void ConstructL();
|
|
606 |
};
|
|
607 |
|
|
608 |
class RTestStepConvertPanic: public RTestStepConvertAudio
|
|
609 |
{
|
|
610 |
public:
|
|
611 |
static RTestStepConvertPanic* NewL(const TDesC& aStepName,
|
|
612 |
const TDesC& aFromFileName,
|
|
613 |
const TDesC& aToFileName,
|
|
614 |
const TDesC& aReferenceFileName);
|
|
615 |
void KickoffTestL();
|
|
616 |
protected:
|
|
617 |
RTestStepConvertPanic(const TDesC& aStepName,
|
|
618 |
const TDesC& aFromFileName,
|
|
619 |
const TDesC& aToFileName,
|
|
620 |
const TDesC& aReferenceFileName);
|
|
621 |
// from MConvAudioObserver
|
|
622 |
void ConvertComplete(TInt aError);
|
|
623 |
};
|
|
624 |
|
|
625 |
#endif //(TESTSTEPCONVERT_H)
|