os/mm/mmlibs/mmfw/tsrc/mmfintegrationtest/vclntavi/inc/testvideoplayer_apr.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// Header file: Declaration for Various Classes used for Audio Resource Notification tests for Video Client.
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
/**
sl@0
    19
 @file Testvideoplayer_apr.h
sl@0
    20
*/
sl@0
    21
sl@0
    22
#ifndef TESTVIDEOPLAYER_APR_H
sl@0
    23
#define TESTVIDEOPLAYER_APR_H
sl@0
    24
sl@0
    25
sl@0
    26
#include "testvideoplayer.h"
sl@0
    27
#include "mdaaudiosampleplayer.h"
sl@0
    28
#include "u32hal.h"
sl@0
    29
sl@0
    30
sl@0
    31
const TInt KSizeBuf = 256;
sl@0
    32
const TInt KMaxEvents = 2;
sl@0
    33
sl@0
    34
//------------------------------------------------------------------------------
sl@0
    35
//********************PREQ 797 - Audio Resource Notification********************
sl@0
    36
//------------------------------------------------------------------------------
sl@0
    37
sl@0
    38
/**
sl@0
    39
 * stopActiveScheduler
sl@0
    40
 */
sl@0
    41
static TInt stopActiveScheduler(TAny*)
sl@0
    42
	{
sl@0
    43
	CActiveScheduler::Stop();
sl@0
    44
	return KErrNone;
sl@0
    45
	}
sl@0
    46
sl@0
    47
//
sl@0
    48
//Declarations//
sl@0
    49
//
sl@0
    50
sl@0
    51
//
sl@0
    52
//Custom Error Codes & CONST Declarations.
sl@0
    53
//
sl@0
    54
const TInt KErrUser = -1000;
sl@0
    55
const TInt KErrBadResult = (KErrUser - 1);
sl@0
    56
const TInt KMicroSecsInOneSec = 1000000; 
sl@0
    57
const TUint KSampleRate8000Hz  = 8000;
sl@0
    58
sl@0
    59
//
sl@0
    60
//Forward class declarations
sl@0
    61
//
sl@0
    62
class CCallbackTimer;
sl@0
    63
class CTestAVPlayerAPRCallbackSupport;
sl@0
    64
class CVclntAviAprWillResumeTimer;
sl@0
    65
//------------------------------------------------------------------------------
sl@0
    66
//******************CR 0805 - Auto Pause Resume for video client*******************
sl@0
    67
//------------------------------------------------------------------------------
sl@0
    68
sl@0
    69
//
sl@0
    70
//ENUM DECLARATIONS//
sl@0
    71
//
sl@0
    72
sl@0
    73
// Enum to describe the current state.
sl@0
    74
enum TAVPlayerAPRState
sl@0
    75
	{
sl@0
    76
	EStateBegin = 0,
sl@0
    77
	EStateOpenAudioPlayer1,
sl@0
    78
	EStateOpenAudioPlayer2,
sl@0
    79
	EStateAudioPlaying1,
sl@0
    80
	EStateAudioPlaying2,
sl@0
    81
	EStateEndAudioPlay1,
sl@0
    82
	EStateEndAudioPlay1A,
sl@0
    83
	EStateEndAudioPlay2,
sl@0
    84
	EStateEndAudioPlay2A,
sl@0
    85
	EStateErrInUseAudioPlayer1,
sl@0
    86
	EStateErrInUseAudioPlayer2,
sl@0
    87
	EStateNotifiedAudioPlayer1,
sl@0
    88
	EStateNotifiedAudioPlayer2,
sl@0
    89
	EStateErrInUseAudioPlayer1A,
sl@0
    90
	EStateNotifiedAudioPlayer1A,
sl@0
    91
	EStateAudioPlaying2A,
sl@0
    92
	EStateAudioEndPlay2A,
sl@0
    93
	EStatePrepareVideoPlayer,
sl@0
    94
	EStateOpenVideoPlayer,
sl@0
    95
	EStateVideoPlaying,
sl@0
    96
	EStateEndVideoPlay,
sl@0
    97
	EStateErrInUseVideoPlayer,
sl@0
    98
	EStateNotifiedVideoPlayer,
sl@0
    99
	EStateErrInUseVideoPlayer1A,
sl@0
   100
	EStateNotifiedVideoPlayer1A,
sl@0
   101
	EStateVideoPlaying2A,
sl@0
   102
	EStateEndVideoPlay2A,
sl@0
   103
	EStateNoOtherPlayerNotified
sl@0
   104
	};
sl@0
   105
sl@0
   106
// Enum to decide which Event has occured.
sl@0
   107
enum TAVPlayerAPREvents
sl@0
   108
	{
sl@0
   109
	EIdlePlayer = 0,
sl@0
   110
	EMvpuoOpenComplete,
sl@0
   111
	EMvpuoPrepareComplete,
sl@0
   112
	EMvpuoFrameReady,
sl@0
   113
	EMvpuoPlayComplete,
sl@0
   114
	EMvpuoEvent,
sl@0
   115
	EMapcInitComplete1,
sl@0
   116
	EMapcInitComplete2,
sl@0
   117
	EMapcPlayComplete1,
sl@0
   118
	EMapcPlayComplete2,
sl@0
   119
	EMarncResourceAvailable1,
sl@0
   120
	EMarncResourceAvailable2,
sl@0
   121
	EMarncResourceAvailable3
sl@0
   122
	};
sl@0
   123
sl@0
   124
//
sl@0
   125
//BASE CLASS DECLARATIONS//
sl@0
   126
//
sl@0
   127
sl@0
   128
/**
sl@0
   129
 * timer support
sl@0
   130
 *
sl@0
   131
 * @class CCallBackTimer
sl@0
   132
 *
sl@0
   133
 */
sl@0
   134
sl@0
   135
class CCallBackTimer : public CTimer
sl@0
   136
	{
sl@0
   137
public:
sl@0
   138
	static CCallBackTimer* NewL(TCallBack aCallBack, TPriority aPriority = EPriorityStandard);
sl@0
   139
private:
sl@0
   140
	virtual void RunL();
sl@0
   141
private:
sl@0
   142
	CCallBackTimer(TCallBack aCallBack, TPriority aPriority);
sl@0
   143
private:
sl@0
   144
	TCallBack iCallBack;
sl@0
   145
	};
sl@0
   146
sl@0
   147
sl@0
   148
/**
sl@0
   149
 * Observer class to identify and pass events to the test step class
sl@0
   150
 * 
sl@0
   151
 * @class MTestAVPlayerAPRCallback
sl@0
   152
 *
sl@0
   153
 */
sl@0
   154
class MTestAVPlayerAPRCallback
sl@0
   155
	{
sl@0
   156
public :
sl@0
   157
	virtual void MvpuoOpenCompleteTest(TInt aError, CTestAVPlayerAPRCallbackSupport& aMdaVideoPlayerCallbackSupport) = 0;
sl@0
   158
	virtual void MvpuoPrepareCompleteTest(TInt aError, CTestAVPlayerAPRCallbackSupport& aMdaVideoPlayerCallbackSupport)= 0;
sl@0
   159
	virtual void MvpuoFrameReadyTest(CFbsBitmap &aFrame, TInt aError, CTestAVPlayerAPRCallbackSupport& aMdaVideoPlayerCallbackSupport)=0;
sl@0
   160
	virtual void MvpuoPlayCompleteTest(TInt aError,CTestAVPlayerAPRCallbackSupport& aMdaVideoPlayerCallbackSupport)=0;
sl@0
   161
	virtual void MvpuoEventTest(const TMMFEvent &aEvent, CTestAVPlayerAPRCallbackSupport& aMdaVideoPlayerCallbackSupport)=0;
sl@0
   162
	virtual void MapcInitCompleteTest(TInt aError, const TTimeIntervalMicroSeconds &aDuration, CTestAVPlayerAPRCallbackSupport& aMdaVideoPlayerCallbackSupport)=0;
sl@0
   163
	virtual void MapcPlayCompleteTest(TInt aError, CTestAVPlayerAPRCallbackSupport& aMdaVideoPlayerCallbackSupport)=0;
sl@0
   164
	virtual void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestAVPlayerAPRCallbackSupport& aMdaVideoPlayerCallbackSupport) = 0;
sl@0
   165
	};
sl@0
   166
sl@0
   167
/**
sl@0
   168
 * Support class to pass the events to the test step class using the MTestAVPlayerAPRCallback
sl@0
   169
 * 
sl@0
   170
 * @class CTestAVPlayerAPRCallbackSupport
sl@0
   171
 *
sl@0
   172
 */
sl@0
   173
class CTestAVPlayerAPRCallbackSupport : public CBase, public MVideoPlayerUtilityObserver, public MMMFAudioResourceNotificationCallback, public MMdaAudioPlayerCallback
sl@0
   174
	{
sl@0
   175
public :
sl@0
   176
	static CTestAVPlayerAPRCallbackSupport* NewL(MTestAVPlayerAPRCallback& aCallback);
sl@0
   177
	virtual void MvpuoOpenComplete(TInt aError);
sl@0
   178
	virtual void MvpuoPrepareComplete(TInt aError);
sl@0
   179
	virtual void MvpuoFrameReady(CFbsBitmap &aFrame, TInt aError);
sl@0
   180
	virtual void MvpuoPlayComplete(TInt aError);
sl@0
   181
	virtual void MvpuoEvent(const TMMFEvent &aEvent);
sl@0
   182
	virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds &aDuration);
sl@0
   183
	virtual void MapcPlayComplete(TInt aError);
sl@0
   184
	virtual void MarncResourceAvailable(TUid aNotificationEventId, const TDesC8& aNotificationData);
sl@0
   185
	
sl@0
   186
protected:
sl@0
   187
	CTestAVPlayerAPRCallbackSupport(MTestAVPlayerAPRCallback& aCallback);
sl@0
   188
	void ConstructL();
sl@0
   189
private :
sl@0
   190
	MTestAVPlayerAPRCallback& iCallback;
sl@0
   191
	};
sl@0
   192
sl@0
   193
sl@0
   194
/**
sl@0
   195
 * Base Class for APR functionality for most APR video player tests
sl@0
   196
 * 
sl@0
   197
 * @class RTestMmfVclntVideoPlayerAPR
sl@0
   198
 *
sl@0
   199
 */
sl@0
   200
class RTestMmfVclntVideoPlayerAPR : public RTestMmfVclntAviStep, public MTestAVPlayerAPRCallback
sl@0
   201
	{
sl@0
   202
public :
sl@0
   203
	// Constructor
sl@0
   204
	RTestMmfVclntVideoPlayerAPR(const TDesC& aTestName, const TDesC& aSectName);
sl@0
   205
sl@0
   206
	// Virtual methods for Preamble and Postamble.
sl@0
   207
	virtual TVerdict DoTestStepCreateL();
sl@0
   208
	virtual TVerdict DoTestStepDeleteL();
sl@0
   209
	// Virtual function to access test specific methods
sl@0
   210
	virtual TVerdict DoTestStepL();
sl@0
   211
	// Pure function to access test specific methods
sl@0
   212
	virtual TVerdict DoTestL()=0;
sl@0
   213
	// from MTestAVPlayerAPRCallback
sl@0
   214
	virtual void MvpuoOpenCompleteTest(TInt aError, CTestAVPlayerAPRCallbackSupport& aMdaVideoPlayerCallbackSupport);
sl@0
   215
	virtual void MvpuoPrepareCompleteTest(TInt aError, CTestAVPlayerAPRCallbackSupport& aMdaVideoPlayerCallbackSupport);
sl@0
   216
	virtual void MvpuoFrameReadyTest(CFbsBitmap &aFrame, TInt aError, CTestAVPlayerAPRCallbackSupport& aMdaVideoPlayerCallbackSupport);
sl@0
   217
	virtual void MvpuoPlayCompleteTest(TInt aError,CTestAVPlayerAPRCallbackSupport& aMdaVideoPlayerCallbackSupport);
sl@0
   218
	virtual void MvpuoEventTest(const TMMFEvent &aEvent, CTestAVPlayerAPRCallbackSupport& aMdaVideoPlayerCallbackSupport);
sl@0
   219
	virtual void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestAVPlayerAPRCallbackSupport& aMdaVideoPlayerCallbackSupport);
sl@0
   220
	virtual void MapcInitCompleteTest(TInt aError, const TTimeIntervalMicroSeconds &aDuration, CTestAVPlayerAPRCallbackSupport& aMdaVideoPlayerCallbackSupport);
sl@0
   221
	virtual void MapcPlayCompleteTest(TInt aError, CTestAVPlayerAPRCallbackSupport& aMdaVideoPlayerCallbackSupport);
sl@0
   222
	
sl@0
   223
	// Centralised State Handler
sl@0
   224
	virtual void Fsm(TAVPlayerAPREvents aEventCode, TInt aError)=0;
sl@0
   225
	virtual TBool FsmCheck(TAVPlayerAPREvents aEventCode, TInt aError);
sl@0
   226
	virtual TInt SetCacheSize();
sl@0
   227
	virtual TInt CheckCacheError(TInt aError);
sl@0
   228
		
sl@0
   229
protected :	
sl@0
   230
		// StateInit Function
sl@0
   231
	void StateInit();
sl@0
   232
	// StateChange Function
sl@0
   233
	void StateChange(TAVPlayerAPRState aState, TAVPlayerAPREvents aExpectedEvent, TInt aExpectedError=KErrNone, TInt aEventIndex = 1);
sl@0
   234
	// check if we can go to the next state
sl@0
   235
	TInt AnalyseInput(TAVPlayerAPREvents aEventCode, TInt aError);
sl@0
   236
protected :	
sl@0
   237
sl@0
   238
	// CMdaAudioPlayerUtility instances
sl@0
   239
	CMdaAudioPlayerUtility* iTestAudioPlayer1;
sl@0
   240
	CMdaAudioPlayerUtility* iTestAudioPlayer2;
sl@0
   241
	// CVideoPlayerUtility instances
sl@0
   242
	CVideoPlayerUtility* iTestVideoPlayer;
sl@0
   243
	// CTestAVPlayerAPRCallbackSupport instances
sl@0
   244
	CTestAVPlayerAPRCallbackSupport* iVideoPlayerCallbackSupport1;
sl@0
   245
	CTestAVPlayerAPRCallbackSupport* iAudioPlayerCallbackSupport1;
sl@0
   246
	CTestAVPlayerAPRCallbackSupport* iAudioPlayerCallbackSupport2;
sl@0
   247
sl@0
   248
	
sl@0
   249
	// Other class variable declarations
sl@0
   250
	TBuf<KSizeBuf> iFilename1;
sl@0
   251
	TBuf<KSizeBuf> iFilename2;
sl@0
   252
	TBuf<KSizeBuf> iFilename3;
sl@0
   253
	TTimeIntervalMicroSeconds iPosition;
sl@0
   254
	TTimeIntervalMicroSeconds iDuration;
sl@0
   255
	TInt iError;
sl@0
   256
	TAVPlayerAPRState iState;
sl@0
   257
	TRequestStatus iRequestStatus;
sl@0
   258
	CCallBackTimer* iCallBackTimer;
sl@0
   259
	TAVPlayerAPREvents iExpectedEvent[KMaxEvents];
sl@0
   260
	TInt iExpectedError[KMaxEvents];
sl@0
   261
	TBool iCanStateChange;
sl@0
   262
	TInt iExpEventCount;
sl@0
   263
	TInt iActEventCount;
sl@0
   264
	};
sl@0
   265
sl@0
   266
//
sl@0
   267
//POSITIVE TESTS//
sl@0
   268
//
sl@0
   269
sl@0
   270
/** 
sl@0
   271
 * One-time registration for same event by a player.
sl@0
   272
 *
sl@0
   273
 * RTestVclntAprRegOnce4SameEvent
sl@0
   274
 * MM-MMF-VCLNTAVIAPR-I-0001-HP
sl@0
   275
 * 
sl@0
   276
 */
sl@0
   277
class RTestVclntAprRegOnce4SameEvent : public RTestMmfVclntVideoPlayerAPR
sl@0
   278
	{
sl@0
   279
public:
sl@0
   280
	static RTestVclntAprRegOnce4SameEvent* NewL( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   281
	virtual TVerdict DoTestL();
sl@0
   282
	virtual void Fsm(TAVPlayerAPREvents aEventCode, TInt aError);
sl@0
   283
	
sl@0
   284
protected:
sl@0
   285
	RTestVclntAprRegOnce4SameEvent( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   286
	TVerdict PerformTestL();
sl@0
   287
	};
sl@0
   288
sl@0
   289
/** 
sl@0
   290
 * Register before opening Video player and receive notification of a resource available event 
sl@0
   291
 *
sl@0
   292
 * RTestVclntAprRegB4Open
sl@0
   293
 * MM-MMF-VCLNTAVIAPR-I-0002-HP
sl@0
   294
 * 
sl@0
   295
 */
sl@0
   296
class RTestVclntAprRegB4Open : public RTestMmfVclntVideoPlayerAPR
sl@0
   297
	{
sl@0
   298
public:
sl@0
   299
	static RTestVclntAprRegB4Open* NewL( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   300
	virtual TVerdict DoTestL();
sl@0
   301
	virtual void Fsm(TAVPlayerAPREvents aEventCode, TInt aError);
sl@0
   302
	
sl@0
   303
protected:
sl@0
   304
	RTestVclntAprRegB4Open( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   305
	TVerdict PerformTestL();
sl@0
   306
	};
sl@0
   307
sl@0
   308
/** 
sl@0
   309
 * Register (after Open and before Play of video) , receive notification of a resource available event.
sl@0
   310
 *
sl@0
   311
 * RTestVclntAprRegAftrOpenAndB4Play
sl@0
   312
 * MM-MMF-VCLNTAVIAPR-I-0003-HP
sl@0
   313
 * 
sl@0
   314
 */
sl@0
   315
class RTestVclntAprRegAftrOpenAndB4Play : public RTestMmfVclntVideoPlayerAPR
sl@0
   316
	{
sl@0
   317
public:
sl@0
   318
	static RTestVclntAprRegAftrOpenAndB4Play* NewL( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   319
	virtual TVerdict DoTestL();
sl@0
   320
	virtual void Fsm(TAVPlayerAPREvents aEventCode, TInt aError);
sl@0
   321
	TTimeIntervalMicroSeconds iVidPosition;
sl@0
   322
	
sl@0
   323
protected:
sl@0
   324
	RTestVclntAprRegAftrOpenAndB4Play( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   325
	TVerdict PerformTestL();
sl@0
   326
	};
sl@0
   327
sl@0
   328
/** 
sl@0
   329
 * Register after the highest priority client (Audio) completes playing and receive the notification of a resource availalble event.
sl@0
   330
 *
sl@0
   331
 * RTestVclntAprRegAftrHpClntCompltPlay
sl@0
   332
 * MM-MMF-VCLNTAVIAPR-I-0004-HP
sl@0
   333
 * 
sl@0
   334
 */
sl@0
   335
class RTestVclntAprRegAftrHpClntCompltPlay : public RTestMmfVclntVideoPlayerAPR
sl@0
   336
	{
sl@0
   337
public:
sl@0
   338
	static RTestVclntAprRegAftrHpClntCompltPlay* NewL( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   339
	virtual TVerdict DoTestL();
sl@0
   340
	virtual void Fsm(TAVPlayerAPREvents aEventCode, TInt aError);
sl@0
   341
	
sl@0
   342
protected:
sl@0
   343
	RTestVclntAprRegAftrHpClntCompltPlay( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   344
	TVerdict PerformTestL();
sl@0
   345
	};
sl@0
   346
	
sl@0
   347
/** 
sl@0
   348
 * Receive notification by same priority players in the order of registration
sl@0
   349
 *
sl@0
   350
 * RTestVclntAprRegSamePriorityPlayers
sl@0
   351
 * MM-MMF-VCLNTAVIAPR-I-0005-HP
sl@0
   352
 * 
sl@0
   353
 */
sl@0
   354
class RTestVclntAprRegSamePriorityPlayers : public RTestMmfVclntVideoPlayerAPR
sl@0
   355
	{
sl@0
   356
public:
sl@0
   357
	static RTestVclntAprRegSamePriorityPlayers* NewL( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   358
	virtual TVerdict DoTestL();
sl@0
   359
	virtual void Fsm(TAVPlayerAPREvents aEventCode, TInt aError);
sl@0
   360
	
sl@0
   361
protected:
sl@0
   362
	RTestVclntAprRegSamePriorityPlayers( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   363
	TVerdict PerformTestL();
sl@0
   364
	};
sl@0
   365
sl@0
   366
sl@0
   367
/** 
sl@0
   368
 * Register (at the time of Play) and Cancellation of the notification request
sl@0
   369
 *
sl@0
   370
 * RTestVclntAprRegAtPlayAndCancelNfn
sl@0
   371
 * MM-MMF-VCLNTAVIAPR-I-0006-HP
sl@0
   372
 * 
sl@0
   373
 */
sl@0
   374
class RTestVclntAprRegAtPlayAndCancelNfn : public RTestMmfVclntVideoPlayerAPR
sl@0
   375
	{
sl@0
   376
public:
sl@0
   377
	static RTestVclntAprRegAtPlayAndCancelNfn* NewL( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   378
	virtual TVerdict DoTestL();
sl@0
   379
	virtual void Fsm(TAVPlayerAPREvents aEventCode, TInt aError);
sl@0
   380
	
sl@0
   381
protected:
sl@0
   382
	RTestVclntAprRegAtPlayAndCancelNfn( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   383
	TVerdict PerformTestL();
sl@0
   384
	};
sl@0
   385
sl@0
   386
/** 
sl@0
   387
 * Test for WillResumePlay() using 3 clients.
sl@0
   388
 *
sl@0
   389
 * RTestVclntAprTestWillResumePlay
sl@0
   390
 * MM-MMF-VCLNTAVIAPR-I-0007-HP
sl@0
   391
 * 
sl@0
   392
 */
sl@0
   393
class RTestVclntAprTestWillResumePlay : public RTestMmfVclntVideoPlayerAPR
sl@0
   394
	{
sl@0
   395
public:
sl@0
   396
	static RTestVclntAprTestWillResumePlay* NewL( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   397
	virtual TVerdict DoTestL();
sl@0
   398
	virtual void Fsm(TAVPlayerAPREvents aEventCode, TInt aError);
sl@0
   399
	virtual void FinishedL(); // for CVclntAviAprWillResumeTimer	
sl@0
   400
sl@0
   401
protected:
sl@0
   402
	RTestVclntAprTestWillResumePlay( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   403
	TVerdict PerformTestL();
sl@0
   404
	CVclntAviAprWillResumeTimer* iWillResumePlayTimer;
sl@0
   405
	};
sl@0
   406
sl@0
   407
/**
sl@0
   408
 * 
sl@0
   409
 * CVclntAviAprWillResumeTimer
sl@0
   410
 * MM-MMF-VCLNTAVIAPR-I-0007-HP
sl@0
   411
 * - Timer for checking if no notification occurs in 5 seconds
sl@0
   412
 *   after calling WillResumePlay()
sl@0
   413
 *
sl@0
   414
 */
sl@0
   415
class CVclntAviAprWillResumeTimer : public CTimer
sl@0
   416
    {
sl@0
   417
public:
sl@0
   418
    static CVclntAviAprWillResumeTimer* NewL(RTestVclntAprTestWillResumePlay* aParent, TTimeIntervalMicroSeconds32 aWaitTime);
sl@0
   419
    void Start();
sl@0
   420
protected:
sl@0
   421
    TInt RunError(TInt aError);
sl@0
   422
    void RunL();
sl@0
   423
private:
sl@0
   424
    CVclntAviAprWillResumeTimer(RTestVclntAprTestWillResumePlay* aParent, TTimeIntervalMicroSeconds32 aWaitTime);
sl@0
   425
    RTestVclntAprTestWillResumePlay* iParent;
sl@0
   426
    TTimeIntervalMicroSeconds32 iWaitTime;
sl@0
   427
    };
sl@0
   428
sl@0
   429
/** 
sl@0
   430
 * APR Alloc tests (using shared heap) for Video Player utility.
sl@0
   431
 *
sl@0
   432
 * RTestVclntAprAllocUsingSharedHeap
sl@0
   433
 * MM-MMF-VCLNTAVIAPR-I-0008-HP
sl@0
   434
 * 
sl@0
   435
 */
sl@0
   436
class RTestVclntAprAllocUsingSharedHeap : public RTestMmfVclntVideoPlayerAPR
sl@0
   437
	{
sl@0
   438
public:
sl@0
   439
	static RTestVclntAprAllocUsingSharedHeap* NewL( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   440
	void VideoPlayAllocL();
sl@0
   441
	virtual TVerdict DoTestStepL();
sl@0
   442
	virtual TVerdict DoTestL();
sl@0
   443
	virtual void Fsm(TAVPlayerAPREvents aEventCode, TInt aError);
sl@0
   444
		
sl@0
   445
protected:
sl@0
   446
	RTestVclntAprAllocUsingSharedHeap( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   447
	TVerdict PerformTestL();
sl@0
   448
	};
sl@0
   449
	
sl@0
   450
sl@0
   451
//
sl@0
   452
//NEGATIVE TESTS//
sl@0
   453
//
sl@0
   454
sl@0
   455
/** 
sl@0
   456
 * Multiple Registration (at the time of Play) and receive notification of a resource available event
sl@0
   457
 *
sl@0
   458
 * RTestVclntAprMultRegAtPlay
sl@0
   459
 * MM-MMF-VCLNTAVIAPR-I-0101-HP
sl@0
   460
 * 
sl@0
   461
 */
sl@0
   462
class RTestVclntAprMultRegAtPlay : public RTestMmfVclntVideoPlayerAPR
sl@0
   463
	{
sl@0
   464
public:
sl@0
   465
	static RTestVclntAprMultRegAtPlay* NewL( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   466
	virtual TVerdict DoTestL();
sl@0
   467
	virtual void Fsm(TAVPlayerAPREvents aEventCode, TInt aError);
sl@0
   468
	
sl@0
   469
protected:
sl@0
   470
	RTestVclntAprMultRegAtPlay( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   471
	TVerdict PerformTestL();
sl@0
   472
	};
sl@0
   473
	
sl@0
   474
/** 
sl@0
   475
 * Cancel when no resource Notification is requested.
sl@0
   476
 *
sl@0
   477
 * RTestVclntAprCancelNoResourceNfn
sl@0
   478
 * MM-MMF-VCLNTAVIAPR-I-0102-HP
sl@0
   479
 * 
sl@0
   480
 */
sl@0
   481
 class RTestVclntAprCancelNoResourceNfn : public RTestMmfVclntVideoPlayerAPR
sl@0
   482
	{
sl@0
   483
public:
sl@0
   484
	static RTestVclntAprCancelNoResourceNfn* NewL( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   485
	virtual TVerdict DoTestL();
sl@0
   486
	virtual void Fsm(TAVPlayerAPREvents aEventCode, TInt aError);
sl@0
   487
	
sl@0
   488
protected:
sl@0
   489
	RTestVclntAprCancelNoResourceNfn( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   490
	TVerdict PerformTestL();
sl@0
   491
	};
sl@0
   492
	
sl@0
   493
/** 
sl@0
   494
 * Register for notification with an unsupported event type.
sl@0
   495
 *
sl@0
   496
 * RTestVclntAprRegUnsupportedEvent
sl@0
   497
 * MM-MMF-VCLNTAVIAPR-I-0103-HP
sl@0
   498
 * 
sl@0
   499
 */
sl@0
   500
class RTestVclntAprRegUnsupportedEvent : public RTestMmfVclntVideoPlayerAPR
sl@0
   501
	{
sl@0
   502
public:
sl@0
   503
	static RTestVclntAprRegUnsupportedEvent* NewL( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   504
	virtual TVerdict DoTestL();
sl@0
   505
	virtual void Fsm(TAVPlayerAPREvents aEventCode, TInt aError);
sl@0
   506
	
sl@0
   507
protected:
sl@0
   508
	RTestVclntAprRegUnsupportedEvent( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   509
	TVerdict PerformTestL();
sl@0
   510
	};
sl@0
   511
	
sl@0
   512
/** 
sl@0
   513
 * Cancellation of  notification with an unsupported event type.
sl@0
   514
 *
sl@0
   515
 * RTestVclntAprCancelUnsupportedEvent
sl@0
   516
 * MM-MMF-VCLNTAVIAPR-I-0104-HP
sl@0
   517
 * 
sl@0
   518
 */
sl@0
   519
class RTestVclntAprCancelUnsupportedEvent : public RTestMmfVclntVideoPlayerAPR
sl@0
   520
	{
sl@0
   521
public:
sl@0
   522
	static RTestVclntAprCancelUnsupportedEvent* NewL( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   523
	virtual TVerdict DoTestL();
sl@0
   524
	virtual void Fsm(TAVPlayerAPREvents aEventCode, TInt aError);
sl@0
   525
	
sl@0
   526
protected:
sl@0
   527
	RTestVclntAprCancelUnsupportedEvent( const TDesC& aTestName, const TDesC& aSectName );
sl@0
   528
	TVerdict PerformTestL();
sl@0
   529
	};
sl@0
   530
	
sl@0
   531
#endif