mmlibs/mmfw/tsrc/mmfunittest/MidiClnt/TestMidiClientUtility.h
changeset 0 40261b775718
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Header file: Basic  tests.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file TESTMIDICLIENTUTILITY.h
       
    20 */
       
    21 
       
    22 #ifndef TESTMIDICLIENTUTILITY_H__
       
    23 #define TESTMIDICLIENTUTILITY_H__
       
    24 
       
    25 #include <caf/caf.h>
       
    26 #include "TSU_MMFMIDICLNT.h"
       
    27 
       
    28 _LIT(KMidiFileName,"C:\\MidiClntITestData\\midi.mid");
       
    29 
       
    30 enum TMmcuoCallbacks
       
    31 {
       
    32 	EMmcuoTempoChanged,
       
    33 	EMmcuoVolumeChanged,
       
    34 	EMmcuoMuteChanged,
       
    35 	EMmcuoPolyphonyChanged,
       
    36 	EMmcuoInstrumentChanged,
       
    37 	EMmcuoSyncUpdate,
       
    38 	EMmcuoMetaDataEntryFound,
       
    39 	EMmcuoMipMessageReceived,
       
    40 	EMmcuoInvalid
       
    41 };
       
    42 
       
    43 
       
    44 /**
       
    45  * Load and initialise a midi file.
       
    46  *
       
    47  * @class CTestMidiClntOpenFile
       
    48  *
       
    49  * Req. under test 
       
    50  */
       
    51 class CTestMidiClntOpenFile : public CTestMmfMidiClntStep
       
    52 	{
       
    53 public:
       
    54 	CTestMidiClntOpenFile(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
       
    55 	~CTestMidiClntOpenFile() {};
       
    56 	static CTestMidiClntOpenFile* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
       
    57 	// From Base Class
       
    58 	virtual TVerdict DoTestStepL();
       
    59 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
    60 
       
    61 protected:
       
    62 	TBuf<KNameBufSize> iSectName;			// Section name for retrieving filename
       
    63 	TBuf<KNameBufSize> iKeyName;			// Key name for retrieving filename
       
    64 	const TBool iPlay;						// Does this test require playing the Audio file 
       
    65 	TTimeIntervalMicroSeconds iDuration;	// Stores duration of Audio file
       
    66 
       
    67 	};
       
    68 
       
    69 /**
       
    70  * Load and initialise a midi file.
       
    71  *
       
    72  * @class CTestMidiClntOpenDes
       
    73  *
       
    74  * Req. under test 
       
    75  */
       
    76 class CTestMidiClntOpenDes : public CTestMmfMidiClntStep
       
    77 	{
       
    78 public:
       
    79 	CTestMidiClntOpenDes(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
       
    80 	~CTestMidiClntOpenDes() {};
       
    81 	static CTestMidiClntOpenDes* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
       
    82 	// From Base Class
       
    83 	virtual TVerdict DoTestStepL();
       
    84 	virtual TVerdict DoTestStepPreambleL();
       
    85 	virtual TVerdict DoTestStepPostambleL();
       
    86 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
    87 
       
    88 protected:
       
    89 	TBuf<KNameBufSize> iSectName;			// Section name for retrieving filename
       
    90 	TBuf<KNameBufSize> iKeyName;			// Key name for retrieving filename
       
    91 	const TBool iPlay;						// Does this test require playing the Audio file 
       
    92 	TTimeIntervalMicroSeconds iDuration;	// Stores duration of Audio file
       
    93 	HBufC8* iAudio;							// Buffer for holding audio descriptor data
       
    94 	};
       
    95 
       
    96 /**
       
    97  * Load and initialise a midi file.
       
    98  *
       
    99  * @class CTestMidiClntOpenUrl
       
   100  *
       
   101  * Req. under test 
       
   102  */
       
   103 class CTestMidiClntOpenUrl : public CTestMmfMidiClntStep
       
   104 	{
       
   105 public:
       
   106 	CTestMidiClntOpenUrl(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
       
   107 	~CTestMidiClntOpenUrl() {};
       
   108 	static CTestMidiClntOpenUrl* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
       
   109 	// From Base Class
       
   110 	virtual TVerdict DoTestStepL();
       
   111 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   112 
       
   113 protected:
       
   114 	TBuf<KNameBufSize> iSectName;			// Section name for retrieving filename
       
   115 	TBuf<KNameBufSize> iKeyName;			// Key name for retrieving filename
       
   116 	const TBool iPlay;						// Does this test require playing the Audio file 
       
   117 	TTimeIntervalMicroSeconds iDuration;	// Stores duration of Audio file
       
   118 	};
       
   119 
       
   120 /**
       
   121  * Close a midi file.
       
   122  *
       
   123  * @class CTestMidiClntClose
       
   124  *
       
   125  * Req. under test 
       
   126  */
       
   127 class CTestMidiClntClose : public CTestMmfMidiClntStep
       
   128 	{
       
   129 public:
       
   130 	static CTestMidiClntClose* NewL(const TDesC& aTestName);
       
   131 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   132 private:
       
   133 	CTestMidiClntClose(const TDesC& aTestName);
       
   134 	~CTestMidiClntClose() {};
       
   135 	};
       
   136 
       
   137 /**
       
   138  * Play a midi file.
       
   139  *
       
   140  * @class CTestMidiClntPlay
       
   141  *
       
   142  * Req. under test 
       
   143  */
       
   144 class CTestMidiClntPlay : public CTestMmfMidiClntStep
       
   145 	{
       
   146 public:
       
   147 	static CTestMidiClntPlay* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   148 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   149 private:
       
   150 	CTestMidiClntPlay(const TDesC& aTestName, const TTestStepType aTestType);
       
   151 	~CTestMidiClntPlay() {};
       
   152 	};
       
   153 
       
   154 /**
       
   155  * Stop a midi file.
       
   156  *
       
   157  * @class CTestMidiClntStop
       
   158  *
       
   159  * Req. under test 
       
   160  */
       
   161 class CTestMidiClntStop : public CTestMmfMidiClntStep
       
   162 	{
       
   163 public:
       
   164 	static CTestMidiClntStop* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   165 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   166 private:
       
   167 	CTestMidiClntStop(const TDesC& aTestName, const TTestStepType aTestType);
       
   168 	~CTestMidiClntStop() {};
       
   169 	};
       
   170 
       
   171 /**
       
   172  * Returns the state of the midi device.
       
   173  *
       
   174  * @class CTestMidiClntGetState
       
   175  *
       
   176  * Req. under test 
       
   177  */
       
   178 class CTestMidiClntGetState : public CTestMidiClntOpenFile // ** N.B.
       
   179 	{
       
   180 public:
       
   181 	static CTestMidiClntGetState* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,
       
   182 									   const TTestStepType aTestType, const TBool aPlay);
       
   183 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   184 private:
       
   185 	CTestMidiClntGetState(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,
       
   186 						  const TTestStepType aTestType, const TBool aPlay);
       
   187 	~CTestMidiClntGetState() {};
       
   188 	};
       
   189 
       
   190 /**
       
   191  * Play midi note.
       
   192  *
       
   193  * @class CTestMidiClntPlayNote
       
   194  *
       
   195  * Req. under test 
       
   196  */
       
   197 class CTestMidiClntPlayNote : public CTestMmfMidiClntStep
       
   198 	{
       
   199 public:
       
   200 	static CTestMidiClntPlayNote* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   201 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   202 private:
       
   203 	CTestMidiClntPlayNote(const TDesC& aTestName, const TTestStepType aTestType);
       
   204 	~CTestMidiClntPlayNote() {};
       
   205 	};
       
   206 
       
   207 /**
       
   208  * Play midi note with start time.
       
   209  *
       
   210  * @class CTestMidiClntPlayNoteStartTime
       
   211  *
       
   212  * Req. under test 
       
   213  */
       
   214 class CTestMidiClntPlayNoteStartTime : public CTestMmfMidiClntStep
       
   215 	{
       
   216 public:
       
   217 	static CTestMidiClntPlayNoteStartTime* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   218 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   219 private:
       
   220 	CTestMidiClntPlayNoteStartTime(const TDesC& aTestName, const TTestStepType aTestType);
       
   221 	~CTestMidiClntPlayNoteStartTime() {};
       
   222 	};
       
   223 
       
   224 /**
       
   225  * Stop midi note.
       
   226  *
       
   227  * @class CTestMidiClntStopNotes
       
   228  *
       
   229  * Req. under test 
       
   230  */
       
   231 class CTestMidiClntStopNotes : public CTestMmfMidiClntStep
       
   232 	{
       
   233 public:
       
   234 	static CTestMidiClntStopNotes* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   235 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   236 private:
       
   237 	CTestMidiClntStopNotes(const TDesC& aTestName, const TTestStepType aTestType);
       
   238 	~CTestMidiClntStopNotes() {};
       
   239 	};
       
   240 
       
   241 /**
       
   242  * Midi note on.
       
   243  *
       
   244  * @class CTestMidiClntNoteOn
       
   245  *
       
   246  * Req. under test 
       
   247  */
       
   248 class CTestMidiClntNoteOn : public CTestMmfMidiClntStep
       
   249 	{
       
   250 public:
       
   251 	static CTestMidiClntNoteOn* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   252 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   253 private:
       
   254 	CTestMidiClntNoteOn(const TDesC& aTestName, const TTestStepType aTestType);
       
   255 	~CTestMidiClntNoteOn() {};
       
   256 	};
       
   257 
       
   258 /**
       
   259  * Midi note off.
       
   260  *
       
   261  * @class CTestMidiClntNoteOff
       
   262  *
       
   263  * Req. under test 
       
   264  */
       
   265 class CTestMidiClntNoteOff : public CTestMmfMidiClntStep
       
   266 	{
       
   267 public:
       
   268 	static CTestMidiClntNoteOff* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   269 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   270 private:
       
   271 	CTestMidiClntNoteOff(const TDesC& aTestName, const TTestStepType aTestType);
       
   272 	~CTestMidiClntNoteOff() {};
       
   273 	};
       
   274 
       
   275 /**
       
   276  * Returns play back rate of the midi device.
       
   277  *
       
   278  * @class CTestMidiClntReturnPlaybackRate
       
   279  *
       
   280  * Req. under test 
       
   281  */
       
   282 class CTestMidiClntReturnPlaybackRate : public CTestMmfMidiClntStep
       
   283 	{
       
   284 public:
       
   285 	static CTestMidiClntReturnPlaybackRate* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   286 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   287 private:
       
   288 	CTestMidiClntReturnPlaybackRate(const TDesC& aTestName, const TTestStepType aTestType);
       
   289 	~CTestMidiClntReturnPlaybackRate() {};
       
   290 	};
       
   291 
       
   292 /**
       
   293  * Sets the play back rate of the midi device.
       
   294  *
       
   295  * @class CTestMidiClntSetPlaybackRate
       
   296  *
       
   297  * Req. under test 
       
   298  */
       
   299 class CTestMidiClntSetPlaybackRate : public CTestMmfMidiClntStep
       
   300 	{
       
   301 public:
       
   302 	static CTestMidiClntSetPlaybackRate* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   303 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   304 private:
       
   305 	CTestMidiClntSetPlaybackRate(const TDesC& aTestName, const TTestStepType aTestType);
       
   306 	~CTestMidiClntSetPlaybackRate() {};
       
   307 	};
       
   308 
       
   309 /**
       
   310  * Returns the max play rate of the midi device.
       
   311  *
       
   312  * @class CTestMidiClntReturnMaxPlayRate
       
   313  *
       
   314  * Req. under test 
       
   315  */
       
   316 class CTestMidiClntReturnMaxPlayRate : public CTestMmfMidiClntStep
       
   317 	{
       
   318 public:
       
   319 	static CTestMidiClntReturnMaxPlayRate* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   320 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   321 private:
       
   322 	CTestMidiClntReturnMaxPlayRate(const TDesC& aTestName, const TTestStepType aTestType);
       
   323 	~CTestMidiClntReturnMaxPlayRate() {};
       
   324 	};
       
   325 
       
   326 /**
       
   327  * Returns the min play rate of the midi device.
       
   328  *
       
   329  * @class CTestMidiClntReturnMinPlayRate
       
   330  *
       
   331  * Req. under test 
       
   332  */
       
   333 class CTestMidiClntReturnMinPlayRate : public CTestMmfMidiClntStep
       
   334 	{
       
   335 public:
       
   336 	static CTestMidiClntReturnMinPlayRate* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   337 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   338 private:
       
   339 	CTestMidiClntReturnMinPlayRate(const TDesC& aTestName, const TTestStepType aTestType);
       
   340 	~CTestMidiClntReturnMinPlayRate() {};
       
   341 	};
       
   342 
       
   343 /**
       
   344  * Sets the micro bpm (beats per minute)
       
   345  *
       
   346  * @class CTestMidiClntTempoMicroBeatsPerMinute
       
   347  *
       
   348  * Req. under test 
       
   349  */
       
   350 class CTestMidiClntTempoMicroBeatsPerMinute : public CTestMmfMidiClntStep
       
   351 	{
       
   352 public:
       
   353 	static CTestMidiClntTempoMicroBeatsPerMinute* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   354 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   355 private:
       
   356 	CTestMidiClntTempoMicroBeatsPerMinute(const TDesC& aTestName, const TTestStepType aTestType);
       
   357 	~CTestMidiClntTempoMicroBeatsPerMinute() {};
       
   358 	};
       
   359 
       
   360 /**
       
   361  * Sets the tempo micro bpm (beats per minute)
       
   362  *
       
   363  * @class CTestMidiClntSetTempo
       
   364  *
       
   365  * Req. under test 
       
   366  */
       
   367 class CTestMidiClntSetTempo : public CTestMmfMidiClntStep
       
   368 	{
       
   369 public:
       
   370 	static CTestMidiClntSetTempo* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   371 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   372 private:
       
   373 	CTestMidiClntSetTempo(const TDesC& aTestName, const TTestStepType aTestType);
       
   374 	~CTestMidiClntSetTempo() {};
       
   375 	};
       
   376 
       
   377 /**
       
   378  * Get Pitch Transposition in Cents
       
   379  *
       
   380  * @class CTestMidiClntGetPitchTranspositionCents
       
   381  *
       
   382  * Req. under test 
       
   383  */
       
   384 class CTestMidiClntGetPitchTranspositionCents : public CTestMmfMidiClntStep
       
   385 	{
       
   386 public:
       
   387 	static CTestMidiClntGetPitchTranspositionCents* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   388 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   389 private:
       
   390 	CTestMidiClntGetPitchTranspositionCents(const TDesC& aTestName, const TTestStepType aTestType);
       
   391 	~CTestMidiClntGetPitchTranspositionCents() {};
       
   392 private:
       
   393 	TInt iTestType;
       
   394 	};
       
   395 
       
   396 /**
       
   397  * Set Pitch Transposition in Cents
       
   398  *
       
   399  * @class CTestMidiClntSetPitchTransposition
       
   400  *
       
   401  * Req. under test 
       
   402  */
       
   403 class CTestMidiClntSetPitchTransposition : public CTestMmfMidiClntStep
       
   404 	{
       
   405 public:
       
   406 	static CTestMidiClntSetPitchTransposition* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   407 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   408 private:
       
   409 	CTestMidiClntSetPitchTransposition(const TDesC& aTestName, const TTestStepType aTestType);
       
   410 	~CTestMidiClntSetPitchTransposition() {};
       
   411 	};
       
   412 
       
   413 /**
       
   414  * Return duration in micro seconds
       
   415  *
       
   416  * @class CTestMidiClntDurationMicroSeconds
       
   417  *
       
   418  * Req. under test 
       
   419  */
       
   420 class CTestMidiClntDurationMicroSeconds : public CTestMmfMidiClntStep
       
   421 	{
       
   422 public:
       
   423 	static CTestMidiClntDurationMicroSeconds* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   424 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   425 private:
       
   426 	CTestMidiClntDurationMicroSeconds(const TDesC& aTestName, const TTestStepType aTestType);
       
   427 	~CTestMidiClntDurationMicroSeconds() {};
       
   428 	};
       
   429 
       
   430 /**
       
   431  * Return duration in micro beats
       
   432  *
       
   433  * @class CTestMidiClntDurationMicroBeats
       
   434  *
       
   435  * Req. under test 
       
   436  */
       
   437 class CTestMidiClntDurationMicroBeats : public CTestMmfMidiClntStep
       
   438 	{
       
   439 public:
       
   440 	static CTestMidiClntDurationMicroBeats* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   441 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   442 private:
       
   443 	CTestMidiClntDurationMicroBeats(const TDesC& aTestName, const TTestStepType aTestType);
       
   444 	~CTestMidiClntDurationMicroBeats() {};
       
   445 	};
       
   446 
       
   447 /**
       
   448  * Return number of tracks
       
   449  *
       
   450  * @class CTestMidiClntNumTracks
       
   451  *
       
   452  * Req. under test 
       
   453  */
       
   454 class CTestMidiClntNumTracks : public CTestMmfMidiClntStep
       
   455 	{
       
   456 public:
       
   457 	static CTestMidiClntNumTracks* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   458 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   459 private:
       
   460 	CTestMidiClntNumTracks(const TDesC& aTestName, const TTestStepType aTestType);
       
   461 	~CTestMidiClntNumTracks() {};
       
   462 	};
       
   463 
       
   464 /**
       
   465  * Mute track
       
   466  *
       
   467  * @class CTestMidiClntSetTrackMute
       
   468  *
       
   469  * Req. under test 
       
   470  */
       
   471 class CTestMidiClntSetTrackMute : public CTestMmfMidiClntStep
       
   472 	{
       
   473 public:
       
   474 	static CTestMidiClntSetTrackMute* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   475 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   476 private:
       
   477 	CTestMidiClntSetTrackMute(const TDesC& aTestName, const TTestStepType aTestType);
       
   478 	~CTestMidiClntSetTrackMute() {};
       
   479 	};
       
   480 
       
   481 /**
       
   482  * Returns MimeType
       
   483  *
       
   484  * @class CTestMidiClntMimeType
       
   485  *
       
   486  * Req. under test 
       
   487  */
       
   488 class CTestMidiClntMimeType : public CTestMmfMidiClntStep
       
   489 	{
       
   490 public:
       
   491 	static CTestMidiClntMimeType* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   492 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   493 private:
       
   494 	CTestMidiClntMimeType(const TDesC& aTestName, const TTestStepType aTestType);
       
   495 	~CTestMidiClntMimeType() {};
       
   496 	};
       
   497 
       
   498 /**
       
   499  * Returns MimeTypes Supported
       
   500  *
       
   501  * @class CTestMidiClntGetMimeTypesSupported
       
   502  *
       
   503  * Req. under test 
       
   504  */
       
   505 class CTestMidiClntGetMimeTypesSupported : public CTestMmfMidiClntStep
       
   506 	{
       
   507 public:
       
   508 	static CTestMidiClntGetMimeTypesSupported* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   509 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   510 private:
       
   511 	CTestMidiClntGetMimeTypesSupported(const TDesC& aTestName, const TTestStepType aTestType);
       
   512 	~CTestMidiClntGetMimeTypesSupported() {};
       
   513 	};
       
   514 
       
   515 /**
       
   516  * Sets position in micro seconds
       
   517  *
       
   518  * @class CTestMidiClntPositionMicroSeconds
       
   519  *
       
   520  * Req. under test 
       
   521  */
       
   522 class CTestMidiClntPositionMicroSeconds : public CTestMmfMidiClntStep
       
   523 	{
       
   524 public:
       
   525 	static CTestMidiClntPositionMicroSeconds* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   526 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   527 private:
       
   528 	CTestMidiClntPositionMicroSeconds(const TDesC& aTestName, const TTestStepType aTestType);
       
   529 	~CTestMidiClntPositionMicroSeconds() {};
       
   530 	};
       
   531 
       
   532 /**
       
   533  * Returns position in micro seconds
       
   534  *
       
   535  * @class CTestMidiClntReturnPositionMicroSeconds
       
   536  *
       
   537  * Req. under test 
       
   538  */
       
   539 class CTestMidiClntReturnPositionMicroSeconds : public CTestMmfMidiClntStep
       
   540 	{
       
   541 public:
       
   542 	static CTestMidiClntReturnPositionMicroSeconds* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   543 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   544 private:
       
   545 	CTestMidiClntReturnPositionMicroSeconds(const TDesC& aTestName, const TTestStepType aTestType);
       
   546 	~CTestMidiClntReturnPositionMicroSeconds() {};
       
   547 	};
       
   548 
       
   549 /**
       
   550  * Sets position in micro seconds
       
   551  *
       
   552  * @class CTestMidiClntSetPositionMicroSeconds
       
   553  *
       
   554  * Req. under test 
       
   555  */
       
   556 class CTestMidiClntSetPositionMicroSeconds : public CTestMmfMidiClntStep
       
   557 	{
       
   558 public:
       
   559 	static CTestMidiClntSetPositionMicroSeconds* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   560 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   561 private:
       
   562 	CTestMidiClntSetPositionMicroSeconds(const TDesC& aTestName, const TTestStepType aTestType);
       
   563 	~CTestMidiClntSetPositionMicroSeconds() {};
       
   564 	};
       
   565 
       
   566 /**
       
   567  * Returns position in micro beats
       
   568  *
       
   569  * @class CTestMidiClntReturnsPositionMicroBeats
       
   570  *
       
   571  * Req. under test 
       
   572  */
       
   573 class CTestMidiClntReturnsPositionMicroBeats : public CTestMmfMidiClntStep
       
   574 	{
       
   575 public:
       
   576 	static CTestMidiClntReturnsPositionMicroBeats* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   577 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   578 private:
       
   579 	CTestMidiClntReturnsPositionMicroBeats(const TDesC& aTestName, const TTestStepType aTestType);
       
   580 	~CTestMidiClntReturnsPositionMicroBeats() {};
       
   581 	};
       
   582 
       
   583 /**
       
   584  * Sets position in micro beats
       
   585  *
       
   586  * @class CTestMidiClntSetPositionMicroBeats
       
   587  *
       
   588  * Req. under test 
       
   589  */
       
   590 class CTestMidiClntSetPositionMicroBeats : public CTestMmfMidiClntStep
       
   591 	{
       
   592 public:
       
   593 	static CTestMidiClntSetPositionMicroBeats* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   594 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   595 private:
       
   596 	CTestMidiClntSetPositionMicroBeats(const TDesC& aTestName, const TTestStepType aTestType);
       
   597 	~CTestMidiClntSetPositionMicroBeats() {};
       
   598 	};
       
   599 
       
   600 /**
       
   601  * Sets the sync update call back interval
       
   602  *
       
   603  * @class CTestSetSyncUpdateCallbackInterval
       
   604  *
       
   605  * Req. under test 
       
   606  */
       
   607 class CTestSetSyncUpdateCallbackInterval : public CTestMmfMidiClntStep
       
   608 	{
       
   609 public:
       
   610 	static CTestSetSyncUpdateCallbackInterval* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   611 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   612 private:
       
   613 	CTestSetSyncUpdateCallbackInterval(const TDesC& aTestName, const TTestStepType aTestType);
       
   614 	~CTestSetSyncUpdateCallbackInterval() {};
       
   615 	};
       
   616 
       
   617 // -----------------------------------------------------------------------------------------------
       
   618 
       
   619 /**
       
   620  * Send a midi message
       
   621  *
       
   622  * @class CTestSendMessage
       
   623  *
       
   624  * Req. under test 
       
   625  */
       
   626 class CTestSendMessage : public CTestMmfMidiClntStep
       
   627 	{
       
   628 public:
       
   629 	static CTestSendMessage* NewL(const TDesC& aTestName,
       
   630 								  const TTestStepType aTestType, const TDesC8& aMessage);
       
   631 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   632 private:
       
   633 	CTestSendMessage(const TDesC& aTestName,
       
   634 					 const TTestStepType aTestType, const TDesC8& aMessage);
       
   635 	~CTestSendMessage() {};
       
   636 
       
   637 private:
       
   638 	TBuf8<KNameBufSize> iMessage;
       
   639 	};
       
   640 
       
   641 // class CTestSendMessageTime incorporated in CTestSendMessage
       
   642 
       
   643 /**
       
   644  * Send a Mip (Maximum Instantenous Polyphony) message
       
   645  *
       
   646  * @class CTestSendMipMessage
       
   647  *
       
   648  * Req. under test 
       
   649  */
       
   650 class CTestSendMipMessage : public CTestMmfMidiClntStep
       
   651 	{
       
   652 public:
       
   653 	static CTestSendMipMessage* NewL(const TDesC& aTestName,
       
   654 								  const TTestStepType aTestType);
       
   655 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   656 private:
       
   657 	CTestSendMipMessage(const TDesC& aTestName,
       
   658 					 const TTestStepType aTestType);
       
   659 	~CTestSendMipMessage() {};
       
   660 
       
   661 	};
       
   662 
       
   663 /**
       
   664  * Number of banks
       
   665  *
       
   666  * @class CTestNumberOfBanks
       
   667  *
       
   668  * Req. under test 
       
   669  */
       
   670 class CTestNumberOfBanks : public CTestMmfMidiClntStep
       
   671 	{
       
   672 public:
       
   673 	static CTestNumberOfBanks* NewL(const TDesC& aTestName,
       
   674 								  const TTestStepType aTestType);
       
   675 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   676 private:
       
   677 	CTestNumberOfBanks(const TDesC& aTestName,
       
   678 								  const TTestStepType aTestType);
       
   679 	~CTestNumberOfBanks() {};
       
   680 	};
       
   681 
       
   682 /**
       
   683  * Return bank id
       
   684  *
       
   685  * @class CTestGetBankId
       
   686  *
       
   687  * Req. under test 
       
   688  */
       
   689 class CTestGetBankId : public CTestMmfMidiClntStep
       
   690 	{
       
   691 public:
       
   692 	static CTestGetBankId* NewL(const TDesC& aTestName,
       
   693 								  const TTestStepType aTestType);
       
   694 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   695 private:
       
   696 	CTestGetBankId(const TDesC& aTestName,
       
   697 								  const TTestStepType aTestType);
       
   698 	~CTestGetBankId() {};
       
   699 	};
       
   700 
       
   701 /**
       
   702  * Load custom bank
       
   703  *
       
   704  * @class CTestLoadCustomBank
       
   705  *
       
   706  * Req. under test 
       
   707  */
       
   708 class CTestLoadCustomBank : public CTestMmfMidiClntStep
       
   709 	{
       
   710 public:
       
   711 	static CTestLoadCustomBank* NewL(const TDesC& aTestName,
       
   712 								  const TTestStepType aTestType);
       
   713 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   714 private:
       
   715 	CTestLoadCustomBank(const TDesC& aTestName,
       
   716 								  const TTestStepType aTestType);
       
   717 	~CTestLoadCustomBank() {};
       
   718 	};
       
   719 
       
   720 /**
       
   721  * Unload custom bank
       
   722  *
       
   723  * @class CTestUnloadCustomBank
       
   724  *
       
   725  * Req. under test 
       
   726  */
       
   727 class CTestUnloadCustomBank : public CTestMmfMidiClntStep
       
   728 	{
       
   729 public:
       
   730 	static CTestUnloadCustomBank* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   731 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   732 private:
       
   733 	CTestUnloadCustomBank(const TDesC& aTestName, const TTestStepType aTestType);
       
   734 	~CTestUnloadCustomBank() {};
       
   735 	};
       
   736 
       
   737 /**
       
   738  * Unload all custom banks
       
   739  *
       
   740  * @class CTestUnloadAllCustomBanks
       
   741  *
       
   742  * Req. under test 
       
   743  */
       
   744 class CTestUnloadAllCustomBanks : public CTestMmfMidiClntStep
       
   745 	{
       
   746 public:
       
   747 	static CTestUnloadAllCustomBanks* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   748 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   749 private:
       
   750 	CTestUnloadAllCustomBanks(const TDesC& aTestName, const TTestStepType aTestType);
       
   751 	~CTestUnloadAllCustomBanks() {};
       
   752 	};
       
   753 
       
   754 /**
       
   755  * Return the number of instruments
       
   756  *
       
   757  * @class CTestNumberOfInstruments
       
   758  *
       
   759  * Req. under test 
       
   760  */
       
   761 class CTestNumberOfInstruments : public CTestMmfMidiClntStep
       
   762 	{
       
   763 public:
       
   764 	static CTestNumberOfInstruments* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   765 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   766 private:
       
   767 	CTestNumberOfInstruments(const TDesC& aTestName, const TTestStepType aTestType);
       
   768 	~CTestNumberOfInstruments() {};
       
   769 	};
       
   770 
       
   771 /**
       
   772  * Returns instrument id
       
   773  *
       
   774  * @class CTestGetInstrumentId
       
   775  *
       
   776  * Req. under test 
       
   777  */
       
   778 class CTestGetInstrumentId : public CTestMmfMidiClntStep
       
   779 	{
       
   780 public:
       
   781 	static CTestGetInstrumentId* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   782 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   783 private:
       
   784 	CTestGetInstrumentId(const TDesC& aTestName, const TTestStepType aTestType);
       
   785 	~CTestGetInstrumentId() {};
       
   786 	};
       
   787 
       
   788 /**
       
   789  * Returns instrument name
       
   790  *
       
   791  * @class CTestReturnsInstrumentName
       
   792  *
       
   793  * Req. under test 
       
   794  */
       
   795 class CTestReturnsInstrumentName : public CTestMmfMidiClntStep
       
   796 	{
       
   797 public:
       
   798 	static CTestReturnsInstrumentName* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   799 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   800 private:
       
   801 	CTestReturnsInstrumentName(const TDesC& aTestName, const TTestStepType aTestType);
       
   802 	~CTestReturnsInstrumentName() {};
       
   803 	};
       
   804 
       
   805 /**
       
   806  * Returns instrument
       
   807  *
       
   808  * @class CTestGetInstrument
       
   809  *
       
   810  * Req. under test 
       
   811  */
       
   812 class CTestGetInstrument : public CTestMmfMidiClntStep
       
   813 	{
       
   814 public:
       
   815 	static CTestGetInstrument* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   816 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   817 private:
       
   818 	CTestGetInstrument(const TDesC& aTestName, const TTestStepType aTestType);
       
   819 	~CTestGetInstrument() {};
       
   820 	};
       
   821 
       
   822 /**
       
   823  * Set instrument
       
   824  *
       
   825  * @class CTestSetInstrument
       
   826  *
       
   827  * Req. under test 
       
   828  */
       
   829 class CTestSetInstrument : public CTestMmfMidiClntStep
       
   830 	{
       
   831 public:
       
   832 	static CTestSetInstrument* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   833 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   834 private:
       
   835 	CTestSetInstrument(const TDesC& aTestName, const TTestStepType aTestType);
       
   836 	~CTestSetInstrument() {};
       
   837 	};
       
   838 
       
   839 /**
       
   840  * Load custom instrument
       
   841  *
       
   842  * @class CTestLoadCustomInstrument
       
   843  *
       
   844  * Req. under test 
       
   845  */
       
   846 class CTestLoadCustomInstrument : public CTestMmfMidiClntStep
       
   847 	{
       
   848 public:
       
   849 	static CTestLoadCustomInstrument* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   850 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   851 private:
       
   852 	CTestLoadCustomInstrument(const TDesC& aTestName, const TTestStepType aTestType);
       
   853 	~CTestLoadCustomInstrument() {};
       
   854 	};
       
   855 
       
   856 
       
   857 /**
       
   858  * Load custom instrument data
       
   859  *
       
   860  * @class CTestLoadCustomInstrumentData
       
   861  *
       
   862  * Req. under test 
       
   863  */
       
   864 class CTestLoadCustomInstrumentData : public CTestMmfMidiClntStep
       
   865 	{
       
   866 public:
       
   867 	static CTestLoadCustomInstrumentData* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   868 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   869 private:
       
   870 	CTestLoadCustomInstrumentData(const TDesC& aTestName, const TTestStepType aTestType);
       
   871 	~CTestLoadCustomInstrumentData() {};
       
   872 	};
       
   873 
       
   874 
       
   875 /**
       
   876  * Unload custom instrument
       
   877  *
       
   878  * @class CTestUnloadCustomInstrument
       
   879  *
       
   880  * Req. under test 
       
   881  */
       
   882 class CTestUnloadCustomInstrument : public CTestMmfMidiClntStep
       
   883 	{
       
   884 public:
       
   885 	static CTestUnloadCustomInstrument* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   886 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   887 private:
       
   888 	CTestUnloadCustomInstrument(const TDesC& aTestName, const TTestStepType aTestType);
       
   889 	~CTestUnloadCustomInstrument() {};
       
   890 	};
       
   891 
       
   892 /**
       
   893  * Get percussion key name
       
   894  *
       
   895  * @class CTestPercussionKeyName
       
   896  *
       
   897  * Req. under test 
       
   898  */
       
   899 class CTestPercussionKeyName : public CTestMmfMidiClntStep
       
   900 	{
       
   901 public:
       
   902 	static CTestPercussionKeyName* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   903 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   904 private:
       
   905 	CTestPercussionKeyName(const TDesC& aTestName, const TTestStepType aTestType);
       
   906 	~CTestPercussionKeyName() {};
       
   907 	};
       
   908 
       
   909 /**
       
   910  * Stop time
       
   911  *
       
   912  * @class CTestStopTime
       
   913  *
       
   914  * Req. under test 
       
   915  */
       
   916 class CTestStopTime : public CTestMmfMidiClntStep
       
   917 	{
       
   918 public:
       
   919 	static CTestStopTime* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   920 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   921 private:
       
   922 	CTestStopTime(const TDesC& aTestName, const TTestStepType aTestType);
       
   923 	~CTestStopTime() {};
       
   924 	};
       
   925 
       
   926 /**
       
   927  * Set stop time
       
   928  *
       
   929  * @class CTestSetStopTime
       
   930  *
       
   931  * Req. under test 
       
   932  */
       
   933 class CTestSetStopTime : public CTestMmfMidiClntStep
       
   934 	{
       
   935 public:
       
   936 	static CTestSetStopTime* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   937 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   938 private:
       
   939 	CTestSetStopTime(const TDesC& aTestName, const TTestStepType aTestType);
       
   940 	~CTestSetStopTime() {};
       
   941 	};
       
   942 
       
   943 /**
       
   944  * Set the number of repeats
       
   945  *
       
   946  * @class CTestSetRepeats
       
   947  *
       
   948  * Req. under test 
       
   949  */
       
   950 class CTestSetRepeats : public CTestMmfMidiClntStep
       
   951 	{
       
   952 public:
       
   953 	static CTestSetRepeats* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   954 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   955 private:
       
   956 	CTestSetRepeats(const TDesC& aTestName, const TTestStepType aTestType);
       
   957 	~CTestSetRepeats() {};
       
   958 	};
       
   959 
       
   960 /**
       
   961  * Returns the number of simultaneous voices a synth is able to play (polyphony)
       
   962  *
       
   963  * @class CTestPolyphony
       
   964  *
       
   965  * Req. under test 
       
   966  */
       
   967 class CTestPolyphony : public CTestMmfMidiClntStep
       
   968 	{
       
   969 public:
       
   970 	static CTestPolyphony* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   971 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   972 private:
       
   973 	CTestPolyphony(const TDesC& aTestName, const TTestStepType aTestType);
       
   974 	~CTestPolyphony() {};
       
   975 	};
       
   976 
       
   977 /**
       
   978  * Returns channels supported
       
   979  *
       
   980  * @class CTestChannelsSupported
       
   981  *
       
   982  * Req. under test 
       
   983  */
       
   984 class CTestChannelsSupported : public CTestMmfMidiClntStep
       
   985 	{
       
   986 public:
       
   987 	static CTestChannelsSupported* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
   988 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
   989 private:
       
   990 	CTestChannelsSupported(const TDesC& aTestName, const TTestStepType aTestType);
       
   991 	~CTestChannelsSupported() {};
       
   992 	};
       
   993 
       
   994 /**
       
   995  * Returns channel volume
       
   996  *
       
   997  * @class CTestReturnChannelVolume
       
   998  *
       
   999  * Req. under test 
       
  1000  */
       
  1001 class CTestReturnChannelVolume : public CTestMmfMidiClntStep
       
  1002 	{
       
  1003 public:
       
  1004 	static CTestReturnChannelVolume* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1005 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1006 private:
       
  1007 	CTestReturnChannelVolume(const TDesC& aTestName, const TTestStepType aTestType);
       
  1008 	~CTestReturnChannelVolume() {};
       
  1009 	};
       
  1010 
       
  1011 /**
       
  1012  * Returns max channel volume
       
  1013  *
       
  1014  * @class CTestMaxChannelVolume
       
  1015  *
       
  1016  * Req. under test 
       
  1017  */
       
  1018 class CTestMaxChannelVolume : public CTestMmfMidiClntStep
       
  1019 	{
       
  1020 public:
       
  1021 	static CTestMaxChannelVolume* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1022 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1023 private:
       
  1024 	CTestMaxChannelVolume(const TDesC& aTestName, const TTestStepType aTestType);
       
  1025 	~CTestMaxChannelVolume() {};
       
  1026 	};
       
  1027 
       
  1028 /**
       
  1029  * Sets channel volume
       
  1030  *
       
  1031  * @class CTestSetChannelVolume
       
  1032  *
       
  1033  * Req. under test 
       
  1034  */
       
  1035 class CTestSetChannelVolume : public CTestMmfMidiClntStep
       
  1036 	{
       
  1037 public:
       
  1038 	static CTestSetChannelVolume* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1039 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1040 private:
       
  1041 	CTestSetChannelVolume(const TDesC& aTestName, const TTestStepType aTestType);
       
  1042 	~CTestSetChannelVolume() {};
       
  1043 	};
       
  1044 
       
  1045 /**
       
  1046  * Mute channel volume
       
  1047  *
       
  1048  * @class CTestSetChannelMute
       
  1049  *
       
  1050  * Req. under test 
       
  1051  */
       
  1052 class CTestSetChannelMute : public CTestMmfMidiClntStep
       
  1053 	{
       
  1054 public:
       
  1055 	static CTestSetChannelMute* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1056 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1057 private:
       
  1058 	CTestSetChannelMute(const TDesC& aTestName, const TTestStepType aTestType);
       
  1059 	~CTestSetChannelMute() {};
       
  1060 	};
       
  1061 
       
  1062 /**
       
  1063  * Return volume
       
  1064  *
       
  1065  * @class CTestReturnVolume
       
  1066  *
       
  1067  * Req. under test 
       
  1068  */
       
  1069 class CTestReturnVolume : public CTestMmfMidiClntStep
       
  1070 	{
       
  1071 public:
       
  1072 	static CTestReturnVolume* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1073 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1074 private:
       
  1075 	CTestReturnVolume(const TDesC& aTestName, const TTestStepType aTestType);
       
  1076 	~CTestReturnVolume() {};
       
  1077 	};
       
  1078 
       
  1079 /**
       
  1080  * Return Max volume
       
  1081  *
       
  1082  * @class CTestMaxVolume
       
  1083  *
       
  1084  * Req. under test 
       
  1085  */
       
  1086 class CTestReturnMaxVolume : public CTestMmfMidiClntStep
       
  1087 	{
       
  1088 public:
       
  1089 	static CTestReturnMaxVolume* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1090 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1091 private:
       
  1092 	CTestReturnMaxVolume(const TDesC& aTestName, const TTestStepType aTestType);
       
  1093 	~CTestReturnMaxVolume() {};
       
  1094 	};
       
  1095 
       
  1096 /**
       
  1097  * Set volume
       
  1098  *
       
  1099  * @class CTestSetVolume
       
  1100  *
       
  1101  * Req. under test 
       
  1102  */
       
  1103 class CTestSetVolume : public CTestMmfMidiClntStep
       
  1104 	{
       
  1105 public:
       
  1106 	static CTestSetVolume* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1107 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1108 private:
       
  1109 	CTestSetVolume(const TDesC& aTestName, const TTestStepType aTestType);
       
  1110 	~CTestSetVolume() {};
       
  1111 	};
       
  1112 
       
  1113 /**
       
  1114  * Set volume ramp
       
  1115  *
       
  1116  * @class CTestSetVolumeRamp
       
  1117  *
       
  1118  * Req. under test 
       
  1119  */
       
  1120 class CTestSetVolumeRamp : public CTestMmfMidiClntStep
       
  1121 	{
       
  1122 public:
       
  1123 	static CTestSetVolumeRamp* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1124 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1125 private:
       
  1126 	CTestSetVolumeRamp(const TDesC& aTestName, const TTestStepType aTestType);
       
  1127 	~CTestSetVolumeRamp() {};
       
  1128 	};
       
  1129 
       
  1130 /**
       
  1131  * Returns balance
       
  1132  *
       
  1133  * @class CTestGetBalance
       
  1134  *
       
  1135  * Req. under test 
       
  1136  */
       
  1137 class CTestGetBalance : public CTestMmfMidiClntStep
       
  1138 	{
       
  1139 public:
       
  1140 	static CTestGetBalance* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1141 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1142 private:
       
  1143 	CTestGetBalance(const TDesC& aTestName, const TTestStepType aTestType);
       
  1144 	~CTestGetBalance() {};
       
  1145 	};
       
  1146 
       
  1147 /**
       
  1148  * Set balance
       
  1149  *
       
  1150  * @class CTestSetBalance
       
  1151  *
       
  1152  * Req. under test 
       
  1153  */
       
  1154 class CTestSetBalance : public CTestMmfMidiClntStep
       
  1155 	{
       
  1156 public:
       
  1157 	static CTestSetBalance* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1158 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1159 private:
       
  1160 	CTestSetBalance(const TDesC& aTestName, const TTestStepType aTestType);
       
  1161 	~CTestSetBalance() {};
       
  1162 	};
       
  1163 
       
  1164 /**
       
  1165  * Set priority
       
  1166  *
       
  1167  * @class CTestSetPriority
       
  1168  *
       
  1169  * Req. under test 
       
  1170  */
       
  1171 class CTestSetPriority : public CTestMmfMidiClntStep
       
  1172 	{
       
  1173 public:
       
  1174 	static CTestSetPriority* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1175 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1176 private:
       
  1177 	CTestSetPriority(const TDesC& aTestName, const TTestStepType aTestType);
       
  1178 	~CTestSetPriority() {};
       
  1179 	};
       
  1180 
       
  1181 /**
       
  1182  * Returns number of xmf meta data entries
       
  1183  *
       
  1184  * @class CTestNumberOfXmfMetaDataEntries
       
  1185  *
       
  1186  * Req. under test 
       
  1187  */
       
  1188 class CTestNumberOfXmfMetaDataEntries : public CTestMmfMidiClntStep
       
  1189 	{
       
  1190 public:
       
  1191 	static CTestNumberOfXmfMetaDataEntries* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1192 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1193 private:
       
  1194 	CTestNumberOfXmfMetaDataEntries(const TDesC& aTestName, const TTestStepType aTestType);
       
  1195 	~CTestNumberOfXmfMetaDataEntries() {};
       
  1196 	};
       
  1197 
       
  1198 /**
       
  1199  * Returns xmf meta data entry
       
  1200  *
       
  1201  * @class CTestGetXmfMetaDataEntry
       
  1202  *
       
  1203  * Req. under test 
       
  1204  */
       
  1205 class CTestGetXmfMetaDataEntry : public CTestMmfMidiClntStep
       
  1206 	{
       
  1207 public:
       
  1208 	static CTestGetXmfMetaDataEntry* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1209 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1210 private:
       
  1211 	CTestGetXmfMetaDataEntry(const TDesC& aTestName, const TTestStepType aTestType);
       
  1212 	~CTestGetXmfMetaDataEntry() {};
       
  1213 	};
       
  1214 
       
  1215 /**
       
  1216  * Loads instrument data
       
  1217  *
       
  1218  * @class CTestLoadInstrumentData
       
  1219  *
       
  1220  * Req. under test 
       
  1221  */
       
  1222 class CTestLoadInstrumentData : public CTestMmfMidiClntStep
       
  1223 	{
       
  1224 public:
       
  1225 	static CTestLoadInstrumentData* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1226 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1227 private:
       
  1228 	CTestLoadInstrumentData(const TDesC& aTestName, const TTestStepType aTestType);
       
  1229 	~CTestLoadInstrumentData() {};
       
  1230 	};
       
  1231 
       
  1232 
       
  1233 /**
       
  1234  * Checks that we call the right function in the Midi test controller
       
  1235  *
       
  1236  * @class CTestCheckInterface
       
  1237  *
       
  1238  * Req. under test 
       
  1239  */
       
  1240 class CTestCheckInterface : public CTestMmfMidiClntStep
       
  1241 	{
       
  1242 public:
       
  1243 	static CTestCheckInterface* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1244 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1245 private:
       
  1246 	CTestCheckInterface(const TDesC& aTestName, const TTestStepType aTestType);
       
  1247 	~CTestCheckInterface();
       
  1248 	void Close();
       
  1249 	TInt CompareInterface(const TDesC8& aInterfaceName);
       
  1250 	void ConstructL(void);
       
  1251 private:
       
  1252 	RChunk iChunk;
       
  1253 	RSemaphore iSemaphore;
       
  1254 	};
       
  1255 
       
  1256 /**
       
  1257  * Load and initialise a midi file.
       
  1258  *
       
  1259  * @class CTestMidiClntOpenFileByHandle
       
  1260  *
       
  1261  * Req. under test 
       
  1262  */
       
  1263 class CTestMidiClntOpenFileByHandle : public CTestMmfMidiClntStep
       
  1264 	{
       
  1265 public:
       
  1266 	~CTestMidiClntOpenFileByHandle() {};
       
  1267 	static CTestMidiClntOpenFileByHandle* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay, const TTestStepType aTestType);
       
  1268 	// From Base Class
       
  1269 	virtual TVerdict DoTestStepL();
       
  1270 private:
       
  1271 	CTestMidiClntOpenFileByHandle(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay, const TTestStepType aTestType);
       
  1272 protected:
       
  1273 	TBuf<KNameBufSize> iSectName;			// Section name for retrieving filename
       
  1274 	TBuf<KNameBufSize> iKeyName;			// Key name for retrieving filename
       
  1275 	const TBool iPlay;						// Does this test require playing the Audio file 
       
  1276 	TTimeIntervalMicroSeconds iDuration;	// Stores duration of Audio file
       
  1277 	};
       
  1278 
       
  1279 /**
       
  1280  * Play a midi file.
       
  1281  *
       
  1282  * @class CTestMidiClntPlayFileByHandle
       
  1283  *
       
  1284  * Req. under test 
       
  1285  */
       
  1286 class CTestMidiClntPlayFileByHandle : public CTestMmfMidiClntStep
       
  1287 	{
       
  1288 public:
       
  1289 	~CTestMidiClntPlayFileByHandle() {};
       
  1290 	static CTestMidiClntPlayFileByHandle* NewL(const TDesC& aTestName);
       
  1291 	// From Base Class
       
  1292 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1293 private:
       
  1294 	CTestMidiClntPlayFileByHandle(const TDesC& aTestName);
       
  1295 	};
       
  1296 	
       
  1297 	
       
  1298 /**
       
  1299  * Play a midi file and verify that no events are getting lost
       
  1300  *
       
  1301  * @class CTestMidiClntThirteenMidiEvents
       
  1302  *
       
  1303  * Req. under test 
       
  1304  */
       
  1305 class CTestMidiClntThirteenMidiEvents : public CTestMmfMidiClntStep
       
  1306 	{
       
  1307 public:
       
  1308 	static CTestMidiClntThirteenMidiEvents* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1309 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1310 	
       
  1311 	virtual void MmcuoTempoChanged(TInt aMicroBeatsPerMinute);
       
  1312 	virtual void MmcuoVolumeChanged(TInt aChannel,TReal32 aVolumeInDecibels);
       
  1313 	virtual void MmcuoMuteChanged(TInt aChannel,TBool aMuted);
       
  1314 	virtual void MmcuoMetaDataEntryFound(const TInt aMetaDataEntryId,const TTimeIntervalMicroSeconds& aPosition);
       
  1315 	virtual void MmcuoMipMessageReceived(const RArray<TMipMessageEntry>& aEntry);
       
  1316 	virtual void MmcuoPolyphonyChanged(TInt aNewPolyphony);
       
  1317 	virtual void MmcuoInstrumentChanged(TInt aChannel,TInt aBankId,TInt aInstrumentId);
       
  1318 
       
  1319 	void InitialiseExpectedTransArrayL();
       
  1320 private:
       
  1321 	CTestMidiClntThirteenMidiEvents(const TDesC& aTestName, const TTestStepType aTestType);
       
  1322 	~CTestMidiClntThirteenMidiEvents() {};
       
  1323 	
       
  1324 	RArray<TMmcuoCallbacks> expectedTransitions;
       
  1325 	TUint8 iCurrentTransion;
       
  1326 	};
       
  1327 	
       
  1328 	
       
  1329 /**
       
  1330  * Test the MIDI pluging state machine: transition from EMidiStateClosedDisengaged to EMidiStateClosedEngaged
       
  1331  *
       
  1332  * @class CTestTrasitionFromEClosedToEClosedEngaged
       
  1333  *
       
  1334  * Req. under test 
       
  1335  */
       
  1336 class CTestTrasitionFromEClosedToEClosedEngaged : public CTestMmfMidiClntStep
       
  1337 	{
       
  1338 public:
       
  1339 	static CTestTrasitionFromEClosedToEClosedEngaged* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1340 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1341 	
       
  1342 private:
       
  1343 	CTestTrasitionFromEClosedToEClosedEngaged(const TDesC& aTestName, const TTestStepType aTestType);
       
  1344 	~CTestTrasitionFromEClosedToEClosedEngaged() {};
       
  1345 	};
       
  1346 	
       
  1347 
       
  1348 /**
       
  1349  * Test the MIDI pluging state machine: transition from EMidiStateClosedDisengaged to EMidiStateOpenEngaged
       
  1350  *
       
  1351  * @class CTestTrasitionFromEClosedToEOpenEngaged
       
  1352  *
       
  1353  * Req. under test 
       
  1354  */
       
  1355 class CTestTrasitionFromEClosedToEOpenEngaged : public CTestMmfMidiClntStep
       
  1356 	{
       
  1357 public:
       
  1358 	static CTestTrasitionFromEClosedToEOpenEngaged* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1359 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1360 	
       
  1361 private:
       
  1362 	CTestTrasitionFromEClosedToEOpenEngaged(const TDesC& aTestName, const TTestStepType aTestType);
       
  1363 	~CTestTrasitionFromEClosedToEOpenEngaged() {};
       
  1364 	};
       
  1365 
       
  1366 
       
  1367 	
       
  1368 /**
       
  1369  * Test the MIDI pluging state machine: transition from EMidiStateOpenEngaged to EMidiStateClosedEngaged
       
  1370  *
       
  1371  * @class CTestTrasitionFromEOpenEngagedToEClosedEngaged
       
  1372  *
       
  1373  * Req. under test 
       
  1374  */
       
  1375 class CTestTrasitionFromEOpenEngagedToEClosedEngaged : public CTestMmfMidiClntStep
       
  1376 	{
       
  1377 public:
       
  1378 	static CTestTrasitionFromEOpenEngagedToEClosedEngaged* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1379 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1380 	
       
  1381 private:
       
  1382 	CTestTrasitionFromEOpenEngagedToEClosedEngaged(const TDesC& aTestName, const TTestStepType aTestType);
       
  1383 	~CTestTrasitionFromEOpenEngagedToEClosedEngaged() {};
       
  1384 	};
       
  1385 
       
  1386 
       
  1387 /**
       
  1388  * Test the MIDI pluging state machine: transition from EMidiStateClosedEngaged to EMidiStateClosedDisengaged
       
  1389  *
       
  1390  * @class CTestTrasitionFromEClosedEngagedToEClosed
       
  1391  *
       
  1392  * Req. under test 
       
  1393  */
       
  1394 class CTestTrasitionFromEClosedEngagedToEClosed : public CTestMmfMidiClntStep
       
  1395 	{
       
  1396 public:
       
  1397 	static CTestTrasitionFromEClosedEngagedToEClosed* NewL(const TDesC& aTestName, const TTestStepType aTestType);
       
  1398 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1399 	
       
  1400 private:
       
  1401 	CTestTrasitionFromEClosedEngagedToEClosed(const TDesC& aTestName, const TTestStepType aTestType);
       
  1402 	~CTestTrasitionFromEClosedEngagedToEClosed() {};
       
  1403 	};
       
  1404 
       
  1405 struct TDrmTestParams
       
  1406 	{
       
  1407 	enum 
       
  1408 		{
       
  1409 		KNoIntent=-1
       
  1410 		};
       
  1411 		
       
  1412 	enum TSourceType
       
  1413 		{
       
  1414 		EFileName=0,
       
  1415 		EFileHandle
       
  1416 		};
       
  1417 	enum TTestMode
       
  1418 		{
       
  1419 		ENormal = 0,
       
  1420 		EAlloc
       
  1421 		};
       
  1422 		
       
  1423 	const TText*			iFileNameKey;
       
  1424 	const TText*			iUniqueId;
       
  1425 	ContentAccess::TIntent	iIntent;
       
  1426 	TInt					iExpectedError;	
       
  1427 	TSourceType				iSourceType;
       
  1428 	TInt					iNumPlayLoops;
       
  1429 	TTestMode				iTestMode;
       
  1430 	};
       
  1431 	
       
  1432 class CCallbackTimer;	
       
  1433 	
       
  1434 class CTestStepDrm : public CTestMmfMidiClntStep 
       
  1435 	{
       
  1436 protected:
       
  1437 
       
  1438 	virtual void OnTimer();
       
  1439 
       
  1440 	virtual TVerdict DoTestStepPreambleL();
       
  1441 	virtual TVerdict DoTestStepPostambleL();
       
  1442 	virtual TVerdict DoTestStepL();
       
  1443 	TVerdict OpenFileL(CMidiClientUtility* aMidi);
       
  1444 	CTestStepDrm(const TDesC& aTestName, const TTestStepType aTestType, const TDrmTestParams& aDrmParams);
       
  1445 	
       
  1446 	const TDrmTestParams& iDrmParams;
       
  1447 	RFs iFs;
       
  1448 	RFile iFile;
       
  1449 	CCallbackTimer* iTimer;
       
  1450 private:
       
  1451 static TInt TimerGate(TAny* aPtr);	
       
  1452 	};
       
  1453 /**
       
  1454  * DRM-related negative test 
       
  1455  *
       
  1456  *
       
  1457  * Req. under test 
       
  1458  */
       
  1459 class CTestDrmNegative : public CTestStepDrm
       
  1460 	{
       
  1461 public:
       
  1462 	static CTestDrmNegative* NewL(const TDesC& aTestName, const TTestStepType aTestType, const TDrmTestParams& aDrmParams);
       
  1463 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1464 	virtual void MmcuoStateChanged(TMidiState /*aOldState*/,TMidiState /*aNewState*/,const TTimeIntervalMicroSeconds& /*aTime*/,TInt aError);
       
  1465 private:
       
  1466 	CTestDrmNegative(const TDesC& aTestName, const TTestStepType aTestType, const TDrmTestParams& aDrmParams);
       
  1467 	};
       
  1468 
       
  1469 class CTestDrmPlay : public CTestStepDrm
       
  1470 	{
       
  1471 public:
       
  1472 	static CTestDrmPlay* NewL(const TDesC& aTestName, const TTestStepType aTestType, const TDrmTestParams& aDrmParams);
       
  1473 	
       
  1474 	virtual TVerdict PlayL(CMidiClientUtility* aMidi, TTimeIntervalMicroSeconds32 aStopAfter);
       
  1475 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1476 	virtual void MmcuoStateChanged(TMidiState /*aOldState*/,TMidiState /*aNewState*/,const TTimeIntervalMicroSeconds& /*aTime*/,TInt aError);
       
  1477 	
       
  1478 protected:
       
  1479 	CTestDrmPlay(const TDesC& aTestName, const TTestStepType aTestType, const TDrmTestParams& aDrmParams);
       
  1480 
       
  1481 protected:
       
  1482 	TMidiState iLatestState; 	
       
  1483 	
       
  1484 	};
       
  1485 
       
  1486 
       
  1487 class CTestDrmPlayStop : public CTestDrmPlay
       
  1488 	{
       
  1489 public:
       
  1490 	static CTestDrmPlayStop* NewL(const TDesC& aTestName, const TTestStepType aTestType, const TDrmTestParams& aDrmParams);
       
  1491 	
       
  1492 	virtual void OnTimer();
       
  1493 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1494 private:
       
  1495 	CTestDrmPlayStop(const TDesC& aTestName, const TTestStepType aTestType, const TDrmTestParams& aDrmParams);
       
  1496 	CMidiClientUtility* iMidi;
       
  1497 	TBool iStopping;
       
  1498 	};
       
  1499 		
       
  1500 
       
  1501 class CTestDrmPlayWithUI : public CTestStepDrm
       
  1502 	{
       
  1503 public:
       
  1504 	static CTestDrmPlayWithUI* NewL(const TDesC& aTestName, const TTestStepType aTestType, const TDrmTestParams& aDrmParams);
       
  1505 	
       
  1506 	virtual TVerdict PlayL(CMidiClientUtility* aMidi, TTimeIntervalMicroSeconds32 aStopAfter);
       
  1507 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1508 	virtual void MmcuoStateChanged(TMidiState /*aOldState*/,TMidiState /*aNewState*/,const TTimeIntervalMicroSeconds& /*aTime*/,TInt aError);
       
  1509 	
       
  1510 protected:
       
  1511 	TMidiState iLatestState; 	
       
  1512 	
       
  1513 private:
       
  1514 	CTestDrmPlayWithUI(const TDesC& aTestName, const TTestStepType aTestType, const TDrmTestParams& aDrmParams);
       
  1515 	};
       
  1516 
       
  1517 /**
       
  1518  * Open a midi file more than once using FileHandle
       
  1519  *
       
  1520  * @class CTestMidiOpenFileHandleRepeat
       
  1521  *
       
  1522  * Req. under test 
       
  1523  */
       
  1524 class CTestMidiOpenFileHandleRepeat : public CTestMmfMidiClntStep
       
  1525 	{
       
  1526 public:
       
  1527 	CTestMidiOpenFileHandleRepeat(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
       
  1528 	~CTestMidiOpenFileHandleRepeat() {};
       
  1529 	static CTestMidiOpenFileHandleRepeat* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
       
  1530 	// From Base Class
       
  1531 	virtual TVerdict DoTestStepL();
       
  1532 	virtual TVerdict DoTestL(CMidiClientUtility* aMidi);
       
  1533 
       
  1534 protected:
       
  1535 	TBuf<KNameBufSize> iSectName;			// Section name for retrieving filename
       
  1536 	TBuf<KNameBufSize> iKeyName;			// Key name for retrieving filename
       
  1537 	const TBool iPlay;						// Does this test require playing the Audio file 
       
  1538 	TTimeIntervalMicroSeconds iDuration;	// Stores duration of Audio file
       
  1539 
       
  1540 	};
       
  1541 	
       
  1542 /**
       
  1543  * Play without opening a file.
       
  1544  *
       
  1545  * @class CTestMidiClntPlayWithoutFile
       
  1546  *
       
  1547  * 
       
  1548  */
       
  1549 class CTestMidiClntPlayWithoutFile : public CTestMmfMidiClntStep
       
  1550 	{
       
  1551 public:
       
  1552 	CTestMidiClntPlayWithoutFile(const TDesC& aTestName);
       
  1553 	~CTestMidiClntPlayWithoutFile() {};
       
  1554 	static CTestMidiClntPlayWithoutFile * NewL(const TDesC& aTestName);
       
  1555 	// From Base Class
       
  1556 	virtual TVerdict DoTestStepL();
       
  1557 	void MmcuoStateChanged(TMidiState aOldState,TMidiState aNewState,const TTimeIntervalMicroSeconds& aTime,TInt aError);
       
  1558 protected:
       
  1559     TInt iError;
       
  1560 	};
       
  1561 
       
  1562 
       
  1563 /**
       
  1564  * Opening a midifile and playing it.
       
  1565  *
       
  1566  * @class CTestMidiClntOpenAndPlayFile
       
  1567  *
       
  1568  * 
       
  1569  */
       
  1570 class CTestMidiClntOpenAndPlayFile : public CTestMmfMidiClntStep
       
  1571 	{
       
  1572 public:
       
  1573 	CTestMidiClntOpenAndPlayFile(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
       
  1574 	~CTestMidiClntOpenAndPlayFile() {};
       
  1575 	static CTestMidiClntOpenAndPlayFile* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName);
       
  1576 	// From Base Class
       
  1577 	virtual TVerdict DoTestStepL();
       
  1578 	void MmcuoStateChanged(TMidiState aOldState,TMidiState aNewState,const TTimeIntervalMicroSeconds& aTime,TInt aError);
       
  1579 protected:
       
  1580     TBuf<KNameBufSize> iSectName;			// Section name for retrieving filename
       
  1581 	TBuf<KNameBufSize> iKeyName;			// Key name for retrieving filename
       
  1582     TInt iError;
       
  1583 	};
       
  1584 #endif
       
  1585