Update contrib.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // NB: these includes are added here to pull in includes from MmfControllerFramework.h
15 // They are placed here as we are messing aroung with private (see below) to allow access to
16 // the private member iSubThread in RMMFControllerProxy for test 152 without resorting to friend
17 // classes. This was done to test INC038123.
18 // +++++++++ Start of playing around with private block. +++++++++++++
24 #include <mmf/common/mmfutilities.h>
25 #include <mmf/common/mmfcontrollerframeworkbase.h>
27 #define private public
28 #include <mmf/common/mmfcontrollerframework.h>
30 //++++++++ End of playing around with private block. +++++++++++
33 // Test system includes
34 #include <testframework.h>
36 #include <mmf/plugin/mmfformatimplementationuids.hrh>
37 #include <mmf/plugin/mmfcontrollerimplementationuids.hrh>
39 #include "CmmfTestControllerUIDs.hrh"
40 #include "cmmftestterminationcontrolleruids.hrh"
41 #include "TSU_MMF_CTLFRM.h"
42 #include "TSU_MMF_CTLFRMSuite.h"
44 //const TUid KMmfUidControllerAudioUid = {KMmfUidControllerAudio}; // EABI warning removal
45 const TUid KTstControllerUid = {KMmfTestControllerUid}; //(0x101F88D8)
46 const TUid KTestDataSourceUid = {KMmfTestDataSourceUid};
47 const TUid KTestDataSourceBUid = {KMmfTestDataSourceBUid};
48 const TUid KTestDataSinkUid = {KMmfTestDataSinkUid};
49 const TUid KTestDataSinkBUid = {KMmfTestDataSinkBUid};
50 const TUid KTestTerminationControllerUid = {KMmfTestTerminationControllerUid};
52 // Expected results in Test 0140s.
53 // 'KMmfUidControllerAudio' is the preferred Controller used in these tests
54 const TUid KExpectedMediaIDUid140 = {0x101F7D8D};//{0x101F5D07};
56 const TUid KMmfUidFormatPAVReadUid = {KMmfUidFormatPAVRead};
57 const TUid KMmfUidFormatFAWReadUid = {KMmfUidFormatFAWRead};
58 const TUid KMmfUidFormatAIReadUid = {KMmfUidFormatAIRead};
59 const TUid KMmfUidFormatMBEGReadUid = {KMmfUidFormatMBEGRead};
61 const TUid KMmfUidFormatPAVWriteUid = {KMmfUidFormatPAVWrite};
62 const TUid KMmfUidFormatFAWWriteUid = {KMmfUidFormatFAWWrite};
63 const TUid KMmfUidFormatAIWriteUid = {KMmfUidFormatAIWrite};
65 const TUid KMmfUidPluginInterfaceFormatEncodeUid = {KMmfUidPluginInterfaceFormatEncode};
66 const TUid KMmfUidPluginInterfaceFormatDecodeUid = {KMmfUidPluginInterfaceFormatDecode};
68 _LIT(KTestControllerSupplier, "TSU_MMF_CTLFRM");
70 // Used as dummy data to pass to sources, sinks etc
71 _LIT8(KInitData,"TEST");
75 * CTestStepSelfTest constructor
80 CTestStep_MMF_CTLFRM::CTestStep_MMF_CTLFRM()
86 * CTestStepSelfTest destructor
91 CTestStep_MMF_CTLFRM::~CTestStep_MMF_CTLFRM()
95 TVerdict CTestStep_MMF_CTLFRM::DoTestStepPreambleL()
97 TVerdict verdict = EPass;
102 TVerdict CTestStep_MMF_CTLFRM::DoTestStepPostambleL()
104 TVerdict verdict = EPass;
110 CTestStep_MMF_CTLFRM_U_0001::CTestStep_MMF_CTLFRM_U_0001()
114 // store the name of this test case
115 // this is the name that is used by the script file
116 // Each test step initialises it's own name
117 iTestStepName = _L("MM-MMF-CTLFRM-U-0001");
123 TVerdict CTestStep_MMF_CTLFRM_U_0001::DoTestStepL( void )
125 * Call the RMMFController::Open(..) with the parameters specified,
126 * varify the return value is 0. Call the RMMFController::Close() on the Custom Controller.
127 * Varify 'error' is 0.
130 * @test Req. under test REQ172.5.1 REQ172.5.2 REQ172.5.5.12
133 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
136 TVerdict verdict = EPass;
138 TMMFPrioritySettings settings;
139 TInt error = KErrNone;
140 RMMFController controller;
142 settings.iPriority = 1;
143 settings.iPref = EMdaPriorityPreferenceTime;
144 settings.iState = EMMFStateIdle;
146 INFO_PRINTF1(_L("Attempting to Open Controller"));
148 // Open a Custom Controller
149 error = controller.Open(KTstControllerUid,settings);
150 INFO_PRINTF2(_L("Controller Open: %d"), error);
157 INFO_PRINTF1(_L("Closing Controller"));
160 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
167 //------------------------------------------------------------------
170 CTestStep_MMF_CTLFRM_U_0007::CTestStep_MMF_CTLFRM_U_0007()
174 // store the name of this test case
175 // this is the name that is used by the script file
176 // Each test step initialises it's own name
177 iTestStepName = _L("MM-MMF-CTLFRM-U-0007");
183 TVerdict CTestStep_MMF_CTLFRM_U_0007::DoTestStepL( void )
184 /** Call the RMMFController::Open(..) (with the parameters from test TSU_MMF_CTLFRM_U_0001),
185 * varify the return value is 0. Instantiate a Custom DataSource Object and add it to
186 * the Custom Controller using RMMFController::AddDataSource(..), with the specified
187 * parameters. Call Custom Command 'KLogFunction' and varify the text value returned is
188 * equal to the specifed text in Test Step. Call the RMMFController::Close() on the Custom
189 * Controller. Varify 'error' is 0.
192 * @test Req. under test REQ172.5.5 REQ172.5.5.1
195 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
198 TVerdict verdict = EPass;
199 _LIT8(KExpectedResult, "AddDataSourceL Called");
201 TMMFPrioritySettings settings;
202 TInt error = KErrNone;
203 RMMFController controller;
205 settings.iPriority = 1;
206 settings.iPref = EMdaPriorityPreferenceTime;
207 settings.iState = EMMFStateIdle;
209 error = controller.Open(KTstControllerUid,settings);
210 INFO_PRINTF2(_L("Controller Open: %d"), error);
212 const TDesC8& initData = KInitData;
215 INFO_PRINTF1(_L("Attempting to add a Source and a Sink to Controller"));
218 INFO_PRINTF1(_L("API TEST: Calling AddDataSource"));
219 error = controller.AddDataSource(KTestDataSourceUid, initData);
220 error = controller.AddDataSource(KTestDataSourceBUid, initData);
223 INFO_PRINTF2(_L("Controller Status: %d"), error);
225 //------------------------------------//
226 // Getting Log from Custom Controller //
227 //------------------------------------//
230 INFO_PRINTF1(_L("Getting Log"));
232 TBuf8<64> memFunctionText;
234 TUid uid = {KMmfTestControllerUid};
235 TMMFMessageDestination handleInfo(uid);
236 TMMFMessageDestinationPckg messageDest(handleInfo);
238 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
240 TBuf<64> memFunctionText16;
241 memFunctionText16.Copy(memFunctionText);
242 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
245 if (memFunctionText != KExpectedResult)
251 //------------------------------------//
254 INFO_PRINTF1(_L("Closing Controller"));
262 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
268 //------------------------------------------------------------------
270 CTestStep_MMF_CTLFRM_U_0008::CTestStep_MMF_CTLFRM_U_0008()
274 // store the name of this test case
275 // this is the name that is used by the script file
276 // Each test step initialises it's own name
277 iTestStepName = _L("MM-MMF-CTLFRM-U-0008");
282 TVerdict CTestStep_MMF_CTLFRM_U_0008::DoTestStepL( void )
283 /** Call the RMMFController::Open(..) (with the parameters from test TSU_MMF_CTLFRM_U_0001),
284 * varify the return value is 0. Instantiate a Custom DataSink Object and add it to the
285 * Custom Controller using RMMFController::AddDataSink(..), with the specified parameters.
286 * Call Custom Command 'KLogFunction' and varify the text value returned is equal to the
287 * specifed text in Test Step. Call the RMMFController::Close() on the Custom Controller.
288 * Varify 'error' is 0.
291 * @test Req. under test REQ172.5.5 REQ172.5.5.3
294 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
297 TVerdict verdict = EPass;
298 _LIT8(KExpectedResult, "AddDataSinkL Called");
300 TMMFPrioritySettings settings;
301 TInt error = KErrNone;
302 RMMFController controller;
304 settings.iPriority = 1;
305 settings.iPref = EMdaPriorityPreferenceTime;
306 settings.iState = EMMFStateIdle;
308 error = controller.Open(KTstControllerUid,settings);
309 INFO_PRINTF2(_L("Controller Open: %d"), error);
311 const TDesC8& initData = KInitData;
316 INFO_PRINTF1(_L("API TEST: Calling AddDataSink"));
317 error = controller.AddDataSink(KTestDataSinkUid, initData);
318 error = controller.AddDataSink(KTestDataSinkBUid, initData);
322 INFO_PRINTF2(_L("Controller Status: %d"), error);
324 //------------------------------------//
325 // Getting Log from Custom Controller //
326 //------------------------------------//
329 INFO_PRINTF1(_L("Getting Log"));
331 TBuf8<64> memFunctionText;
333 TUid uid = {KMmfTestControllerUid};
334 TMMFMessageDestination handleInfo(uid);
335 TMMFMessageDestinationPckg messageDest(handleInfo);
337 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
339 TBuf<64> memFunctionText16;
340 memFunctionText16.Copy(memFunctionText);
341 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
343 if (memFunctionText != KExpectedResult)
349 //------------------------------------//
351 INFO_PRINTF1(_L("Closing Controller"));
359 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
365 //------------------------------------------------------------------
367 CTestStep_MMF_CTLFRM_U_0009::CTestStep_MMF_CTLFRM_U_0009()
371 // store the name of this test case
372 // this is the name that is used by the script file
373 // Each test step initialises it's own name
374 iTestStepName = _L("MM-MMF-CTLFRM-U-0009");
379 TVerdict CTestStep_MMF_CTLFRM_U_0009::DoTestStepL( void )
380 /** Call the RMMFController::Open(..) (with the parameters from test TSU_MMF_CTLFRM_U_0001),
381 * varify the return value is 0. Instantiate a Custom DataSource Object and add it to the
382 * Custom Controller using RMMFController::AddDataSource(..), with the specified parameters.
383 * Call Custom Command 'KLogFunction' and varify the text value returned is equal to the
384 * specifed text in Test Step. Call the RMMFController::Close() on the Custom Controller.
385 * Varify 'error' is 0.
388 * @test Req. under test REQ172.5.5 REQ172.5.5.1
391 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
394 TVerdict verdict = EPass;
395 _LIT8(KExpectedResult, "AddDataSourceL Called");
397 TMMFPrioritySettings settings;
398 TInt error = KErrNone;
399 RMMFController controller;
401 settings.iPriority = 1;
402 settings.iPref = EMdaPriorityPreferenceTime;
403 settings.iState = EMMFStateIdle;
405 error = controller.Open(KTstControllerUid,settings);
406 INFO_PRINTF2(_L("Controller Open: %d"), error);
408 const TDesC8& initData = KInitData;
410 TMMFMessageDestination sourceHandlePtr;
411 TMMFMessageDestination& sourceHandle = sourceHandlePtr;
414 INFO_PRINTF1(_L("Attempting to add a Source and a Sink to Controller"));
417 INFO_PRINTF1(_L("API TEST: Calling AddDataSource"));
418 error = controller.AddDataSource(KTestDataSourceUid, initData, sourceHandle);
421 INFO_PRINTF2(_L("Controller Status: %d"), error);
423 //------------------------------------//
424 // Getting Log from Custom Controller //
425 //------------------------------------//
428 INFO_PRINTF1(_L("Getting Log"));
430 TBuf8<64> memFunctionText;
432 TUid uid = {KMmfTestControllerUid};
433 TMMFMessageDestination handleInfo(uid);
434 TMMFMessageDestinationPckg messageDest(handleInfo);
436 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
438 TBuf<64> memFunctionText16;
439 memFunctionText16.Copy(memFunctionText);
440 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
442 if (memFunctionText != KExpectedResult)
448 //------------------------------------//
450 INFO_PRINTF1(_L("Closing Controller"));
458 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
464 //------------------------------------------------------------------
466 CTestStep_MMF_CTLFRM_U_0010::CTestStep_MMF_CTLFRM_U_0010()
470 // store the name of this test case
471 // this is the name that is used by the script file
472 // Each test step initialises it's own name
473 iTestStepName = _L("MM-MMF-CTLFRM-U-0010");
478 TVerdict CTestStep_MMF_CTLFRM_U_0010::DoTestStepL( void )
479 /** Call the RMMFController::Open(..) (with the parameters from test TSU_MMF_CTLFRM_U_0001),
480 * varify the return value is 0. Instantiate a Custom DataSink Object and add it to the
481 * Custom Controller using RMMFController::AddDataSink(..), with the specified parameters.
482 * Call Custom Command 'KLogFunction' and varify the text value returned is equal to the
483 * specifed text in Test Step. Call the RMMFController::Close() on the Custom Controller.
484 * Varify 'error' is 0.
487 * @test Req. under test REQ172.5.5 REQ172.5.5.3
490 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
493 TVerdict verdict = EPass;
494 _LIT8(KExpectedResult, "AddDataSinkL Called");
496 TMMFPrioritySettings settings;
497 TInt error = KErrNone;
498 RMMFController controller;
500 settings.iPriority = 1;
501 settings.iPref = EMdaPriorityPreferenceTime;
502 settings.iState = EMMFStateIdle;
504 error = controller.Open(KTstControllerUid,settings);
505 INFO_PRINTF2(_L("Controller Open: %d"), error);
507 const TDesC8& initData = KInitData;
508 TMMFMessageDestination sinkHandlePtr;
509 TMMFMessageDestination& sinkHandle = sinkHandlePtr;
514 INFO_PRINTF1(_L("API TEST: Calling AddDataSink"));
515 error = controller.AddDataSink(KTestDataSinkUid, initData, sinkHandle);
518 INFO_PRINTF2(_L("Controller Status: %d"), error);
520 //------------------------------------//
521 // Getting Log from Custom Controller //
522 //------------------------------------//
525 INFO_PRINTF1(_L("Getting Log"));
527 TBuf8<64> memFunctionText;
529 TUid uid = {KMmfTestControllerUid};
530 TMMFMessageDestination handleInfo(uid);
531 TMMFMessageDestinationPckg messageDest(handleInfo);
533 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
535 TBuf<64> memFunctionText16;
536 memFunctionText16.Copy(memFunctionText);
537 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
539 if (memFunctionText != KExpectedResult)
545 //------------------------------------//
547 INFO_PRINTF1(_L("Closing Controller"));
555 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
562 //------------------------------------------------------------------
564 CTestStep_MMF_CTLFRM_U_0011::CTestStep_MMF_CTLFRM_U_0011()
568 // store the name of this test case
569 // this is the name that is used by the script file
570 // Each test step initialises it's own name
571 iTestStepName = _L("MM-MMF-CTLFRM-U-0011");
576 TVerdict CTestStep_MMF_CTLFRM_U_0011::DoTestStepL( void )
577 /** Call the RMMFController::Open(..) (with the parameters from test TSU_MMF_CTLFRM_U_0001),
578 * varify the return value is 0. Instantiate a Custom DataSource Object and add it to the
579 * Custom Controller using RMMFController::AddDataSource(..), with the specified parameters.
580 * Call Custom Command 'KLogFunction' and varify the text value returned is equal to the
581 * specifed text in Test Step. Call the RMMFController::Close() on the Custom Controller.
582 * Varify 'error' is 0.
585 * @test Req. under test REQ172.5.5 REQ172.5.5.2
588 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
591 TVerdict verdict = EPass;
592 _LIT8(KExpectedResult,"RemoveDataSourceL Called");
594 TMMFPrioritySettings settings;
595 TInt error = KErrNone;
596 RMMFController controller;
598 settings.iPriority = 1;
599 settings.iPref = EMdaPriorityPreferenceTime;
600 settings.iState = EMMFStateIdle;
602 error = controller.Open(KTstControllerUid,settings);
603 INFO_PRINTF2(_L("Controller Open: %d"), error);
605 const TDesC8& initData = KInitData;
607 TMMFMessageDestination sourceHandlePtr;
608 TMMFMessageDestination& sourceHandle = sourceHandlePtr;
610 // Add and Remove Source
611 INFO_PRINTF1(_L("Attempting to add a Source and a Sink to Controller"));
614 error = controller.AddDataSource(KTestDataSourceUid, initData, sourceHandle);
615 INFO_PRINTF1(_L("API TEST: Calling RemoveDataSource"));
616 error = controller.RemoveDataSource(sourceHandle);
619 INFO_PRINTF2(_L("Controller Status: %d"), error);
621 //------------------------------------//
622 // Getting Log from Custom Controller //
623 //------------------------------------//
626 INFO_PRINTF1(_L("Getting Log"));
628 TBuf8<64> memFunctionText;
630 TUid uid = {KMmfTestControllerUid};
631 TMMFMessageDestination handleInfo(uid);
632 TMMFMessageDestinationPckg messageDest(handleInfo);
634 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
636 TBuf<64> memFunctionText16;
637 memFunctionText16.Copy(memFunctionText);
638 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
640 if (memFunctionText != KExpectedResult)
646 //------------------------------------//
648 INFO_PRINTF1(_L("Closing Controller"));
656 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
663 //------------------------------------------------------------------
665 CTestStep_MMF_CTLFRM_U_0012::CTestStep_MMF_CTLFRM_U_0012()
669 // store the name of this test case
670 // this is the name that is used by the script file
671 // Each test step initialises it's own name
672 iTestStepName = _L("MM-MMF-CTLFRM-U-0012");
677 TVerdict CTestStep_MMF_CTLFRM_U_0012::DoTestStepL( void )
678 /** Call the RMMFController::Open(..) (with the parameters from test TSU_MMF_CTLFRM_U_0001),
679 * varify the return value is 0. Instantiate a Custom DataSink Object and add it to the
680 * Custom Controller using RMMFController::AddDataSink(..), with the specified parameters.
681 * Call Custom Command 'KLogFunction' and varify the text value returned is equal to the
682 * specifed text in Test Step. Call the RMMFController::Close() on the Custom Controller.
683 * Varify 'error' is 0.
686 * @test Req. under test REQ172.5.5 REQ172.5.5.4
689 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
692 TVerdict verdict = EPass;
693 _LIT8(KExpectedResult, "RemoveDataSinkL Called");
695 TMMFPrioritySettings settings;
696 TInt error = KErrNone;
697 RMMFController controller;
699 settings.iPriority = 1;
700 settings.iPref = EMdaPriorityPreferenceTime;
701 settings.iState = EMMFStateIdle;
703 error = controller.Open(KTstControllerUid,settings);
704 INFO_PRINTF2(_L("Controller Open: %d"), error);
706 const TDesC8& initData = KInitData;
707 TMMFMessageDestination sinkHandlePtr;
708 TMMFMessageDestination& sinkHandle = sinkHandlePtr;
710 // Add and Remove Sink
713 error = controller.AddDataSink(KTestDataSinkUid, initData, sinkHandle);
714 INFO_PRINTF1(_L("API TEST: Calling RemoveDataSink"));
715 error = controller.RemoveDataSink(sinkHandle);
718 INFO_PRINTF2(_L("Controller Status: %d"), error);
720 //------------------------------------//
721 // Getting Log from Custom Controller //
722 //------------------------------------//
725 INFO_PRINTF1(_L("Getting Log"));
727 TBuf8<64> memFunctionText;
729 TUid uid = {KMmfTestControllerUid};
730 TMMFMessageDestination handleInfo(uid);
731 TMMFMessageDestinationPckg messageDest(handleInfo);
733 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
735 TBuf<64> memFunctionText16;
736 memFunctionText16.Copy(memFunctionText);
737 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
739 if (memFunctionText != KExpectedResult)
745 //------------------------------------//
747 INFO_PRINTF1(_L("Closing Controller"));
755 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
762 //------------------------------------------------------------------
764 CTestStep_MMF_CTLFRM_U_0013::CTestStep_MMF_CTLFRM_U_0013()
768 // store the name of this test case
769 // this is the name that is used by the script file
770 // Each test step initialises it's own name
771 iTestStepName = _L("MM-MMF-CTLFRM-U-0013");
776 TVerdict CTestStep_MMF_CTLFRM_U_0013::DoTestStepL( void )
777 /** Call the RMMFController::Open(..) (with the parameters from test TSU_MMF_CTLFRM_U_0001),
778 * varify the return value is 0. Call RMMFController Method specified (in API Method Calls
779 * and Parameters) and varify the 'error' is 0. Follow this by calling the Custom Command
780 * 'KLogFunction' and varify the text value returned is equal to the specifed text in
781 * Test Step. Call the RMMFController::Close() on the Custom Controller. Varify 'error'
785 * @test Req. under test No Requirement Found
788 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
791 TVerdict verdict = EPass;
792 _LIT8(KExpectedResult,"ResetL Called");
794 TMMFPrioritySettings settings;
795 TInt error = KErrNone;
796 RMMFController controller;
798 settings.iPriority = 1;
799 settings.iPref = EMdaPriorityPreferenceTime;
800 settings.iState = EMMFStateIdle;
802 error = controller.Open(KTstControllerUid,settings);
803 INFO_PRINTF2(_L("Controller Open: %d"), error);
805 // Reset Controller (API being tested)
808 INFO_PRINTF1(_L("API TEST: Calling Reset"));
809 error = controller.Reset();
812 INFO_PRINTF2(_L("Controller Status: %d"), error);
814 //------------------------------------//
815 // Getting Log from Custom Controller //
816 //------------------------------------//
819 INFO_PRINTF1(_L("Getting Log"));
821 TBuf8<64> memFunctionText;
823 TUid uid = {KMmfTestControllerUid};
824 TMMFMessageDestination handleInfo(uid);
825 TMMFMessageDestinationPckg messageDest(handleInfo);
827 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
829 TBuf<64> memFunctionText16;
830 memFunctionText16.Copy(memFunctionText);
831 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
833 if (memFunctionText != KExpectedResult)
839 //------------------------------------//
841 INFO_PRINTF1(_L("Closing Controller"));
849 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
856 //------------------------------------------------------------------
858 CTestStep_MMF_CTLFRM_U_0014::CTestStep_MMF_CTLFRM_U_0014()
862 // store the name of this test case
863 // this is the name that is used by the script file
864 // Each test step initialises it's own name
865 iTestStepName = _L("MM-MMF-CTLFRM-U-0014");
870 TVerdict CTestStep_MMF_CTLFRM_U_0014::DoTestStepL( void )
871 /** As TSU_MMF_CTLFRM_U_0013
874 * @test Req. under test REQ172.5.5 REQ172.5.5.5
877 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
880 TVerdict verdict = EPass;
881 _LIT8(KExpectedResult, "PrimeL Called");
883 TMMFPrioritySettings settings;
884 TInt error = KErrNone;
885 RMMFController controller;
887 settings.iPriority = 1;
888 settings.iPref = EMdaPriorityPreferenceTime;
889 settings.iState = EMMFStateIdle;
891 error = controller.Open(KTstControllerUid,settings);
892 INFO_PRINTF2(_L("Controller Open: %d"), error);
897 INFO_PRINTF1(_L("API TEST: Calling Prime"));
898 error = controller.Prime();
901 INFO_PRINTF2(_L("Controller Status: %d"), error);
903 //------------------------------------//
904 // Getting Log from Custom Controller //
905 //------------------------------------//
908 INFO_PRINTF1(_L("Getting Log"));
910 TBuf8<64> memFunctionText;
912 TUid uid = {KMmfTestControllerUid};
913 TMMFMessageDestination handleInfo(uid);
914 TMMFMessageDestinationPckg messageDest(handleInfo);
916 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
918 TBuf<64> memFunctionText16;
919 memFunctionText16.Copy(memFunctionText);
920 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
922 if (memFunctionText != KExpectedResult)
928 //------------------------------------//
930 INFO_PRINTF1(_L("Closing Controller"));
938 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
945 //------------------------------------------------------------------
947 CTestStep_MMF_CTLFRM_U_0015::CTestStep_MMF_CTLFRM_U_0015()
951 // store the name of this test case
952 // this is the name that is used by the script file
953 // Each test step initialises it's own name
954 iTestStepName = _L("MM-MMF-CTLFRM-U-0015");
959 TVerdict CTestStep_MMF_CTLFRM_U_0015::DoTestStepL( void )
960 /** As TSU_MMF_CTLFRM_U_0013
963 * @test Req. under test REQ172.5.5 REQ172.5.5.6
966 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
969 TVerdict verdict = EPass;
970 _LIT8(KExpectedResult, "PlayL Called");
972 TMMFPrioritySettings settings;
973 TInt error = KErrNone;
974 RMMFController controller;
976 settings.iPriority = 1;
977 settings.iPref = EMdaPriorityPreferenceTime;
978 settings.iState = EMMFStateIdle;
980 error = controller.Open(KTstControllerUid,settings);
981 INFO_PRINTF2(_L("Controller Open: %d"), error);
986 INFO_PRINTF1(_L("Calling Play"));
987 error = controller.Play();
990 INFO_PRINTF2(_L("API TEST: Controller Status: %d"), error);
992 //------------------------------------//
993 // Getting Log from Custom Controller //
994 //------------------------------------//
997 INFO_PRINTF1(_L("Getting Log"));
999 TBuf8<64> memFunctionText;
1001 TUid uid = {KMmfTestControllerUid};
1002 TMMFMessageDestination handleInfo(uid);
1003 TMMFMessageDestinationPckg messageDest(handleInfo);
1005 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
1007 TBuf<64> memFunctionText16;
1008 memFunctionText16.Copy(memFunctionText);
1009 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
1011 if (memFunctionText != KExpectedResult)
1017 //------------------------------------//
1019 INFO_PRINTF1(_L("Closing Controller"));
1027 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
1034 //------------------------------------------------------------------
1036 CTestStep_MMF_CTLFRM_U_0016::CTestStep_MMF_CTLFRM_U_0016()
1040 // store the name of this test case
1041 // this is the name that is used by the script file
1042 // Each test step initialises it's own name
1043 iTestStepName = _L("MM-MMF-CTLFRM-U-0016");
1048 TVerdict CTestStep_MMF_CTLFRM_U_0016::DoTestStepL( void )
1049 /** As TSU_MMF_CTLFRM_U_0013
1052 * @test Req. under test REQ172.5.5 REQ172.5.5.8
1055 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
1058 TVerdict verdict = EPass;
1059 _LIT8(KExpectedResult, "PauseL Called");
1061 TMMFPrioritySettings settings;
1062 TInt error = KErrNone;
1063 RMMFController controller;
1065 settings.iPriority = 1;
1066 settings.iPref = EMdaPriorityPreferenceTime;
1067 settings.iState = EMMFStateIdle;
1069 error = controller.Open(KTstControllerUid,settings);
1070 INFO_PRINTF2(_L("Controller Open: %d"), error);
1075 INFO_PRINTF1(_L("API TEST: Calling Pause"));
1076 error = controller.Pause();
1079 INFO_PRINTF2(_L("Controller Status: %d"), error);
1081 //------------------------------------//
1082 // Getting Log from Custom Controller //
1083 //------------------------------------//
1086 INFO_PRINTF1(_L("Getting Log"));
1088 TBuf8<64> memFunctionText;
1090 TUid uid = {KMmfTestControllerUid};
1091 TMMFMessageDestination handleInfo(uid);
1092 TMMFMessageDestinationPckg messageDest(handleInfo);
1094 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
1096 TBuf<64> memFunctionText16;
1097 memFunctionText16.Copy(memFunctionText);
1098 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
1100 if (memFunctionText != KExpectedResult)
1106 //------------------------------------//
1108 INFO_PRINTF1(_L("Closing Controller"));
1116 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
1123 //------------------------------------------------------------------
1125 CTestStep_MMF_CTLFRM_U_0017::CTestStep_MMF_CTLFRM_U_0017()
1129 // store the name of this test case
1130 // this is the name that is used by the script file
1131 // Each test step initialises it's own name
1132 iTestStepName = _L("MM-MMF-CTLFRM-U-0017");
1137 TVerdict CTestStep_MMF_CTLFRM_U_0017::DoTestStepL( void )
1138 /** As TSU_MMF_CTLFRM_U_0013
1141 * @test Req. under test REQ172.5.5 REQ172.5.5.7
1144 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
1147 TVerdict verdict = EPass;
1148 _LIT8(KExpectedResult, "StopL Called");
1150 TMMFPrioritySettings settings;
1151 TInt error = KErrNone;
1152 RMMFController controller;
1154 settings.iPriority = 1;
1155 settings.iPref = EMdaPriorityPreferenceTime;
1156 settings.iState = EMMFStateIdle;
1158 error = controller.Open(KTstControllerUid,settings);
1159 INFO_PRINTF2(_L("Controller Open: %d"), error);
1164 INFO_PRINTF1(_L("API TEST: Calling Stop"));
1165 error = controller.Stop();
1168 INFO_PRINTF2(_L("Controller Status: %d"), error);
1170 //------------------------------------//
1171 // Getting Log from Custom Controller //
1172 //------------------------------------//
1175 INFO_PRINTF1(_L("Getting Log"));
1177 TBuf8<64> memFunctionText;
1179 TUid uid = {KMmfTestControllerUid};
1180 TMMFMessageDestination handleInfo(uid);
1181 TMMFMessageDestinationPckg messageDest(handleInfo);
1183 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
1185 TBuf<64> memFunctionText16;
1186 memFunctionText16.Copy(memFunctionText);
1187 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
1189 if (memFunctionText != KExpectedResult)
1195 //------------------------------------//
1197 INFO_PRINTF1(_L("Closing Controller"));
1205 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
1211 //------------------------------------------------------------------
1213 CTestStep_MMF_CTLFRM_U_0018::CTestStep_MMF_CTLFRM_U_0018()
1217 // store the name of this test case
1218 // this is the name that is used by the script file
1219 // Each test step initialises it's own name
1220 iTestStepName = _L("MM-MMF-CTLFRM-U-0018");
1225 TVerdict CTestStep_MMF_CTLFRM_U_0018::DoTestStepL( void )
1226 /** As TSU_MMF_CTLFRM_U_0013
1229 * @test Req. under test REQ172.5.5 REQ172.5.5.10
1232 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
1235 TVerdict verdict = EPass;
1236 _LIT8(KExpectedResult, "PositionL Called");
1238 TMMFPrioritySettings settings;
1239 TInt error = KErrNone;
1240 RMMFController controller;
1242 settings.iPriority = 1;
1243 settings.iPref = EMdaPriorityPreferenceTime;
1244 settings.iState = EMMFStateIdle;
1246 error = controller.Open(KTstControllerUid,settings);
1247 INFO_PRINTF2(_L("Controller Open: %d"), error);
1249 const TInt64 interval = 5;
1250 TTimeIntervalMicroSeconds position(interval);
1252 const TInt64 expectedInterval = 16;
1253 TTimeIntervalMicroSeconds expectedPosition(expectedInterval);
1255 // Get Position Controller
1258 INFO_PRINTF1(_L("API TEST: Calling GetPosition"));
1259 error = controller.GetPosition(position);
1262 INFO_PRINTF2(_L("Controller Status: %d"), error);
1263 INFO_PRINTF2(_L("Expected Position: %d"), I64LOW(expectedPosition.Int64()));
1264 INFO_PRINTF2(_L("Current Position: %d"), I64LOW(position.Int64()));
1267 if (expectedPosition != position)
1269 INFO_PRINTF1(_L("Getting Log"));
1271 TBuf8<64> memFunctionText;
1273 TUid uid = {KMmfTestControllerUid};
1274 TMMFMessageDestination handleInfo(uid);
1275 TMMFMessageDestinationPckg messageDest(handleInfo);
1277 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
1279 TBuf<64> memFunctionText16;
1280 memFunctionText16.Copy(memFunctionText);
1281 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
1283 if (memFunctionText != KExpectedResult)
1289 INFO_PRINTF1(_L("Closing Controller"));
1297 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
1303 //------------------------------------------------------------------
1305 CTestStep_MMF_CTLFRM_U_0019::CTestStep_MMF_CTLFRM_U_0019()
1309 // store the name of this test case
1310 // this is the name that is used by the script file
1311 // Each test step initialises it's own name
1312 iTestStepName = _L("MM-MMF-CTLFRM-U-0019");
1317 TVerdict CTestStep_MMF_CTLFRM_U_0019::DoTestStepL( void )
1318 /** As TSU_MMF_CTLFRM_U_0013
1321 * @test Req. under test REQ172.5.5 REQ172.5.5.11
1324 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
1327 TVerdict verdict = EPass;
1328 _LIT8(KExpectedResult, "SetPositionL Called");
1330 TMMFPrioritySettings settings;
1331 TInt error = KErrNone;
1332 RMMFController controller;
1334 settings.iPriority = 1;
1335 settings.iPref = EMdaPriorityPreferenceTime;
1336 settings.iState = EMMFStateIdle;
1338 error = controller.Open(KTstControllerUid,settings);
1339 INFO_PRINTF2(_L("Controller Open: %d"), error);
1341 const TInt64 interval = 5;
1342 TTimeIntervalMicroSeconds position(interval);
1344 // Set Position Controller
1347 INFO_PRINTF1(_L("API TEST: Calling SetPosition"));
1348 error = controller.SetPosition(position);
1352 error = controller.GetPosition(position);
1355 INFO_PRINTF2(_L("Controller Status: %d"), error);
1356 INFO_PRINTF2(_L("Current Position: %d"), position.Int64());
1358 //------------------------------------//
1359 // Getting Log from Custom Controller //
1360 //------------------------------------//
1363 INFO_PRINTF1(_L("Getting Log"));
1365 TBuf8<64> memFunctionText;
1367 TUid uid = {KMmfTestControllerUid};
1368 TMMFMessageDestination handleInfo(uid);
1369 TMMFMessageDestinationPckg messageDest(handleInfo);
1371 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
1373 TBuf<64> memFunctionText16;
1374 memFunctionText16.Copy(memFunctionText);
1375 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
1377 if (memFunctionText != KExpectedResult)
1383 //------------------------------------//
1385 INFO_PRINTF1(_L("Closing Controller"));
1393 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
1399 //------------------------------------------------------------------
1401 CTestStep_MMF_CTLFRM_U_0020::CTestStep_MMF_CTLFRM_U_0020()
1405 // store the name of this test case
1406 // this is the name that is used by the script file
1407 // Each test step initialises it's own name
1408 iTestStepName = _L("MM-MMF-CTLFRM-U-0020");
1413 TVerdict CTestStep_MMF_CTLFRM_U_0020::DoTestStepL( void )
1414 /** As TSU_MMF_CTLFRM_U_0013
1417 * @test Req. under test No Requirement Found
1420 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
1423 TVerdict verdict = EPass;
1425 TMMFPrioritySettings settings;
1426 TInt error = KErrNone;
1427 RMMFController controller;
1429 settings.iPriority = 1;
1430 settings.iPref = EMdaPriorityPreferenceTime;
1431 settings.iState = EMMFStateIdle;
1433 error = controller.Open(KTstControllerUid,settings);
1434 INFO_PRINTF2(_L("Controller Open: %d"), error);
1436 const TInt64 interval = 5;
1437 TTimeIntervalMicroSeconds duration(interval);
1439 const TInt64 expectedInterval = 36;
1440 TTimeIntervalMicroSeconds expectedDuration(expectedInterval);
1444 INFO_PRINTF1(_L("API TEST: Calling GetDuration"));
1445 error = controller.GetDuration(duration);
1449 INFO_PRINTF2(_L("Controller Status: %d"), error);
1450 INFO_PRINTF2(_L("Current Duration: %d"), I64LOW(expectedDuration.Int64()));
1451 INFO_PRINTF2(_L("Current Duration: %d"), I64LOW(duration.Int64()));
1453 if (duration != expectedDuration)
1458 INFO_PRINTF1(_L("Closing Controller"));
1466 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
1473 //------------------------------------------------------------------
1475 CTestStep_MMF_CTLFRM_U_0021::CTestStep_MMF_CTLFRM_U_0021()
1479 // store the name of this test case
1480 // this is the name that is used by the script file
1481 // Each test step initialises it's own name
1482 iTestStepName = _L("MM-MMF-CTLFRM-U-0021");
1487 TVerdict CTestStep_MMF_CTLFRM_U_0021::DoTestStepL( void )
1488 /** As TSU_MMF_CTLFRM_U_0013
1489 * ::GetNumberOfMetaDataEntries(..)
1491 * @test Req. under test No Requirement Found
1494 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
1497 TVerdict verdict = EPass;
1498 _LIT8(KExpectedResult, "GetNumberOfMetaDataEntriesL Called");
1500 TInt numberOfEntries = 0;
1502 TMMFPrioritySettings settings;
1503 TInt error = KErrNone;
1504 RMMFController controller;
1506 settings.iPriority = 1;
1507 settings.iPref = EMdaPriorityPreferenceTime;
1508 settings.iState = EMMFStateIdle;
1510 error = controller.Open(KTstControllerUid,settings);
1511 INFO_PRINTF2(_L("Controller Open: %d"), error);
1514 // Add Source and Sink
1515 INFO_PRINTF1(_L("Attempting to add a Source and a Sink to Controller"));
1519 INFO_PRINTF1(_L("API TEST: Calling GetNumberOfMetaDataEntries"));
1520 error = controller.GetNumberOfMetaDataEntries(numberOfEntries);
1523 INFO_PRINTF2(_L("Number of Meta entries is: %d"), numberOfEntries);
1525 //------------------------------------//
1526 // Getting Log from Custom Controller //
1527 //------------------------------------//
1530 INFO_PRINTF1(_L("Getting Log"));
1532 TBuf8<64> memFunctionText;
1534 TUid uid = {KMmfTestControllerUid};
1535 TMMFMessageDestination handleInfo(uid);
1536 TMMFMessageDestinationPckg messageDest(handleInfo);
1538 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
1540 TBuf<64> memFunctionText16;
1541 memFunctionText16.Copy(memFunctionText);
1542 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
1544 if (memFunctionText != KExpectedResult)
1550 //------------------------------------//
1552 INFO_PRINTF1(_L("Closing Controller"));
1560 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
1566 //------------------------------------------------------------------
1568 CTestStep_MMF_CTLFRM_U_0022::CTestStep_MMF_CTLFRM_U_0022()
1572 // store the name of this test case
1573 // this is the name that is used by the script file
1574 // Each test step initialises it's own name
1575 iTestStepName = _L("MM-MMF-CTLFRM-U-0022");
1580 TVerdict CTestStep_MMF_CTLFRM_U_0022::DoTestStepL( void )
1581 /** As TSU_MMF_CTLFRM_U_0013
1582 * ::GetMetaDataEntry(..)
1584 * @test Req. under test No Requirement Found
1587 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
1590 TVerdict verdict = EPass;
1591 _LIT8(KExpectedResult, "GetMetaDataEntryL Called");
1593 TMMFPrioritySettings settings;
1594 TInt error = KErrNone;
1595 RMMFController controller;
1597 settings.iPriority = 1;
1598 settings.iPref = EMdaPriorityPreferenceTime;
1599 settings.iState = EMMFStateIdle;
1601 error = controller.Open(KTstControllerUid,settings);
1602 INFO_PRINTF2(_L("Controller Open: %d"), error);
1606 TInt indexOfEntry = 1;
1607 INFO_PRINTF1(_L("API TEST: Calling GetMetaDataEntryL"));
1608 CMMFMetaDataEntry* metaEntry = controller.GetMetaDataEntryL(indexOfEntry);
1609 CleanupStack::PushL(metaEntry);
1610 INFO_PRINTF2(_L("AudioLevel is: %S"), &metaEntry->Value());
1612 CleanupStack::PopAndDestroy(1);
1615 //------------------------------------//
1616 // Getting Log from Custom Controller //
1617 //------------------------------------//
1620 INFO_PRINTF1(_L("Getting Log"));
1622 TBuf8<64> memFunctionText;
1624 TUid uid = {KMmfTestControllerUid};
1625 TMMFMessageDestination handleInfo(uid);
1626 TMMFMessageDestinationPckg messageDest(handleInfo);
1628 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
1630 TBuf<64> memFunctionText16;
1631 memFunctionText16.Copy(memFunctionText);
1632 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
1634 if (memFunctionText != KExpectedResult)
1640 //------------------------------------//
1642 INFO_PRINTF1(_L("Closing Controller"));
1650 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
1656 //------------------------------------------------------------------
1658 CTestStep_MMF_CTLFRM_U_0023::CTestStep_MMF_CTLFRM_U_0023()
1662 // store the name of this test case
1663 // this is the name that is used by the script file
1664 // Each test step initialises it's own name
1665 iTestStepName = _L("MM-MMF-CTLFRM-U-0023");
1670 TVerdict CTestStep_MMF_CTLFRM_U_0023::DoTestStepL( void )
1671 /** As TSU_MMF_CTLFRM_U_0013
1672 * ::CustomSommandSync(..)
1674 * @test Req. under test REQ172.5.5 REQ172.5.5.14
1677 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
1680 TVerdict verdict = EPass;
1681 _LIT8(KExpectedResult, "KDummyFunc1 Called");
1683 TMMFPrioritySettings settings;
1684 TInt error = KErrNone;
1685 RMMFController controller;
1687 settings.iPriority = 1;
1688 settings.iPref = EMdaPriorityPreferenceTime;
1689 settings.iState = EMMFStateIdle;
1691 // Open a Custom Controller
1692 error = controller.Open(KTstControllerUid,settings);
1693 INFO_PRINTF2(_L("Controller Open: %d"), error);
1697 INFO_PRINTF1(_L("Calling CustomCommandSync"));
1698 TMMFMessageDestinationPckg messageDest;
1700 const TInt interval = 5;
1701 TTimeIntervalMicroSeconds randomData(interval);
1702 TTimeIntervalMicroSeconds randomData2(interval+1);
1703 TTimeIntervalMicroSeconds randomData3(interval+2);
1705 TPckgBuf<TTimeIntervalMicroSeconds> randomDataPckg = randomData;
1706 TPckgBuf<TTimeIntervalMicroSeconds> randomData2Pckg = randomData2;
1707 TPckgBuf<TTimeIntervalMicroSeconds> randomData3Pckg = randomData3;
1709 error = controller.CustomCommandSync(messageDest, KDummyFunc1, randomDataPckg, randomData2Pckg, randomData3Pckg);
1712 //------------------------------------//
1713 // Getting Log from Custom Controller //
1714 //------------------------------------//
1717 INFO_PRINTF1(_L("Getting Log"));
1719 TBuf8<64> memFunctionText;
1721 TUid uid = {KMmfTestControllerUid};
1722 TMMFMessageDestination handleInfo(uid);
1723 TMMFMessageDestinationPckg messageDest(handleInfo);
1725 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
1727 TBuf<64> memFunctionText16;
1728 memFunctionText16.Copy(memFunctionText);
1729 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
1731 if (memFunctionText != KExpectedResult)
1737 //------------------------------------//
1744 INFO_PRINTF1(_L("Closing Controller"));
1747 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
1753 //------------------------------------------------------------------
1755 CTestStep_MMF_CTLFRM_U_0024::CTestStep_MMF_CTLFRM_U_0024()
1759 // store the name of this test case
1760 // this is the name that is used by the script file
1761 // Each test step initialises it's own name
1762 iTestStepName = _L("MM-MMF-CTLFRM-U-0024");
1767 TVerdict CTestStep_MMF_CTLFRM_U_0024::DoTestStepL( void )
1768 /** As TSU_MMF_CTLFRM_U_0013
1769 * ::CustomCommandAsync(..)
1771 * @test Req. under test REQ172.5.5 REQ172.5.5.14
1774 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
1777 TVerdict verdict = EPass;
1778 _LIT8(KExpectedResult, "KDummyFunc1 Called");
1780 TMMFPrioritySettings settings;
1781 TInt error = KErrNone;
1782 RMMFController controller;
1784 settings.iPriority = 1;
1785 settings.iPref = EMdaPriorityPreferenceTime;
1786 settings.iState = EMMFStateIdle;
1789 // Open a Custom Controller
1790 error = controller.Open(KTstControllerUid,settings);
1791 INFO_PRINTF2(_L("Controller Open: %d"), error);
1795 INFO_PRINTF1(_L("Calling CustomCommandSync"));
1796 TMMFMessageDestinationPckg messageDest;
1798 const TInt interval = 5;
1799 TTimeIntervalMicroSeconds randomData(interval);
1800 TTimeIntervalMicroSeconds randomData2(interval+1);
1801 TTimeIntervalMicroSeconds randomData3(interval+2);
1803 TPckgBuf<TTimeIntervalMicroSeconds> randomDataPckg = randomData;
1804 TPckgBuf<TTimeIntervalMicroSeconds> randomData2Pckg = randomData2;
1805 TPckgBuf<TTimeIntervalMicroSeconds> randomData3Pckg = randomData3;
1807 TRequestStatus stat;
1808 controller.CustomCommandAsync(messageDest, KDummyFunc1, randomDataPckg, randomData2Pckg, randomData3Pckg, stat);
1809 User::WaitForRequest(stat);
1813 //------------------------------------//
1814 // Getting Log from Custom Controller //
1815 //------------------------------------//
1818 INFO_PRINTF1(_L("Getting Log"));
1820 TBuf8<64> memFunctionText;
1822 TUid uid = {KMmfTestControllerUid};
1823 TMMFMessageDestination handleInfo(uid);
1824 TMMFMessageDestinationPckg messageDest(handleInfo);
1826 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
1828 TBuf<64> memFunctionText16;
1829 memFunctionText16.Copy(memFunctionText);
1830 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
1832 if (memFunctionText != KExpectedResult)
1838 //------------------------------------//
1845 INFO_PRINTF1(_L("Closing Controller"));
1848 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
1854 //------------------------------------------------------------------
1856 CTestStep_MMF_CTLFRM_U_0027::CTestStep_MMF_CTLFRM_U_0027()
1860 // store the name of this test case
1861 // this is the name that is used by the script file
1862 // Each test step initialises it's own name
1863 iTestStepName = _L("MM-MMF-CTLFRM-U-0027");
1868 TVerdict CTestStep_MMF_CTLFRM_U_0027::DoTestStepL( void )
1869 /** As TSU_MMF_CTLFRM_U_0013
1870 * ::GetAudioQuality(..)
1872 * @test Req. under test REQ172.5.5 REQ172.5.5.13
1875 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
1878 TVerdict verdict = EPass;
1879 _LIT8(KExpectedResult, "GetAudioQuality Called");
1881 TMMFPrioritySettings settings;
1882 TInt error = KErrNone;
1883 RMMFController controller;
1885 settings.iPriority = 1;
1886 settings.iPref = EMdaPriorityPreferenceTime;
1887 settings.iState = EMMFStateIdle;
1890 // Open a Custom Controller
1891 error = controller.Open(KTstControllerUid,settings);
1892 INFO_PRINTF2(_L("Controller Open: %d"), error);
1893 TUid uid = {0x101f72B4};
1895 RMMFTestCustomCommands customCommands(controller,uid);
1898 error = customCommands.GetAudioQuality(audioQuality);
1900 //------------------------------------//
1901 // Getting Log from Custom Controller //
1902 //------------------------------------//
1905 INFO_PRINTF1(_L("Getting Log"));
1907 TBuf8<64> memFunctionText;
1909 TUid uid = {KMmfTestControllerUid};
1910 TMMFMessageDestination handleInfo(uid);
1911 TMMFMessageDestinationPckg messageDest(handleInfo);
1913 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
1915 TBuf<64> memFunctionText16;
1916 memFunctionText16.Copy(memFunctionText);
1917 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
1919 if (memFunctionText != KExpectedResult)
1925 //------------------------------------//
1933 INFO_PRINTF1(_L("Closing Controller"));
1936 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
1942 //------------------------------------------------------------------
1944 CTestStep_MMF_CTLFRM_U_0028::CTestStep_MMF_CTLFRM_U_0028()
1948 // store the name of this test case
1949 // this is the name that is used by the script file
1950 // Each test step initialises it's own name
1951 iTestStepName = _L("MM-MMF-CTLFRM-U-0028");
1956 TVerdict CTestStep_MMF_CTLFRM_U_0028::DoTestStepL( void )
1957 /** As TSU_MMF_CTLFRM_U_0013
1958 * ::SetAudioQuality(..)
1960 * @test Req. under test REQ172.5.5 REQ172.5.5.13
1963 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
1966 TVerdict verdict = EPass;
1967 _LIT8(KExpectedResult, "SetAudioQuality Called");
1970 TMMFPrioritySettings settings;
1971 TInt error = KErrNone;
1972 RMMFController controller;
1974 settings.iPriority = 1;
1975 settings.iPref = EMdaPriorityPreferenceTime;
1976 settings.iState = EMMFStateIdle;
1979 // Open a Custom Controller
1980 error = controller.Open(KTstControllerUid,settings);
1981 INFO_PRINTF2(_L("Controller Open: %d"), error);
1982 TUid uid = {0x101f72B4};
1984 RMMFTestCustomCommands customCommands(controller,uid);
1987 TInt audioQuality = 14;
1989 error = customCommands.SetAudioQuality(audioQuality);
1991 //------------------------------------//
1992 // Getting Log from Custom Controller //
1993 //------------------------------------//
1996 INFO_PRINTF1(_L("Getting Log"));
1998 TBuf8<64> memFunctionText;
2000 TUid uid = {KMmfTestControllerUid};
2001 TMMFMessageDestination handleInfo(uid);
2002 TMMFMessageDestinationPckg messageDest(handleInfo);
2004 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
2006 TBuf<64> memFunctionText16;
2007 memFunctionText16.Copy(memFunctionText);
2008 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
2010 if (memFunctionText != KExpectedResult)
2016 //------------------------------------//
2024 INFO_PRINTF1(_L("Closing Controller"));
2027 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
2033 //------------------------------------------------------------------
2034 // This test is supposed to fail
2036 CTestStep_MMF_CTLFRM_U_0029::CTestStep_MMF_CTLFRM_U_0029()
2040 // store the name of this test case
2041 // this is the name that is used by the script file
2042 // Each test step initialises it's own name
2043 iTestStepName = _L("MM-MMF-CTLFRM-U-0029");
2048 TVerdict CTestStep_MMF_CTLFRM_U_0029::DoTestStepL( void )
2049 /** Call the RMMFController::Open(..) with the parameters specified, varify the
2050 * return value is NOT 0. Call the RMMFController::Close() on the Custom Controller.
2051 * Varify 'error' is NOT zero.
2054 * @test Req. under test REQ172.5.5 REQ172.5.5.13
2057 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
2060 TVerdict verdict = EPass;
2061 INFO_PRINTF1(_L("Test to Fail to Open a Custom Controller"));
2064 TMMFPrioritySettings settings;
2065 TInt error = KErrNone;
2066 RMMFController controller;
2068 settings.iPriority = 1;
2069 settings.iPref = EMdaPriorityPreferenceTime;
2070 settings.iState = EMMFStateIdle;
2072 // Dummy UID to try and instantiate a controller which does not exist
2073 TUid uidDummy = {0x12345678};
2075 // Open a Custom Controller
2076 error = controller.Open(uidDummy,settings);
2077 INFO_PRINTF2(_L("Controller Open: %d"), error);
2084 INFO_PRINTF1(_L("Closing Controller"));
2087 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
2093 //------------------------------------------------------------------
2095 CTestStep_MMF_CTLFRM_U_0030::CTestStep_MMF_CTLFRM_U_0030()
2099 // store the name of this test case
2100 // this is the name that is used by the script file
2101 // Each test step initialises it's own name
2102 iTestStepName = _L("MM-MMF-CTLFRM-U-0030");
2107 TVerdict CTestStep_MMF_CTLFRM_U_0030::DoTestStepL( void )
2108 /** Call the RMMFController::Open(..) (with the parameters from test 001), varify
2109 * the return value is 0. Fail to Instantiate a Custom DataSource Object and add it to
2110 * the Custom Controller using RMMFController::AddDataSource(..), with the specified
2111 * parameters. Call Custom Command 'KLogFunction' and varify the text value returned is
2112 * not equal to the specifed text in Test Step. Call the RMMFController::Close() on the
2113 * Custom Controller. Varify 'error' is NOT zero.
2116 * @test Req. under test REQ172.5.5 REQ172.5.5.13
2119 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
2122 TVerdict verdict = EPass;
2124 INFO_PRINTF1(_L("Test to Fail to Open a Data Source"));
2126 TMMFPrioritySettings settings;
2127 TInt error = KErrNone;
2128 RMMFController controller;
2130 settings.iPriority = 1;
2131 settings.iPref = EMdaPriorityPreferenceTime;
2132 settings.iState = EMMFStateIdle;
2134 error = controller.Open(KTstControllerUid,settings);
2135 INFO_PRINTF2(_L("Controller Open: %d"), error);
2137 const TDesC8& initData = KInitData;
2138 TUid uidDummy = {0x12345678};
2141 INFO_PRINTF1(_L("Attempting to add a Source to Controller"));
2144 INFO_PRINTF1(_L("API TEST: Calling AddDataSource"));
2145 error = controller.AddDataSource(uidDummy, initData);
2148 INFO_PRINTF2(_L("Controller Status: %d"), error);
2150 INFO_PRINTF1(_L("Closing Controller"));
2158 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
2165 //---------------------------------------------------------------------
2167 CTestStep_MMF_CTLFRM_U_0031::CTestStep_MMF_CTLFRM_U_0031()
2171 // store the name of this test case
2172 // this is the name that is used by the script file
2173 // Each test step initialises it's own name
2174 iTestStepName = _L("MM-MMF-CTLFRM-U-0031");
2179 TVerdict CTestStep_MMF_CTLFRM_U_0031::DoTestStepL( void )
2180 /** Call the RMMFController::Open(..) (with the parameters from test 001), varify the
2181 * return value is 0. Instantiate a Custom DataSink Object and add it to the Custom
2182 * Controller using RMMFController::AddDataSink(..), with the specified parameters. Call
2183 * Custom Command 'KLogFunction' and varify the text value returned is equal to the
2184 * specifed text in Test Step. Call the RMMFController::Close() on the Custom Controller.
2185 * Varify 'error' is zero.
2188 * @test Req. under test REQ172.5.5 REQ172.5.5.13
2191 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
2194 TVerdict verdict = EPass;
2196 INFO_PRINTF1(_L("Test to Fail to Open a Data Sink"));
2198 TMMFPrioritySettings settings;
2199 TInt error = KErrNone;
2200 RMMFController controller;
2202 settings.iPriority = 1;
2203 settings.iPref = EMdaPriorityPreferenceTime;
2204 settings.iState = EMMFStateIdle;
2206 error = controller.Open(KTstControllerUid,settings);
2208 INFO_PRINTF2(_L("Controller Open: %d"), error);
2210 const TDesC8& initData = KInitData;
2211 TUid uidDummy = {0x12345678};
2214 INFO_PRINTF1(_L("Attempting to add a Sink to Controller"));
2217 INFO_PRINTF1(_L("API TEST: Calling AddDataSource"));
2218 error = controller.AddDataSink(uidDummy, initData);
2221 INFO_PRINTF2(_L("Controller Status: %d"), error);
2223 INFO_PRINTF1(_L("Closing Controller"));
2231 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
2237 //----------------------------------------------------------
2239 CTestStep_MMF_CTLFRM_U_0032::CTestStep_MMF_CTLFRM_U_0032()
2243 // store the name of this test case
2244 // this is the name that is used by the script file
2245 // Each test step initialises it's own name
2246 iTestStepName = _L("MM-MMF-CTLFRM-U-0032");
2251 TVerdict CTestStep_MMF_CTLFRM_U_0032::DoTestStepL( void )
2252 /** Verfiy CMMFDescriptorBuffer creation and deletion using default buffer size
2254 * @test Req. under test REQ172.5.5 REQ172.5.5.13
2257 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
2260 TVerdict verdict = EPass;
2262 TMMFPrioritySettings settings;
2263 TInt error = KErrNone;
2264 RMMFController controller;
2266 settings.iPriority = 1;
2267 settings.iPref = EMdaPriorityPreferenceTime;
2268 settings.iState = EMMFStateIdle;
2270 error = controller.Open(KTstControllerUid,settings);
2271 INFO_PRINTF2(_L("Controller Open: %d"), error);
2273 //---------------------//
2274 // Set Controller Mode //
2275 //---------------------//
2278 TUid uid = {KMmfTestControllerUid};
2279 TMMFMessageDestination handleInfo(uid);
2280 TMMFMessageDestinationPckg messageDest(handleInfo);
2282 TPckgBuf<TUint8> value = 1; // 1 = EFailure Mode
2284 error = controller.CustomCommandSync(messageDest, KModeFunction, value, KNullDesC8);
2287 const TDesC8& initData = KInitData;
2288 TUid uidDummy = {0x12345678};
2291 INFO_PRINTF1(_L("Attempting to add a Source to Controller"));
2294 INFO_PRINTF1(_L("API TEST: Calling AddDataSource"));
2295 //error = controller.AddDataSource(KTestDataSourceUid, initData);
2296 error = controller.AddDataSource(uidDummy, initData);
2299 INFO_PRINTF2(_L("Controller Status: %d"), error);
2301 if (error != KAddDataSourceFailure)
2307 INFO_PRINTF1(_L("Closing Controller"));
2310 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
2316 //---------------------------------------------------------------
2319 CTestStep_MMF_CTLFRM_U_0033::CTestStep_MMF_CTLFRM_U_0033()
2323 // store the name of this test case
2324 // this is the name that is used by the script file
2325 // Each test step initialises it's own name
2326 iTestStepName = _L("MM-MMF-CTLFRM-U-0033");
2331 TVerdict CTestStep_MMF_CTLFRM_U_0033::DoTestStepL( void )
2332 /** Verfiy CMMFDescriptorBuffer creation and deletion using default buffer size
2334 * @test Req. under test REQ172.5.5 REQ172.5.5.13
2337 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
2340 TVerdict verdict = EPass;
2342 TMMFPrioritySettings settings;
2343 TInt error = KErrNone;
2344 RMMFController controller;
2346 settings.iPriority = 1;
2347 settings.iPref = EMdaPriorityPreferenceTime;
2348 settings.iState = EMMFStateIdle;
2350 error = controller.Open(KTstControllerUid,settings);
2351 INFO_PRINTF2(_L("Controller Open: %d"), error);
2353 //---------------------//
2354 // Set Controller Mode //
2355 //---------------------//
2358 TUid uid = {KMmfTestControllerUid};
2359 TMMFMessageDestination handleInfo(uid);
2360 TMMFMessageDestinationPckg messageDest(handleInfo);
2363 TPckgBuf<TUint8> value = 1; // 1 = EFailure Mode
2365 error = controller.CustomCommandSync(messageDest, KModeFunction, value, KNullDesC8);
2368 const TDesC8& initData = KInitData;
2371 INFO_PRINTF1(_L("Attempting to add a Sink to Controller"));
2374 INFO_PRINTF1(_L("API TEST: Calling AddDataSink"));
2375 error = controller.AddDataSource(KTestDataSinkUid, initData);
2378 INFO_PRINTF2(_L("Controller Status: %d"), error);
2380 if (error != KAddDataSinkFailure)
2386 INFO_PRINTF1(_L("Closing Controller"));
2389 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
2395 //---------------------------------------------------------------
2398 CTestStep_MMF_CTLFRM_U_0034::CTestStep_MMF_CTLFRM_U_0034()
2402 // store the name of this test case
2403 // this is the name that is used by the script file
2404 // Each test step initialises it's own name
2405 iTestStepName = _L("MM-MMF-CTLFRM-U-0034");
2410 TVerdict CTestStep_MMF_CTLFRM_U_0034::DoTestStepL( void )
2411 /** Verfiy CMMFDescriptorBuffer creation and deletion using default buffer size
2413 * @test Req. under test REQ172.5.5 REQ172.5.5.13
2416 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
2419 TVerdict verdict = EPass;
2421 TMMFPrioritySettings settings;
2422 TInt error = KErrNone;
2423 RMMFController controller;
2425 settings.iPriority = 1;
2426 settings.iPref = EMdaPriorityPreferenceTime;
2427 settings.iState = EMMFStateIdle;
2429 error = controller.Open(KTstControllerUid,settings);
2430 INFO_PRINTF2(_L("Controller Open: %d"), error);
2432 //---------------------//
2433 // Set Controller Mode //
2434 //---------------------//
2437 TUid uid = {KMmfTestControllerUid};
2438 TMMFMessageDestination handleInfo(uid);
2439 TMMFMessageDestinationPckg messageDest(handleInfo);
2441 TPckgBuf<TUint8> value = 1; // 1 = EFailure Mode
2443 error = controller.CustomCommandSync(messageDest, KModeFunction, value, KNullDesC8);
2446 const TDesC8& initData = KInitData;
2447 TMMFMessageDestination sourceHandlePtr;
2448 TMMFMessageDestination& sourceHandle = sourceHandlePtr;
2451 INFO_PRINTF1(_L("Attempting to add a Source to Controller"));
2454 INFO_PRINTF1(_L("API TEST: Calling AddDataSource"));
2455 error = controller.AddDataSource(KTestDataSourceUid, initData, sourceHandle);
2456 error = controller.RemoveDataSource(sourceHandle);
2460 INFO_PRINTF2(_L("Controller Status: %d"), error);
2462 if (error != KAddDataSourceFailure)
2468 INFO_PRINTF1(_L("Closing Controller"));
2471 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
2477 //-----------------------------------------------------------//
2479 CTestStep_MMF_CTLFRM_U_0035::CTestStep_MMF_CTLFRM_U_0035()
2483 // store the name of this test case
2484 // this is the name that is used by the script file
2485 // Each test step initialises it's own name
2486 iTestStepName = _L("MM-MMF-CTLFRM-U-0035");
2491 TVerdict CTestStep_MMF_CTLFRM_U_0035::DoTestStepL( void )
2492 /** Verfiy CMMFDescriptorBuffer creation and deletion using default buffer size
2494 * @test Req. under test REQ172.5.5 REQ172.5.5.13
2497 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
2500 TVerdict verdict = EPass;
2502 TMMFPrioritySettings settings;
2503 TInt error = KErrNone;
2504 RMMFController controller;
2506 settings.iPriority = 1;
2507 settings.iPref = EMdaPriorityPreferenceTime;
2508 settings.iState = EMMFStateIdle;
2510 error = controller.Open(KTstControllerUid,settings);
2511 INFO_PRINTF2(_L("Controller Open: %d"), error);
2513 //---------------------//
2514 // Set Controller Mode //
2515 //---------------------//
2518 TUid uid = {KMmfTestControllerUid};
2519 TMMFMessageDestination handleInfo(uid);
2520 TMMFMessageDestinationPckg messageDest(handleInfo);
2522 // TUint8 value = 1; // 1 = EFailure Mode
2523 TPckgBuf<TUint8> value = 1;
2525 error = controller.CustomCommandSync(messageDest, KModeFunction, value, KNullDesC8);
2528 const TDesC8& initData = KInitData;
2529 TMMFMessageDestination sinkHandlePtr;
2530 TMMFMessageDestination& sinkHandle = sinkHandlePtr;
2533 INFO_PRINTF1(_L("Attempting to add a Sink to Controller"));
2536 INFO_PRINTF1(_L("API TEST: Calling AddDataSink"));
2537 error = controller.AddDataSink(KTestDataSinkUid, initData, sinkHandle);
2538 error = controller.RemoveDataSink(sinkHandle);
2542 INFO_PRINTF2(_L("Controller Status: %d"), error);
2544 if (error != KAddDataSinkFailure)
2549 INFO_PRINTF1(_L("Closing Controller"));
2552 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
2558 //-----------------------------------------------------------//
2562 //-----------------------------------------------------------
2563 // Testing of the Standard Custom Commands
2564 //-----------------------------------------------------------
2566 CTestStep_MMF_CTLFRM_U_0040::CTestStep_MMF_CTLFRM_U_0040()
2570 // store the name of this test case
2571 // this is the name that is used by the script file
2572 // Each test step initialises it's own name
2573 iTestStepName = _L("MM-MMF-CTLFRM-U-0040");
2578 TVerdict CTestStep_MMF_CTLFRM_U_0040::DoTestStepL( void )
2579 /** Call the RMMFController::Open(..) (with the parameters from test 001), varify the
2580 * return value is 0. Instantiate a CustomCommands Object (specified). Call RMMFController
2581 * Method specified and varify the 'error' is 0. Follow this by calling the Custom
2582 * Command 'KLogFunction' and varify the text value returned is equal to the specifed text
2583 * in Test Step. Call the RMMFController::Close() on the Custom Controller. Varify 'error'
2587 * @test Req. under test REQ172.5.5 REQ172.5.5.13
2590 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
2593 TVerdict verdict = EPass;
2594 _LIT8(KExpectedResult, "MapdSetVolumeL Called");
2596 TMMFPrioritySettings settings;
2597 TInt error = KErrNone;
2598 RMMFController controller;
2600 settings.iPriority = 1;
2601 settings.iPref = EMdaPriorityPreferenceTime;
2602 settings.iState = EMMFStateIdle;
2606 // Open a Custom Controller
2607 error = controller.Open(KTstControllerUid,settings);
2608 INFO_PRINTF2(_L("Controller Open: %d"), error);
2610 RMMFAudioPlayDeviceCustomCommands customCommands(controller);
2612 error = customCommands.SetVolume(volume);
2614 //------------------------------------//
2615 // Getting Log from Custom Controller //
2616 //------------------------------------//
2619 INFO_PRINTF1(_L("Getting Log"));
2621 TBuf8<64> memFunctionText;
2623 TUid uid = {KMmfTestControllerUid};
2624 TMMFMessageDestination handleInfo(uid);
2625 TMMFMessageDestinationPckg messageDest(handleInfo);
2627 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
2629 TBuf<64> memFunctionText16;
2630 memFunctionText16.Copy(memFunctionText);
2631 INFO_PRINTF2(_L("Log:%S"),&memFunctionText16);
2633 if (memFunctionText != KExpectedResult)
2639 //------------------------------------//
2646 INFO_PRINTF1(_L("Closing Controller"));
2649 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
2655 //---------------------------------------------------------------
2658 CTestStep_MMF_CTLFRM_U_0041::CTestStep_MMF_CTLFRM_U_0041()
2662 // store the name of this test case
2663 // this is the name that is used by the script file
2664 // Each test step initialises it's own name
2665 iTestStepName = _L("MM-MMF-CTLFRM-U-0041");
2670 TVerdict CTestStep_MMF_CTLFRM_U_0041::DoTestStepL( void )
2671 /** As TSU_MMF_CTLFRM_U_0040
2674 * @test Req. under test REQ172.5.5 REQ172.5.5.13
2677 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
2680 TVerdict verdict = EPass;
2681 _LIT8(KExpectedResult, "MapdGetMaxVolumeL Called");
2683 TMMFPrioritySettings settings;
2684 TInt error = KErrNone;
2685 RMMFController controller;
2687 settings.iPriority = 1;
2688 settings.iPref = EMdaPriorityPreferenceTime;
2689 settings.iState = EMMFStateIdle;
2693 // Open a Custom Controller
2694 error = controller.Open(KTstControllerUid,settings);
2695 INFO_PRINTF2(_L("Controller Open: %d"), error);
2697 RMMFAudioPlayDeviceCustomCommands customCommands(controller);
2699 error = customCommands.GetMaxVolume(maxVolume);
2701 //------------------------------------//
2702 // Getting Log from Custom Controller //
2703 //------------------------------------//
2706 INFO_PRINTF1(_L("Getting Log"));
2708 TBuf8<64> memFunctionText;
2710 TUid uid = {KMmfTestControllerUid};
2711 TMMFMessageDestination handleInfo(uid);
2712 TMMFMessageDestinationPckg messageDest(handleInfo);
2714 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
2716 TBuf<64> memFunctionText16;
2717 memFunctionText16.Copy(memFunctionText);
2718 INFO_PRINTF2(_L("Log:%S"),&memFunctionText16);
2720 if (memFunctionText != KExpectedResult)
2726 //------------------------------------//
2734 INFO_PRINTF1(_L("Closing Controller"));
2737 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
2743 //---------------------------------------------------------------
2745 CTestStep_MMF_CTLFRM_U_0042::CTestStep_MMF_CTLFRM_U_0042()
2749 // store the name of this test case
2750 // this is the name that is used by the script file
2751 // Each test step initialises it's own name
2752 iTestStepName = _L("MM-MMF-CTLFRM-U-0042");
2757 TVerdict CTestStep_MMF_CTLFRM_U_0042::DoTestStepL( void )
2758 /** As TSU_MMF_CTLFRM_U_0040
2760 * @test Req. under test REQ172.5.5 REQ172.5.5.13
2763 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
2766 TVerdict verdict = EPass;
2767 _LIT8(KExpectedResult, "MapdGetVolumeL Called");
2769 TMMFPrioritySettings settings;
2770 TInt error = KErrNone;
2771 RMMFController controller;
2773 settings.iPriority = 1;
2774 settings.iPref = EMdaPriorityPreferenceTime;
2775 settings.iState = EMMFStateIdle;
2779 // Open a Custom Controller
2780 error = controller.Open(KTstControllerUid,settings);
2781 INFO_PRINTF2(_L("Controller Open: %d"), error);
2783 RMMFAudioPlayDeviceCustomCommands customCommands(controller);
2785 error = customCommands.GetVolume(volume);
2787 //------------------------------------//
2788 // Getting Log from Custom Controller //
2789 //------------------------------------//
2792 INFO_PRINTF1(_L("Getting Log"));
2794 TBuf8<64> memFunctionText;
2796 TUid uid = {KMmfTestControllerUid};
2797 TMMFMessageDestination handleInfo(uid);
2798 TMMFMessageDestinationPckg messageDest(handleInfo);
2800 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
2802 TBuf<64> memFunctionText16;
2803 memFunctionText16.Copy(memFunctionText);
2804 INFO_PRINTF2(_L("Log:%S"),&memFunctionText16);
2806 if (memFunctionText != KExpectedResult)
2812 //------------------------------------//
2819 INFO_PRINTF1(_L("Closing Controller"));
2822 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
2828 //---------------------------------------------------------------
2831 CTestStep_MMF_CTLFRM_U_0043::CTestStep_MMF_CTLFRM_U_0043()
2835 // store the name of this test case
2836 // this is the name that is used by the script file
2837 // Each test step initialises it's own name
2838 iTestStepName = _L("MM-MMF-CTLFRM-U-0043");
2843 TVerdict CTestStep_MMF_CTLFRM_U_0043::DoTestStepL( void )
2844 /** As TSU_MMF_CTLFRM_U_0040
2846 * @test Req. under test REQ172.5.5 REQ172.5.5.13
2849 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
2852 TVerdict verdict = EPass;
2853 _LIT8(KExpectedResult, "MapdSetVolumeRampL Called");
2855 TMMFPrioritySettings settings;
2856 TInt error = KErrNone;
2857 RMMFController controller;
2859 settings.iPriority = 1;
2860 settings.iPref = EMdaPriorityPreferenceTime;
2861 settings.iState = EMMFStateIdle;
2863 const TInt64 interval = 10;
2864 TTimeIntervalMicroSeconds rampData(interval);
2866 // Open a Custom Controller
2867 error = controller.Open(KTstControllerUid,settings);
2868 INFO_PRINTF2(_L("Controller Open: %d"), error);
2870 RMMFAudioPlayDeviceCustomCommands customCommands(controller);
2872 error = customCommands.SetVolumeRamp(rampData);
2874 //------------------------------------//
2875 // Getting Log from Custom Controller //
2876 //------------------------------------//
2879 INFO_PRINTF1(_L("Getting Log"));
2881 TBuf8<64> memFunctionText;
2883 TUid uid = {KMmfTestControllerUid};
2884 TMMFMessageDestination handleInfo(uid);
2885 TMMFMessageDestinationPckg messageDest(handleInfo);
2887 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
2889 TBuf<64> memFunctionText16;
2890 memFunctionText16.Copy(memFunctionText);
2891 INFO_PRINTF2(_L("Log:%S"),&memFunctionText16);
2893 if (memFunctionText != KExpectedResult)
2899 //------------------------------------//
2906 INFO_PRINTF1(_L("Closing Controller"));
2909 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
2915 //---------------------------------------------------------------
2917 CTestStep_MMF_CTLFRM_U_0044::CTestStep_MMF_CTLFRM_U_0044()
2921 // store the name of this test case
2922 // this is the name that is used by the script file
2923 // Each test step initialises it's own name
2924 iTestStepName = _L("MM-MMF-CTLFRM-U-0044");
2929 TVerdict CTestStep_MMF_CTLFRM_U_0044::DoTestStepL( void )
2930 /** As TSU_MMF_CTLFRM_U_0040
2932 * @test Req. under test REQ172.5.5 REQ172.5.5.13
2935 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
2938 TVerdict verdict = EPass;
2939 _LIT8(KExpectedResult, "MapdSetBalanceL Called");
2941 TMMFPrioritySettings settings;
2942 TInt error = KErrNone;
2943 RMMFController controller;
2945 settings.iPriority = 1;
2946 settings.iPref = EMdaPriorityPreferenceTime;
2947 settings.iState = EMMFStateIdle;
2951 // Open a Custom Controller
2952 error = controller.Open(KTstControllerUid,settings);
2953 INFO_PRINTF2(_L("Controller Open: %d"), error);
2955 RMMFAudioPlayDeviceCustomCommands customCommands(controller);
2957 error = customCommands.SetBalance(balance);
2960 //------------------------------------//
2961 // Getting Log from Custom Controller //
2962 //------------------------------------//
2965 INFO_PRINTF1(_L("Getting Log"));
2967 TBuf8<64> memFunctionText;
2969 TUid uid = {KMmfTestControllerUid};
2970 TMMFMessageDestination handleInfo(uid);
2971 TMMFMessageDestinationPckg messageDest(handleInfo);
2973 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
2975 TBuf<64> memFunctionText16;
2976 memFunctionText16.Copy(memFunctionText);
2977 INFO_PRINTF2(_L("Log:%S"),&memFunctionText16);
2979 if (memFunctionText != KExpectedResult)
2985 //------------------------------------//
2993 INFO_PRINTF1(_L("Closing Controller"));
2996 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
3002 //---------------------------------------------------------------
3004 CTestStep_MMF_CTLFRM_U_0045::CTestStep_MMF_CTLFRM_U_0045()
3008 // store the name of this test case
3009 // this is the name that is used by the script file
3010 // Each test step initialises it's own name
3011 iTestStepName = _L("MM-MMF-CTLFRM-U-0045");
3016 TVerdict CTestStep_MMF_CTLFRM_U_0045::DoTestStepL( void )
3017 /** As TSU_MMF_CTLFRM_U_0040
3019 * @test Req. under test REQ172.5.5 REQ172.5.5.13
3022 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
3025 TVerdict verdict = EPass;
3026 _LIT8(KExpectedResult, "MapdGetBalanceL Called");
3028 TMMFPrioritySettings settings;
3029 TInt error = KErrNone;
3030 RMMFController controller;
3032 settings.iPriority = 1;
3033 settings.iPref = EMdaPriorityPreferenceTime;
3034 settings.iState = EMMFStateIdle;
3038 // Open a Custom Controller
3039 error = controller.Open(KTstControllerUid,settings);
3040 INFO_PRINTF2(_L("Controller Open: %d"), error);
3042 RMMFAudioPlayDeviceCustomCommands customCommands(controller);
3044 customCommands.GetBalance(balance);
3046 //------------------------------------//
3047 // Getting Log from Custom Controller //
3048 //------------------------------------//
3051 INFO_PRINTF1(_L("Getting Log"));
3053 TBuf8<64> memFunctionText;
3055 TUid uid = {KMmfTestControllerUid};
3056 TMMFMessageDestination handleInfo(uid);
3057 TMMFMessageDestinationPckg messageDest(handleInfo);
3059 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
3061 TBuf<64> memFunctionText16;
3062 memFunctionText16.Copy(memFunctionText);
3063 INFO_PRINTF2(_L("Log:%S"),&memFunctionText16);
3065 if (memFunctionText != KExpectedResult)
3071 //------------------------------------//
3079 INFO_PRINTF1(_L("Closing Controller"));
3082 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
3088 //---------------------------------------------------------------
3090 CTestStep_MMF_CTLFRM_U_0050::CTestStep_MMF_CTLFRM_U_0050()
3094 // store the name of this test case
3095 // this is the name that is used by the script file
3096 // Each test step initialises it's own name
3097 iTestStepName = _L("MM-MMF-CTLFRM-U-0050");
3102 TVerdict CTestStep_MMF_CTLFRM_U_0050::DoTestStepL( void )
3103 /** As TSU_MMF_CTLFRM_U_0040
3105 * @test Req. under test REQ172.5.5 REQ172.5.5.13
3108 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
3111 TVerdict verdict = EPass;
3112 _LIT8(KExpectedResult, "MardSetGainL Called");
3114 TMMFPrioritySettings settings;
3115 TInt error = KErrNone;
3116 RMMFController controller;
3118 settings.iPriority = 1;
3119 settings.iPref = EMdaPriorityPreferenceTime;
3120 settings.iState = EMMFStateIdle;
3124 // Open a Custom Controller
3125 error = controller.Open(KTstControllerUid,settings);
3126 INFO_PRINTF2(_L("Controller Open: %d"), error);
3128 RMMFAudioRecordDeviceCustomCommands customCommands(controller);
3129 error = customCommands.SetGain(gain);
3131 //------------------------------------//
3132 // Getting Log from Custom Controller //
3133 //------------------------------------//
3136 INFO_PRINTF1(_L("Getting Log"));
3138 TBuf8<64> memFunctionText;
3140 TUid uid = {KMmfTestControllerUid};
3141 TMMFMessageDestination handleInfo(uid);
3142 TMMFMessageDestinationPckg messageDest(handleInfo);
3144 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
3146 TBuf<64> memFunctionText16;
3147 memFunctionText16.Copy(memFunctionText);
3148 INFO_PRINTF2(_L("Log:%S"),&memFunctionText16);
3150 if (memFunctionText != KExpectedResult)
3156 //------------------------------------//
3163 INFO_PRINTF1(_L("Closing Controller"));
3166 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
3172 //---------------------------------------------------------------
3175 CTestStep_MMF_CTLFRM_U_0051::CTestStep_MMF_CTLFRM_U_0051()
3179 // store the name of this test case
3180 // this is the name that is used by the script file
3181 // Each test step initialises it's own name
3182 iTestStepName = _L("MM-MMF-CTLFRM-U-0051");
3187 TVerdict CTestStep_MMF_CTLFRM_U_0051::DoTestStepL( void )
3188 /** As TSU_MMF_CTLFRM_U_0040
3190 * @test Req. under test REQ172.5.5 REQ172.5.5.13
3193 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
3196 TVerdict verdict = EPass;
3197 _LIT8(KExpectedResult, "MardGetMaxGainL Called");
3199 TMMFPrioritySettings settings;
3200 TInt error = KErrNone;
3201 RMMFController controller;
3203 settings.iPriority = 1;
3204 settings.iPref = EMdaPriorityPreferenceTime;
3205 settings.iState = EMMFStateIdle;
3209 // Open a Custom Controller
3210 error = controller.Open(KTstControllerUid,settings);
3211 INFO_PRINTF2(_L("Controller Open: %d"), error);
3213 RMMFAudioRecordDeviceCustomCommands customCommands(controller);
3214 error = customCommands.GetMaxGain(maxGain);
3216 //------------------------------------//
3217 // Getting Log from Custom Controller //
3218 //------------------------------------//
3221 INFO_PRINTF1(_L("Getting Log"));
3223 TBuf8<64> memFunctionText;
3225 TUid uid = {KMmfTestControllerUid};
3226 TMMFMessageDestination handleInfo(uid);
3227 TMMFMessageDestinationPckg messageDest(handleInfo);
3229 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
3231 TBuf<64> memFunctionText16;
3232 memFunctionText16.Copy(memFunctionText);
3233 INFO_PRINTF2(_L("Log:%S"),&memFunctionText16);
3235 if (memFunctionText != KExpectedResult)
3241 //------------------------------------//
3243 INFO_PRINTF2(_L("Max Gain: %d"),maxGain);
3251 INFO_PRINTF1(_L("Closing Controller"));
3254 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
3260 //---------------------------------------------------------------
3262 CTestStep_MMF_CTLFRM_U_0052::CTestStep_MMF_CTLFRM_U_0052()
3266 // store the name of this test case
3267 // this is the name that is used by the script file
3268 // Each test step initialises it's own name
3269 iTestStepName = _L("MM-MMF-CTLFRM-U-0052");
3274 TVerdict CTestStep_MMF_CTLFRM_U_0052::DoTestStepL( void )
3275 /** As TSU_MMF_CTLFRM_U_0040
3277 * @test Req. under test REQ172.5.5 REQ172.5.5.13
3280 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
3283 TVerdict verdict = EPass;
3284 _LIT8(KExpectedResult, "MardGetGainL Called");
3286 TMMFPrioritySettings settings;
3287 TInt error = KErrNone;
3288 RMMFController controller;
3290 settings.iPriority = 1;
3291 settings.iPref = EMdaPriorityPreferenceTime;
3292 settings.iState = EMMFStateIdle;
3296 // Open a Custom Controller
3297 error = controller.Open(KTstControllerUid,settings);
3298 INFO_PRINTF2(_L("Controller Open: %d"), error);
3300 RMMFAudioRecordDeviceCustomCommands customCommands(controller);
3302 error = customCommands.GetGain(gain);
3304 //------------------------------------//
3305 // Getting Log from Custom Controller //
3306 //------------------------------------//
3309 INFO_PRINTF1(_L("Getting Log"));
3311 TBuf8<64> memFunctionText;
3313 TUid uid = {KMmfTestControllerUid};
3314 TMMFMessageDestination handleInfo(uid);
3315 TMMFMessageDestinationPckg messageDest(handleInfo);
3317 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
3319 TBuf<64> memFunctionText16;
3320 memFunctionText16.Copy(memFunctionText);
3321 INFO_PRINTF2(_L("Log:%S"),&memFunctionText16);
3323 if (memFunctionText != KExpectedResult)
3329 //------------------------------------//
3331 INFO_PRINTF2(_L("Gain: %d"),gain);
3339 INFO_PRINTF1(_L("Closing Controller"));
3342 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
3348 //---------------------------------------------------------------
3350 CTestStep_MMF_CTLFRM_U_0053::CTestStep_MMF_CTLFRM_U_0053()
3354 // store the name of this test case
3355 // this is the name that is used by the script file
3356 // Each test step initialises it's own name
3357 iTestStepName = _L("MM-MMF-CTLFRM-U-0053");
3362 TVerdict CTestStep_MMF_CTLFRM_U_0053::DoTestStepL( void )
3363 /** As TSU_MMF_CTLFRM_U_0040
3365 * @test Req. under test REQ172.5.5 REQ172.5.5.13
3368 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
3371 TVerdict verdict = EPass;
3372 _LIT8(KExpectedResult, "MardSetBalanceL Called");
3374 TMMFPrioritySettings settings;
3375 TInt error = KErrNone;
3376 RMMFController controller;
3378 settings.iPriority = 1;
3379 settings.iPref = EMdaPriorityPreferenceTime;
3380 settings.iState = EMMFStateIdle;
3384 // Open a Custom Controller
3385 error = controller.Open(KTstControllerUid,settings);
3386 INFO_PRINTF2(_L("Controller Open: %d"), error);
3388 RMMFAudioRecordDeviceCustomCommands customCommands(controller);
3389 error = customCommands.SetBalance(balance);
3391 //------------------------------------//
3392 // Getting Log from Custom Controller //
3393 //------------------------------------//
3396 INFO_PRINTF1(_L("Getting Log"));
3398 TBuf8<64> memFunctionText;
3400 TUid uid = {KMmfTestControllerUid};
3401 TMMFMessageDestination handleInfo(uid);
3402 TMMFMessageDestinationPckg messageDest(handleInfo);
3404 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
3406 TBuf<64> memFunctionText16;
3407 memFunctionText16.Copy(memFunctionText);
3408 INFO_PRINTF2(_L("Log:%S"),&memFunctionText16);
3410 if (memFunctionText != KExpectedResult)
3416 //------------------------------------//
3423 INFO_PRINTF1(_L("Closing Controller"));
3426 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
3432 //---------------------------------------------------------------
3434 CTestStep_MMF_CTLFRM_U_0054::CTestStep_MMF_CTLFRM_U_0054()
3438 // store the name of this test case
3439 // this is the name that is used by the script file
3440 // Each test step initialises it's own name
3441 iTestStepName = _L("MM-MMF-CTLFRM-U-0054");
3446 TVerdict CTestStep_MMF_CTLFRM_U_0054::DoTestStepL( void )
3447 /** As TSU_MMF_CTLFRM_U_0040
3449 * @test Req. under test REQ172.5.5 REQ172.5.5.13
3452 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
3455 TVerdict verdict = EPass;
3456 _LIT8(KExpectedResult, "MardGetBalanceL Called");
3458 TMMFPrioritySettings settings;
3459 TInt error = KErrNone;
3460 RMMFController controller;
3462 settings.iPriority = 1;
3463 settings.iPref = EMdaPriorityPreferenceTime;
3464 settings.iState = EMMFStateIdle;
3468 // Open a Custom Controller
3469 error = controller.Open(KTstControllerUid,settings);
3470 INFO_PRINTF2(_L("Controller Open: %d"), error);
3472 RMMFAudioRecordDeviceCustomCommands customCommands(controller);
3473 error = customCommands.GetBalance(balance);
3475 //------------------------------------//
3476 // Getting Log from Custom Controller //
3477 //------------------------------------//
3480 INFO_PRINTF1(_L("Getting Log"));
3482 TBuf8<64> memFunctionText;
3484 TUid uid = {KMmfTestControllerUid};
3485 TMMFMessageDestination handleInfo(uid);
3486 TMMFMessageDestinationPckg messageDest(handleInfo);
3488 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
3490 TBuf<64> memFunctionText16;
3491 memFunctionText16.Copy(memFunctionText);
3492 INFO_PRINTF2(_L("Log:%S"),&memFunctionText16);
3494 if (memFunctionText != KExpectedResult)
3500 //------------------------------------//
3502 INFO_PRINTF2(_L("Balance: %d"),balance);
3509 INFO_PRINTF1(_L("Closing Controller"));
3512 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
3518 //---------------------------------------------------------------
3520 CTestStep_MMF_CTLFRM_U_0060::CTestStep_MMF_CTLFRM_U_0060()
3524 // store the name of this test case
3525 // this is the name that is used by the script file
3526 // Each test step initialises it's own name
3527 iTestStepName = _L("MM-MMF-CTLFRM-U-0060");
3532 TVerdict CTestStep_MMF_CTLFRM_U_0060::DoTestStepL( void )
3533 /** As TSU_MMF_CTLFRM_U_0040
3535 * @test Req. under test REQ172.5.5 REQ172.5.5.13
3538 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
3541 TVerdict verdict = EPass;
3542 _LIT8(KExpectedResult, "MapdSetPlaybackWindowL Called");
3544 TMMFPrioritySettings settings;
3545 TInt error = KErrNone;
3546 RMMFController controller;
3548 settings.iPriority = 1;
3549 settings.iPref = EMdaPriorityPreferenceTime;
3550 settings.iState = EMMFStateIdle;
3552 const TInt64 interval1 = 10;
3553 TTimeIntervalMicroSeconds start(interval1);
3555 const TInt64 interval2 = 25;
3556 TTimeIntervalMicroSeconds end(interval2);
3558 // Open a Custom Controller
3559 error = controller.Open(KTstControllerUid,settings);
3560 INFO_PRINTF2(_L("Controller Open: %d"), error);
3562 RMMFAudioPlayControllerCustomCommands customCommands(controller);
3563 error = customCommands.SetPlaybackWindow(start,end);
3565 //------------------------------------//
3566 // Getting Log from Custom Controller //
3567 //------------------------------------//
3570 INFO_PRINTF1(_L("Getting Log"));
3572 TBuf8<64> memFunctionText;
3574 TUid uid = {KMmfTestControllerUid};
3575 TMMFMessageDestination handleInfo(uid);
3576 TMMFMessageDestinationPckg messageDest(handleInfo);
3578 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
3580 TBuf<64> memFunctionText16;
3581 memFunctionText16.Copy(memFunctionText);
3582 INFO_PRINTF2(_L("Log:%S"),&memFunctionText16);
3584 if (memFunctionText != KExpectedResult)
3590 //------------------------------------//
3597 INFO_PRINTF1(_L("Closing Controller"));
3600 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
3606 //---------------------------------------------------------------
3608 CTestStep_MMF_CTLFRM_U_0061::CTestStep_MMF_CTLFRM_U_0061()
3612 // store the name of this test case
3613 // this is the name that is used by the script file
3614 // Each test step initialises it's own name
3615 iTestStepName = _L("MM-MMF-CTLFRM-U-0061");
3620 TVerdict CTestStep_MMF_CTLFRM_U_0061::DoTestStepL( void )
3621 /** As TSU_MMF_CTLFRM_U_0040
3623 * @test Req. under test REQ172.5.5 REQ172.5.5.13
3626 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
3629 TVerdict verdict = EPass;
3630 _LIT8(KExpectedResult, "MapdDeletePlaybackWindowL Called");
3632 TMMFPrioritySettings settings;
3633 TInt error = KErrNone;
3634 RMMFController controller;
3636 settings.iPriority = 1;
3637 settings.iPref = EMdaPriorityPreferenceTime;
3638 settings.iState = EMMFStateIdle;
3640 // Open a Custom Controller
3641 error = controller.Open(KTstControllerUid,settings);
3642 INFO_PRINTF2(_L("Controller Open: %d"), error);
3644 RMMFAudioPlayControllerCustomCommands customCommands(controller);
3645 error = customCommands.DeletePlaybackWindow();
3647 //------------------------------------//
3648 // Getting Log from Custom Controller //
3649 //------------------------------------//
3652 INFO_PRINTF1(_L("Getting Log"));
3654 TBuf8<64> memFunctionText;
3656 TUid uid = {KMmfTestControllerUid};
3657 TMMFMessageDestination handleInfo(uid);
3658 TMMFMessageDestinationPckg messageDest(handleInfo);
3660 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
3662 TBuf<64> memFunctionText16;
3663 memFunctionText16.Copy(memFunctionText);
3664 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
3666 if (memFunctionText != KExpectedResult)
3672 //------------------------------------//
3679 INFO_PRINTF1(_L("Closing Controller"));
3682 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
3688 //---------------------------------------------------------------
3691 CTestStep_MMF_CTLFRM_U_0070::CTestStep_MMF_CTLFRM_U_0070()
3695 // store the name of this test case
3696 // this is the name that is used by the script file
3697 // Each test step initialises it's own name
3698 iTestStepName = _L("MM-MMF-CTLFRM-U-0070");
3703 TVerdict CTestStep_MMF_CTLFRM_U_0070::DoTestStepL( void )
3704 /** As TSU_MMF_CTLFRM_U_0040
3706 * @test Req. under test REQ172.5.5 REQ172.5.5.13
3709 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
3712 TVerdict verdict = EPass;
3713 _LIT8(KExpectedResult, "MarcGetRecordTimeAvailableL Called");
3715 TMMFPrioritySettings settings;
3716 TInt error = KErrNone;
3717 RMMFController controller;
3719 settings.iPriority = 1;
3720 settings.iPref = EMdaPriorityPreferenceTime;
3721 settings.iState = EMMFStateIdle;
3723 const TInt64 interval = 0;
3724 TTimeIntervalMicroSeconds recordTime(interval);
3726 // Open a Custom Controller
3727 error = controller.Open(KTstControllerUid,settings);
3728 INFO_PRINTF2(_L("Controller Open: %d"), error);
3730 RMMFAudioRecordControllerCustomCommands customCommands(controller);
3731 error = customCommands.GetRecordTimeAvailable(recordTime);
3733 INFO_PRINTF2(_L("Record Time Available %d"),recordTime.Int64());
3735 //------------------------------------//
3736 // Getting Log from Custom Controller //
3737 //------------------------------------//
3740 INFO_PRINTF1(_L("Getting Log"));
3742 TBuf8<64> memFunctionText;
3744 TUid uid = {KMmfTestControllerUid};
3745 TMMFMessageDestination handleInfo(uid);
3746 TMMFMessageDestinationPckg messageDest(handleInfo);
3748 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
3750 TBuf<64> memFunctionText16;
3751 memFunctionText16.Copy(memFunctionText);
3752 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
3754 if (memFunctionText != KExpectedResult)
3760 //------------------------------------//
3767 INFO_PRINTF1(_L("Closing Controller"));
3770 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
3776 //---------------------------------------------------------------
3778 CTestStep_MMF_CTLFRM_U_0071::CTestStep_MMF_CTLFRM_U_0071()
3782 // store the name of this test case
3783 // this is the name that is used by the script file
3784 // Each test step initialises it's own name
3785 iTestStepName = _L("MM-MMF-CTLFRM-U-0071");
3790 TVerdict CTestStep_MMF_CTLFRM_U_0071::DoTestStepL( void )
3791 /** As TSU_MMF_CTLFRM_U_0040
3793 * @test Req. under test REQ172.5.5 REQ172.5.5.13
3796 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
3799 TVerdict verdict = EPass;
3800 _LIT8(KExpectedResult, "MarcSetMaxDurationL Called");
3802 TMMFPrioritySettings settings;
3803 TInt error = KErrNone;
3804 RMMFController controller;
3806 settings.iPriority = 1;
3807 settings.iPref = EMdaPriorityPreferenceTime;
3808 settings.iState = EMMFStateIdle;
3810 const TInt64 interval = 25;
3811 TTimeIntervalMicroSeconds maxDuration(interval);
3813 // Open a Custom Controller
3814 error = controller.Open(KTstControllerUid,settings);
3815 INFO_PRINTF2(_L("Controller Open: %d"), error);
3817 RMMFAudioRecordControllerCustomCommands customCommands(controller);
3818 error = customCommands.SetMaxDuration(maxDuration);
3820 //------------------------------------//
3821 // Getting Log from Custom Controller //
3822 //------------------------------------//
3825 INFO_PRINTF1(_L("Getting Log"));
3827 TBuf8<64> memFunctionText;
3829 TUid uid = {KMmfTestControllerUid};
3830 TMMFMessageDestination handleInfo(uid);
3831 TMMFMessageDestinationPckg messageDest(handleInfo);
3833 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
3835 TBuf<64> memFunctionText16;
3836 memFunctionText16.Copy(memFunctionText);
3837 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
3839 if (memFunctionText != KExpectedResult)
3845 //------------------------------------//
3852 INFO_PRINTF1(_L("Closing Controller"));
3855 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
3862 //---------------------------------------------------------------
3864 CTestStep_MMF_CTLFRM_U_0072::CTestStep_MMF_CTLFRM_U_0072()
3868 // store the name of this test case
3869 // this is the name that is used by the script file
3870 // Each test step initialises it's own name
3871 iTestStepName = _L("MM-MMF-CTLFRM-U-0072");
3876 TVerdict CTestStep_MMF_CTLFRM_U_0072::DoTestStepL( void )
3877 /** As TSU_MMF_CTLFRM_U_0040
3879 * @test Req. under test REQ172.5.5 REQ172.5.5.13
3882 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
3885 TVerdict verdict = EPass;
3886 _LIT8(KExpectedResult, "MarcSetMaxFileSizeL Called");
3888 TMMFPrioritySettings settings;
3889 TInt error = KErrNone;
3890 RMMFController controller;
3892 settings.iPriority = 1;
3893 settings.iPref = EMdaPriorityPreferenceTime;
3894 settings.iState = EMMFStateIdle;
3896 const TInt fileSize = 10;
3898 // Open a Custom Controller
3899 error = controller.Open(KTstControllerUid,settings);
3900 INFO_PRINTF2(_L("Controller Open: %d"), error);
3902 RMMFAudioRecordControllerCustomCommands customCommands(controller);
3903 error = customCommands.SetMaxFileSize(fileSize);
3905 //------------------------------------//
3906 // Getting Log from Custom Controller //
3907 //------------------------------------//
3910 INFO_PRINTF1(_L("Getting Log"));
3912 TBuf8<64> memFunctionText;
3914 TUid uid = {KMmfTestControllerUid};
3915 TMMFMessageDestination handleInfo(uid);
3916 TMMFMessageDestinationPckg messageDest(handleInfo);
3918 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
3920 TBuf<64> memFunctionText16;
3921 memFunctionText16.Copy(memFunctionText);
3922 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
3924 if (memFunctionText != KExpectedResult)
3930 //------------------------------------//
3938 INFO_PRINTF1(_L("Closing Controller"));
3941 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
3948 //---------------------------------------------------------------
3950 CTestStep_MMF_CTLFRM_U_0073::CTestStep_MMF_CTLFRM_U_0073()
3954 // store the name of this test case
3955 // this is the name that is used by the script file
3956 // Each test step initialises it's own name
3957 iTestStepName = _L("MM-MMF-CTLFRM-U-0073");
3962 TVerdict CTestStep_MMF_CTLFRM_U_0073::DoTestStepL( void )
3963 /** As TSU_MMF_CTLFRM_U_0040
3965 * @test Req. under test REQ172.5.5 REQ172.5.5.13
3968 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
3971 TVerdict verdict = EPass;
3972 _LIT8(KExpectedResult, "MarcCropL Called");
3974 TMMFPrioritySettings settings;
3975 TInt error = KErrNone;
3976 RMMFController controller;
3978 settings.iPriority = 1;
3979 settings.iPref = EMdaPriorityPreferenceTime;
3980 settings.iState = EMMFStateIdle;
3982 // Open a Custom Controller
3983 error = controller.Open(KTstControllerUid,settings);
3984 INFO_PRINTF2(_L("Controller Open: %d"), error);
3986 RMMFAudioRecordControllerCustomCommands customCommands(controller);
3987 error = customCommands.Crop(ETrue);
3989 //------------------------------------//
3990 // Getting Log from Custom Controller //
3991 //------------------------------------//
3994 INFO_PRINTF1(_L("Getting Log"));
3996 TBuf8<64> memFunctionText;
3998 TUid uid = {KMmfTestControllerUid};
3999 TMMFMessageDestination handleInfo(uid);
4000 TMMFMessageDestinationPckg messageDest(handleInfo);
4002 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
4004 TBuf<64> memFunctionText16;
4005 memFunctionText16.Copy(memFunctionText);
4006 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
4009 if (memFunctionText != KExpectedResult)
4015 //------------------------------------//
4022 INFO_PRINTF1(_L("Closing Controller"));
4025 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
4032 //---------------------------------------------------------------
4034 CTestStep_MMF_CTLFRM_U_0074::CTestStep_MMF_CTLFRM_U_0074()
4038 // store the name of this test case
4039 // this is the name that is used by the script file
4040 // Each test step initialises it's own name
4041 iTestStepName = _L("MM-MMF-CTLFRM-U-0074");
4046 TVerdict CTestStep_MMF_CTLFRM_U_0074::DoTestStepL( void )
4047 /** As TSU_MMF_CTLFRM_U_0040
4049 * @test Req. under test REQ172.5.5 REQ172.5.5.13
4052 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
4055 TVerdict verdict = EPass;
4056 _LIT8(KExpectedResult, "MarcAddMetaDataEntryL Called");
4058 TMMFPrioritySettings settings;
4059 TInt error = KErrNone;
4060 RMMFController controller;
4062 CMMFMetaDataEntry* metaEntry = CMMFMetaDataEntry::NewL();
4063 CleanupStack::PushL(metaEntry);
4065 settings.iPriority = 1;
4066 settings.iPref = EMdaPriorityPreferenceTime;
4067 settings.iState = EMMFStateIdle;
4069 // Open a Custom Controller
4070 error = controller.Open(KTstControllerUid,settings);
4071 INFO_PRINTF2(_L("Controller Open: %d"), error);
4073 RMMFAudioRecordControllerCustomCommands customCommands(controller);
4074 customCommands.AddMetaDataEntryL(*metaEntry);
4076 //------------------------------------//
4077 // Getting Log from Custom Controller //
4078 //------------------------------------//
4081 INFO_PRINTF1(_L("Getting Log"));
4083 TBuf8<64> memFunctionText;
4085 TUid uid = {KMmfTestControllerUid};
4086 TMMFMessageDestination handleInfo(uid);
4087 TMMFMessageDestinationPckg messageDest(handleInfo);
4089 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
4091 TBuf<64> memFunctionText16;
4092 memFunctionText16.Copy(memFunctionText);
4093 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
4095 if (memFunctionText != KExpectedResult)
4101 //------------------------------------//
4108 INFO_PRINTF1(_L("Closing Controller"));
4111 CleanupStack::PopAndDestroy();
4113 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
4120 //---------------------------------------------------------------
4123 CTestStep_MMF_CTLFRM_U_0075::CTestStep_MMF_CTLFRM_U_0075()
4127 // store the name of this test case
4128 // this is the name that is used by the script file
4129 // Each test step initialises it's own name
4130 iTestStepName = _L("MM-MMF-CTLFRM-U-0075");
4135 TVerdict CTestStep_MMF_CTLFRM_U_0075::DoTestStepL( void )
4136 /** As TSU_MMF_CTLFRM_U_0040
4138 * @test Req. under test REQ172.5.5 REQ172.5.5.13
4141 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
4144 TVerdict verdict = EPass;
4145 _LIT8(KExpectedResult, "MarcRemoveMetaDataEntryL Called");
4147 TMMFPrioritySettings settings;
4148 TInt error = KErrNone;
4149 RMMFController controller;
4153 settings.iPriority = 1;
4154 settings.iPref = EMdaPriorityPreferenceTime;
4155 settings.iState = EMMFStateIdle;
4157 // Open a Custom Controller
4158 error = controller.Open(KTstControllerUid,settings);
4159 INFO_PRINTF2(_L("Controller Open: %d"), error);
4161 RMMFAudioRecordControllerCustomCommands customCommands(controller);
4162 error = customCommands.RemoveMetaDataEntry(index);
4164 //------------------------------------//
4165 // Getting Log from Custom Controller //
4166 //------------------------------------//
4169 INFO_PRINTF1(_L("Getting Log"));
4171 TBuf8<64> memFunctionText;
4173 TUid uid = {KMmfTestControllerUid};
4174 TMMFMessageDestination handleInfo(uid);
4175 TMMFMessageDestinationPckg messageDest(handleInfo);
4177 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
4179 TBuf<64> memFunctionText16;
4180 memFunctionText16.Copy(memFunctionText);
4181 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
4183 if (memFunctionText != KExpectedResult)
4189 //------------------------------------//
4196 INFO_PRINTF1(_L("Closing Controller"));
4199 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
4206 //---------------------------------------------------------------
4208 CTestStep_MMF_CTLFRM_U_0076::CTestStep_MMF_CTLFRM_U_0076()
4212 // store the name of this test case
4213 // this is the name that is used by the script file
4214 // Each test step initialises it's own name
4215 iTestStepName = _L("MM-MMF-CTLFRM-U-0076");
4220 TVerdict CTestStep_MMF_CTLFRM_U_0076::DoTestStepL( void )
4221 /** As TSU_MMF_CTLFRM_U_0040
4223 * @test Req. under test REQ172.5.5 REQ172.5.5.13
4226 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
4229 TVerdict verdict = EPass;
4230 _LIT8(KExpectedResult, "MarcReplaceMetaDataEntryL Called");
4232 TMMFPrioritySettings settings;
4233 TInt error = KErrNone;
4234 RMMFController controller;
4236 const TInt index = 1;
4237 CMMFMetaDataEntry* metaEntry = CMMFMetaDataEntry::NewL();
4238 CleanupStack::PushL(metaEntry);
4240 settings.iPriority = 1;
4241 settings.iPref = EMdaPriorityPreferenceTime;
4242 settings.iState = EMMFStateIdle;
4244 // Open a Custom Controller
4245 error = controller.Open(KTstControllerUid,settings);
4246 INFO_PRINTF2(_L("Controller Open: %d"), error);
4248 RMMFAudioRecordControllerCustomCommands customCommands(controller);
4249 customCommands.ReplaceMetaDataEntryL(index, *metaEntry);
4251 //------------------------------------//
4252 // Getting Log from Custom Controller //
4253 //------------------------------------//
4256 INFO_PRINTF1(_L("Getting Log"));
4258 TBuf8<64> memFunctionText;
4260 TUid uid = {KMmfTestControllerUid};
4261 TMMFMessageDestination handleInfo(uid);
4262 TMMFMessageDestinationPckg messageDest(handleInfo);
4264 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
4266 TBuf<64> memFunctionText16;
4267 memFunctionText16.Copy(memFunctionText);
4268 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
4270 if (memFunctionText != KExpectedResult)
4276 //------------------------------------//
4283 INFO_PRINTF1(_L("Closing Controller"));
4286 CleanupStack::PopAndDestroy();
4288 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
4295 //---------------------------------------------------------------
4297 CTestStep_MMF_CTLFRM_U_0080::CTestStep_MMF_CTLFRM_U_0080()
4301 // store the name of this test case
4302 // this is the name that is used by the script file
4303 // Each test step initialises it's own name
4304 iTestStepName = _L("MM-MMF-CTLFRM-U-0080");
4309 TVerdict CTestStep_MMF_CTLFRM_U_0080::DoTestStepL( void )
4310 /** As TSU_MMF_CTLFRM_U_0040
4312 * @test Req. under test REQ172.5.5 REQ172.5.5.13
4315 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
4318 TVerdict verdict = EPass;
4320 TMMFPrioritySettings settings;
4321 TInt error = KErrNone;
4322 RMMFController controller;
4324 const TUint sample = 1;
4326 settings.iPriority = 1;
4327 settings.iPref = EMdaPriorityPreferenceTime;
4328 settings.iState = EMMFStateIdle;
4330 // Open a Custom Controller
4331 error = controller.Open(KTstControllerUid,settings);
4332 INFO_PRINTF2(_L("Controller Open: %d"), error);
4334 RMMFAudioControllerCustomCommands customCommands(controller);
4335 error = customCommands.SetSourceSampleRate(sample);
4341 INFO_PRINTF1(_L("Closing Controller"));
4344 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
4351 //---------------------------------------------------------------
4353 CTestStep_MMF_CTLFRM_U_0081::CTestStep_MMF_CTLFRM_U_0081()
4357 // store the name of this test case
4358 // this is the name that is used by the script file
4359 // Each test step initialises it's own name
4360 iTestStepName = _L("MM-MMF-CTLFRM-U-0081");
4365 TVerdict CTestStep_MMF_CTLFRM_U_0081::DoTestStepL( void )
4366 /** As TSU_MMF_CTLFRM_U_0040
4368 * @test Req. under test REQ172.5.5 REQ172.5.5.13
4371 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
4374 TVerdict verdict = EPass;
4376 TMMFPrioritySettings settings;
4377 TInt error = KErrNone;
4378 RMMFController controller;
4380 const TUint numChannels = 1;
4382 settings.iPriority = 1;
4383 settings.iPref = EMdaPriorityPreferenceTime;
4384 settings.iState = EMMFStateIdle;
4386 // Open a Custom Controller
4387 error = controller.Open(KTstControllerUid,settings);
4388 INFO_PRINTF2(_L("Controller Open: %d"), error);
4390 RMMFAudioControllerCustomCommands customCommands(controller);
4391 error = customCommands.SetSourceNumChannels(numChannels);
4398 INFO_PRINTF1(_L("Closing Controller"));
4401 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
4408 //---------------------------------------------------------------
4411 CTestStep_MMF_CTLFRM_U_0082::CTestStep_MMF_CTLFRM_U_0082()
4415 // store the name of this test case
4416 // this is the name that is used by the script file
4417 // Each test step initialises it's own name
4418 iTestStepName = _L("MM-MMF-CTLFRM-U-0082");
4423 TVerdict CTestStep_MMF_CTLFRM_U_0082::DoTestStepL( void )
4424 /** As TSU_MMF_CTLFRM_U_0040
4426 * @test Req. under test REQ172.5.5 REQ172.5.5.13
4429 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
4432 TVerdict verdict = EPass;
4434 TMMFPrioritySettings settings;
4435 TInt error = KErrNone;
4436 RMMFController controller;
4438 TUid uid = {0x12345678};
4440 settings.iPriority = 1;
4441 settings.iPref = EMdaPriorityPreferenceTime;
4442 settings.iState = EMMFStateIdle;
4444 // Open a Custom Controller
4445 error = controller.Open(KTstControllerUid,settings);
4446 INFO_PRINTF2(_L("Controller Open: %d"), error);
4448 RMMFAudioControllerCustomCommands customCommands(controller);
4449 error = customCommands.SetSourceFormat(uid);
4456 INFO_PRINTF1(_L("Closing Controller"));
4459 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
4466 //---------------------------------------------------------------
4468 CTestStep_MMF_CTLFRM_U_0083::CTestStep_MMF_CTLFRM_U_0083()
4472 // store the name of this test case
4473 // this is the name that is used by the script file
4474 // Each test step initialises it's own name
4475 iTestStepName = _L("MM-MMF-CTLFRM-U-0083");
4480 TVerdict CTestStep_MMF_CTLFRM_U_0083::DoTestStepL( void )
4481 /** As TSU_MMF_CTLFRM_U_0040
4483 * @test Req. under test REQ172.5.5 REQ172.5.5.13
4486 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
4489 TVerdict verdict = EPass;
4491 TMMFPrioritySettings settings;
4492 TInt error = KErrNone;
4493 RMMFController controller;
4495 TUint sampleRate = 5;
4497 settings.iPriority = 1;
4498 settings.iPref = EMdaPriorityPreferenceTime;
4499 settings.iState = EMMFStateIdle;
4501 // Open a Custom Controller
4502 error = controller.Open(KTstControllerUid,settings);
4503 INFO_PRINTF2(_L("Controller Open: %d"), error);
4505 RMMFAudioControllerCustomCommands customCommands(controller);
4506 error = customCommands.SetSinkSampleRate(sampleRate);
4513 INFO_PRINTF1(_L("Closing Controller"));
4516 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
4523 //---------------------------------------------------------------
4525 CTestStep_MMF_CTLFRM_U_0084::CTestStep_MMF_CTLFRM_U_0084()
4529 // store the name of this test case
4530 // this is the name that is used by the script file
4531 // Each test step initialises it's own name
4532 iTestStepName = _L("MM-MMF-CTLFRM-U-0084");
4537 TVerdict CTestStep_MMF_CTLFRM_U_0084::DoTestStepL( void )
4538 /** As TSU_MMF_CTLFRM_U_0040
4540 * @test Req. under test REQ172.5.5 REQ172.5.5.13
4543 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
4546 TVerdict verdict = EPass;
4548 TMMFPrioritySettings settings;
4549 TInt error = KErrNone;
4550 RMMFController controller;
4552 TUint numChannels = 1;
4554 settings.iPriority = 1;
4555 settings.iPref = EMdaPriorityPreferenceTime;
4556 settings.iState = EMMFStateIdle;
4558 // Open a Custom Controller
4559 error = controller.Open(KTstControllerUid,settings);
4560 INFO_PRINTF2(_L("Controller Open: %d"), error);
4562 RMMFAudioControllerCustomCommands customCommands(controller);
4563 error = customCommands.SetSinkNumChannels(numChannels);
4570 INFO_PRINTF1(_L("Closing Controller"));
4573 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
4580 //---------------------------------------------------------------
4582 CTestStep_MMF_CTLFRM_U_0085::CTestStep_MMF_CTLFRM_U_0085()
4586 // store the name of this test case
4587 // this is the name that is used by the script file
4588 // Each test step initialises it's own name
4589 iTestStepName = _L("MM-MMF-CTLFRM-U-0085");
4594 TVerdict CTestStep_MMF_CTLFRM_U_0085::DoTestStepL( void )
4595 /** As TSU_MMF_CTLFRM_U_0040
4597 * @test Req. under test REQ172.5.5 REQ172.5.5.13
4600 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
4603 TVerdict verdict = EPass;
4605 TMMFPrioritySettings settings;
4606 TInt error = KErrNone;
4607 RMMFController controller;
4609 TUid sinkUid = {0x12345679};
4610 CMMFMetaDataEntry* metaEntry = CMMFMetaDataEntry::NewL();
4611 CleanupStack::PushL(metaEntry);
4613 settings.iPriority = 1;
4614 settings.iPref = EMdaPriorityPreferenceTime;
4615 settings.iState = EMMFStateIdle;
4617 // Open a Custom Controller
4618 error = controller.Open(KTstControllerUid,settings);
4619 INFO_PRINTF2(_L("Controller Open: %d"), error);
4621 RMMFAudioControllerCustomCommands customCommands(controller);
4622 error = customCommands.SetSinkFormat(sinkUid);
4629 INFO_PRINTF1(_L("Closing Controller"));
4632 CleanupStack::PopAndDestroy(1);
4634 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
4641 //---------------------------------------------------------------
4644 CTestStep_MMF_CTLFRM_U_0086::CTestStep_MMF_CTLFRM_U_0086()
4648 // store the name of this test case
4649 // this is the name that is used by the script file
4650 // Each test step initialises it's own name
4651 iTestStepName = _L("MM-MMF-CTLFRM-U-0086");
4656 TVerdict CTestStep_MMF_CTLFRM_U_0086::DoTestStepL( void )
4657 /** As TSU_MMF_CTLFRM_U_0040
4659 * @test Req. under test REQ172.5.5 REQ172.5.5.13
4662 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
4665 TVerdict verdict = EPass;
4667 TMMFPrioritySettings settings;
4668 TInt error = KErrNone;
4669 RMMFController controller;
4671 TFourCC sourceFourCC(' ','P','1','6');
4672 TFourCC sinkFourCC(' ','P','1','6');
4674 settings.iPriority = 1;
4675 settings.iPref = EMdaPriorityPreferenceTime;
4676 settings.iState = EMMFStateIdle;
4678 // Open a Custom Controller
4679 error = controller.Open(KTstControllerUid,settings);
4680 INFO_PRINTF2(_L("Controller Open: %d"), error);
4682 RMMFAudioControllerCustomCommands customCommands(controller);
4683 error = customCommands.SetCodec(sourceFourCC, sinkFourCC);
4690 INFO_PRINTF1(_L("Closing Controller"));
4694 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
4701 //---------------------------------------------------------------
4705 CTestStep_MMF_CTLFRM_U_0100::CTestStep_MMF_CTLFRM_U_0100()
4709 // store the name of this test case
4710 // this is the name that is used by the script file
4711 // Each test step initialises it's own name
4712 iTestStepName = _L("MM-MMF-CTLFRM-U-0100");
4717 TVerdict CTestStep_MMF_CTLFRM_U_0100::DoTestStepL( void )
4718 /** This test is to add and remove multiple Sources and Sinks and ensure this is
4719 * carried out correctly.
4722 * @test Req. under test REQ172.5.5 REQ172.5.5.13
4725 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
4728 TVerdict verdict = EPass;
4730 TMMFPrioritySettings settings;
4731 TInt error = KErrNone;
4732 RMMFController controller;
4734 settings.iPriority = 1;
4735 settings.iPref = EMdaPriorityPreferenceTime;
4736 settings.iState = EMMFStateIdle;
4738 const TDesC8& initData = KInitData;
4740 CArrayFixFlat<TMMFMessageDestination>* sinkHandles = new (ELeave) CArrayFixFlat<TMMFMessageDestination>(6);
4741 CleanupStack::PushL(sinkHandles);
4742 CArrayFixFlat<TMMFMessageDestination>* sourceHandles = new (ELeave) CArrayFixFlat<TMMFMessageDestination>(3);
4743 CleanupStack::PushL(sourceHandles);
4746 // Open a Custom Controller
4747 error = controller.Open(KTstControllerUid,settings);
4748 INFO_PRINTF2(_L("Controller Open: %d"), error);
4753 INFO_PRINTF1(_L("API TEST: Calling AddDataSink"));
4754 TMMFMessageDestination& sinkHandle = sinkHandles->ExtendL();
4755 error = controller.AddDataSink(KTestDataSinkUid, initData, sinkHandle); // index = 1
4757 TMMFMessageDestination& sinkHandle2= sinkHandles->ExtendL();
4758 error = controller.AddDataSink(KTestDataSinkBUid, initData, sinkHandle2); // index = 2
4760 TMMFMessageDestination& sinkHandle3 = sinkHandles->ExtendL();
4761 error = controller.AddDataSink(KTestDataSinkUid, initData, sinkHandle3); // index = 3
4763 TMMFMessageDestination& sinkHandle4 = sinkHandles->ExtendL();
4764 error = controller.AddDataSink(KTestDataSinkBUid, initData, sinkHandle4); // index = 4
4766 TMMFMessageDestination& sourceHandle = sourceHandles->ExtendL();
4767 error = controller.AddDataSource(KTestDataSourceUid, initData, sourceHandle); // index = 1
4769 TMMFMessageDestination& sourceHandle2 = sourceHandles->ExtendL();
4770 error = controller.AddDataSource(KTestDataSourceUid, initData, sourceHandle2); // index = 2
4772 TMMFMessageDestination& sourceHandle3 = sourceHandles->ExtendL();
4773 error = controller.AddDataSource(KTestDataSourceBUid, initData, sourceHandle3); // index = 3
4775 TMMFMessageDestination& sinkHandle5 = sinkHandles->ExtendL();
4776 error = controller.AddDataSink(KTestDataSinkUid, initData, sinkHandle5); // index = 5
4778 TMMFMessageDestination& sinkHandle6 = sinkHandles->ExtendL();
4779 error = controller.AddDataSink(KTestDataSinkUid, initData, sinkHandle6); // index = 6
4784 // Remove two Sinks and a Source
4785 error = controller.RemoveDataSink((*sinkHandles)[2]);
4787 error = controller.RemoveDataSource((*sourceHandles)[2]);
4789 error = controller.RemoveDataSink((*sinkHandles)[5]);
4798 INFO_PRINTF1(_L("Closing Controller"));
4801 CleanupStack::PopAndDestroy(2);
4803 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
4810 //---------------------------------------------------------------
4813 CTestStep_MMF_CTLFRM_U_0110::CTestStep_MMF_CTLFRM_U_0110()
4817 // store the name of this test case
4818 // this is the name that is used by the script file
4819 // Each test step initialises it's own name
4820 iTestStepName = _L("MM-MMF-CTLFRM-U-0110");
4824 TVerdict CTestStep_MMF_CTLFRM_U_0110::DoTestStepL( void )
4825 /** Verfiy CMMFDescriptorBuffer creation and deletion using default buffer size
4827 * @test Req. under test REQ172.5.5 REQ172.5.5.13
4830 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
4833 TVerdict verdict = EPass;
4835 TMMFPrioritySettings settings;
4836 TInt error = KErrNone;
4837 RMMFController controller;
4839 settings.iPriority = 1;
4840 settings.iPref = EMdaPriorityPreferenceTime;
4841 settings.iState = EMMFStateIdle;
4843 // Open a Custom Controller
4845 INFO_PRINTF1(_L("Controller Instantiation Fail"));
4846 __UHEAP_FAILNEXT(1); // Make the Controller Instantiation fail
4848 TRAP(error, controller.Open(KTstControllerUid,settings));
4849 INFO_PRINTF2(_L("Controller Open: %d"), error);
4858 INFO_PRINTF1(_L("Closing Controller"));
4861 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
4868 //---------------------------------------------------------------
4870 CTestStep_MMF_CTLFRM_U_0111::CTestStep_MMF_CTLFRM_U_0111()
4874 // store the name of this test case
4875 // this is the name that is used by the script file
4876 // Each test step initialises it's own name
4877 iTestStepName = _L("MM-MMF-CTLFRM-U-0111");
4882 TVerdict CTestStep_MMF_CTLFRM_U_0111::DoTestStepL( void )
4883 /** Verfiy CMMFDescriptorBuffer creation and deletion using default buffer size
4885 * @test Req. under test REQ172.5.5 REQ172.5.5.13
4888 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
4891 TVerdict verdict = EPass;
4892 _LIT8(KExpectedResult, "AddDataSourceL Called");
4894 TMMFPrioritySettings settings;
4895 TInt error = KErrNone;
4896 RMMFController controller;
4898 settings.iPriority = 1;
4899 settings.iPref = EMdaPriorityPreferenceTime;
4900 settings.iState = EMMFStateIdle;
4902 error = controller.Open(KTstControllerUid,settings);
4903 INFO_PRINTF2(_L("Controller Open: %d"), error);
4905 const TDesC8& initData = KInitData;
4908 INFO_PRINTF1(_L("Attempting to add a Source and a Sink to Controller"));
4911 INFO_PRINTF1(_L("API TEST: Calling AddDataSource"));
4912 __UHEAP_FAILNEXT(1);
4913 error = controller.AddDataSource(KTestDataSourceUid, initData);
4916 INFO_PRINTF2(_L("Controller Status: %d"), error);
4918 //------------------------------------//
4919 // Getting Log from Custom Controller //
4920 //------------------------------------//
4923 INFO_PRINTF1(_L("Getting Log"));
4925 TBuf8<64> memFunctionText;
4928 TUid uid = {KMmfTestControllerUid};
4929 TMMFMessageDestination handleInfo(uid);
4930 TMMFMessageDestinationPckg messageDest(handleInfo);
4932 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
4934 TBuf<64> memFunctionText16;
4935 memFunctionText16.Copy(memFunctionText);
4936 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
4938 if (memFunctionText != KExpectedResult)
4944 //------------------------------------//
4947 INFO_PRINTF1(_L("Closing Controller"));
4955 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
4962 //---------------------------------------------------------------
4964 CTestStep_MMF_CTLFRM_U_0112::CTestStep_MMF_CTLFRM_U_0112()
4968 // store the name of this test case
4969 // this is the name that is used by the script file
4970 // Each test step initialises it's own name
4971 iTestStepName = _L("MM-MMF-CTLFRM-U-0112");
4976 TVerdict CTestStep_MMF_CTLFRM_U_0112::DoTestStepL( void )
4977 /** Verfiy CMMFDescriptorBuffer creation and deletion using default buffer size
4979 * @test Req. under test REQ172.5.5 REQ172.5.5.13
4982 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
4985 TVerdict verdict = EPass;
4986 _LIT8(KExpectedResult, "AddDataSinkL Called");
4988 TMMFPrioritySettings settings;
4989 TInt error = KErrNone;
4990 RMMFController controller;
4992 settings.iPriority = 1;
4993 settings.iPref = EMdaPriorityPreferenceTime;
4994 settings.iState = EMMFStateIdle;
4996 error = controller.Open(KTstControllerUid,settings);
4997 INFO_PRINTF2(_L("Controller Open: %d"), error);
4999 const TDesC8& initData = KInitData;
5004 INFO_PRINTF1(_L("API TEST: Calling AddDataSink"));
5005 __UHEAP_FAILNEXT(1);
5006 error = controller.AddDataSink(KTestDataSinkUid, initData);
5010 INFO_PRINTF2(_L("Controller Status: %d"), error);
5012 //------------------------------------//
5013 // Getting Log from Custom Controller //
5014 //------------------------------------//
5017 INFO_PRINTF1(_L("Getting Log"));
5019 TBuf8<64> memFunctionText;
5021 TUid uid = {KMmfTestControllerUid};
5022 TMMFMessageDestination handleInfo(uid);
5023 TMMFMessageDestinationPckg messageDest(handleInfo);
5025 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
5027 TBuf<64> memFunctionText16;
5028 memFunctionText16.Copy(memFunctionText);
5029 INFO_PRINTF2(_L("Log: %S"),&memFunctionText16);
5031 if (memFunctionText != KExpectedResult)
5037 //------------------------------------//
5039 INFO_PRINTF1(_L("Closing Controller"));
5047 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
5054 //---------------------------------------------------------------
5056 CTestStep_MMF_CTLFRM_U_0120::CTestStep_MMF_CTLFRM_U_0120()
5060 // store the name of this test case
5061 // this is the name that is used by the script file
5062 // Each test step initialises it's own name
5063 iTestStepName = _L("MM-MMF-CTLFRM-U-0120");
5068 TVerdict CTestStep_MMF_CTLFRM_U_0120::DoTestStepL( void )
5069 /** Instantiate a CMMFControllerPluginSelectionParameters and CMMFFormatSelectionParameters
5070 * set the parameters appropiately (See API Method Calls and Parameters) to obtain
5071 * controller Implementation Uid's in a CMMFControllerImplementationInformation Array to
5072 * open a controller. Open the controller, check for errors and close the controller.
5073 * (Test CMMFFormatSelectionParameters API).
5076 * @test Req. under test REQ172.5.5 REQ172.5.5.13
5079 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
5082 TVerdict verdict = EPass;
5084 TMMFPrioritySettings settings;
5085 TInt error = KErrNone;
5086 RMMFController controller1;
5088 settings.iPriority = 1;
5089 settings.iPref = EMdaPriorityPreferenceTime;
5090 settings.iState = EMMFStateIdle;
5092 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
5093 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
5095 // Set the format match data
5097 //---------------------//
5098 // Method being Tested //
5099 //---------------------//
5100 fSelect->SetMatchToFileNameL(_L("test.pav"));
5101 //---------------------//
5103 // Set the controller plugin play format match data
5104 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
5107 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
5108 CleanupResetAndDestroyPushL(controllers);
5109 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
5111 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
5112 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
5114 INFO_PRINTF1(_L("Closing Controller"));
5115 controller1.Close();
5122 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
5129 //---------------------------------------------------------------
5131 CTestStep_MMF_CTLFRM_U_0121::CTestStep_MMF_CTLFRM_U_0121()
5135 // store the name of this test case
5136 // this is the name that is used by the script file
5137 // Each test step initialises it's own name
5138 iTestStepName = _L("MM-MMF-CTLFRM-U-0121");
5143 TVerdict CTestStep_MMF_CTLFRM_U_0121::DoTestStepL( void )
5144 /** As TSU_MMF_CTLFRM_U_0120
5146 * @test Req. under test REQ172.5.5 REQ172.5.5.13
5149 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
5152 TVerdict verdict = EPass;
5154 TMMFPrioritySettings settings;
5155 TInt error = KErrNone;
5156 RMMFController controller1;
5158 settings.iPriority = 1;
5159 settings.iPref = EMdaPriorityPreferenceTime;
5160 settings.iState = EMMFStateIdle;
5162 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
5163 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
5165 //---------------------//
5166 // Method being Tested //
5167 //---------------------//
5168 _LIT8(KMimeData, "audio/mbeg");
5169 fSelect->SetMatchToMimeTypeL(KMimeData);
5170 //--------------------//
5172 // Set the controller plugin play format match data
5173 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
5175 cSelect->SetPreferredSupplierL(_L("Symbian"), CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
5177 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
5178 CleanupResetAndDestroyPushL(controllers);
5179 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
5181 // Check Array Size here
5182 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
5183 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
5185 INFO_PRINTF1(_L("Closing Controller"));
5186 controller1.Close();
5193 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
5200 //---------------------------------------------------------------
5202 CTestStep_MMF_CTLFRM_U_0122::CTestStep_MMF_CTLFRM_U_0122()
5206 // store the name of this test case
5207 // this is the name that is used by the script file
5208 // Each test step initialises it's own name
5209 iTestStepName = _L("MM-MMF-CTLFRM-U-0122");
5214 TVerdict CTestStep_MMF_CTLFRM_U_0122::DoTestStepL( void )
5215 /** As TSU_MMF_CTLFRM_U_0120
5217 * @test Req. under test REQ172.5.5 REQ172.5.5.13
5220 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
5223 TVerdict verdict = EPass;
5225 TMMFPrioritySettings settings;
5226 TInt error = KErrNone;
5227 RMMFController controller1;
5229 settings.iPriority = 1;
5230 settings.iPref = EMdaPriorityPreferenceTime;
5231 settings.iState = EMMFStateIdle;
5233 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
5234 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
5236 //---------------------//
5237 // Method being Tested //
5238 //---------------------//
5239 _LIT8(KHeaderData, "RIFF????PAVE");
5240 fSelect->SetMatchToHeaderDataL(KHeaderData);
5241 //--------------------//
5243 // Set the controller plugin play format match data
5244 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
5246 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
5247 CleanupResetAndDestroyPushL(controllers);
5248 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
5249 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
5250 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
5251 controller1.Close();
5258 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
5265 //---------------------------------------------------------------
5267 CTestStep_MMF_CTLFRM_U_0123::CTestStep_MMF_CTLFRM_U_0123()
5271 // store the name of this test case
5272 // this is the name that is used by the script file
5273 // Each test step initialises it's own name
5274 iTestStepName = _L("MM-MMF-CTLFRM-U-0123");
5279 TVerdict CTestStep_MMF_CTLFRM_U_0123::DoTestStepL( void )
5280 /** As TSU_MMF_CTLFRM_U_0120
5282 * @test Req. under test REQ172.5.5 REQ172.5.5.13
5285 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
5288 TVerdict verdict = EPass;
5290 TMMFPrioritySettings settings;
5291 TInt error = KErrNone;
5292 RMMFController controller1;
5294 settings.iPriority = 1;
5295 settings.iPref = EMdaPriorityPreferenceTime;
5296 settings.iState = EMMFStateIdle;
5298 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
5299 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
5302 _LIT8(KHeaderData, "RIFF????PAVE");
5303 fSelect->SetMatchToHeaderDataL(KHeaderData);
5306 //---------------------//
5307 // Method being Tested //
5308 //---------------------//
5309 fSelect->MatchData();
5310 //---------------------//
5312 // Set the controller plugin play format match data
5313 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
5315 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
5316 CleanupResetAndDestroyPushL(controllers);
5317 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
5318 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
5319 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
5320 controller1.Close();
5327 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
5334 //---------------------------------------------------------------
5336 CTestStep_MMF_CTLFRM_U_0124::CTestStep_MMF_CTLFRM_U_0124()
5340 // store the name of this test case
5341 // this is the name that is used by the script file
5342 // Each test step initialises it's own name
5343 iTestStepName = _L("MM-MMF-CTLFRM-U-0124");
5348 TVerdict CTestStep_MMF_CTLFRM_U_0124::DoTestStepL( void )
5349 /**As TSU_MMF_CTLFRM_U_0120
5351 * @test Req. under test REQ172.5.5 REQ172.5.5.13
5354 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
5357 TVerdict verdict = EPass;
5359 TMMFPrioritySettings settings;
5360 TInt error = KErrNone;
5361 RMMFController controller1;
5363 settings.iPriority = 1;
5364 settings.iPref = EMdaPriorityPreferenceTime;
5365 settings.iState = EMMFStateIdle;
5367 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
5368 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
5370 _LIT8(KHeaderData, "RIFF????PAVE");
5371 fSelect->SetMatchToHeaderDataL(KHeaderData);
5373 //---------------------//
5374 // Method being Tested //
5375 //---------------------//
5376 // CMMFFormatSelectionParameters::TMatchDataType dataType; //EABI warning removal
5377 // dataType = fSelect->MatchDataType();
5378 //--------------------//
5380 // Set the controller plugin play format match data
5381 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
5383 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
5384 CleanupResetAndDestroyPushL(controllers);
5385 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
5386 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
5387 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
5388 controller1.Close();
5395 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
5401 //---------------------------------------------------------------
5405 CTestStep_MMF_CTLFRM_U_0130::CTestStep_MMF_CTLFRM_U_0130()
5409 // store the name of this test case
5410 // this is the name that is used by the script file
5411 // Each test step initialises it's own name
5412 iTestStepName = _L("MM-MMF-CTLFRM-U-0130");
5417 TVerdict CTestStep_MMF_CTLFRM_U_0130::DoTestStepL( void )
5418 /** Instantiate a CMMFControllerPluginSelectionParameters and CMMFFormatSelectionParameters
5419 * set the parameters appropiately (See API Method Calls and Parameters) to obtain
5420 * controller Implementation Uid's in a CMMFControllerImplementationInformation Array to
5421 * open a controller. Check the details obtained to open the controller are correct. Open
5422 * the controller, check for errors and close the controller.
5423 * (Test CMMFControllerPluginSelectionParameters API).
5426 * @test Req. under test REQ172.5.5 REQ172.5.5.13
5429 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
5432 TVerdict verdict = EPass;
5434 TMMFPrioritySettings settings;
5435 TInt error = KErrNone;
5436 RMMFController controller1;
5438 settings.iPriority = 1;
5439 settings.iPref = EMdaPriorityPreferenceTime;
5440 settings.iState = EMMFStateIdle;
5442 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
5443 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
5445 //_LIT8(KHeaderData, "RIFF????PAVE");
5446 //fSelect->SetMatchToHeaderDataL(KHeaderData);
5447 fSelect->SetMatchToFileNameL(_L("test.pav"));
5449 //---------------------//
5450 // Method being Tested //
5451 //---------------------//
5452 // Set the controller plugin play format match data
5453 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
5454 //--------------------//
5456 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
5457 CleanupResetAndDestroyPushL(controllers);
5458 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
5459 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
5462 controllerUid = controllers[0]->Uid();
5464 if (controllerUid == KTstControllerUid)
5473 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
5474 controller1.Close();
5481 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
5488 //---------------------------------------------------------------
5491 CTestStep_MMF_CTLFRM_U_0131::CTestStep_MMF_CTLFRM_U_0131()
5495 // store the name of this test case
5496 // this is the name that is used by the script file
5497 // Each test step initialises it's own name
5498 iTestStepName = _L("MM-MMF-CTLFRM-U-0131");
5503 TVerdict CTestStep_MMF_CTLFRM_U_0131::DoTestStepL( void )
5504 /** As TSU_MMF_CTLFRM_U_0130
5507 * @test Req. under test REQ172.5.5 REQ172.5.5.13
5510 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
5513 TVerdict verdict = EPass;
5515 TMMFPrioritySettings settings;
5516 TInt error = KErrNone;
5517 RMMFController controller1;
5519 settings.iPriority = 1;
5520 settings.iPref = EMdaPriorityPreferenceTime;
5521 settings.iState = EMMFStateIdle;
5524 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
5525 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
5527 fSelect->SetMatchToFileNameL(_L("test.ai"));
5529 //---------------------//
5530 // Method being Tested //
5531 //---------------------//
5532 // Set the controller plugin play format match data
5533 cSelect->SetRequiredRecordFormatSupportL(*fSelect);
5534 //--------------------//
5536 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
5537 CleanupResetAndDestroyPushL(controllers);
5538 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
5539 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
5542 controllerUid = controllers[0]->Uid();
5544 if (controllerUid == KTstControllerUid)
5553 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
5554 controller1.Close();
5561 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
5568 //---------------------------------------------------------------
5571 CTestStep_MMF_CTLFRM_U_0140::CTestStep_MMF_CTLFRM_U_0140()
5575 // store the name of this test case
5576 // this is the name that is used by the script file
5577 // Each test step initialises it's own name
5578 iTestStepName = _L("MM-MMF-CTLFRM-U-0140");
5583 TVerdict CTestStep_MMF_CTLFRM_U_0140::DoTestStepL( void )
5584 /** Instantiate a CMMFControllerPluginSelectionParameters and CMMFFormatSelectionParameters
5585 * set the parameters appropiately (See API Method Calls and Parameters) to obtain
5586 * controller Implementation Uid's in a CMMFControllerImplementationInformation Array to
5587 * open a controller. Check the details obtained to open the controller are correct. Open
5588 * the controller, check for errors and close the controller.
5589 * (Test CMMFPluginImplementationInformation API)
5592 * @test Req. under test REQ172.5.5 REQ172.5.5.13
5595 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
5598 TVerdict verdict = EPass;
5600 TMMFPrioritySettings settings;
5601 TInt error = KErrNone;
5602 RMMFController controller1;
5604 settings.iPriority = 1;
5605 settings.iPref = EMdaPriorityPreferenceTime;
5606 settings.iState = EMMFStateIdle;
5608 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
5609 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
5611 // Set the format match data
5613 fSelect->SetMatchToFileNameL(_L("test.pav"));
5615 // Set the controller plugin play format match data
5616 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
5619 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
5620 CleanupResetAndDestroyPushL(controllers);
5621 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
5623 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
5625 //---------------------//
5626 // Method being Tested //
5627 //---------------------//
5629 controllerUid = controllers[0]->Uid();
5631 if (controllerUid == KTstControllerUid)
5639 //--------------------//
5642 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
5643 controller1.Close();
5650 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
5657 //---------------------------------------------------------------
5660 CTestStep_MMF_CTLFRM_U_0141::CTestStep_MMF_CTLFRM_U_0141()
5664 // store the name of this test case
5665 // this is the name that is used by the script file
5666 // Each test step initialises it's own name
5667 iTestStepName = _L("MM-MMF-CTLFRM-U-0141");
5672 TVerdict CTestStep_MMF_CTLFRM_U_0141::DoTestStepL( void )
5673 /** As TSU_MMF_CTLFRM_U_0140
5676 * @test Req. under test REQ172.5.5 REQ172.5.5.13
5679 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
5682 TVerdict verdict = EPass;
5684 _LIT(KExpectedName,"CMMFTestController");
5686 TMMFPrioritySettings settings;
5687 TInt error = KErrNone;
5688 RMMFController controller1;
5690 settings.iPriority = 1;
5691 settings.iPref = EMdaPriorityPreferenceTime;
5692 settings.iState = EMMFStateIdle;
5695 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
5696 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
5698 // Set the format match data
5700 //---------------------//
5701 // Method being Tested //
5702 //---------------------//
5703 fSelect->SetMatchToFileNameL(_L("test.pav"));
5704 //---------------------//
5706 // Set the controller plugin play format match data
5707 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
5710 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
5711 CleanupResetAndDestroyPushL(controllers);
5712 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
5714 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
5716 //---------------------//
5717 // Method being Tested //
5718 //---------------------//
5719 TPtrC controllerName;
5720 controllerName.Set(controllers[0]->DisplayName());
5721 INFO_PRINTF2(_L("Controller Name: %S"),&controllerName);
5723 if (controllerName == KExpectedName)
5731 //--------------------//
5733 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
5734 controller1.Close();
5741 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
5748 //---------------------------------------------------------------
5751 CTestStep_MMF_CTLFRM_U_0142::CTestStep_MMF_CTLFRM_U_0142()
5755 // store the name of this test case
5756 // this is the name that is used by the script file
5757 // Each test step initialises it's own name
5758 iTestStepName = _L("MM-MMF-CTLFRM-U-0142");
5763 TVerdict CTestStep_MMF_CTLFRM_U_0142::DoTestStepL( void )
5764 /** As TSU_MMF_CTLFRM_U_0140
5767 * @test Req. under test REQ172.5.5 REQ172.5.5.13
5770 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
5773 TVerdict verdict = EPass;
5775 _LIT(KExpectedSupplier, "TSU_MMF_CTLFRM");
5777 TMMFPrioritySettings settings;
5778 TInt error = KErrNone;
5779 RMMFController controller1;
5781 settings.iPriority = 1;
5782 settings.iPref = EMdaPriorityPreferenceTime;
5783 settings.iState = EMMFStateIdle;
5785 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
5786 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
5788 // Set the format match data
5790 fSelect->SetMatchToFileNameL(_L("test.pav"));
5792 // Set the controller plugin play format match data
5793 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
5796 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
5797 CleanupResetAndDestroyPushL(controllers);
5798 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
5800 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
5802 //---------------------//
5803 // Method being Tested //
5804 //---------------------//
5807 supplier.Set(controllers[0]->Supplier());
5809 INFO_PRINTF2(_L("Controller Name: %S"),&supplier);
5810 TPtrC expectedSupplierPtrC;
5811 expectedSupplierPtrC.Set(KExpectedSupplier);
5813 if (*supplier.Ptr() == *expectedSupplierPtrC.Ptr())
5821 //--------------------//
5823 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
5824 controller1.Close();
5831 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
5838 //---------------------------------------------------------------
5840 CTestStep_MMF_CTLFRM_U_0143::CTestStep_MMF_CTLFRM_U_0143()
5844 // store the name of this test case
5845 // this is the name that is used by the script file
5846 // Each test step initialises it's own name
5847 iTestStepName = _L("MM-MMF-CTLFRM-U-0143");
5852 TVerdict CTestStep_MMF_CTLFRM_U_0143::DoTestStepL( void )
5853 /** As TSU_MMF_CTLFRM_U_0140
5856 * @test Req. under test REQ172.5.5 REQ172.5.5.13
5859 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
5862 TVerdict verdict = EPass;
5865 TInt expectVersionNo = 3;
5867 TMMFPrioritySettings settings;
5868 TInt error = KErrNone;
5869 RMMFController controller1;
5871 settings.iPriority = 1;
5872 settings.iPref = EMdaPriorityPreferenceTime;
5873 settings.iState = EMMFStateIdle;
5876 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
5877 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
5879 // Set the format match data
5881 //---------------------//
5882 // Method being Tested //
5883 //---------------------//
5884 fSelect->SetMatchToFileNameL(_L("test.pav"));
5885 //---------------------//
5887 // Set the controller plugin play format match data
5888 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
5891 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
5892 CleanupResetAndDestroyPushL(controllers);
5893 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
5895 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // instantiate the controller
5898 //---------------------//
5899 // Method being Tested //
5900 //---------------------//
5902 versionNo = controllers[0]->Version();
5903 INFO_PRINTF2(_L("Controller Name:%d"),versionNo);
5905 if (expectVersionNo != versionNo)
5909 //--------------------//
5912 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
5913 controller1.Close();
5920 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
5927 //---------------------------------------------------------------
5930 CTestStep_MMF_CTLFRM_U_0144::CTestStep_MMF_CTLFRM_U_0144()
5934 // store the name of this test case
5935 // this is the name that is used by the script file
5936 // Each test step initialises it's own name
5937 iTestStepName = _L("MM-MMF-CTLFRM-U-0144");
5942 TVerdict CTestStep_MMF_CTLFRM_U_0144::DoTestStepL( void )
5943 /** As TSU_MMF_CTLFRM_U_0140
5946 * @test Req. under test REQ172.5.5 REQ172.5.5.13
5949 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
5952 TVerdict verdict = EPass;
5954 TMMFPrioritySettings settings;
5955 TInt error = KErrNone;
5956 RMMFController controller1;
5958 settings.iPriority = 1;
5959 settings.iPref = EMdaPriorityPreferenceTime;
5960 settings.iState = EMMFStateIdle;
5962 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
5963 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
5965 // Set the format match data
5967 fSelect->SetMatchToFileNameL(_L("test.pav"));
5969 // Set the controller plugin play format match data
5970 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
5973 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
5974 CleanupResetAndDestroyPushL(controllers);
5975 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
5977 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
5979 //---------------------//
5980 // Method being Tested //
5981 //---------------------//
5982 const RArray<TUid>& mediaIds = controllers[0]->SupportedMediaIds();
5984 TUid controllerUid = mediaIds[0];
5985 if (controllerUid == KExpectedMediaIDUid140)
5993 //--------------------//
5995 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
5996 controller1.Close();
6003 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
6009 //---------------------------------------------------------------
6012 CTestStep_MMF_CTLFRM_U_0145::CTestStep_MMF_CTLFRM_U_0145()
6016 // store the name of this test case
6017 // this is the name that is used by the script file
6018 // Each test step initialises it's own name
6019 iTestStepName = _L("MM-MMF-CTLFRM-U-0145");
6024 TVerdict CTestStep_MMF_CTLFRM_U_0145::DoTestStepL( void )
6025 /** As TSU_MMF_CTLFRM_U_0140
6028 * @test Req. under test REQ172.5.5 REQ172.5.5.13
6031 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
6034 TVerdict verdict = EPass;
6036 TMMFPrioritySettings settings;
6037 TInt error = KErrNone;
6038 RMMFController controller1;
6040 settings.iPriority = 1;
6041 settings.iPref = EMdaPriorityPreferenceTime;
6042 settings.iState = EMMFStateIdle;
6044 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
6045 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
6047 // Set the format match data
6049 //---------------------//
6050 // Method being Tested //
6051 //---------------------//
6052 fSelect->SetMatchToFileNameL(_L("test.pav"));
6053 //---------------------//
6055 // Set the controller plugin play format match data
6056 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
6059 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
6060 CleanupResetAndDestroyPushL(controllers);
6061 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
6063 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
6065 //---------------------//
6066 // Method being Tested //
6067 //---------------------//
6068 TBool supplierSupported = controllers[0]->SupportsSupplier(_L("TSU_MMF_CTLFRM"));
6070 if (!supplierSupported)
6074 //--------------------//
6076 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
6077 controller1.Close();
6084 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
6090 //---------------------------------------------------------------
6093 CTestStep_MMF_CTLFRM_U_0146::CTestStep_MMF_CTLFRM_U_0146()
6097 // store the name of this test case
6098 // this is the name that is used by the script file
6099 // Each test step initialises it's own name
6100 iTestStepName = _L("MM-MMF-CTLFRM-U-0146");
6105 TVerdict CTestStep_MMF_CTLFRM_U_0146::DoTestStepL( void )
6106 /** As TSU_MMF_CTLFRM_U_0140
6108 * @test Req. under test REQ172.5.5 REQ172.5.5.13
6111 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
6114 TVerdict verdict = EPass;
6116 TMMFPrioritySettings settings;
6117 TInt error = KErrNone;
6118 RMMFController controller1;
6120 settings.iPriority = 1;
6121 settings.iPref = EMdaPriorityPreferenceTime;
6122 settings.iState = EMMFStateIdle;
6124 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
6125 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
6127 // Set the format match data
6129 fSelect->SetMatchToFileNameL(_L("test.pav"));
6131 // Set the controller plugin play format match data
6132 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
6135 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
6136 CleanupResetAndDestroyPushL(controllers);
6137 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
6139 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
6141 //---------------------//
6142 // Method being Tested //
6143 //---------------------//
6144 TBool mediaSupported = controllers[0]->SupportsMediaId(KExpectedMediaIDUid140);
6146 if (!mediaSupported)
6150 //--------------------//
6152 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
6153 controller1.Close();
6160 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
6166 //---------------------------------------------------------------
6168 CTestStep_MMF_CTLFRM_U_0150::CTestStep_MMF_CTLFRM_U_0150()
6172 // store the name of this test case
6173 // this is the name that is used by the script file
6174 // Each test step initialises it's own name
6175 iTestStepName = _L("MM-MMF-CTLFRM-U-0150");
6180 TVerdict CTestStep_MMF_CTLFRM_U_0150::DoTestStepL( void )
6181 /** Instanciate a CMMFControllerPluginSelectionParameters and CMMFFormatSelectionParameters
6182 * set the parameters appropiately (See API Method Calls and Parameters) to obtain
6183 * controller Implementation Uid's in a CMMFControllerImplementationInformation Array to
6184 * open a controller. Check the details obtained to open the controller are correct. Open
6185 * the controller, check for errors and close the controller.
6186 * (Test CMMFControllerImplementationInformation API)
6189 * @test Req. under test REQ172.5.5 REQ172.5.5.13
6192 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
6195 TVerdict verdict = EPass;
6197 TMMFPrioritySettings settings;
6198 TInt error = KErrNone;
6199 RMMFController controller1;
6201 settings.iPriority = 1;
6202 settings.iPref = EMdaPriorityPreferenceTime;
6203 settings.iState = EMMFStateIdle;
6205 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
6206 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
6208 // Set the format match data
6210 fSelect->SetMatchToFileNameL(_L("test.pav"));
6212 // Set the controller plugin play format match data
6213 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
6216 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
6217 CleanupResetAndDestroyPushL(controllers);
6218 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
6220 //---------------------//
6221 // Method being Tested //
6222 //---------------------//
6223 RMMFFormatImplInfoArray controllersPlayFormats = controllers[0]->PlayFormats();
6224 INFO_PRINTF2(_L("Number of Play Formats: %d"),controllersPlayFormats.Count());
6226 TUid formatUid = controllersPlayFormats[0]->Uid();
6228 if (formatUid == KMmfUidFormatPAVReadUid ||
6229 formatUid == KMmfUidFormatFAWReadUid ||
6230 formatUid == KMmfUidFormatAIReadUid ||
6231 formatUid == KMmfUidFormatMBEGReadUid)
6239 //--------------------//
6241 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
6243 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
6244 controller1.Close();
6251 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
6257 //---------------------------------------------------------------
6260 CTestStep_MMF_CTLFRM_U_0151::CTestStep_MMF_CTLFRM_U_0151()
6264 // store the name of this test case
6265 // this is the name that is used by the script file
6266 // Each test step initialises it's own name
6267 iTestStepName = _L("MM-MMF-CTLFRM-U-0151");
6272 TVerdict CTestStep_MMF_CTLFRM_U_0151::DoTestStepL( void )
6273 /** As TSU_MMF_CTLFRM_U_0150
6275 * @test Req. under test REQ172.5.5 REQ172.5.5.13
6278 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
6281 TVerdict verdict = EPass;
6283 TMMFPrioritySettings settings;
6284 TInt error = KErrNone;
6285 RMMFController controller1;
6287 settings.iPriority = 1;
6288 settings.iPref = EMdaPriorityPreferenceTime;
6289 settings.iState = EMMFStateIdle;
6291 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
6292 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
6294 // Set the format match data
6295 fSelect->SetMatchToFileNameL(_L("test.ai"));
6297 // Set the controller plugin play format match data
6298 cSelect->SetRequiredRecordFormatSupportL(*fSelect);
6301 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
6302 CleanupResetAndDestroyPushL(controllers);
6303 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
6305 //---------------------//
6306 // Method being Tested //
6307 //---------------------//
6308 RMMFFormatImplInfoArray controllersRecordFormats = controllers[0]->RecordFormats();
6309 INFO_PRINTF2(_L("Number of Record Formats: %d"),controllersRecordFormats.Count());
6311 TUid formatUid = controllersRecordFormats[0]->Uid();
6313 if (formatUid == KMmfUidFormatPAVWriteUid ||
6314 formatUid == KMmfUidFormatFAWWriteUid ||
6315 formatUid == KMmfUidFormatAIWriteUid)
6323 //--------------------//
6325 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
6327 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
6328 controller1.Close();
6335 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
6341 //------------------------------------------------------------
6343 CTestStep_MMF_CTLFRM_U_0197::CTestStep_MMF_CTLFRM_U_0197()
6347 // store the name of this test case
6348 // this is the name that is used by the script file
6349 // Each test step initialises it's own name
6350 iTestStepName = _L("MM-MMF-CTLFRM-U-0197");
6355 TVerdict CTestStep_MMF_CTLFRM_U_0197::DoTestStepL( void )
6356 /** As TSU_MMF_CTLFRM_U_0140
6359 * @test Req. under test REQ172.5.5 REQ172.5.5.13
6363 _LIT8(KExpectedText, "rtsp");
6364 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
6367 TVerdict verdict = EPass;
6369 TMMFPrioritySettings settings;
6370 TInt error = KErrNone;
6371 RMMFController controller1;
6373 settings.iPriority = 1;
6374 settings.iPref = EMdaPriorityPreferenceTime;
6375 settings.iState = EMMFStateIdle;
6377 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
6378 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
6380 // Set the format match data
6381 fSelect->SetMatchToUriSupportL(_L("rtsp://www.symbian.com/first/test/directory/test.rm"));
6383 // Set the controller plugin play format match data
6384 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
6387 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
6388 CleanupResetAndDestroyPushL(controllers);
6389 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
6391 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
6393 //---------------------//
6394 // Method being Tested //
6395 //---------------------//
6396 const CDesC8Array* uriSchemes = &controllers[0]->SupportedUriSchemes();
6398 if (uriSchemes->Count() > 0)
6401 ptrC.Set(uriSchemes->MdcaPoint(0));
6403 if (ptrC.Compare(KExpectedText)==0)
6413 //--------------------//
6415 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
6416 controller1.Close();
6423 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
6431 //------------------------------------------------------------
6435 //---------------------------------------------------------------
6437 CTestStep_MMF_CTLFRM_U_0152::CTestStep_MMF_CTLFRM_U_0152()
6441 // store the name of this test case
6442 // this is the name that is used by the script file
6443 // Each test step initialises it's own name
6444 iTestStepName = _L("MM-MMF-CTLFRM-U-0152");
6452 TVerdict CTestStep_MMF_CTLFRM_U_0152::DoTestStepL( void )
6454 * Call the RMMFController::Open(..) for a number of controllers and determine what Heap size has been allocated.
6456 * This test needs access to the private member iSubThread in RMMFControllerProxy. To achieve this,
6457 * private has been #defined to public oprior to including MmfControllerFramework.h and them #undef.
6458 * This avoided the use of a friend declaration, but may later result in a maintenance problem.
6460 * Test for fix to INC038123
6464 INFO_PRINTF1(_L("The test step is not available on EKA2 - Skipping test!"));
6470 //---------------------------------------------------------------
6472 CTestStep_MMF_CTLFRM_U_0160::CTestStep_MMF_CTLFRM_U_0160()
6476 // store the name of this test case
6477 // this is the name that is used by the script file
6478 // Each test step initialises it's own name
6479 iTestStepName = _L("MM-MMF-CTLFRM-U-0160");
6484 TVerdict CTestStep_MMF_CTLFRM_U_0160::DoTestStepL( void )
6487 * @test Req. under test REQ172.5.5 REQ172.5.5.13
6490 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
6493 TVerdict verdict = EPass;
6494 _LIT8(KExpectedText, ".ai");
6497 TMMFPrioritySettings settings;
6498 TInt error = KErrNone;
6499 RMMFController controller1;
6501 settings.iPriority = 1;
6502 settings.iPref = EMdaPriorityPreferenceTime;
6503 settings.iState = EMMFStateIdle;
6505 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
6506 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
6508 // Set the format match data
6509 fSelect->SetMatchToFileNameL(_L("test.ai"));
6512 // Set the controller plugin play format match data
6513 cSelect->SetRequiredRecordFormatSupportL(*fSelect);
6516 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
6517 CleanupResetAndDestroyPushL(controllers);
6518 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
6519 if (controllers.Count() > 0 )
6521 RMMFFormatImplInfoArray controllersRecordFormats = controllers[0]->RecordFormats();
6522 INFO_PRINTF2(_L("Number of Record Formats: %d"),controllersRecordFormats.Count());
6523 for (TInt recordFormatCount = 0;recordFormatCount < controllersRecordFormats.Count();recordFormatCount++)
6525 //---------------------//
6526 // Method being Tested //
6527 const CDesC8Array* fileExtensions = &controllersRecordFormats[recordFormatCount]->SupportedFileExtensions();
6528 //---------------------//
6529 if (fileExtensions->Count() > 0)
6532 ptrC.Set(fileExtensions->MdcaPoint(0));
6533 if (ptrC.Compare(KExpectedText)==0)
6549 if (controllers.Count() >0)//if loop added so that it will enter into loop only if Controller count >0
6551 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
6552 controller1.Close();
6554 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
6559 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
6564 //---------------------------------------------------------------
6568 CTestStep_MMF_CTLFRM_U_0161::CTestStep_MMF_CTLFRM_U_0161()
6572 // store the name of this test case
6573 // this is the name that is used by the script file
6574 // Each test step initialises it's own name
6575 iTestStepName = _L("MM-MMF-CTLFRM-U-0161");
6580 TVerdict CTestStep_MMF_CTLFRM_U_0161::DoTestStepL( void )
6583 * @test Req. under test REQ172.5.5 REQ172.5.5.13
6586 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
6589 TVerdict verdict = EPass;
6590 _LIT8(KExpectedText,"audio/mbeg");
6592 TMMFPrioritySettings settings;
6593 TInt error = KErrNone;
6594 RMMFController controller1;
6596 settings.iPriority = 1;
6597 settings.iPref = EMdaPriorityPreferenceTime;
6598 settings.iState = EMMFStateIdle;
6600 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
6601 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
6603 // Set the format match data
6604 fSelect->SetMatchToFileNameL(_L("test.pav"));
6606 // Set the controller plugin play format match data
6607 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
6608 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
6611 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
6612 CleanupResetAndDestroyPushL(controllers);
6613 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
6615 if (controllers.Count() > 0)
6617 RMMFFormatImplInfoArray controllersPlayFormats = controllers[0]->PlayFormats();
6618 INFO_PRINTF2(_L("Number of Play Formats: %d"),controllersPlayFormats.Count());
6620 if (controllersPlayFormats.Count() > 0)
6622 //---------------------//
6623 // Method being Tested //
6624 const CDesC8Array* mimeTypes = &controllersPlayFormats[1]->SupportedMimeTypes();
6625 //---------------------//
6627 if (mimeTypes->Count() <= 0)
6634 ptrC.Set(mimeTypes->MdcaPoint(0));
6635 if (ptrC.Compare(KExpectedText) == 0)
6656 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
6658 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
6659 controller1.Close();
6666 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
6672 //---------------------------------------------------------------
6675 CTestStep_MMF_CTLFRM_U_0162::CTestStep_MMF_CTLFRM_U_0162()
6679 // store the name of this test case
6680 // this is the name that is used by the script file
6681 // Each test step initialises it's own name
6682 iTestStepName = _L("MM-MMF-CTLFRM-U-0162");
6687 TVerdict CTestStep_MMF_CTLFRM_U_0162::DoTestStepL( void )
6690 * @test Req. under test REQ172.5.5 REQ172.5.5.13
6693 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
6696 TVerdict verdict = EPass;
6697 _LIT8(KExpectedText, "RIFF????PAVE");
6699 TMMFPrioritySettings settings;
6700 TInt error = KErrNone;
6701 RMMFController controller1;
6703 settings.iPriority = 1;
6704 settings.iPref = EMdaPriorityPreferenceTime;
6705 settings.iState = EMMFStateIdle;
6707 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
6708 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
6710 // Set the format match data
6711 fSelect->SetMatchToFileNameL(_L("test.pav"));
6713 // Set the controller plugin play format match data
6714 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
6715 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
6718 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
6719 CleanupResetAndDestroyPushL(controllers);
6720 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
6722 //---------------------//
6723 // Method being Tested //
6724 //---------------------//
6725 RMMFFormatImplInfoArray controllersPlayFormats = controllers[0]->PlayFormats();
6726 INFO_PRINTF2(_L("Number of Play Formats: %d"),controllersPlayFormats.Count());
6728 if (controllersPlayFormats.Count() > 0)
6730 //---------------------//
6731 // Method being Tested //
6732 const CDesC8Array* headerData = &controllersPlayFormats[0]->SupportedHeaderData();
6733 //---------------------//
6735 if (headerData->Count() <= 0)
6742 ptrC.Set(headerData->MdcaPoint(0));
6743 if (ptrC.Compare(KExpectedText)==0)
6758 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
6760 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
6761 controller1.Close();
6768 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
6774 //---------------------------------------------------------------
6777 CTestStep_MMF_CTLFRM_U_0163::CTestStep_MMF_CTLFRM_U_0163()
6781 // store the name of this test case
6782 // this is the name that is used by the script file
6783 // Each test step initialises it's own name
6784 iTestStepName = _L("MM-MMF-CTLFRM-U-0163");
6789 TVerdict CTestStep_MMF_CTLFRM_U_0163::DoTestStepL( void )
6792 * @test Req. under test REQ172.5.5 REQ172.5.5.13
6795 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
6798 TVerdict verdict = EPass;
6799 _LIT8(KExpectedText, ".ai");
6801 TMMFPrioritySettings settings;
6802 TInt error = KErrNone;
6803 RMMFController controller1;
6805 settings.iPriority = 1;
6806 settings.iPref = EMdaPriorityPreferenceTime;
6807 settings.iState = EMMFStateIdle;
6809 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
6810 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
6812 // Set the format match data
6813 fSelect->SetMatchToFileNameL(_L("test.ai"));
6815 // Set the controller plugin play format match data
6816 cSelect->SetRequiredRecordFormatSupportL(*fSelect);
6817 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
6820 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
6821 CleanupResetAndDestroyPushL(controllers);
6822 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
6823 if (controllers.Count() > 0)
6825 //---------------------//
6826 // Method being Tested //
6827 //---------------------//
6828 RMMFFormatImplInfoArray controllersRecordFormats = controllers[0]->RecordFormats();
6829 INFO_PRINTF2(_L("Number of Record Formats: %d"),controllersRecordFormats.Count());
6830 TBufC8<32> bufC8Expected;
6831 bufC8Expected = KExpectedText;
6832 for (TInt recordFormatCount=0;recordFormatCount<controllersRecordFormats.Count();recordFormatCount++)
6834 TBool fileExtensionSupported = controllersRecordFormats[recordFormatCount]->SupportsFileExtension(bufC8Expected);
6835 if (fileExtensionSupported)
6840 else if (!fileExtensionSupported)
6851 if (controllers.Count() >0) //if loop added so that it will enter into loop only if Controller count >0
6853 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
6854 controller1.Close();
6856 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
6862 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
6868 //---------------------------------------------------------------
6872 CTestStep_MMF_CTLFRM_U_0164::CTestStep_MMF_CTLFRM_U_0164()
6876 // store the name of this test case
6877 // this is the name that is used by the script file
6878 // Each test step initialises it's own name
6879 iTestStepName = _L("MM-MMF-CTLFRM-U-0164");
6884 TVerdict CTestStep_MMF_CTLFRM_U_0164::DoTestStepL( void )
6887 * @test Req. under test REQ172.5.5 REQ172.5.5.13
6890 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
6893 TVerdict verdict = EPass;
6894 _LIT8(KExpectedText, "audio/mbeg");
6896 TMMFPrioritySettings settings;
6897 TInt error = KErrNone;
6898 RMMFController controller1;
6900 settings.iPriority = 1;
6901 settings.iPref = EMdaPriorityPreferenceTime;
6902 settings.iState = EMMFStateIdle;
6904 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
6905 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
6907 // Set the format match data
6908 fSelect->SetMatchToFileNameL(_L("test.mp3"));
6910 // Set the controller plugin play format match data
6911 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
6912 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
6915 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
6916 CleanupResetAndDestroyPushL(controllers);
6917 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
6919 //---------------------//
6920 // Method being Tested //
6921 //---------------------//
6922 RMMFFormatImplInfoArray controllersPlayFormats = controllers[0]->PlayFormats();
6923 INFO_PRINTF2(_L("Number of Play Formats: %d"),controllersPlayFormats.Count());
6925 if (controllersPlayFormats.Count() > 0)
6927 TBufC8<32> bufC8Expected;
6928 bufC8Expected = KExpectedText;
6929 //---------------------//
6930 // Method being Tested //
6931 TBool mimeTypeSupported = controllersPlayFormats[1]->SupportsMimeType(bufC8Expected);
6932 //---------------------//
6934 if (!mimeTypeSupported)
6944 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
6946 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
6947 controller1.Close();
6954 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
6960 //---------------------------------------------------------------
6963 CTestStep_MMF_CTLFRM_U_0165::CTestStep_MMF_CTLFRM_U_0165()
6967 // store the name of this test case
6968 // this is the name that is used by the script file
6969 // Each test step initialises it's own name
6970 iTestStepName = _L("MM-MMF-CTLFRM-U-0165");
6975 TVerdict CTestStep_MMF_CTLFRM_U_0165::DoTestStepL( void )
6978 * @test Req. under test REQ172.5.5 REQ172.5.5.13
6981 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
6984 TVerdict verdict = EPass;
6985 _LIT8(KExpectedText, "RIFF????PAVE");
6987 TMMFPrioritySettings settings;
6988 TInt error = KErrNone;
6989 RMMFController controller1;
6991 settings.iPriority = 1;
6992 settings.iPref = EMdaPriorityPreferenceTime;
6993 settings.iState = EMMFStateIdle;
6995 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
6996 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
6998 // Set the format match data
6999 fSelect->SetMatchToFileNameL(_L("test.pav"));
7001 // Set the controller plugin play format match data
7002 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
7003 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
7006 RMMFControllerImplInfoArray controllers; // Array to hold all the controllers support the match data
7007 CleanupResetAndDestroyPushL(controllers);
7008 cSelect->ListImplementationsL(controllers); // Populates the array with all the suitable controllers
7010 //---------------------//
7011 // Method being Tested //
7012 //---------------------//
7013 RMMFFormatImplInfoArray controllersPlayFormats = controllers[0]->PlayFormats();
7014 INFO_PRINTF2(_L("Number of Play Formats: %d"),controllersPlayFormats.Count());
7016 if (controllersPlayFormats.Count() > 0)
7018 TBufC8<32> bufC8Expected;
7019 bufC8Expected = KExpectedText;
7020 //---------------------//
7021 // Method being Tested //
7022 TBool headerDataSupported = controllersPlayFormats[0]->SupportsHeaderDataL(bufC8Expected);
7023 //---------------------//
7025 if (!headerDataSupported)
7035 User::LeaveIfError(error = controller1.Open(controllers[0]->Uid(), settings)); // iinstantiate the controller
7037 CleanupStack::PopAndDestroy(3);//controllers, fSelect, cSelect
7038 controller1.Close();
7045 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
7051 //---------------------------------------------------------------
7055 CTestStep_MMF_CTLFRM_U_0170::CTestStep_MMF_CTLFRM_U_0170()
7059 // store the name of this test case
7060 // this is the name that is used by the script file
7061 // Each test step initialises it's own name
7062 iTestStepName = _L("MM-MMF-CTLFRM-U-0170");
7067 TVerdict CTestStep_MMF_CTLFRM_U_0170::DoTestStepL( void )
7070 * @test Req. under test REQ172.5.5 REQ172.5.5.13
7073 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
7076 TVerdict verdict = EPass;
7077 // TMMFPrioritySettings settings; //EABI warning removal
7079 // settings.iPriority = 1;
7080 // settings.iPref = EMdaPriorityPreferenceTime;
7081 // settings.iState = EMMFStateIdle;
7083 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
7084 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
7086 CMMFFormatEncodePluginSelectionParameters* fEncodeSelect = CMMFFormatEncodePluginSelectionParameters::NewLC();
7088 // Set the format match data
7089 fSelect->SetMatchToFileNameL(_L("test.pav"));
7091 // Set the controller plugin play format match data
7092 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
7093 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
7096 fEncodeSelect->SetRequiredFormatSupportL(*fSelect);
7098 //---------------------//
7099 // Method being Tested //
7100 //---------------------//
7101 fEncodeSelect->SetPreferredSupplierL(_L("Symbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
7102 //---------------------//
7104 // Get Encode Format(s)
7105 RMMFFormatImplInfoArray formats;
7106 CleanupResetAndDestroyPushL(formats);
7107 fEncodeSelect->ListImplementationsL(formats);
7110 // Check the Uid is correct, hense the correct interface has been obtained
7112 formatUid = formats[0]->Uid();
7113 if (formatUid == KMmfUidFormatPAVWriteUid)
7122 CleanupStack::PopAndDestroy(4);//formats, fSelect, cSelect, fEncodeSelect
7124 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
7130 //---------------------------------------------------------------
7132 CTestStep_MMF_CTLFRM_U_0171::CTestStep_MMF_CTLFRM_U_0171()
7136 // store the name of this test case
7137 // this is the name that is used by the script file
7138 // Each test step initialises it's own name
7139 iTestStepName = _L("MM-MMF-CTLFRM-U-0171");
7144 TVerdict CTestStep_MMF_CTLFRM_U_0171::DoTestStepL( void )
7150 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
7153 TVerdict verdict = EPass;
7154 // TMMFPrioritySettings settings; //EABI warning removal
7156 // settings.iPriority = 1;
7157 // settings.iPref = EMdaPriorityPreferenceTime;
7158 // settings.iState = EMMFStateIdle;
7160 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
7161 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
7163 CMMFFormatEncodePluginSelectionParameters* fEncodeSelect = CMMFFormatEncodePluginSelectionParameters::NewLC();
7165 // Set the format match data
7166 fSelect->SetMatchToFileNameL(_L("test.pav"));
7168 // Set the controller plugin play format match data
7169 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
7170 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
7172 fEncodeSelect->SetRequiredFormatSupportL(*fSelect);
7174 fEncodeSelect->SetPreferredSupplierL(_L("Symbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
7176 //---------------------//
7178 // Get Encode Format(s)
7179 RMMFFormatImplInfoArray formats;
7180 CleanupResetAndDestroyPushL(formats);
7181 fEncodeSelect->ListImplementationsL(formats);
7184 RArray<TUid> mediaIds;
7186 //---------------------//
7187 // Method being Tested //
7188 //---------------------//
7189 fEncodeSelect->SetMediaIdsL(mediaIds, CMMFPluginSelectionParameters::EAllowOnlySuppliedMediaIds);
7190 //---------------------//
7192 TUid uid = {0x101FF9FF};
7194 if (mediaIds.Count() > 0)
7196 if (mediaIds[0] == uid)
7206 // Check the Uid is correct, hense the correct interface has been obtained
7208 formatUid = formats[0]->Uid();
7209 if (formatUid == KMmfUidFormatPAVWriteUid)
7218 CleanupStack::PopAndDestroy(4);//formats, fSelect, cSelect, fEncodeSelect
7220 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
7226 //---------------------------------------------------------------
7229 CTestStep_MMF_CTLFRM_U_0172::CTestStep_MMF_CTLFRM_U_0172()
7233 // store the name of this test case
7234 // this is the name that is used by the script file
7235 // Each test step initialises it's own name
7236 iTestStepName = _L("MM-MMF-CTLFRM-U-0172");
7241 TVerdict CTestStep_MMF_CTLFRM_U_0172::DoTestStepL( void )
7244 * @test Req. under test
7247 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
7250 TVerdict verdict = EPass;
7251 _LIT(KExpectedText, "Symbian");
7253 // TMMFPrioritySettings settings; //EABI warning removal
7255 // settings.iPriority = 1;
7256 // settings.iPref = EMdaPriorityPreferenceTime;
7257 // settings.iState = EMMFStateIdle;
7259 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
7260 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
7262 CMMFFormatEncodePluginSelectionParameters* fEncodeSelect = CMMFFormatEncodePluginSelectionParameters::NewLC();
7264 // Set the format match data
7265 fSelect->SetMatchToFileNameL(_L("test.pav"));
7267 // Set the controller plugin play format match data
7268 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
7269 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
7271 fEncodeSelect->SetRequiredFormatSupportL(*fSelect);
7273 fEncodeSelect->SetPreferredSupplierL(_L("Symbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
7274 //---------------------//
7276 // Get Encode Format(s)
7277 RMMFFormatImplInfoArray formats;
7278 CleanupResetAndDestroyPushL(formats);
7279 fEncodeSelect->ListImplementationsL(formats);
7281 //---------------------//
7282 // Method being Tested //
7283 //---------------------//
7284 TBufC<12> bufC = fEncodeSelect->PreferredSupplier();
7285 //---------------------//
7287 if ((bufC == KExpectedText) && (verdict == EPass))
7296 // Check the Uid is correct, hense the correct interface has been obtained
7298 formatUid = formats[0]->Uid();
7299 if (formatUid == KMmfUidFormatPAVWriteUid && verdict == EPass)
7308 CleanupStack::PopAndDestroy(4);//formats, fSelect, cSelect, fEncodeSelect
7310 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
7316 //---------------------------------------------------------------
7319 CTestStep_MMF_CTLFRM_U_0173::CTestStep_MMF_CTLFRM_U_0173()
7323 // store the name of this test case
7324 // this is the name that is used by the script file
7325 // Each test step initialises it's own name
7326 iTestStepName = _L("MM-MMF-CTLFRM-U-0173");
7331 TVerdict CTestStep_MMF_CTLFRM_U_0173::DoTestStepL( void )
7334 * @test Req. under test
7337 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
7340 TVerdict verdict = EPass;
7341 // TMMFPrioritySettings settings; //EABI warning removal
7343 // settings.iPriority = 1;
7344 // settings.iPref = EMdaPriorityPreferenceTime;
7345 // settings.iState = EMMFStateIdle;
7347 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
7348 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
7350 CMMFFormatEncodePluginSelectionParameters* fEncodeSelect = CMMFFormatEncodePluginSelectionParameters::NewLC();
7352 // Set the format match data
7353 fSelect->SetMatchToFileNameL(_L("test.pav"));
7355 // Set the controller plugin play format match data
7356 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
7357 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
7359 fEncodeSelect->SetRequiredFormatSupportL(*fSelect);
7361 fEncodeSelect->SetPreferredSupplierL(_L("Symbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
7362 //---------------------//
7364 // Get Encode Format(s)
7365 RMMFFormatImplInfoArray formats;
7366 CleanupResetAndDestroyPushL(formats);
7367 fEncodeSelect->ListImplementationsL(formats);
7369 //---------------------//
7370 // Method being Tested //
7371 //---------------------//
7372 if ((fEncodeSelect->PreferredSupplierMatchType() == CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned) && (verdict == EPass))
7380 //---------------------//
7382 // Check the Uid is correct, hense the correct interface has been obtained
7384 formatUid = formats[0]->Uid();
7385 if (formatUid == KMmfUidFormatPAVWriteUid && verdict == EPass)
7394 CleanupStack::PopAndDestroy(4);//formats, fSelect, cSelect, fEncodeSelect
7396 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
7402 //---------------------------------------------------------------
7405 CTestStep_MMF_CTLFRM_U_0174::CTestStep_MMF_CTLFRM_U_0174()
7409 // store the name of this test case
7410 // this is the name that is used by the script file
7411 // Each test step initialises it's own name
7412 iTestStepName = _L("MM-MMF-CTLFRM-U-0174");
7417 TVerdict CTestStep_MMF_CTLFRM_U_0174::DoTestStepL( void )
7420 * @test Req. under test
7423 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
7426 TVerdict verdict = EPass;
7427 // TMMFPrioritySettings settings; //EABI warning removal
7429 // settings.iPriority = 1;
7430 // settings.iPref = EMdaPriorityPreferenceTime;
7431 // settings.iState = EMMFStateIdle;
7433 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
7434 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
7436 CMMFFormatEncodePluginSelectionParameters* fEncodeSelect = CMMFFormatEncodePluginSelectionParameters::NewLC();
7438 // Set the format match data
7439 fSelect->SetMatchToFileNameL(_L("test.pav"));
7441 // Set the controller plugin play format match data
7442 cSelect->SetRequiredRecordFormatSupportL(*fSelect);
7443 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
7445 fEncodeSelect->SetRequiredFormatSupportL(*fSelect);
7447 fEncodeSelect->SetPreferredSupplierL(_L("Symbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
7448 //---------------------//
7450 // Get Encode Format(s)
7451 RMMFFormatImplInfoArray formats;
7452 CleanupResetAndDestroyPushL(formats);
7453 fEncodeSelect->ListImplementationsL(formats);
7455 TUid testUid = {0x12345679};
7456 RArray<TUid> mediaIdsToAdd;
7457 mediaIdsToAdd.Append(testUid);
7459 fEncodeSelect->SetMediaIdsL(mediaIdsToAdd, CMMFPluginSelectionParameters::EAllowOtherMediaIds);
7461 //---------------------//
7462 // Method being Tested //
7463 //---------------------//
7464 const RArray<TUid>& mediaIds = fEncodeSelect->MediaIds();
7465 //---------------------//
7467 if (mediaIds.Count() > 0)
7469 TUid uid = {0x12345679};
7471 if (mediaIds[0] == uid)
7485 // Check the Uid is correct, hense the correct interface has been obtained
7487 formatUid = formats[0]->Uid();
7488 if (formatUid == KMmfUidFormatPAVWriteUid && verdict == EPass)
7498 mediaIdsToAdd.Remove(0); // Remove otherwise TUid will be destroyed below and Panic.
7499 mediaIdsToAdd.Close();
7501 CleanupStack::PopAndDestroy(4);// formats, fSelect, cSelect, fEncodeSelect
7503 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
7509 //---------------------------------------------------------------
7511 CTestStep_MMF_CTLFRM_U_0175::CTestStep_MMF_CTLFRM_U_0175()
7515 // store the name of this test case
7516 // this is the name that is used by the script file
7517 // Each test step initialises it's own name
7518 iTestStepName = _L("MM-MMF-CTLFRM-U-0175");
7523 TVerdict CTestStep_MMF_CTLFRM_U_0175::DoTestStepL( void )
7526 * @test Req. under test
7529 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
7532 TVerdict verdict = EPass;
7533 // TMMFPrioritySettings settings; //EABI warning removal
7535 // settings.iPriority = 1;
7536 // settings.iPref = EMdaPriorityPreferenceTime;
7537 // settings.iState = EMMFStateIdle;
7539 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
7540 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
7542 CMMFFormatEncodePluginSelectionParameters* fEncodeSelect = CMMFFormatEncodePluginSelectionParameters::NewLC();
7544 // Set the format match data
7545 fSelect->SetMatchToFileNameL(_L("test.pav"));
7547 // Set the controller plugin play format match data
7548 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
7549 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
7551 fEncodeSelect->SetRequiredFormatSupportL(*fSelect);
7553 fEncodeSelect->SetPreferredSupplierL(_L("Symbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
7554 //---------------------//
7556 // Get Encode Format(s)
7557 RMMFFormatImplInfoArray formats;
7558 CleanupResetAndDestroyPushL(formats);
7559 fEncodeSelect->ListImplementationsL(formats);
7561 //---------------------//
7562 // Method being Tested //
7563 //---------------------//
7564 if ((fEncodeSelect->MediaIdMatchType() == CMMFPluginSelectionParameters::ENoMediaIdMatch) && (verdict == EPass))
7572 //---------------------//
7574 // Check the Uid is correct, hense the correct interface has been obtained
7576 formatUid = formats[0]->Uid();
7577 if (formatUid == KMmfUidFormatPAVWriteUid && verdict == EPass)
7586 CleanupStack::PopAndDestroy(4);//formats, fSelect, cSelect, fEncodeSelect
7588 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
7594 //---------------------------------------------------------------
7596 CTestStep_MMF_CTLFRM_U_0176::CTestStep_MMF_CTLFRM_U_0176()
7600 // store the name of this test case
7601 // this is the name that is used by the script file
7602 // Each test step initialises it's own name
7603 iTestStepName = _L("MM-MMF-CTLFRM-U-0176");
7608 TVerdict CTestStep_MMF_CTLFRM_U_0176::DoTestStepL( void )
7611 * @test Req. under test
7614 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
7617 TVerdict verdict = EPass;
7618 // TMMFPrioritySettings settings; //EABI warning removal
7620 // settings.iPriority = 1;
7621 // settings.iPref = EMdaPriorityPreferenceTime;
7622 // settings.iState = EMMFStateIdle;
7624 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
7625 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
7627 CMMFFormatEncodePluginSelectionParameters* fEncodeSelect = CMMFFormatEncodePluginSelectionParameters::NewLC();
7629 // Set the format match data
7630 fSelect->SetMatchToFileNameL(_L("test.pav"));
7632 // Set the controller plugin play format match data
7633 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
7634 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
7636 fEncodeSelect->SetRequiredFormatSupportL(*fSelect);
7638 fEncodeSelect->SetPreferredSupplierL(_L("Symbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
7639 //---------------------//
7641 // Get Encode Format(s)
7642 RMMFFormatImplInfoArray formats;
7643 CleanupResetAndDestroyPushL(formats);
7644 fEncodeSelect->ListImplementationsL(formats);
7646 //---------------------//
7647 // Method being Tested //
7648 //---------------------//
7649 TUid uid = fEncodeSelect->InterfaceUid();
7650 //---------------------//
7652 if (uid == KMmfUidPluginInterfaceFormatEncodeUid)
7663 // Check the Uid is correct, hense the correct interface has been obtained
7665 formatUid = formats[0]->Uid();
7666 if (formatUid == KMmfUidFormatPAVWriteUid && verdict == EPass)
7675 CleanupStack::PopAndDestroy(4);//formats, fSelect, cSelect, fEncodeSelect
7677 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
7683 //---------------------------------------------------------------
7687 CTestStep_MMF_CTLFRM_U_0180::CTestStep_MMF_CTLFRM_U_0180()
7691 // store the name of this test case
7692 // this is the name that is used by the script file
7693 // Each test step initialises it's own name
7694 iTestStepName = _L("MM-MMF-CTLFRM-U-0180");
7699 TVerdict CTestStep_MMF_CTLFRM_U_0180::DoTestStepL( void )
7702 * @test Req. under test
7705 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
7708 TVerdict verdict = EPass;
7709 // TMMFPrioritySettings settings; //EABI warning removal
7711 // settings.iPriority = 1;
7712 // settings.iPref = EMdaPriorityPreferenceTime;
7713 // settings.iState = EMMFStateIdle;
7715 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
7716 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
7718 CMMFFormatEncodePluginSelectionParameters* fEncodeSelect = CMMFFormatEncodePluginSelectionParameters::NewLC();
7720 // Set the format match data
7721 fSelect->SetMatchToFileNameL(_L("test.pav"));
7723 // Set the controller plugin play format match data
7724 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
7725 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
7728 fEncodeSelect->SetRequiredFormatSupportL(*fSelect);
7730 //---------------------//
7731 // Method being Tested //
7732 //---------------------//
7733 fEncodeSelect->SetPreferredSupplierL(_L("Simbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
7734 //---------------------//
7736 // Get Encode Format(s)
7737 RMMFFormatImplInfoArray formats;
7738 CleanupResetAndDestroyPushL(formats);
7739 fEncodeSelect->ListImplementationsL(formats);
7742 // Check the Uid is correct, hense the correct interface has been obtained
7745 if (formats.Count() > 0)
7747 formatUid = formats[0]->Uid();
7748 if (formatUid == KMmfUidFormatPAVWriteUid)
7750 verdict = EFail; // Wrong if correct ID occurs
7762 CleanupStack::PopAndDestroy(4);//formats, fSelect, cSelect, fEncodeSelect
7764 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
7770 //---------------------------------------------------------------
7772 CTestStep_MMF_CTLFRM_U_0181::CTestStep_MMF_CTLFRM_U_0181()
7776 // store the name of this test case
7777 // this is the name that is used by the script file
7778 // Each test step initialises it's own name
7779 iTestStepName = _L("MM-MMF-CTLFRM-U-0181");
7784 TVerdict CTestStep_MMF_CTLFRM_U_0181::DoTestStepL( void )
7787 * @test Req. under test
7790 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
7793 TVerdict verdict = EPass;
7795 // TMMFPrioritySettings settings; //EABI warning removal
7797 // settings.iPriority = 1;
7798 // settings.iPref = EMdaPriorityPreferenceTime;
7799 // settings.iState = EMMFStateIdle;
7801 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
7802 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
7804 CMMFFormatEncodePluginSelectionParameters* fEncodeSelect = CMMFFormatEncodePluginSelectionParameters::NewLC();
7806 // Set the format match data
7807 fSelect->SetMatchToFileNameL(_L("test.pav"));
7809 // Set the controller plugin play format match data
7810 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
7811 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
7813 fEncodeSelect->SetRequiredFormatSupportL(*fSelect);
7815 fEncodeSelect->SetPreferredSupplierL(_L("Symbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
7817 //---------------------//
7819 // Get Encode Format(s)
7820 RMMFFormatImplInfoArray formats;
7821 CleanupResetAndDestroyPushL(formats);
7822 fEncodeSelect->ListImplementationsL(formats);
7825 RArray<TUid> mediaIds;
7827 //---------------------//
7828 // Method being Tested //
7829 //---------------------//
7830 // Incorrect Enum Passed
7831 fEncodeSelect->SetMediaIdsL(mediaIds, CMMFPluginSelectionParameters::EAllowOtherMediaIds);
7832 //---------------------//
7834 TUid uid = {0x101FF9FF};
7836 // Should return nothing
7837 if (mediaIds.Count() > 0)
7839 if (mediaIds[0] == uid)
7849 CleanupStack::PopAndDestroy(4);//formats, fSelect, cSelect, fEncodeSelect
7851 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
7857 //---------------------------------------------------------------
7860 CTestStep_MMF_CTLFRM_U_0182::CTestStep_MMF_CTLFRM_U_0182()
7864 // store the name of this test case
7865 // this is the name that is used by the script file
7866 // Each test step initialises it's own name
7867 iTestStepName = _L("MM-MMF-CTLFRM-U-0182");
7872 TVerdict CTestStep_MMF_CTLFRM_U_0182::DoTestStepL( void )
7875 * @test Req. under test
7878 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
7881 TVerdict verdict = EPass;
7882 _LIT(KExpectedText, "Symbian");
7884 // TMMFPrioritySettings settings; //EABI warning removal
7886 // settings.iPriority = 1;
7887 // settings.iPref = EMdaPriorityPreferenceTime;
7888 // settings.iState = EMMFStateIdle;
7890 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
7891 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
7893 CMMFFormatEncodePluginSelectionParameters* fEncodeSelect = CMMFFormatEncodePluginSelectionParameters::NewLC();
7895 // Set the format match data
7896 fSelect->SetMatchToFileNameL(_L("test.pav"));
7898 // Set the controller plugin play format match data
7899 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
7900 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
7902 fEncodeSelect->SetRequiredFormatSupportL(*fSelect);
7904 fEncodeSelect->SetPreferredSupplierL(_L("Simbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
7905 //---------------------//
7907 // Get Encode Format(s)
7908 RMMFFormatImplInfoArray formats;
7909 CleanupResetAndDestroyPushL(formats);
7910 fEncodeSelect->ListImplementationsL(formats);
7912 //---------------------//
7913 // Method being Tested //
7914 //---------------------//
7915 TBufC<12> bufC = fEncodeSelect->PreferredSupplier();
7916 //---------------------//
7918 // Shouldn't return Symbian, should be Simbian
7919 if ((bufC == KExpectedText) && (verdict == EPass))
7928 CleanupStack::PopAndDestroy(4);//formats, fSelect, cSelect, fEncodeSelect
7930 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
7936 //---------------------------------------------------------------
7939 CTestStep_MMF_CTLFRM_U_0183::CTestStep_MMF_CTLFRM_U_0183()
7943 // store the name of this test case
7944 // this is the name that is used by the script file
7945 // Each test step initialises it's own name
7946 iTestStepName = _L("MM-MMF-CTLFRM-U-0183");
7951 TVerdict CTestStep_MMF_CTLFRM_U_0183::DoTestStepL( void )
7954 * @test Req. under test
7957 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
7960 TVerdict verdict = EPass;
7961 // TMMFPrioritySettings settings; //EABI warning removal
7963 // settings.iPriority = 1;
7964 // settings.iPref = EMdaPriorityPreferenceTime;
7965 // settings.iState = EMMFStateIdle;
7967 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
7968 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
7970 CMMFFormatEncodePluginSelectionParameters* fEncodeSelect = CMMFFormatEncodePluginSelectionParameters::NewLC();
7972 // Set the format match data
7973 fSelect->SetMatchToFileNameL(_L("test.pav"));
7975 // Set the controller plugin play format match data
7976 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
7977 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
7979 fEncodeSelect->SetRequiredFormatSupportL(*fSelect);
7981 fEncodeSelect->SetPreferredSupplierL(_L("Symbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
7982 //---------------------//
7984 // Get Encode Format(s)
7985 RMMFFormatImplInfoArray formats;
7986 CleanupResetAndDestroyPushL(formats);
7987 fEncodeSelect->ListImplementationsL(formats);
7989 //---------------------//
7990 // Method being Tested //
7991 //---------------------//
7992 if ((fEncodeSelect->PreferredSupplierMatchType() == CMMFPluginSelectionParameters::ENoPreferredSupplierMatch) && (verdict == EFail))
8000 //---------------------//
8002 CleanupStack::PopAndDestroy(4);//formats, fSelect, cSelect, fEncodeSelect
8004 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
8010 //---------------------------------------------------------------
8013 CTestStep_MMF_CTLFRM_U_0184::CTestStep_MMF_CTLFRM_U_0184()
8017 // store the name of this test case
8018 // this is the name that is used by the script file
8019 // Each test step initialises it's own name
8020 iTestStepName = _L("MM-MMF-CTLFRM-U-0184");
8025 TVerdict CTestStep_MMF_CTLFRM_U_0184::DoTestStepL( void )
8028 * @test Req. under test
8031 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
8034 TVerdict verdict = EPass;
8035 // TMMFPrioritySettings settings; //EABI warning removal
8037 // settings.iPriority = 1;
8038 // settings.iPref = EMdaPriorityPreferenceTime;
8039 // settings.iState = EMMFStateIdle;
8041 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
8042 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
8044 CMMFFormatEncodePluginSelectionParameters* fEncodeSelect = CMMFFormatEncodePluginSelectionParameters::NewLC();
8046 // Set the format match data
8047 fSelect->SetMatchToFileNameL(_L("test.pav"));
8049 // Set the controller plugin play format match data
8050 cSelect->SetRequiredRecordFormatSupportL(*fSelect);
8051 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
8053 fEncodeSelect->SetRequiredFormatSupportL(*fSelect);
8055 fEncodeSelect->SetPreferredSupplierL(_L("Simbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
8056 //---------------------//
8058 // Get Encode Format(s)
8059 RMMFFormatImplInfoArray formats;
8060 CleanupResetAndDestroyPushL(formats);
8061 fEncodeSelect->ListImplementationsL(formats);
8063 RArray<TUid> mediaIdsToAdd;
8066 fEncodeSelect->SetMediaIdsL(mediaIdsToAdd, CMMFPluginSelectionParameters::EAllowOtherMediaIds);
8069 //---------------------//
8070 // Method being Tested //
8071 //---------------------//
8072 const RArray<TUid>& mediaIds = fEncodeSelect->MediaIds();
8073 //---------------------//
8075 if (mediaIds.Count() > 0)
8077 TUid uid = {0x12345679};
8078 if (mediaIds[0] == uid)
8092 mediaIdsToAdd.Close();
8094 CleanupStack::PopAndDestroy(4);//formats, fSelect, cSelect, fEncodeSelect
8096 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
8102 //---------------------------------------------------------------
8105 CTestStep_MMF_CTLFRM_U_0190::CTestStep_MMF_CTLFRM_U_0190()
8109 // store the name of this test case
8110 // this is the name that is used by the script file
8111 // Each test step initialises it's own name
8112 iTestStepName = _L("MM-MMF-CTLFRM-U-0190");
8117 TVerdict CTestStep_MMF_CTLFRM_U_0190::DoTestStepL( void )
8120 * @test Req. under test
8123 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
8126 TVerdict verdict = EPass;
8127 // TMMFPrioritySettings settings; //EABI warning removal
8129 // settings.iPriority = 1;
8130 // settings.iPref = EMdaPriorityPreferenceTime;
8131 // settings.iState = EMMFStateIdle;
8133 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
8134 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
8136 CMMFFormatDecodePluginSelectionParameters* fDecodeSelect = CMMFFormatDecodePluginSelectionParameters::NewLC();
8138 // Set the format match data
8139 fSelect->SetMatchToFileNameL(_L("test.pav"));
8141 // Set the controller plugin play format match data
8142 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
8143 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
8146 fDecodeSelect->SetRequiredFormatSupportL(*fSelect);
8148 //---------------------//
8149 // Method being Tested //
8150 //---------------------//
8151 fDecodeSelect->SetPreferredSupplierL(_L("Symbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
8152 //---------------------//
8154 // Get Decode Format(s)
8155 RMMFFormatImplInfoArray formats;
8156 CleanupResetAndDestroyPushL(formats);
8157 fDecodeSelect->ListImplementationsL(formats);
8160 // Check the Uid is correct, hense the correct interface has been obtained
8162 formatUid = formats[0]->Uid();
8163 if (formatUid == KMmfUidFormatPAVReadUid)
8172 CleanupStack::PopAndDestroy(4);//formats, fSelect, cSelect, fDecodeSelect
8174 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
8180 //---------------------------------------------------------------
8182 CTestStep_MMF_CTLFRM_U_0191::CTestStep_MMF_CTLFRM_U_0191()
8186 // store the name of this test case
8187 // this is the name that is used by the script file
8188 // Each test step initialises it's own name
8189 iTestStepName = _L("MM-MMF-CTLFRM-U-0191");
8194 TVerdict CTestStep_MMF_CTLFRM_U_0191::DoTestStepL( void )
8197 * @test Req. under test
8200 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
8203 TVerdict verdict = EPass;
8204 // TMMFPrioritySettings settings; //EABI warning removal
8206 // settings.iPriority = 1;
8207 // settings.iPref = EMdaPriorityPreferenceTime;
8208 // settings.iState = EMMFStateIdle;
8210 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
8211 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
8213 CMMFFormatDecodePluginSelectionParameters* fDecodeSelect = CMMFFormatDecodePluginSelectionParameters::NewLC();
8215 // Set the format match data
8216 fSelect->SetMatchToFileNameL(_L("test.pav"));
8218 // Set the controller plugin play format match data
8219 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
8220 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
8222 fDecodeSelect->SetRequiredFormatSupportL(*fSelect);
8224 fDecodeSelect->SetPreferredSupplierL(_L("Symbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
8226 //---------------------//
8228 // Get Decode Format(s)
8229 RMMFFormatImplInfoArray formats;
8230 CleanupResetAndDestroyPushL(formats);
8231 fDecodeSelect->ListImplementationsL(formats);
8234 RArray<TUid> mediaIds;
8236 //---------------------//
8237 // Method being Tested //
8238 //---------------------//
8239 fDecodeSelect->SetMediaIdsL(mediaIds, CMMFPluginSelectionParameters::EAllowOnlySuppliedMediaIds);
8240 //---------------------//
8242 TUid uid = {0x101FF9FF};
8244 if (mediaIds.Count() > 0)
8246 if (mediaIds[0] == uid)
8256 // Check the Uid is correct, hense the correct interface has been obtained
8258 formatUid = formats[0]->Uid();
8259 if (formatUid == KMmfUidFormatPAVReadUid)
8268 CleanupStack::PopAndDestroy(4);//formats, fSelect, cSelect, fDecodeSelect
8270 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
8276 //---------------------------------------------------------------
8279 CTestStep_MMF_CTLFRM_U_0192::CTestStep_MMF_CTLFRM_U_0192()
8283 // store the name of this test case
8284 // this is the name that is used by the script file
8285 // Each test step initialises it's own name
8286 iTestStepName = _L("MM-MMF-CTLFRM-U-0192");
8291 TVerdict CTestStep_MMF_CTLFRM_U_0192::DoTestStepL( void )
8294 * @test Req. under test
8297 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
8300 TVerdict verdict = EPass;
8301 _LIT(KExpectedText, "Symbian");
8303 // TMMFPrioritySettings settings; //EABI warning removal
8305 // settings.iPriority = 1;
8306 // settings.iPref = EMdaPriorityPreferenceTime;
8307 // settings.iState = EMMFStateIdle;
8309 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
8310 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
8312 CMMFFormatDecodePluginSelectionParameters* fDecodeSelect = CMMFFormatDecodePluginSelectionParameters::NewLC();
8314 // Set the format match data
8315 fSelect->SetMatchToFileNameL(_L("test.pav"));
8317 // Set the controller plugin play format match data
8318 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
8319 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
8321 fDecodeSelect->SetRequiredFormatSupportL(*fSelect);
8323 fDecodeSelect->SetPreferredSupplierL(_L("Symbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
8324 //---------------------//
8326 // Get Decode Format(s)
8327 RMMFFormatImplInfoArray formats;
8328 CleanupResetAndDestroyPushL(formats);
8329 fDecodeSelect->ListImplementationsL(formats);
8331 //---------------------//
8332 // Method being Tested //
8333 //---------------------//
8334 TBufC<12> bufC = fDecodeSelect->PreferredSupplier();
8335 //---------------------//
8337 if ((bufC == KExpectedText) && (verdict == EPass))
8346 // Check the Uid is correct, hense the correct interface has been obtained
8348 formatUid = formats[0]->Uid();
8349 if (formatUid == KMmfUidFormatPAVReadUid && verdict == EPass)
8358 CleanupStack::PopAndDestroy(4);//formats, fSelect, cSelect, fDecodeSelect
8360 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
8366 //---------------------------------------------------------------
8369 CTestStep_MMF_CTLFRM_U_0193::CTestStep_MMF_CTLFRM_U_0193()
8373 // store the name of this test case
8374 // this is the name that is used by the script file
8375 // Each test step initialises it's own name
8376 iTestStepName = _L("MM-MMF-CTLFRM-U-0193");
8381 TVerdict CTestStep_MMF_CTLFRM_U_0193::DoTestStepL( void )
8384 * @test Req. under test
8387 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
8390 TVerdict verdict = EPass;
8391 // TMMFPrioritySettings settings; //EABI warning removal
8394 // settings.iPriority = 1;
8395 // settings.iPref = EMdaPriorityPreferenceTime;
8396 // settings.iState = EMMFStateIdle;
8398 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
8399 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
8401 CMMFFormatDecodePluginSelectionParameters* fDecodeSelect = CMMFFormatDecodePluginSelectionParameters::NewLC();
8403 // Set the format match data
8404 fSelect->SetMatchToFileNameL(_L("test.pav"));
8406 // Set the controller plugin play format match data
8407 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
8408 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
8410 fDecodeSelect->SetRequiredFormatSupportL(*fSelect);
8412 fDecodeSelect->SetPreferredSupplierL(_L("Symbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
8413 //---------------------//
8415 // Get Decode Format(s)
8416 RMMFFormatImplInfoArray formats;
8417 CleanupResetAndDestroyPushL(formats);
8418 fDecodeSelect->ListImplementationsL(formats);
8420 //---------------------//
8421 // Method being Tested //
8422 //---------------------//
8423 if ((fDecodeSelect->PreferredSupplierMatchType() == CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned) && (verdict == EPass))
8431 //---------------------//
8433 // Check the Uid is correct, hense the correct interface has been obtained
8435 formatUid = formats[0]->Uid();
8436 if (formatUid == KMmfUidFormatPAVReadUid && verdict == EPass)
8445 CleanupStack::PopAndDestroy(4);//formats, fSelect, cSelect, fDecodeSelect
8447 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
8453 //---------------------------------------------------------------
8456 CTestStep_MMF_CTLFRM_U_0194::CTestStep_MMF_CTLFRM_U_0194()
8460 // store the name of this test case
8461 // this is the name that is used by the script file
8462 // Each test step initialises it's own name
8463 iTestStepName = _L("MM-MMF-CTLFRM-U-0194");
8468 TVerdict CTestStep_MMF_CTLFRM_U_0194::DoTestStepL( void )
8471 * @test Req. under test
8474 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
8477 TVerdict verdict = EPass;
8478 // TMMFPrioritySettings settings; //EABI warning removal
8481 // settings.iPriority = 1;
8482 // settings.iPref = EMdaPriorityPreferenceTime;
8483 // settings.iState = EMMFStateIdle;
8485 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
8486 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
8488 CMMFFormatDecodePluginSelectionParameters* fDecodeSelect = CMMFFormatDecodePluginSelectionParameters::NewLC();
8490 // Set the format match data
8491 fSelect->SetMatchToFileNameL(_L("test.pav"));
8493 // Set the controller plugin play format match data
8494 cSelect->SetRequiredRecordFormatSupportL(*fSelect);
8495 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
8497 fDecodeSelect->SetRequiredFormatSupportL(*fSelect);
8499 fDecodeSelect->SetPreferredSupplierL(_L("Symbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
8500 //---------------------//
8502 // Get Decode Format(s)
8503 RMMFFormatImplInfoArray formats;
8504 CleanupResetAndDestroyPushL(formats);
8505 fDecodeSelect->ListImplementationsL(formats);
8507 TUid testUid = {0x12345679};
8508 RArray<TUid> mediaIdsToAdd;
8509 mediaIdsToAdd.Append(testUid);
8511 fDecodeSelect->SetMediaIdsL(mediaIdsToAdd, CMMFPluginSelectionParameters::EAllowOtherMediaIds);
8513 //---------------------//
8514 // Method being Tested //
8515 //---------------------//
8516 const RArray<TUid>& mediaIds = fDecodeSelect->MediaIds();
8517 //---------------------//
8519 if (mediaIds.Count() > 0)
8521 TUid uid = {0x12345679};
8522 if (mediaIds[0] == uid)
8536 // Check the Uid is correct, hense the correct interface has been obtained
8538 formatUid = formats[0]->Uid();
8539 if (formatUid == KMmfUidFormatPAVReadUid && verdict == EPass)
8548 mediaIdsToAdd.Remove(0); // Remove otherwise TUid will be destroyed below and Panic.
8549 mediaIdsToAdd.Close();
8551 CleanupStack::PopAndDestroy(4);//formats, fSelect, cSelect, fDecodeSelect
8553 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
8559 //---------------------------------------------------------------
8561 CTestStep_MMF_CTLFRM_U_0195::CTestStep_MMF_CTLFRM_U_0195()
8565 // store the name of this test case
8566 // this is the name that is used by the script file
8567 // Each test step initialises it's own name
8568 iTestStepName = _L("MM-MMF-CTLFRM-U-0195");
8573 TVerdict CTestStep_MMF_CTLFRM_U_0195::DoTestStepL( void )
8576 * @test Req. under test
8579 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
8582 TVerdict verdict = EPass;
8584 // TMMFPrioritySettings settings; //EABI warning removal
8586 // settings.iPriority = 1;
8587 // settings.iPref = EMdaPriorityPreferenceTime;
8588 // settings.iState = EMMFStateIdle;
8590 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
8591 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
8593 CMMFFormatDecodePluginSelectionParameters* fDecodeSelect = CMMFFormatDecodePluginSelectionParameters::NewLC();
8595 // Set the format match data
8596 fSelect->SetMatchToFileNameL(_L("test.pav"));
8598 // Set the controller plugin play format match data
8599 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
8600 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
8602 fDecodeSelect->SetRequiredFormatSupportL(*fSelect);
8604 fDecodeSelect->SetPreferredSupplierL(_L("Symbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
8605 //---------------------//
8607 // Get Decode Format(s)
8608 RMMFFormatImplInfoArray formats;
8609 CleanupResetAndDestroyPushL(formats);
8610 fDecodeSelect->ListImplementationsL(formats);
8612 //---------------------//
8613 // Method being Tested //
8614 //---------------------//
8616 if ((fDecodeSelect->MediaIdMatchType() == CMMFPluginSelectionParameters::ENoMediaIdMatch) && (verdict == EPass))
8624 //---------------------//
8626 // Check the Uid is correct, hense the correct interface has been obtained
8628 formatUid = formats[0]->Uid();
8629 if (formatUid == KMmfUidFormatPAVReadUid && verdict == EPass)
8638 CleanupStack::PopAndDestroy(4);//formats, fSelect, cSelect, fDecodeSelect
8640 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
8646 //---------------------------------------------------------------
8648 CTestStep_MMF_CTLFRM_U_0196::CTestStep_MMF_CTLFRM_U_0196()
8652 // store the name of this test case
8653 // this is the name that is used by the script file
8654 // Each test step initialises it's own name
8655 iTestStepName = _L("MM-MMF-CTLFRM-U-0196");
8660 TVerdict CTestStep_MMF_CTLFRM_U_0196::DoTestStepL( void )
8663 * @test Req. under test
8666 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
8669 TVerdict verdict = EPass;
8670 // TMMFPrioritySettings settings; //EABI warning removal
8672 // settings.iPriority = 1;
8673 // settings.iPref = EMdaPriorityPreferenceTime;
8674 // settings.iState = EMMFStateIdle;
8676 CMMFControllerPluginSelectionParameters* cSelect = CMMFControllerPluginSelectionParameters::NewLC();
8677 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
8679 CMMFFormatDecodePluginSelectionParameters* fDecodeSelect = CMMFFormatDecodePluginSelectionParameters::NewLC();
8681 // Set the format match data
8682 fSelect->SetMatchToFileNameL(_L("test.pav"));
8684 // Set the controller plugin play format match data
8685 cSelect->SetRequiredPlayFormatSupportL(*fSelect);
8686 cSelect->SetPreferredSupplierL(KTestControllerSupplier, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
8688 fDecodeSelect->SetRequiredFormatSupportL(*fSelect);
8690 fDecodeSelect->SetPreferredSupplierL(_L("Symbian"),CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
8691 //---------------------//
8693 // Get Decode Format(s)
8694 RMMFFormatImplInfoArray formats;
8695 CleanupResetAndDestroyPushL(formats);
8696 fDecodeSelect->ListImplementationsL(formats);
8698 //---------------------//
8699 // Method being Tested //
8700 //---------------------//
8701 TUid uid = fDecodeSelect->InterfaceUid();
8702 //---------------------//
8704 if (uid == KMmfUidPluginInterfaceFormatDecodeUid)
8714 // Check the Uid is correct, hense the correct interface has been obtained
8716 formatUid = formats[0]->Uid();
8717 if (formatUid == KMmfUidFormatPAVReadUid && verdict == EPass)
8726 CleanupStack::PopAndDestroy(4);//formats, fSelect, cSelect, fDecodeSelect
8728 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
8734 //---------------------------------------------------------------
8736 CTestStep_MMF_CTLFRM_U_0125::CTestStep_MMF_CTLFRM_U_0125()
8740 // store the name of this test case
8741 // this is the name that is used by the script file
8742 // Each test step initialises it's own name
8743 iTestStepName = _L("MM-MMF-CTLFRM-U-0125");
8748 TVerdict CTestStep_MMF_CTLFRM_U_0125::DoTestStepL( void )
8749 /** Instantiate a CMMFControllerPluginSelectionParameters and CMMFFormatSelectionParameters
8750 * set the parameters appropiately (See API Method Calls and Parameters) to obtain
8751 * controller Implementation Uid's in a CMMFControllerImplementationInformation Array to
8752 * open a controller. Open the controller, check for errors and close the controller.
8753 * (Test CMMFFormatSelectionParameters API).
8756 * @test Req. under test REQ172.5.5 REQ172.5.5.13
8759 const TInt KNumberTestURIs = 5;
8760 _LIT(KTestUri1,"rtsp://www.symbian.com/first/test/directory/test.rm");
8761 _LIT(KTestUri2,"www.symbian.com/first/test/directory/test.rm#garbage characters");
8762 _LIT(KTestUri3,"rtsp://www.symbian.com/first/test/directory/test.rm?param=22050&cat=find");
8763 _LIT(KTestUri4,"rtsp://www.symbian.com/first/test/directory/test.rm?param=22050&cat=find#garbage characters at end of url");
8764 _LIT(KTestUri5,"rtsp://194.252.88.2:554/yle24/mobile/uusin.rm?cloakport=\"80,554,7");
8765 _LIT8(KExpectedMatchData,".rm");
8768 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
8771 TVerdict verdict = EPass;
8773 TPtrC testURIs[KNumberTestURIs];
8774 TPtrC8 expectedMatchData[KNumberTestURIs];
8775 testURIs[0].Set(KTestUri1);
8776 testURIs[1].Set(KTestUri2);
8777 testURIs[2].Set(KTestUri3);
8778 testURIs[3].Set(KTestUri4);
8779 testURIs[4].Set(KTestUri5);
8781 expectedMatchData[0].Set(KExpectedMatchData);
8782 expectedMatchData[1].Set(KExpectedMatchData);
8783 expectedMatchData[2].Set(KExpectedMatchData);
8784 expectedMatchData[3].Set(KExpectedMatchData);
8785 expectedMatchData[4].Set(KExpectedMatchData);
8787 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
8789 // Set the format match data
8790 for (TInt i=0;i<KNumberTestURIs;i++)
8792 //---------------------//
8793 // Method being Tested //
8794 //---------------------//
8795 fSelect->SetMatchToUriL(testURIs[i]);
8796 //---------------------//
8798 if (fSelect->MatchDataType() == CMMFFormatSelectionParameters::EMatchFileExtension)
8800 const TDesC8& matchData = fSelect->MatchData();
8802 // make a unicode copy of the match data (file extension) for printing out
8803 HBufC* bufMatchData = HBufC::NewL(matchData.Length());
8805 TPtr ptr = bufMatchData->Des();
8806 ptr.Copy(matchData);
8807 if (!(matchData == expectedMatchData[i]))
8809 INFO_PRINTF3(_L("Uri Match Data failed on URI: %S | extension: %S"),
8815 INFO_PRINTF3(_L("Success URI: %S | extension: %S"),
8820 delete bufMatchData;
8825 INFO_PRINTF1(_L("MatchDataType set to incorrect type (should be EMatchFileExtension)"));
8830 CleanupStack::Pop(fSelect);
8837 //------------------------------------------------------------------
8839 //---------------------------------------------------------------
8841 CTestStep_MMF_CTLFRM_U_0198::CTestStep_MMF_CTLFRM_U_0198()
8845 // store the name of this test case
8846 // this is the name that is used by the script file
8847 // Each test step initialises it's own name
8848 iTestStepName = _L("MM-MMF-CTLFRM-U-0198");
8853 TVerdict CTestStep_MMF_CTLFRM_U_0198::DoTestStepL( void )
8854 /** Instantiate a CMMFControllerPluginSelectionParameters and CMMFFormatSelectionParameters
8855 * set the parameters appropiately (See API Method Calls and Parameters) to obtain
8856 * controller Implementation Uid's in a CMMFControllerImplementationInformation Array to
8857 * open a controller. Open the controller, check for errors and close the controller.
8858 * (Test CMMFFormatSelectionParameters API).
8861 * @test Req. under CR0632
8864 const TInt KNumberTestURIs = 5;
8865 _LIT(KTestUri1,"rtsp://www.symbian.com/first/test/directory/test.rm");
8866 _LIT(KTestUri2,"www.symbian.com/first/test/directory/test.rm#garbage characters");
8867 _LIT(KTestUri3,"rtsp://www.symbian.com/first/test/directory/test.rm?param=22050&cat=find");
8868 _LIT(KTestUri4,"rtsp://www.symbian.com/first/test/directory/test.rm?param=22050&cat=find#garbage characters at end of url");
8869 _LIT(KTestUri5,"rtsp://194.252.88.2:554/yle24/mobile/uusin.rm?cloakport=\"80,554,7");
8870 _LIT8(KExpectedMatchData,"rtsp");
8871 _LIT8(KExpectedMatchData2,"");
8873 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
8876 TVerdict verdict = EPass;
8878 TPtrC testURIs[KNumberTestURIs];
8879 TPtrC8 expectedMatchData[KNumberTestURIs];
8880 testURIs[0].Set(KTestUri1);
8881 testURIs[1].Set(KTestUri2);
8882 testURIs[2].Set(KTestUri3);
8883 testURIs[3].Set(KTestUri4);
8884 testURIs[4].Set(KTestUri5);
8886 expectedMatchData[0].Set(KExpectedMatchData);
8887 expectedMatchData[1].Set(KExpectedMatchData2);
8888 expectedMatchData[2].Set(KExpectedMatchData);
8889 expectedMatchData[3].Set(KExpectedMatchData);
8890 expectedMatchData[4].Set(KExpectedMatchData);
8892 CMMFFormatSelectionParameters* fSelect = CMMFFormatSelectionParameters::NewLC();
8894 // Set the format match data
8895 for (TInt i=0;i<KNumberTestURIs;i++)
8897 //---------------------//
8898 // Method being Tested //
8899 //---------------------//
8900 fSelect->SetMatchToUriSupportL(testURIs[i]);
8901 //---------------------//
8903 if (fSelect->MatchDataType() == CMMFFormatSelectionParameters::EMatchUri)
8905 const TDesC8& matchurischeme = fSelect->MatchUriScheme();
8907 HBufC* bufMatchData = HBufC::NewL(matchurischeme.Length());
8909 TPtr ptr = bufMatchData->Des();
8910 ptr.Copy(matchurischeme);
8911 if (!(matchurischeme == expectedMatchData[i]))
8913 INFO_PRINTF3(_L("Uri Match Data failed on URI: %S | scheme: %S"),
8919 INFO_PRINTF3(_L("Success URI: %S | scheme: %S"),
8924 delete bufMatchData;
8929 INFO_PRINTF1(_L("MatchDataType set to incorrect type (should be EMatchUri)"));
8934 CleanupStack::Pop(fSelect);
8941 #ifdef SYMBIAN_BUILD_GCE
8942 //---------------------------------------------------------------------
8943 // Testing of the Standard Custom Commands of video surface support
8944 //----------------------------------------------------------------------
8946 CTestStep_MMF_CTLFRM_U_0301::CTestStep_MMF_CTLFRM_U_0301()
8950 // store the name of this test case
8951 // this is the name that is used by the script file
8952 // Each test step initialises it's own name
8953 iTestStepName = _L("MM-MMF-CTLFRM-U-0301");
8956 TVerdict CTestStep_MMF_CTLFRM_U_0301::DoTestStepL( void )
8957 /** Call the RMMFController::Open(..) (with the parameters from test 001), varify the
8958 * return value is 0. Instantiate a CustomCommands Object (specified). Call
8959 * RMMFVideoPlaySurfaceSupportCustomCommands Method specified and varify the 'error'
8960 * is 0. Follow this by calling the Custom Command 'KLogFunction' and varify the text
8961 * value returned is equal to the specifed text in Test Step. Call the RMMFController::Close()
8962 * on the Custom Controller. Varify 'error' is zero.
8965 * @test Req. under test REQ 7418
8968 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
8971 TVerdict verdict = EPass;
8972 _LIT8(KExpectedResult, "MvpssUseSurfacesL Called");
8974 TMMFPrioritySettings settings;
8975 TInt error = KErrNone;
8976 RMMFController controller;
8978 settings.iPriority = 1;
8979 settings.iPref = EMdaPriorityPreferenceTime;
8980 settings.iState = EMMFStateIdle;
8982 // Open a Custom Controller
8983 error = controller.Open(KTstControllerUid,settings);
8984 INFO_PRINTF2(_L("Controller Open: %d"), error);
8986 if (error == KErrNone)
8988 RMMFVideoPlaySurfaceSupportCustomCommands customCommands(controller);
8990 error = customCommands.UseSurfaces();
8991 INFO_PRINTF2(_L("customCommands.UseSurfaces() returns: %d"), error);
8993 //------------------------------------//
8994 // Getting Log from Custom Controller //
8995 //------------------------------------//
8996 if (error == KErrNone)
8998 INFO_PRINTF1(_L("Getting Log"));
9000 TBuf8<64> memFunctionText;
9002 TUid uid = {KMmfTestControllerUid};
9003 TMMFMessageDestination handleInfo(uid);
9004 TMMFMessageDestinationPckg messageDest(handleInfo);
9006 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
9008 TBuf<64> memFunctionText16;
9009 memFunctionText16.Copy(memFunctionText);
9010 INFO_PRINTF2(_L("Log:%S"),&memFunctionText16);
9012 if (memFunctionText != KExpectedResult)
9018 //------------------------------------//
9020 if (error != KErrNone)
9022 INFO_PRINTF2(_L("Test case failed with error:%d"),error);
9027 INFO_PRINTF1(_L("Closing Controller"));
9030 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
9036 //---------------------------------------------------------------
9038 CTestStep_MMF_CTLFRM_U_0303::CTestStep_MMF_CTLFRM_U_0303()
9042 // store the name of this test case
9043 // this is the name that is used by the script file
9044 // Each test step initialises it's own name
9046 iTestStepName = _L("MM-MMF-CTLFRM-U-0303");
9049 TVerdict CTestStep_MMF_CTLFRM_U_0303::DoTestStepL( void )
9050 /** As TSU_MMF_CTLFRM_U_0301
9053 * @test Req. under test REQ1714.3.3
9056 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
9059 TVerdict verdict = EPass;
9060 _LIT8(KExpectedResult, "MvpssGetSurfaceParametersL Called");
9062 TMMFPrioritySettings settings;
9063 TInt error = KErrNone;
9064 RMMFController controller;
9066 settings.iPriority = 1;
9067 settings.iPref = EMdaPriorityPreferenceTime;
9068 settings.iState = EMMFStateIdle;
9070 TSurfaceId surfaceId;
9072 TVideoAspectRatio par;
9074 // Open a Custom Controller
9075 error = controller.Open(KTstControllerUid,settings);
9076 INFO_PRINTF2(_L("Controller Open: %d"), error);
9078 if (error == KErrNone)
9080 RMMFVideoPlaySurfaceSupportCustomCommands customCommands(controller);
9082 error = customCommands.GetSurfaceParameters(surfaceId, getRect,par);
9083 INFO_PRINTF2(_L("customCommands.GetSurfaceParameters returns: %d"), error);
9086 //From mmf test controller which sets the values
9087 TSurfaceId expectedSurfaceId = {11111, 22222, 33333, 44444};
9088 TInt expectedTlIx = 100;
9089 TInt expectedTlIy = 50;
9090 TInt expectedBrIx = 600;
9091 TInt expectedBrIy = 200;
9092 TInt expectedParIN = 1;
9093 TInt expectedParID = 2;
9096 //------------------------------------//
9097 // Getting Log from Custom Controller //
9098 //------------------------------------//
9101 INFO_PRINTF1(_L("Getting Log"));
9103 TBuf8<64> memFunctionText;
9105 TUid uid = {KMmfTestControllerUid};
9106 TMMFMessageDestination handleInfo(uid);
9107 TMMFMessageDestinationPckg messageDest(handleInfo);
9109 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
9111 TBuf<64> memFunctionText16;
9112 memFunctionText16.Copy(memFunctionText);
9113 INFO_PRINTF2(_L("Log:%S"),&memFunctionText16);
9115 if (memFunctionText != KExpectedResult || expectedSurfaceId != surfaceId || expectedTlIx != getRect.iTl.iX ||
9116 expectedTlIy != getRect.iTl.iY || expectedBrIx != getRect.iBr.iX || expectedBrIy != getRect.iBr.iY ||
9117 expectedParIN != par.iNumerator || expectedParID != par.iDenominator)
9119 INFO_PRINTF5(_L("Expected surfaceId %d %d %d %d"),
9120 expectedSurfaceId.iInternal[0], expectedSurfaceId.iInternal[1],
9121 expectedSurfaceId.iInternal[2], expectedSurfaceId.iInternal[3]);
9122 INFO_PRINTF5(_L("surfaceId Available %d %d %d %d"),
9123 surfaceId.iInternal[0], surfaceId.iInternal[1],
9124 surfaceId.iInternal[2], surfaceId.iInternal[3]);
9125 INFO_PRINTF2(_L("Expected Rect first %d"),expectedTlIx);
9126 INFO_PRINTF2(_L("Rect first Available %d"),getRect.iTl.iX);
9127 INFO_PRINTF2(_L("Expected Rect second %d"),expectedTlIy);
9128 INFO_PRINTF2(_L("Rect second Available %d"),getRect.iTl.iY);
9129 INFO_PRINTF2(_L("Expected Rect third %d"),expectedBrIx);
9131 INFO_PRINTF2(_L("Rect third Available %d"),getRect.iBr.iX);
9132 INFO_PRINTF2(_L("Expected Rect fourth %d"),expectedBrIy);
9133 INFO_PRINTF2(_L("Rect fourth Available %d"),getRect.iBr.iY);
9134 INFO_PRINTF2(_L("Expected TVideoAspectRatio iNumerator %d"),expectedParIN);
9135 INFO_PRINTF2(_L("TVideoAspectRatio iNumerator Available %d"),par.iNumerator);
9136 INFO_PRINTF2(_L("Expected TVideoAspectRatio iDenominator %d"),expectedParID);
9137 INFO_PRINTF2(_L("TVideoAspectRatio iDenominator Available %d"),par.iDenominator);
9143 //------------------------------------//
9145 INFO_PRINTF1(_L("Closing Controller"));
9148 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
9154 //---------------------------------------------------------------
9156 CTestStep_MMF_CTLFRM_U_0305::CTestStep_MMF_CTLFRM_U_0305(TSurfaceId& aSurfaceId, TBool aNegTest)
9160 // store the name of this test case
9161 // this is the name that is used by the script file
9162 // Each test step initialises it's own name
9163 iNegTest = aNegTest;
9165 if (!aNegTest) // The value for the positive testing in test controller
9167 iSurfaceId = aSurfaceId;
9168 iTestStepName = _L("MM-MMF-CTLFRM-U-0305");
9170 else // Any other value for the negative testing
9172 iSurfaceId2 = aSurfaceId;
9173 iTestStepName = _L("MM-MMF-CTLFRM-U-0309");
9177 TVerdict CTestStep_MMF_CTLFRM_U_0305::DoTestStepL()
9178 /** As TSU_MMF_CTLFRM_U_0301
9180 * @test Req. under test REQ 7418
9183 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
9186 TVerdict verdict = EPass;
9187 _LIT8(KExpectedResult, "MvpssSurfaceRemovedL Called");
9189 TMMFPrioritySettings settings;
9190 TInt error = KErrNone;
9191 RMMFController controller;
9193 settings.iPriority = 1;
9194 settings.iPref = EMdaPriorityPreferenceTime;
9195 settings.iState = EMMFStateIdle;
9197 // Open a Custom Controller
9198 error = controller.Open(KTstControllerUid,settings);
9199 INFO_PRINTF2(_L("Controller Open: %d"), error);
9201 TSurfaceId surfaceId;
9204 surfaceId = iSurfaceId2;
9208 surfaceId = iSurfaceId;
9211 if (error == KErrNone)
9213 RMMFVideoPlaySurfaceSupportCustomCommands customCommands(controller);
9214 error = customCommands.SurfaceRemoved(surfaceId);
9215 INFO_PRINTF2(_L("customCommands.SurfaceRemoved returns: %d"), error);
9218 //------------------------------------//
9219 // Getting Log from Custom Controller //
9220 //------------------------------------//
9221 if (error == KErrNone)
9223 INFO_PRINTF1(_L("Getting Log"));
9225 TBuf8<64> memFunctionText;
9227 TUid uid = {KMmfTestControllerUid};
9228 TMMFMessageDestination handleInfo(uid);
9229 TMMFMessageDestinationPckg messageDest(handleInfo);
9231 error = controller.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
9233 TBuf<64> memFunctionText16;
9234 memFunctionText16.Copy(memFunctionText);
9235 INFO_PRINTF2(_L("Log:%S"),&memFunctionText16);
9237 if (memFunctionText != KExpectedResult)
9243 if (error != KErrNone)
9245 if (iNegTest && error == KErrArgument)
9247 INFO_PRINTF1(_L("Negative test; Expected return with -6"));
9252 INFO_PRINTF2(_L("Failed with error:%d"),error);
9257 if (iNegTest && error != KErrArgument)
9259 INFO_PRINTF1(_L("Negative test; Expected return with -6"));
9262 //------------------------------------//
9264 INFO_PRINTF1(_L("Closing Controller"));
9267 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
9274 //------------------------------------------------------------------
9276 #endif // SYMBIAN_BUILD_GCE
9278 RTestStep_MMF_CTLFRM_U_0200::RTestStep_MMF_CTLFRM_U_0200()
9282 // store the name of this test case
9283 // this is the name that is used by the script file
9284 // Each test step initialises it's own name
9285 iTestStepName = _L("MM-MMF-CTLFRM-U-0200");
9288 TInt RTestStep_MMF_CTLFRM_U_0200::Timeout(TAny* aArg)
9290 RTestStep_MMF_CTLFRM_U_0200* arg = static_cast<RTestStep_MMF_CTLFRM_U_0200*>(aArg);
9291 arg->StopTest(KErrNone,EFail);
9296 void RTestStep_MMF_CTLFRM_U_0200::KickoffTestL()
9298 * Call the RMMFController::Open(..) with the parameters specified,
9299 * verify the return value is 0. Sends an asynchronous custom command to the controller which generates a panic
9300 * in the subthread, verify the return value is 0. Verify application thread terminates with KErrDied. (with Active Scheduler)
9303 * @test Req. INC108007
9306 // Create an active object that will wrap the test execution
9307 iAsyncTest = new (ELeave) CAsyncTest(this);
9308 iAsyncTest->Start();
9311 void RTestStep_MMF_CTLFRM_U_0200::CloseTest()
9315 iAsyncTest->Cancel();
9320 void RTestStep_MMF_CTLFRM_U_0200::OpeningController()
9322 INFO_PRINTF1(_L("Attempting to Open Controller"));
9325 void RTestStep_MMF_CTLFRM_U_0200::OpenCompleted(TInt aError)
9327 INFO_PRINTF2(_L("Controller Open: %d"), aError);
9330 void RTestStep_MMF_CTLFRM_U_0200::ClosingController()
9332 INFO_PRINTF1(_L("Closing Controller"));
9335 void RTestStep_MMF_CTLFRM_U_0200::ClosingComplete()
9337 INFO_PRINTF1(_L("Controller Closed"));
9340 void RTestStep_MMF_CTLFRM_U_0200::SendingCustomCommand()
9342 INFO_PRINTF1(_L("Sending Panic custom command"));
9345 void RTestStep_MMF_CTLFRM_U_0200::CustomCommandSent(TInt aError)
9347 INFO_PRINTF2(_L("Custom Command Sent: %d"), aError);
9350 void RTestStep_MMF_CTLFRM_U_0200::CancellingCustomCommand()
9352 INFO_PRINTF1(_L("Cancelling Panic custom command"));
9355 void RTestStep_MMF_CTLFRM_U_0200::CustomCommandCancelled(TInt aError)
9357 INFO_PRINTF2(_L("Custom Command Cancelled: %d"), aError);
9360 void RTestStep_MMF_CTLFRM_U_0200::TestError(TInt aError)
9362 if(aError!=KErrServerTerminated)
9364 StopTest(aError,EFail);
9372 RTestStep_MMF_CTLFRM_U_0200::CAsyncTest::CAsyncTest(MMMF_CTRLFRM_U_0200_Observer* aObserver)
9373 : CActive(EPriorityStandard)
9375 iObserver = aObserver;
9377 CActiveScheduler::Add(this);
9380 RTestStep_MMF_CTLFRM_U_0200::CAsyncTest::~CAsyncTest()
9384 iObserver->ClosingController();
9385 iController.Close();
9386 iObserver->ClosingComplete();
9389 void RTestStep_MMF_CTLFRM_U_0200::CAsyncTest::Start()
9391 TMMFPrioritySettings settings;
9392 TInt error = KErrNone;
9394 settings.iPriority = 1;
9395 settings.iPref = EMdaPriorityPreferenceTime;
9396 settings.iState = EMMFStateIdle;
9398 iObserver->OpeningController();
9400 // Open a Custom Controller
9401 error = iController.Open(KTestTerminationControllerUid,settings);
9402 iObserver->OpenCompleted(error);
9404 //------------------------------------//
9405 // Sending Panic Custom Command //
9406 //------------------------------------//
9409 iObserver->SendingCustomCommand();
9410 TMMFMessageDestination handleInfo(KTestTerminationControllerUid);
9411 iMessage = handleInfo;
9413 iController.CustomCommandAsync(iMessage, KDummyFunc1, KNullDesC8, KNullDesC8, iStatus);
9417 iObserver->TestError(error);
9420 void RTestStep_MMF_CTLFRM_U_0200::CAsyncTest::RunL()
9422 iObserver->CustomCommandSent(iStatus.Int());
9423 iObserver->TestError(iStatus.Int());
9426 TInt RTestStep_MMF_CTLFRM_U_0200::CAsyncTest::RunError(TInt aError)
9431 void RTestStep_MMF_CTLFRM_U_0200::CAsyncTest::DoCancel()
9437 //------------------------------------------------------------------
9439 CTestStep_MMF_CTLFRM_U_0201::CTestStep_MMF_CTLFRM_U_0201()
9443 // store the name of this test case
9444 // this is the name that is used by the script file
9445 // Each test step initialises it's own name
9446 iTestStepName = _L("MM-MMF-CTLFRM-U-0201");
9452 TVerdict CTestStep_MMF_CTLFRM_U_0201::DoTestStepL( void )
9454 * Call the RMMFController::Open(..) with the parameters specified,
9455 * verify the return value is 0. Sends an asynchronous custom command to the controller which generates a panic
9456 * in the subthread, verify the return value is 0. Close the controller after a timeout and
9457 * verify application thread terminates with KErrDied. (without Active Scheduler)
9460 * @test Req. INC108007
9463 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
9466 TVerdict verdict = EPass;
9468 TMMFPrioritySettings settings;
9469 TInt error = KErrNone;
9470 RMMFController controller;
9472 settings.iPriority = 1;
9473 settings.iPref = EMdaPriorityPreferenceTime;
9474 settings.iState = EMMFStateIdle;
9476 error = controller.Open(KTestTerminationControllerUid,settings);
9477 INFO_PRINTF2(_L("Controller Open: %d"), error);
9479 //------------------------------------//
9480 // Sending Panic Custom Command //
9481 //------------------------------------//
9484 TMMFMessageDestination handleInfo(KTestTerminationControllerUid);
9485 TMMFMessageDestinationPckg messageDest(handleInfo);
9487 TRequestStatus status;
9488 INFO_PRINTF1(_L("Sending Panic custom command"));
9489 controller.CustomCommandAsync(messageDest, KDummyFunc1, KNullDesC8, KNullDesC8, status);
9491 // Creation of a timeout timer
9493 timer.CreateLocal();
9494 TRequestStatus timeout = KRequestPending;
9495 timer.After(timeout, 3000000);
9497 User::WaitForRequest(status, timeout);
9498 INFO_PRINTF3(_L("Status=[%d] Timeout[%d]"), status.Int(), timeout.Int());
9500 //------------------------------------//
9503 INFO_PRINTF1(_L("Closing Controller"));
9506 // client thread should not panic as such.
9509 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
9515 //------------------------------------------------------------------
9517 CTestStep_MMF_CTLFRM_U_0202::CTestStep_MMF_CTLFRM_U_0202()
9521 // store the name of this test case
9522 // this is the name that is used by the script file
9523 // Each test step initialises it's own name
9524 iTestStepName = _L("MM-MMF-CTLFRM-U-0202");
9530 TVerdict CTestStep_MMF_CTLFRM_U_0202::DoTestStepL( void )
9532 * Call the RMMFController::Open(..) with the parameters specified,
9533 * verify the return value is 0. Call the RMMFController::Close() on the Custom Controller.
9534 * Verify error is 0. There will be a memory allocation error while calling iSubThread.Logon()
9535 * inside RMMFControllerProxy::Close().
9538 * @test Req. INC108007
9541 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
9544 TVerdict verdict = EPass;
9546 TMMFPrioritySettings settings;
9547 TInt error = KErrNone;
9548 RMMFController controller;
9550 settings.iPriority = 1;
9551 settings.iPref = EMdaPriorityPreferenceTime;
9552 settings.iState = EMMFStateIdle;
9554 INFO_PRINTF1(_L("Attempting to Open Controller"));
9556 // Open a Custom Controller
9557 error = controller.Open(KTstControllerUid,settings);
9558 INFO_PRINTF2(_L("Controller Open: %d"), error);
9565 INFO_PRINTF1(_L("Setting __DbgSetAllocFail"));
9566 User::__DbgSetAllocFail(ETrue, RHeap::EFailNext, 1);
9567 INFO_PRINTF1(_L("Closing Controller"));
9569 INFO_PRINTF1(_L("Reseting __DbgSetAllocFail"));
9570 User::__DbgSetAllocFail(ETrue, RHeap::ENone, 1);
9572 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
9579 //------------------------------------------------------------------
9581 CTestStep_MMF_CTLFRM_U_0203::CTestStep_MMF_CTLFRM_U_0203()
9585 // store the name of this test case
9586 // this is the name that is used by the script file
9587 // Each test step initialises it's own name
9588 iTestStepName = _L("MM-MMF-CTLFRM-U-0203");
9594 TVerdict CTestStep_MMF_CTLFRM_U_0203::DoTestStepL( void )
9596 * Call the RMMFController::Open(..) with the parameters specified,
9597 * verify the return value is 0. Call the RMMFController::Close() on the Custom Controller.
9598 * Verify error is 0. There will be a memory allocation error while calling timer.CreateLocal()
9599 * inside RMMFControllerProxy::Close()
9602 * @test Req. INC108007
9605 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
9608 TVerdict verdict = EPass;
9610 TMMFPrioritySettings settings;
9611 TInt error = KErrNone;
9612 RMMFController controller;
9614 settings.iPriority = 1;
9615 settings.iPref = EMdaPriorityPreferenceTime;
9616 settings.iState = EMMFStateIdle;
9618 INFO_PRINTF1(_L("Attempting to Open Controller"));
9620 // Open a Custom Controller
9621 error = controller.Open(KTstControllerUid,settings);
9622 INFO_PRINTF2(_L("Controller Open: %d"), error);
9629 INFO_PRINTF1(_L("Setting __DbgSetAllocFail"));
9630 User::__DbgSetAllocFail(ETrue, RHeap::EDeterministic, 2);
9631 INFO_PRINTF1(_L("Closing Controller"));
9633 INFO_PRINTF1(_L("Reseting __DbgSetAllocFail"));
9634 User::__DbgSetAllocFail(ETrue, RHeap::ENone, 1);
9636 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
9643 //------------------------------------------------------------------
9645 #ifdef SYMBIAN_MULTIMEDIA_SUBTITLE_SUPPORT
9646 TVerdict CTestStep_MMF_CTLFRM_Subtitles::DoTestStepPreambleL()
9648 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
9651 TMMFPrioritySettings settings;
9652 settings.iPriority = 1;
9653 settings.iPref = EMdaPriorityPreferenceTime;
9654 settings.iState = EMMFStateIdle;
9656 // Open a Custom Controller
9657 TInt error = iController.Open(KTstControllerUid, settings);
9659 if (KErrNone != error)
9661 ERR_PRINTF2(_L("Controller Open: %d"), error);
9662 return EInconclusive; // Cannot run the test
9665 iSubtitleCommands = new(ELeave) RMMFVideoPlaySubtitleSupportCustomCommands(iController);
9666 return CTestStep_MMF_CTLFRM::DoTestStepPreambleL();
9669 TVerdict CTestStep_MMF_CTLFRM_Subtitles::DoTestStepPostambleL()
9671 iController.Close();
9672 delete iSubtitleCommands;
9673 iSubtitleCommands = NULL;
9675 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));
9681 TVerdict CTestStep_MMF_CTLFRM_Subtitles::CheckExpectedFunctionText(const TDesC8& aExpected)
9683 INFO_PRINTF1(_L("Getting Log"));
9685 TBuf8<64> memFunctionText;
9687 TUid uid = {KMmfTestControllerUid};
9688 TMMFMessageDestination handleInfo(uid);
9689 TMMFMessageDestinationPckg messageDest(handleInfo);
9691 TInt error = iController.CustomCommandSync(messageDest, KLogFunction, KNullDesC8, KNullDesC8, memFunctionText);
9693 if (KErrNone != error)
9695 ERR_PRINTF2(_L("Failed to retrieve function text. Error is %d"), error);
9699 TBuf<64> memFunctionText16;
9700 memFunctionText16.Copy(memFunctionText);
9702 if (memFunctionText != aExpected)
9704 TBuf<64> expected16;
9705 expected16.Copy(aExpected);
9706 ERR_PRINTF3(_L("Function log expected \"%S\" but got \"%S\""), &expected16, &memFunctionText16);
9711 INFO_PRINTF2(_L("Log:%S"),&memFunctionText16);
9717 void CTestStep_MMF_CTLFRM_Subtitles::SetExpectedSubtitlesAvailableL(TInt aAvailable)
9719 TUid uid = {KMmfTestControllerUid};
9720 TMMFMessageDestination handleInfo(uid);
9721 TMMFMessageDestinationPckg messageDest(handleInfo);
9722 TPckgBuf<TInt> availPckg(aAvailable);
9724 User::LeaveIfError(iController.CustomCommandSync(messageDest, KTestSetSubtitleAvailable, availPckg, KNullDesC8));
9727 CTestStep_MMF_CTRLFRM_U_400::CTestStep_MMF_CTRLFRM_U_400()
9729 // store the name of this test case
9730 // this is the name that is used by the script file
9731 // Each test step initialises it's own name
9732 iTestStepName = _L("MM-MMF-CTLFRM-U-0400");
9735 TVerdict CTestStep_MMF_CTRLFRM_U_400::DoTestStepL()
9737 TBool avail = EFalse;
9738 TInt err = iSubtitleCommands->GetSubtitlesAvailable(avail);
9740 if (KErrNone != err)
9742 ERR_PRINTF3(_L("SubtitlesAvailable returned error code %d; expected %d"), err, KErrNone);
9748 ERR_PRINTF1(_L("Expected subtitles to be available, but got EFalse"));
9752 return CheckExpectedFunctionText(KSubAvailable);
9755 CTestStep_MMF_CTRLFRM_U_401::CTestStep_MMF_CTRLFRM_U_401()
9757 // store the name of this test case
9758 // this is the name that is used by the script file
9759 // Each test step initialises it's own name
9760 iTestStepName = _L("MM-MMF-CTLFRM-U-0401");
9763 TVerdict CTestStep_MMF_CTRLFRM_U_401::DoTestStepL()
9765 TInt err = iSubtitleCommands->DisableSubtitles();
9767 if (KErrNone != err)
9769 ERR_PRINTF3(_L("DisableSubtitles returned %d; expected %d"), err, KErrNone);
9773 return CheckExpectedFunctionText(KDisableSub);
9776 CTestStep_MMF_CTRLFRM_U_402::CTestStep_MMF_CTRLFRM_U_402()
9778 // store the name of this test case
9779 // this is the name that is used by the script file
9780 // Each test step initialises it's own name
9781 iTestStepName = _L("MM-MMF-CTLFRM-U-0402");
9784 TVerdict CTestStep_MMF_CTRLFRM_U_402::DoTestStepL()
9786 TInt err = iSubtitleCommands->EnableSubtitles();
9788 if (KErrNone != err)
9790 ERR_PRINTF3(_L("EnableSubtitles returned %d; expected %d"), err, KErrNone);
9794 return CheckExpectedFunctionText(KEnableSub);
9797 CTestStep_MMF_CTRLFRM_U_403::CTestStep_MMF_CTRLFRM_U_403()
9799 // store the name of this test case
9800 // this is the name that is used by the script file
9801 // Each test step initialises it's own name
9802 iTestStepName = _L("MM-MMF-CTLFRM-U-0403");
9805 TVerdict CTestStep_MMF_CTRLFRM_U_403::DoTestStepL()
9807 TMMFSubtitleWindowConfig config;
9808 config.iWindowId = KSubtitleWindowId;
9809 config.iDisplayMode = KSubtitleDisplayMode;
9810 config.iRotation = KSubtitleRotation;
9811 config.iWindowClipRect = KSubtitleCrpRect;
9813 TInt err = iSubtitleCommands->AddSubtitleConfig(config);
9815 if (KErrNone != err)
9817 ERR_PRINTF3(_L("AddSubtitleConfig returned %d; expected %d"), err, KErrNone);
9821 return CheckExpectedFunctionText(KAddSubConfig);
9824 CTestStep_MMF_CTRLFRM_U_404::CTestStep_MMF_CTRLFRM_U_404()
9826 // store the name of this test case
9827 // this is the name that is used by the script file
9828 // Each test step initialises it's own name
9829 iTestStepName = _L("MM-MMF-CTLFRM-U-0404");
9832 TVerdict CTestStep_MMF_CTRLFRM_U_404::DoTestStepL()
9834 TMMFSubtitleWindowConfig config;
9835 config.iWindowId = KSubtitleWindowId;
9836 config.iDisplayMode = KSubtitleDisplayMode;
9837 config.iRotation = KSubtitleRotation;
9838 config.iWindowClipRect = KSubtitleCrpRect;
9840 TInt err = iSubtitleCommands->UpdateSubtitleConfig(config);
9842 if (KErrNone != err)
9844 ERR_PRINTF3(_L("UpdateSubtitleConfig returned %d; expected %d"), err, KErrNone);
9848 return CheckExpectedFunctionText(KUpdateSubConfig);
9851 CTestStep_MMF_CTRLFRM_U_405::CTestStep_MMF_CTRLFRM_U_405()
9853 // store the name of this test case
9854 // this is the name that is used by the script file
9855 // Each test step initialises it's own name
9856 iTestStepName = _L("MM-MMF-CTLFRM-U-0405");
9859 TVerdict CTestStep_MMF_CTRLFRM_U_405::DoTestStepL()
9861 TInt err = iSubtitleCommands->RemoveSubtitleConfig(KSubtitleWindowId);
9863 if (KErrNone != err)
9865 ERR_PRINTF3(_L("RemoveSubtitleConfig returned %d; expected %d"), err, KErrNone);
9869 return CheckExpectedFunctionText(KRemoveSubConfig);
9872 CTestStep_MMF_CTRLFRM_U_406::CTestStep_MMF_CTRLFRM_U_406()
9874 // store the name of this test case
9875 // this is the name that is used by the script file
9876 // Each test step initialises it's own name
9877 iTestStepName = _L("MM-MMF-CTLFRM-U-0406");
9880 TVerdict CTestStep_MMF_CTRLFRM_U_406::DoTestStepL()
9882 TWsGraphicId wsId(TWsGraphicId::EUninitialized);
9884 TInt err = iSubtitleCommands->GetCrpParameters(KSubtitleWindowId, wsId, rect);
9886 if (KErrNone != err)
9888 ERR_PRINTF3(_L("GetCrpParameters returned %d; expected %d"), err, KErrNone);
9892 TWsGraphicId wsIdExpected(KSubtitleWsGraphicId);
9893 if (wsIdExpected.Compare(wsId) != 0 || KSubtitleCrpRect != rect)
9895 ERR_PRINTF1(_L("Unexpected parameters retrieved from GetCrpParameters"));
9899 return CheckExpectedFunctionText(KGetCrpParams);
9902 CTestStep_MMF_CTRLFRM_U_407::CTestStep_MMF_CTRLFRM_U_407()
9904 // store the name of this test case
9905 // this is the name that is used by the script file
9906 // Each test step initialises it's own name
9907 iTestStepName = _L("MM-MMF-CTLFRM-U-0407");
9910 TVerdict CTestStep_MMF_CTRLFRM_U_407::DoTestStepL()
9912 RArray<TLanguage> languages;
9913 CleanupClosePushL(languages);
9914 TRAPD(err, iSubtitleCommands->GetSupportedSubtitleLanguagesL(languages));
9916 if (KErrNone != err)
9918 ERR_PRINTF3(_L("GetSupportedSubtitleLanguagesL left with code %d; expected %d"), err, KErrNone);
9919 CleanupStack::PopAndDestroy(&languages);
9923 if (languages.Count() != 3)
9925 ERR_PRINTF2(_L("Expected 3 languages, but got %d"), languages.Count());
9926 CleanupStack::PopAndDestroy(&languages);
9930 if (KSubtitleLanguage0 != languages[0] ||
9931 KSubtitleLanguage1 != languages[1] ||
9932 KSubtitleLanguage2 != languages[2])
9934 ERR_PRINTF1(_L("Unexpected language returned"));
9935 CleanupStack::PopAndDestroy(&languages);
9939 CleanupStack::PopAndDestroy(&languages);
9940 return CheckExpectedFunctionText(KGetSubLangSup);
9943 CTestStep_MMF_CTRLFRM_U_408::CTestStep_MMF_CTRLFRM_U_408()
9945 // store the name of this test case
9946 // this is the name that is used by the script file
9947 // Each test step initialises it's own name
9948 iTestStepName = _L("MM-MMF-CTLFRM-U-0408");
9951 TVerdict CTestStep_MMF_CTRLFRM_U_408::DoTestStepL()
9953 TLanguage language = ELangTest;
9954 TInt err = iSubtitleCommands->GetSubtitleLanguage(language);
9956 if (KErrNone != err)
9958 ERR_PRINTF3(_L("GetSubtitleLanguage returned %d; expected %d"), err, KErrNone);
9962 if (KSubtitleLanguage0 != language)
9964 ERR_PRINTF3(_L("Language is %d but expected %d"), language, KSubtitleLanguage0);
9968 return CheckExpectedFunctionText(KGetSubLang);
9971 CTestStep_MMF_CTRLFRM_U_409::CTestStep_MMF_CTRLFRM_U_409()
9973 // store the name of this test case
9974 // this is the name that is used by the script file
9975 // Each test step initialises it's own name
9976 iTestStepName = _L("MM-MMF-CTLFRM-U-0409");
9979 TVerdict CTestStep_MMF_CTRLFRM_U_409::DoTestStepL()
9981 TInt err = iSubtitleCommands->SetSubtitleLanguage(KSubtitleLanguage0);
9983 if (KErrNone != err)
9985 ERR_PRINTF3(_L("SetSubtitleLanguage returned %d; expected %d"), err, KErrNone);
9989 return CheckExpectedFunctionText(KSetSubLang);
9992 CTestStep_MMF_CTRLFRM_U_410::CTestStep_MMF_CTRLFRM_U_410()
9994 // store the name of this test case
9995 // this is the name that is used by the script file
9996 // Each test step initialises it's own name
9997 iTestStepName = _L("MM-MMF-CTLFRM-U-0410");
10000 TVerdict CTestStep_MMF_CTRLFRM_U_410::DoTestStepL()
10002 // Expect subtitle functions to fail with KErrNotSupported.
10003 SetExpectedSubtitlesAvailableL(KErrNotSupported);
10005 TBool avail = ETrue;
10007 TInt err = iSubtitleCommands->GetSubtitlesAvailable(avail);
10009 if (KErrNone != err)
10011 ERR_PRINTF2(_L("GetSubtitlesAvailable returned error %d; expected KErrNone"), err);
10017 ERR_PRINTF1(_L("GetSubtitlesAvailable reported subtitles as available."));
10021 err = iSubtitleCommands->EnableSubtitles();
10022 if (KErrNotSupported != err)
10024 ERR_PRINTF2(_L("EnableSubtitles returned error %d; expected KErrNotSupported"), err);
10028 err = iSubtitleCommands->DisableSubtitles();
10029 if (KErrNotSupported != err)
10031 ERR_PRINTF2(_L("DisableSubtitles returned error %d; expected KErrNotSupported"), err);
10035 TMMFSubtitleWindowConfig config;
10036 err = iSubtitleCommands->AddSubtitleConfig(config);
10037 if (KErrNotSupported != err)
10039 ERR_PRINTF2(_L("AddSubtitleConfig returned error %d; expected KErrNotSupported"), err);
10043 err = iSubtitleCommands->UpdateSubtitleConfig(config);
10044 if (KErrNotSupported != err)
10046 ERR_PRINTF2(_L("UpdateSubtitleConfig returned error %d; expected KErrNotSupported"), err);
10050 err = iSubtitleCommands->RemoveSubtitleConfig(0);
10051 if (KErrNotSupported != err)
10053 ERR_PRINTF2(_L("RemoveSubtitleConfig returned error %d; expected KErrNotSupported"), err);
10057 TWsGraphicId wsId(TWsGraphicId::EUninitialized);
10059 err = iSubtitleCommands->GetCrpParameters(0, wsId, rect);
10060 if (KErrNotSupported != err)
10062 ERR_PRINTF2(_L("GetCrpParameters returned error %d; expected KErrNotSupported"), err);
10066 TLanguage language;
10067 err = iSubtitleCommands->GetSubtitleLanguage(language);
10068 if (KErrNotSupported != err)
10070 ERR_PRINTF2(_L("GetSubtitleLanguage returned error %d; expected KErrNotSupported"), err);
10074 err = iSubtitleCommands->SetSubtitleLanguage(language);
10075 if (KErrNotSupported != err)
10077 ERR_PRINTF2(_L("SetSubtitleLanguage returned error %d; expected KErrNotSupported"), err);
10081 RArray<TLanguage> languages;
10082 TRAP(err, iSubtitleCommands->GetSupportedSubtitleLanguagesL(languages));
10084 if (KErrNotSupported != err)
10086 ERR_PRINTF2(_L("GetSupportedSubtitleLanguagesL returned error %d; expected KErrNotSupported"), err);
10093 #endif //SYMBIAN_MULTIMEDIA_SUBTITLE_SUPPORT
10095 //------------------------------------------------------------------
10097 CTestStep_MMF_CTLFRM_U_0300::CTestStep_MMF_CTLFRM_U_0300()
10101 // store the name of this test case
10102 // this is the name that is used by the script file
10103 // Each test step initialises it's own name
10104 iTestStepName = _L("MM-MMF-CTLFRM-U-0300");
10109 TVerdict CTestStep_MMF_CTLFRM_U_0300::DoTestStepL( void )
10111 INFO_PRINTF1(_L("Setting UHEAP_MARK"));
10112 INFO_PRINTF1(_L("CR1655 - Test to check that stack size has been set to 0x4000"));
10113 INFO_PRINTF1(_L("On emulator 1MB should be fine, since stack size cannot be set"));
10116 TVerdict verdict = EPass;
10118 TMMFPrioritySettings settings;
10119 TInt error = KErrNone;
10120 RMMFController controller;
10122 settings.iPriority = 1;
10123 settings.iPref = EMdaPriorityPreferenceTime;
10124 settings.iState = EMMFStateIdle;
10126 // Open a Custom Controller
10127 error = controller.Open(KTstControllerUid,settings);
10128 INFO_PRINTF2(_L("Controller Open: %d"), error);
10129 TUint32 expectedStackSize;
10132 //on hardware we expect the stack size to be set to what is in the resource file
10133 expectedStackSize=0x4000;
10135 //on emulator stack size is 1MB due to it being on a single process / windows thread
10136 expectedStackSize=0x100000;
10142 INFO_PRINTF1(_L("Calling CustomCommandSync"));
10143 TUid uid = {KMmfTestControllerUid};
10144 TMMFMessageDestination handleInfo(uid);
10145 TMMFMessageDestinationPckg messageDest(handleInfo);
10146 TPckg<TUint32> stacksize(0);
10148 error = controller.CustomCommandSync(messageDest, KFuncThreadStackSize, KNullDesC8, KNullDesC8,stacksize);
10152 if(stksz!=expectedStackSize || error)
10156 INFO_PRINTF2(_L("Stack Size is set to %d"),stksz);
10157 INFO_PRINTF1(_L("Closing Controller"));
10158 controller.Close();
10160 INFO_PRINTF1(_L("Setting UHEAP_MARKEND"));