sl@0: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef __TSI_MMFCTLFRMSTEP_H__ sl@0: #define __TSI_MMFCTLFRMSTEP_H__ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: // Test controller/data plugin UIDs. sl@0: // These are custom controllers provided by Integration Testing sl@0: sl@0: // dummy controller sl@0: #define KTSIMmfControllerUid 0x101f7bfa sl@0: #define KTSIMmfController2Uid 0x101f7bfc sl@0: #define KTSIMmfDataSinkUid 0x101f7bfe sl@0: #define KTSIMmfDataSourceUid 0x101f7c00 sl@0: sl@0: #define KTextBufLen 64 sl@0: sl@0: // priorities for controllers sl@0: enum TTSIMmfPriority sl@0: { sl@0: ETSIMmfPriorityLow = 1, sl@0: ETSIMmfPriorityHigh = 11 sl@0: }; sl@0: sl@0: // ----------------------------------- sl@0: // RTestStepMmfCtlfrm, which is the base class for all sl@0: // the MMF CTLFRM suite test steps. sl@0: class RTestStepMmfCtlfrm : public RTestStep sl@0: { sl@0: public: sl@0: RTestStepMmfCtlfrm(); sl@0: }; sl@0: sl@0: // RTestStepMmfCtlfrmTest1 sl@0: // base class with preamble / postamble to open and close a test controller sl@0: class RTestStepMmfCtlfrmTest1 : public RTestStepMmfCtlfrm sl@0: { sl@0: public: sl@0: TVerdict OpenL(); sl@0: void Close(); sl@0: protected: sl@0: RMMFController iController; sl@0: TMMFPrioritySettings iSettings; sl@0: }; sl@0: sl@0: // RTestStepMmfCtlfrmTest2 sl@0: // base class with preamble / postamble to open and close a test controller 2 sl@0: class RTestStepMmfCtlfrmTest2 : public RTestStepMmfCtlfrm sl@0: { sl@0: public: sl@0: TVerdict OpenL(); sl@0: void Close(); sl@0: protected: sl@0: RMMFController iController; sl@0: TMMFPrioritySettings iSettings; sl@0: }; sl@0: sl@0: // RTestStepMmfCtlfrmAudio sl@0: // base class with preamble / postamble to open and close the audio controller sl@0: // configured to receive events from the controlled sl@0: class RTestStepMmfCtlfrmAudio : public RTestStepMmfCtlfrm sl@0: { sl@0: public: sl@0: TVerdict OpenL(); sl@0: void Close(); sl@0: sl@0: protected: sl@0: //[ check if the event status is pending ] sl@0: TBool IsTimeOut( TRequestStatus& aEventStatus ); sl@0: //[ cancel received events ] sl@0: void CancelReceivedEvents(); sl@0: //[ is event sought the one we received ] sl@0: TBool IsSoughtEvent( TMMFEvent& aExpectedEvent, TMMFEventPckg& receivedEvent ); sl@0: // [ search for expected event ] sl@0: TVerdict SearchForEvent( TMMFEvent& aExpectedEvent ); sl@0: sl@0: protected: sl@0: RMMFController iController; sl@0: TMMFPrioritySettings iSettings; sl@0: RTimer iTimer ; // escape timer for waiting on events sl@0: TMMFFileConfig iFileConfig; // audio file sl@0: }; sl@0: sl@0: // RTestStepMmfCtlfrmAudioPrimed sl@0: // same as above, with source/sink handles, and is primed in the preamble sl@0: class RTestStepMmfCtlfrmAudioPrimed : public RTestStepMmfCtlfrmAudio sl@0: { sl@0: public: sl@0: TVerdict OpenL(); sl@0: void Close(); sl@0: sl@0: protected: sl@0: TMMFMessageDestination* iSourceHandlePtr; sl@0: TMMFMessageDestination* iSinkHandlePtr; sl@0: }; sl@0: sl@0: // RTestStepMmfCtlfrmAudioNoSource sl@0: // same as RTestStepMmfCtlfrmAudio, but has no source or sink loaded yet sl@0: class RTestStepMmfCtlfrmAudioNoSource : public RTestStepMmfCtlfrmAudio sl@0: { sl@0: public: sl@0: TVerdict OpenL(); sl@0: }; sl@0: sl@0: // RTestStepMmfCtlfrmDualAudio sl@0: // same as RTestStepMmfCtlfrmAudio, with 2 identical controllers sl@0: class RTestStepMmfCtlfrmDualAudio : public RTestStepMmfCtlfrm sl@0: { sl@0: public: sl@0: TVerdict OpenL(); sl@0: void Close(); sl@0: sl@0: protected: sl@0: //[ check if the event status is pending ] sl@0: TBool IsTimeOut( TRequestStatus& aEventStatus ); sl@0: //[ cancel received events ] sl@0: void CancelReceivedEvents( TInt aWhichController ); sl@0: //[ is event sought the one we received ] sl@0: TBool IsSoughtEvent( TMMFEvent& aExpectedEvent, TMMFEventPckg& receivedEvent ); sl@0: // [ search for expected event ] sl@0: TVerdict SearchForEvent( TMMFEvent& aExpectedEvent, TInt aWhichController ); sl@0: sl@0: protected: sl@0: RMMFController iController1; sl@0: RMMFController iController2; sl@0: TMMFPrioritySettings iSettings; sl@0: RTimer iTimer ; // escape timer for waiting on events sl@0: TMMFFileConfig iFileConfig1; // audio file sl@0: TMMFFileConfig iFileConfig2; // audio file sl@0: }; sl@0: sl@0: // RTestStepMmfCtlfrmVideo sl@0: // base class with preamble / postamble to open and close the video controller sl@0: class RTestStepMmfCtlfrmVideo : public RTestStepMmfCtlfrm sl@0: { sl@0: public: sl@0: TVerdict OpenL(); sl@0: void Close(); sl@0: sl@0: protected: sl@0: RMMFController iController; sl@0: TMMFPrioritySettings iSettings; sl@0: TMMFFileConfig iFileConfig; // video file sl@0: }; sl@0: sl@0: sl@0: #endif // __TSI_MMFCTLFRMSTEP_H__