1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmfunittest/MidiClnt/TestStepMidiClntAllocFailOpen.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,141 @@
1.4 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +
1.20 +#ifndef __TEST_STEP_MIDICLNT_ALLOCFAIL_OPEN__
1.21 +#define __TEST_STEP_MIDICLNT_ALLOCFAIL_OPEN__
1.22 +
1.23 +/**
1.24 + *
1.25 + * Test Open
1.26 + *
1.27 + * @lib "TSU_MMFMIDICLIENT.lib"
1.28 + *
1.29 + * @xxxx
1.30 + *
1.31 + */
1.32 +class CTestStepMidiClntAllocFailOpenFile : public CTestMmfMidiClntStep
1.33 + {
1.34 +public:
1.35 + static CTestStepMidiClntAllocFailOpenFile* NewL(const TDesC& aTestName);
1.36 + CTestStepMidiClntAllocFailOpenFile(const TDesC& aTestName);
1.37 + ~CTestStepMidiClntAllocFailOpenFile();
1.38 + virtual TVerdict DoTestStepPreambleL();
1.39 + virtual TVerdict DoTestStepPostambleL();
1.40 + virtual TVerdict DoTestStepL();
1.41 + void OpenFileAndStartSchedulerL();
1.42 + //For MS 3.4 Access File By Handle
1.43 + void OpenFileByHandleAndStartSchedulerL();
1.44 +
1.45 + // from MMidiClientUtilityObserver
1.46 + virtual void MmcuoStateChanged(TMidiState aOldState,TMidiState aNewState,const TTimeIntervalMicroSeconds& aTime,TInt aError);
1.47 + virtual void MmcuoTempoChanged(TInt aMicroBeatsPerMinute);
1.48 + virtual void MmcuoVolumeChanged(TInt aChannel,TReal32 aVolumeInDecibels);
1.49 + virtual void MmcuoMuteChanged(TInt aChannel,TBool aMuted);
1.50 + virtual void MmcuoSyncUpdate(const TTimeIntervalMicroSeconds& aMicroSeconds,TInt64 aMicroBeats);
1.51 + virtual void MmcuoMetaDataEntryFound(const TInt aMetaDataEntryId,const TTimeIntervalMicroSeconds& aPosition);
1.52 + virtual void MmcuoMipMessageReceived(const RArray<TMipMessageEntry>& aEntry);
1.53 + virtual void MmcuoPolyphonyChanged(TInt aNewPolyphony);
1.54 + virtual void MmcuoInstrumentChanged(TInt aChannel,TInt aBankId,TInt aInstrumentId);
1.55 +
1.56 +private:
1.57 + CMidiClientUtility* iMidiClnt;
1.58 + TBuf<KNameBufSize> iSectName;
1.59 + TBuf<KNameBufSize> iKeyName;
1.60 + TPtrC iFileName;
1.61 + RFs iFs;
1.62 + RFile iFile;
1.63 + };
1.64 +
1.65 +/**
1.66 + *
1.67 + * Test Open
1.68 + *
1.69 + * @lib "TSU_MMFMIDICLIENT.lib"
1.70 + *
1.71 + * @xxxx
1.72 + *
1.73 + */
1.74 +class CTestStepMidiClntAllocFailOpenDes : public CTestMmfMidiClntStep
1.75 + {
1.76 +public:
1.77 + static CTestStepMidiClntAllocFailOpenDes* NewL();
1.78 + CTestStepMidiClntAllocFailOpenDes();
1.79 + ~CTestStepMidiClntAllocFailOpenDes();
1.80 + virtual TVerdict DoTestStepPreambleL();
1.81 + virtual TVerdict DoTestStepPostambleL();
1.82 + virtual TVerdict DoTestStepL();
1.83 + void OpenDesAndStartSchedulerL();
1.84 +
1.85 + // from MMidiClientUtilityObserver
1.86 + virtual void MmcuoStateChanged(TMidiState aOldState,TMidiState aNewState,const TTimeIntervalMicroSeconds& aTime,TInt aError);
1.87 + virtual void MmcuoTempoChanged(TInt aMicroBeatsPerMinute);
1.88 + virtual void MmcuoVolumeChanged(TInt aChannel,TReal32 aVolumeInDecibels);
1.89 + virtual void MmcuoMuteChanged(TInt aChannel,TBool aMuted);
1.90 + virtual void MmcuoSyncUpdate(const TTimeIntervalMicroSeconds& aMicroSeconds,TInt64 aMicroBeats);
1.91 + virtual void MmcuoMetaDataEntryFound(const TInt aMetaDataEntryId,const TTimeIntervalMicroSeconds& aPosition);
1.92 + virtual void MmcuoMipMessageReceived(const RArray<TMipMessageEntry>& aEntry);
1.93 + virtual void MmcuoPolyphonyChanged(TInt aNewPolyphony);
1.94 + virtual void MmcuoInstrumentChanged(TInt aChannel,TInt aBankId,TInt aInstrumentId);
1.95 +
1.96 +private:
1.97 + CMidiClientUtility* iMidiClnt;
1.98 + TBuf<KNameBufSize> iSectName;
1.99 + TBuf<KNameBufSize> iKeyName;
1.100 + HBufC8* iAudio;
1.101 + TPtrC iFilename;
1.102 + };
1.103 +
1.104 +
1.105 +/**
1.106 + *
1.107 + * Test Open
1.108 + *
1.109 + * @lib "TSU_MMFMIDICLIENT.lib"
1.110 + *
1.111 + * @xxxx
1.112 + *
1.113 + */
1.114 +class CTestStepMidiClntAllocFailOpenUrl : public CTestMmfMidiClntStep
1.115 + {
1.116 +public:
1.117 + static CTestStepMidiClntAllocFailOpenUrl* NewL();
1.118 + CTestStepMidiClntAllocFailOpenUrl();
1.119 + ~CTestStepMidiClntAllocFailOpenUrl();
1.120 + virtual TVerdict DoTestStepPreambleL();
1.121 + virtual TVerdict DoTestStepPostambleL();
1.122 + virtual TVerdict DoTestStepL();
1.123 + void OpenUrlAndStartSchedulerL();
1.124 +
1.125 + // from MMidiClientUtilityObserver
1.126 + virtual void MmcuoStateChanged(TMidiState aOldState,TMidiState aNewState,const TTimeIntervalMicroSeconds& aTime,TInt aError);
1.127 + virtual void MmcuoTempoChanged(TInt aMicroBeatsPerMinute);
1.128 + virtual void MmcuoVolumeChanged(TInt aChannel,TReal32 aVolumeInDecibels);
1.129 + virtual void MmcuoMuteChanged(TInt aChannel,TBool aMuted);
1.130 + virtual void MmcuoSyncUpdate(const TTimeIntervalMicroSeconds& aMicroSeconds,TInt64 aMicroBeats);
1.131 + virtual void MmcuoMetaDataEntryFound(const TInt aMetaDataEntryId,const TTimeIntervalMicroSeconds& aPosition);
1.132 + virtual void MmcuoMipMessageReceived(const RArray<TMipMessageEntry>& aEntry);
1.133 + virtual void MmcuoPolyphonyChanged(TInt aNewPolyphony);
1.134 + virtual void MmcuoInstrumentChanged(TInt aChannel,TInt aBankId,TInt aInstrumentId);
1.135 +
1.136 +private:
1.137 + CMidiClientUtility* iMidiClnt;
1.138 + TBuf<KNameBufSize> iSectName;
1.139 + TBuf<KNameBufSize> iKeyName;
1.140 + TPtrC iUrlname;
1.141 + };
1.142 +
1.143 +
1.144 +#endif //(__TEST_STEP_MIDICLNT_ALLOCFAIL_OPEN__)