First public contribution.
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.
16 #ifndef __TSI_MMFCTLFRMSTEP_H__
17 #define __TSI_MMFCTLFRMSTEP_H__
19 #include <testframework.h>
20 #include <mmf/common/mmfcontroller.h>
21 #include <mmf/server/mmffile.h>
23 // Test controller/data plugin UIDs.
24 // These are custom controllers provided by Integration Testing
27 #define KTSIMmfControllerUid 0x101f7bfa
28 #define KTSIMmfController2Uid 0x101f7bfc
29 #define KTSIMmfDataSinkUid 0x101f7bfe
30 #define KTSIMmfDataSourceUid 0x101f7c00
32 #define KTextBufLen 64
34 // priorities for controllers
37 ETSIMmfPriorityLow = 1,
38 ETSIMmfPriorityHigh = 11
41 // -----------------------------------
42 // RTestStepMmfCtlfrm, which is the base class for all
43 // the MMF CTLFRM suite test steps.
44 class RTestStepMmfCtlfrm : public RTestStep
50 // RTestStepMmfCtlfrmTest1
51 // base class with preamble / postamble to open and close a test controller
52 class RTestStepMmfCtlfrmTest1 : public RTestStepMmfCtlfrm
58 RMMFController iController;
59 TMMFPrioritySettings iSettings;
62 // RTestStepMmfCtlfrmTest2
63 // base class with preamble / postamble to open and close a test controller 2
64 class RTestStepMmfCtlfrmTest2 : public RTestStepMmfCtlfrm
70 RMMFController iController;
71 TMMFPrioritySettings iSettings;
74 // RTestStepMmfCtlfrmAudio
75 // base class with preamble / postamble to open and close the audio controller
76 // configured to receive events from the controlled
77 class RTestStepMmfCtlfrmAudio : public RTestStepMmfCtlfrm
84 //[ check if the event status is pending ]
85 TBool IsTimeOut( TRequestStatus& aEventStatus );
86 //[ cancel received events ]
87 void CancelReceivedEvents();
88 //[ is event sought the one we received ]
89 TBool IsSoughtEvent( TMMFEvent& aExpectedEvent, TMMFEventPckg& receivedEvent );
90 // [ search for expected event ]
91 TVerdict SearchForEvent( TMMFEvent& aExpectedEvent );
94 RMMFController iController;
95 TMMFPrioritySettings iSettings;
96 RTimer iTimer ; // escape timer for waiting on events
97 TMMFFileConfig iFileConfig; // audio file
100 // RTestStepMmfCtlfrmAudioPrimed
101 // same as above, with source/sink handles, and is primed in the preamble
102 class RTestStepMmfCtlfrmAudioPrimed : public RTestStepMmfCtlfrmAudio
109 TMMFMessageDestination* iSourceHandlePtr;
110 TMMFMessageDestination* iSinkHandlePtr;
113 // RTestStepMmfCtlfrmAudioNoSource
114 // same as RTestStepMmfCtlfrmAudio, but has no source or sink loaded yet
115 class RTestStepMmfCtlfrmAudioNoSource : public RTestStepMmfCtlfrmAudio
121 // RTestStepMmfCtlfrmDualAudio
122 // same as RTestStepMmfCtlfrmAudio, with 2 identical controllers
123 class RTestStepMmfCtlfrmDualAudio : public RTestStepMmfCtlfrm
130 //[ check if the event status is pending ]
131 TBool IsTimeOut( TRequestStatus& aEventStatus );
132 //[ cancel received events ]
133 void CancelReceivedEvents( TInt aWhichController );
134 //[ is event sought the one we received ]
135 TBool IsSoughtEvent( TMMFEvent& aExpectedEvent, TMMFEventPckg& receivedEvent );
136 // [ search for expected event ]
137 TVerdict SearchForEvent( TMMFEvent& aExpectedEvent, TInt aWhichController );
140 RMMFController iController1;
141 RMMFController iController2;
142 TMMFPrioritySettings iSettings;
143 RTimer iTimer ; // escape timer for waiting on events
144 TMMFFileConfig iFileConfig1; // audio file
145 TMMFFileConfig iFileConfig2; // audio file
148 // RTestStepMmfCtlfrmVideo
149 // base class with preamble / postamble to open and close the video controller
150 class RTestStepMmfCtlfrmVideo : public RTestStepMmfCtlfrm
157 RMMFController iController;
158 TMMFPrioritySettings iSettings;
159 TMMFFileConfig iFileConfig; // video file
163 #endif // __TSI_MMFCTLFRMSTEP_H__