os/mm/mmlibs/mmfw/tsrc/mmfintegrationtest/ACLNT/TestAudioClientUtilitiesARN.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmfintegrationtest/ACLNT/TestAudioClientUtilitiesARN.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,1792 @@
     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 +// Header file: Declaration for Various Classes used for Audio Resource Notification tests.
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +/**
    1.22 + @file TestAudioClientUtilitiesARN.h
    1.23 +*/
    1.24 +
    1.25 +#ifndef TESTAUDIOCLIENTUTILITIESARN_H
    1.26 +#define TESTAUDIOCLIENTUTILITIESARN_H
    1.27 +
    1.28 +#include "mdaaudiosampleplayer.h"
    1.29 +#include "mdaaudiosampleeditor.h"
    1.30 +#include "mdaaudiooutputstream.h"
    1.31 +#include "TestPlayerUtils.h"
    1.32 +#include "TestRecorder.h"
    1.33 +#include "TSI_MMFACLNT.h"
    1.34 +#include <mmf/common/mmfaudio.h>
    1.35 +
    1.36 +//------------------------------------------------------------------------------
    1.37 +//********************PREQ 797 - Audio Resource Notification********************
    1.38 +//------------------------------------------------------------------------------
    1.39 +
    1.40 +/**
    1.41 + * stopActiveScheduler
    1.42 + */
    1.43 +static TInt stopActiveScheduler(TAny*)
    1.44 +	{
    1.45 +	CActiveScheduler::Stop();
    1.46 +	return KErrNone;
    1.47 +	}
    1.48 +
    1.49 +//
    1.50 +//Declarations//
    1.51 +//
    1.52 +
    1.53 +//
    1.54 +//Custom Error Codes & CONST Declarations.
    1.55 +//
    1.56 +const TInt KErrUser = -1000;
    1.57 +const TInt KErrBadResult = (KErrUser - 1);
    1.58 +const TInt KMicroSecsInOneSec = 1000000; 
    1.59 +const TUint KSampleRate8000Hz  = 8000;
    1.60 +
    1.61 +//
    1.62 +//Forward class declarations
    1.63 +//
    1.64 +class CCallbackTimer;
    1.65 +class CTestMdaAudioPlayerCallbackSupport;
    1.66 +class CTestMdaAudioRecorderCallbackSupport;
    1.67 +class CTestMdaAudioOutputStreamCallbackSupport;
    1.68 +class CTestMdaAudioMultiClientCallbackSupport;
    1.69 +
    1.70 +//------------------------------------------------------------------------------
    1.71 +//******************PREQ 797 - Audio Player Test Declarations*******************
    1.72 +//------------------------------------------------------------------------------
    1.73 +class CMultiEventChecker: public CBase
    1.74 +  {	
    1.75 +public:
    1.76 +	// MultiEvent checker utility enums
    1.77 +	enum TClientUtilityType
    1.78 +		{
    1.79 +		EAudioPlayer = 0,
    1.80 +		EAudioRecorder,
    1.81 +		EAudioStream	
    1.82 +		};
    1.83 +public:
    1.84 +	static CMultiEventChecker* NewL();
    1.85 +    TBool CheckFsm(TInt aClientNumber, TClientUtilityType aClientType,TInt aEventCode, TInt aError=KErrNone,CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
    1.86 +	void StopTest();
    1.87 +	void SetExpectedState(TInt aState);
    1.88 +	void SetExpectedEvent(TInt aClientNumber, TInt aEvent,TInt aError,CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
    1.89 +	void RegisterClientEventToMonitor(TInt aClientNumber, TInt aEventCode, TInt aError, TInt aState,CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
    1.90 +	void EnableMultipleEventMonitor()
    1.91 +		{
    1.92 +		iMonitorMultipleEvents = ETrue;	
    1.93 +		}
    1.94 +	void DisableMultipleEventMonitor()
    1.95 +		{
    1.96 +		iMonitorMultipleEvents = EFalse;		
    1.97 +		}
    1.98 +	TBool IsMutipleEventMonitorEnabled()
    1.99 +		{
   1.100 +		return iMonitorMultipleEvents;
   1.101 +		}
   1.102 +	TInt NextState()
   1.103 +		{
   1.104 +		return iNextState;			
   1.105 +		}
   1.106 +	TBool IsMonitoringFinished();
   1.107 +protected:
   1.108 +	void ConstructL();
   1.109 +	CMultiEventChecker();	
   1.110 +	//Register client events to monitor
   1.111 +	TInt iExpectedEvent;
   1.112 +	TInt iExpectedError;
   1.113 +	CMdaAudioClipUtility::TState iExpectedRecorderState;
   1.114 +	TInt iNextState;
   1.115 +	TFixedArray <TInt, 4> iClientEventsToMonitor;
   1.116 +	TFixedArray <TInt, 4> iClientError;
   1.117 +	TFixedArray <TInt, 4> iFsmStateforClient;
   1.118 +	TInt iClientsRegistered;
   1.119 +	TBool iMonitorMultipleEvents;
   1.120 +	};
   1.121 +
   1.122 +//
   1.123 +//BASE CLASS DECLARATIONS//
   1.124 +//
   1.125 +
   1.126 +/**
   1.127 + * Observer class to identify and pass events to the test step class
   1.128 + * 
   1.129 + * @class MTestAudioPlayerCallback
   1.130 + *
   1.131 + */
   1.132 +class MTestAudioPlayerCallback
   1.133 +	{
   1.134 +public :
   1.135 +	virtual void MapcInitCompleteTest(TInt aError, const TTimeIntervalMicroSeconds& aDuration, CTestMdaAudioPlayerCallbackSupport& aMdaAudioPlayerCallbackSupport) = 0;
   1.136 +	virtual void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestMdaAudioPlayerCallbackSupport& aMdaAudioPlayerCallbackSupport) = 0;
   1.137 +	virtual void MapcPlayCompleteTest(TInt aError, CTestMdaAudioPlayerCallbackSupport& aMdaAudioPlayerCallbackSupport) = 0;
   1.138 +	};
   1.139 +
   1.140 +/**
   1.141 + * Support class to pass the events to the test step class using the MTestAudioPlayerCallback
   1.142 + * 
   1.143 + * @class CTestMdaAudioPlayerCallbackSupport
   1.144 + *
   1.145 + */
   1.146 +class CTestMdaAudioPlayerCallbackSupport : public CBase, public MMdaAudioPlayerCallback, public MMMFAudioResourceNotificationCallback
   1.147 +	{
   1.148 +public :
   1.149 +	static CTestMdaAudioPlayerCallbackSupport* NewL(MTestAudioPlayerCallback& aCallback);
   1.150 +	virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
   1.151 +	virtual void MapcPlayComplete(TInt aError);
   1.152 +	virtual void MarncResourceAvailable(TUid aNotificationEventId, const TDesC8& aNotificationData);
   1.153 +protected:
   1.154 +	CTestMdaAudioPlayerCallbackSupport(MTestAudioPlayerCallback& aCallback);
   1.155 +	void ConstructL();
   1.156 +private :
   1.157 +	MTestAudioPlayerCallback& iCallback;
   1.158 +	};
   1.159 +
   1.160 +
   1.161 +/**
   1.162 + * Base Class for ARN functionality for most ARN audio player tests
   1.163 + * 
   1.164 + * @class CTestMmfAclntAudioPlayerARN
   1.165 + *
   1.166 + */
   1.167 +class CTestMmfAclntAudioPlayerARN : public CTestMmfAclntStep, public MTestAudioPlayerCallback
   1.168 +	{
   1.169 +public:
   1.170 +	// Enum to describe the current state.
   1.171 +	enum TMmfAudioPlayerState
   1.172 +		{
   1.173 +		EStateBegin = 0,
   1.174 +		EStateOpenPlayer1,
   1.175 +		EStateOpenPlayer2,
   1.176 +		EStateOpenPlayer3,
   1.177 +		EStatePlaying1,
   1.178 +		EStatePlaying2,
   1.179 +		EStatePlaying3,
   1.180 +		EStateEndPlay1,
   1.181 +		EStateEndPlay2,
   1.182 +		EStateEndPlay3,
   1.183 +		EStateErrInUsePlayer1,
   1.184 +		EStateErrInUsePlayer2,
   1.185 +		EStateErrInUsePlayer3,
   1.186 +		EStateNotifiedPlayer1,
   1.187 +		EStateNotifiedPlayer2,
   1.188 +		EStateNotifiedPlayer3,
   1.189 +		EStateErrInUsePlayer1A,
   1.190 +		EStateNotifiedPlayer1A,
   1.191 +		EStatePlaying2A,
   1.192 +		EStateEndPlay2A
   1.193 +		};
   1.194 +
   1.195 +	// Enum to decide which Event has occured.
   1.196 +	enum TMmfAudioPlayerEvents
   1.197 +		{
   1.198 +		EIdlePlayer = 0,
   1.199 +		EMapcInitComplete1,
   1.200 +		EMapcInitComplete2,
   1.201 +		EMapcInitComplete3,
   1.202 +		EMapcPlayComplete1,
   1.203 +		EMapcPlayComplete2,
   1.204 +		EMapcPlayComplete3,
   1.205 +		EMarncResourceAvailable1,
   1.206 +		EMarncResourceAvailable2,
   1.207 +		EMarncResourceAvailable3
   1.208 +		};
   1.209 +public :
   1.210 +	// Constructor
   1.211 +	CTestMmfAclntAudioPlayerARN(const TDesC& aTestName, const TDesC& aSectName);
   1.212 +	// Virtual methods for Preamble and Postamble.
   1.213 +	virtual TVerdict DoTestStepPreambleL();
   1.214 +	virtual TVerdict DoTestStepPostambleL();
   1.215 +	// Virtual function to access test specific methods
   1.216 +	virtual TVerdict DoTestStepL();
   1.217 +	// Pure function to access test specific methods
   1.218 +	virtual TVerdict DoTestL()=0;
   1.219 +	// from MTestAudioPlayerCallback
   1.220 +	virtual void MapcInitCompleteTest(TInt aError, const TTimeIntervalMicroSeconds& aDuration, CTestMdaAudioPlayerCallbackSupport& aMdaAudioPlayerCallbackSupport);
   1.221 +	virtual void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestMdaAudioPlayerCallbackSupport& aMdaAudioPlayerCallbackSupport);
   1.222 +	virtual void MapcPlayCompleteTest(TInt aError, CTestMdaAudioPlayerCallbackSupport& aMdaAudioPlayerCallbackSupport);
   1.223 +	// Centralised State Handler
   1.224 +	virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError)=0;
   1.225 +	virtual TBool FsmCheck(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.226 +protected :	
   1.227 +		// StateInit Function
   1.228 +	void StateInit();
   1.229 +	// StateChange Function
   1.230 +	void StateChange(TMmfAudioPlayerState aState, TMmfAudioPlayerEvents aExpectedEvent, TInt aExpectedError=KErrNone);
   1.231 +protected :	
   1.232 +	// CMdaAudioPlayerUtility instances
   1.233 +	CMdaAudioPlayerUtility* iTestAudioPlayer1;
   1.234 +	CMdaAudioPlayerUtility* iTestAudioPlayer2;
   1.235 +	CMdaAudioPlayerUtility* iTestAudioPlayer3;
   1.236 +	// CTestMdaAudioPlayerCallbackSupport instances
   1.237 +	CTestMdaAudioPlayerCallbackSupport* iMdaAudioPlayerCallbackSupport1;
   1.238 +	CTestMdaAudioPlayerCallbackSupport* iMdaAudioPlayerCallbackSupport2;
   1.239 +	CTestMdaAudioPlayerCallbackSupport* iMdaAudioPlayerCallbackSupport3;
   1.240 +	// Other class variable declarations
   1.241 +	TBuf<KSizeBuf> iFilename1;
   1.242 +	TBuf<KSizeBuf> iFilename2;
   1.243 +	TBuf<KSizeBuf> iFilename3;
   1.244 +	TTimeIntervalMicroSeconds iPosition;
   1.245 +	TTimeIntervalMicroSeconds iDuration;
   1.246 +	TInt iError;
   1.247 +	TMmfAudioPlayerState iState;
   1.248 +	TRequestStatus iRequestStatus;
   1.249 +	CCallBackTimer* iCallBackTimer;
   1.250 +	TMmfAudioPlayerEvents iExpectedEvent;
   1.251 +	TInt iExpectedError;
   1.252 +	TMmfAudioPlayerEvents iEventOccured;
   1.253 +	TBuf<KNameBufSize> iSectName;		// Section name for retrieving filename
   1.254 +	CMultiEventChecker* iEventChecker;
   1.255 +	};
   1.256 +
   1.257 +//
   1.258 +//POSITIVE TESTS//
   1.259 +//
   1.260 +
   1.261 +/** 
   1.262 + * Register for notification, but make no request to play audio.
   1.263 + *
   1.264 + * @class CTestMmfAclntARN8101
   1.265 + * 
   1.266 + */
   1.267 +class CTestMmfAclntARN8101 : public CTestMmfAclntAudioPlayerARN
   1.268 +	{
   1.269 +public:
   1.270 +	static CTestMmfAclntARN8101* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.271 +	virtual TVerdict DoTestL();
   1.272 +	virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.273 +	
   1.274 +protected:
   1.275 +	CTestMmfAclntARN8101( const TDesC& aTestName, const TDesC& aSectName );
   1.276 +	TVerdict PerformTestL();
   1.277 +	};
   1.278 +
   1.279 +/** 
   1.280 + * Register (b4 play, after Open) and Receive Notification of a Resource Available Event.
   1.281 + * (when audio resource is currently unavailable and then available)
   1.282 + *
   1.283 + * @class CTestMmfAclntARN8102
   1.284 + * 
   1.285 + */
   1.286 +class CTestMmfAclntARN8102 : public CTestMmfAclntAudioPlayerARN
   1.287 +	{
   1.288 +public:
   1.289 +	static CTestMmfAclntARN8102* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.290 +	virtual TVerdict DoTestL();
   1.291 +	virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.292 +
   1.293 +protected:
   1.294 +	CTestMmfAclntARN8102( const TDesC& aTestName, const TDesC& aSectName );
   1.295 +	TVerdict PerformTestL();
   1.296 +	};
   1.297 +
   1.298 +/** 
   1.299 + * Register (at the time of Play) and Receive Notification of a Resource Available Event.
   1.300 + * (when audio resource is currently available and subsequently unavailable, and then available)
   1.301 +	
   1.302 + *
   1.303 + * @class CTestMmfAclntARN8103
   1.304 + * 
   1.305 + */
   1.306 +class CTestMmfAclntARN8103 : public CTestMmfAclntAudioPlayerARN
   1.307 +	{
   1.308 +public:
   1.309 +	static CTestMmfAclntARN8103* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.310 +	virtual TVerdict DoTestL();
   1.311 +	virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.312 +	virtual TBool FsmCheck(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.313 +
   1.314 +protected:
   1.315 +	CTestMmfAclntARN8103( const TDesC& aTestName, const TDesC& aSectName );
   1.316 +	TVerdict PerformTestL();
   1.317 +	};
   1.318 +
   1.319 +/** 
   1.320 + * Registration (b4 File Open) and Cancellation of  the notification request
   1.321 + *
   1.322 + * @class CTestMmfAclntARN8104
   1.323 + * 
   1.324 + */
   1.325 +class CTestMmfAclntARN8104 : public CTestMmfAclntAudioPlayerARN
   1.326 +	{
   1.327 +public:
   1.328 +	static CTestMmfAclntARN8104* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.329 +	virtual TVerdict DoTestL();
   1.330 +	virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.331 +
   1.332 +protected:
   1.333 +	CTestMmfAclntARN8104( const TDesC& aTestName, const TDesC& aSectName );
   1.334 +	TVerdict PerformTestL();
   1.335 +	};
   1.336 +
   1.337 +/** 
   1.338 + * Register (after Play Error) and Get the actual position from where the paused audio can be resumed.
   1.339 + * Low priority client is played first.
   1.340 + *
   1.341 + * @class CTestMmfAclntARN8105
   1.342 + * 
   1.343 + */
   1.344 +class CTestMmfAclntARN8105 : public CTestMmfAclntAudioPlayerARN
   1.345 +	{
   1.346 +public:
   1.347 +	static CTestMmfAclntARN8105* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.348 +	virtual TVerdict DoTestL();
   1.349 +	virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.350 +	virtual TBool FsmCheck(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.351 +
   1.352 +protected:
   1.353 +	CTestMmfAclntARN8105( const TDesC& aTestName, const TDesC& aSectName );
   1.354 +	TVerdict PerformTestL();
   1.355 +
   1.356 +private:
   1.357 +	TTimeIntervalMicroSeconds iPositionStop;
   1.358 +	TTimeIntervalMicroSeconds iPositionResume;
   1.359 +	};
   1.360 +
   1.361 +/** 
   1.362 + * Register (after Play Error) and Get the actual position from where the paused audio can be resumed.
   1.363 + * High priority client is played first.
   1.364 + *
   1.365 + * @class CTestMmfAclntARN8106
   1.366 + * 
   1.367 + */
   1.368 +class CTestMmfAclntARN8106 : public CTestMmfAclntAudioPlayerARN
   1.369 +	{
   1.370 +public:
   1.371 +	static CTestMmfAclntARN8106* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.372 +	virtual TVerdict DoTestL();
   1.373 +	virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.374 +	virtual TBool FsmCheck(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.375 +
   1.376 +protected:
   1.377 +	CTestMmfAclntARN8106( const TDesC& aTestName, const TDesC& aSectName );
   1.378 +	TVerdict PerformTestL();
   1.379 +
   1.380 +private:
   1.381 +	TTimeIntervalMicroSeconds iPositionStop;
   1.382 +	TTimeIntervalMicroSeconds iPositionResume;
   1.383 +	};
   1.384 +
   1.385 +/** 
   1.386 + * Client does not need to Re-register for the same event when the event is received 
   1.387 + * i.e API is not one shot.
   1.388 + *
   1.389 + * @class CTestMmfAclntARN8107
   1.390 + * 
   1.391 + */
   1.392 +class CTestMmfAclntARN8107 : public CTestMmfAclntAudioPlayerARN
   1.393 +	{
   1.394 +public:
   1.395 +	static CTestMmfAclntARN8107* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.396 +	virtual TVerdict DoTestL();
   1.397 +	virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.398 +	virtual TBool FsmCheck(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.399 +
   1.400 +protected:
   1.401 +	CTestMmfAclntARN8107( const TDesC& aTestName, const TDesC& aSectName );
   1.402 +	TVerdict PerformTestL();
   1.403 +	};
   1.404 +
   1.405 +/** 
   1.406 + * High priority client plays with repeats and low priority client doesn't get resources
   1.407 + *
   1.408 + * @class CTestMmfAclntARN8109
   1.409 + * 
   1.410 + */
   1.411 +class CTestMmfAclntARN8109 : public CTestMmfAclntAudioPlayerARN
   1.412 +	{
   1.413 +public:
   1.414 +	static CTestMmfAclntARN8109* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.415 +	virtual TVerdict DoTestL();
   1.416 +	virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.417 +	virtual TBool FsmCheck(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.418 +	
   1.419 +		// from MTestAudioPlayerCallback
   1.420 +	virtual void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestMdaAudioPlayerCallbackSupport& aMdaAudioPlayerCallbackSupport);
   1.421 +	virtual void MapcPlayCompleteTest(TInt aError, CTestMdaAudioPlayerCallbackSupport& aMdaAudioPlayerCallbackSupport);
   1.422 +
   1.423 +protected:
   1.424 +	CTestMmfAclntARN8109( const TDesC& aTestName, const TDesC& aSectName );
   1.425 +	TVerdict PerformTestL();
   1.426 +	TBool TimeComparison(const TUint aActual, const TUint aExpected, const TUint aDeviation);
   1.427 +private:
   1.428 +	TTime iStart;
   1.429 +	TTime iStop;
   1.430 +	TInt  iDuration;
   1.431 +	TUint iActualDuration;
   1.432 +	TBool iPlayComplete2;
   1.433 +	TBool iResourceAvailable1;
   1.434 +	};
   1.435 +
   1.436 +
   1.437 +
   1.438 +/** 
   1.439 + * Call WillResumePlay()
   1.440 + *
   1.441 + * @class CTestMmfAclntARN8108
   1.442 + * 
   1.443 + */
   1.444 +class CTestMmfAclntARN8108 : public CTestMmfAclntAudioPlayerARN
   1.445 +	{
   1.446 +public:
   1.447 +	static CTestMmfAclntARN8108* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.448 +	virtual TVerdict DoTestL();
   1.449 +	virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.450 +	virtual void DecideFsmState(TInt aClientNumber,CMultiEventChecker::TClientUtilityType aClientType, TInt aEventCode, TInt aError=KErrNone);
   1.451 +protected:
   1.452 +	TVerdict HandleStateOpenPlayer1();
   1.453 +	TVerdict HandleStateOpenPlayer3();
   1.454 +	TVerdict HandleStateOpenPlayer2();
   1.455 +	TVerdict HandleStateErrInUsePlayer1();
   1.456 +	TVerdict HandleStateErrInUsePlayer3();
   1.457 +	TVerdict HandleStateNotifiedPlayer1();
   1.458 +	TVerdict HandleStateNotifiedPlayer3();
   1.459 +	TVerdict HandleStatePlaying1();
   1.460 +	CTestMmfAclntARN8108( const TDesC& aTestName, const TDesC& aSectName );
   1.461 +	void InitTest();
   1.462 +	void StartTestL();
   1.463 +	TVerdict PerformTestL();
   1.464 +	typedef TVerdict (CTestMmfAclntARN8108::*fp)();
   1.465 +	TFixedArray<fp,30> iStateHandlers;
   1.466 +	};
   1.467 +
   1.468 +/** 
   1.469 + * Dont register for ARN, get pre-empted and then resume from same position.
   1.470 + * Test case for DevCR KEVN-7T5EHA 
   1.471 + * @class CTestMmfAclntARN8110
   1.472 + * 
   1.473 + */
   1.474 +class CTestMmfAclntARN8110 : public CTestMmfAclntAudioPlayerARN
   1.475 +    {
   1.476 +public:
   1.477 +    static CTestMmfAclntARN8110* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.478 +    virtual TVerdict DoTestL();
   1.479 +    virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.480 +    
   1.481 +protected:
   1.482 +    CTestMmfAclntARN8110( const TDesC& aTestName, const TDesC& aSectName );
   1.483 +    TVerdict PerformTestL();
   1.484 +    TTimeIntervalMicroSeconds iPlayer1Pos;
   1.485 +    };
   1.486 +
   1.487 +/** 
   1.488 + * Dont register for ARN, get pre-empted, stop and chk if position is reset, start play again.
   1.489 + * Test case for DevCR KEVN-7T5EHA 
   1.490 + * @class CTestMmfAclntARN8111
   1.491 + * 
   1.492 + */
   1.493 +class CTestMmfAclntARN8111 : public CTestMmfAclntAudioPlayerARN
   1.494 +    {
   1.495 +public:
   1.496 +    static CTestMmfAclntARN8111* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.497 +    virtual TVerdict DoTestL();
   1.498 +    virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.499 +    
   1.500 +protected:
   1.501 +    CTestMmfAclntARN8111( const TDesC& aTestName, const TDesC& aSectName );
   1.502 +    TVerdict PerformTestL();
   1.503 +    TTimeIntervalMicroSeconds iPlayer1Pos;
   1.504 +    };
   1.505 +
   1.506 +/** 
   1.507 + * Play higher priority first, then start playing low priority
   1.508 + * Test case for DevCR KEVN-7T5EHA 
   1.509 + * @class CTestMmfAclntARN8112
   1.510 + * 
   1.511 + */
   1.512 +class CTestMmfAclntARN8112 : public CTestMmfAclntAudioPlayerARN
   1.513 +    {
   1.514 +public:
   1.515 +    static CTestMmfAclntARN8112* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.516 +    virtual TVerdict DoTestL();
   1.517 +    virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.518 +    
   1.519 +protected:
   1.520 +    CTestMmfAclntARN8112( const TDesC& aTestName, const TDesC& aSectName );
   1.521 +    TVerdict PerformTestL();
   1.522 +    TTimeIntervalMicroSeconds iPlayer1Pos;
   1.523 +    };
   1.524 +//
   1.525 +//NEGATIVE TESTS//
   1.526 +//
   1.527 +
   1.528 +/** 
   1.529 + * Register for notification with an unsupported event type.
   1.530 + *
   1.531 + * @class CTestMmfAclntARN1301
   1.532 + * 
   1.533 + */
   1.534 +class CTestMmfAclntARN1301 : public CTestMmfAclntAudioPlayerARN
   1.535 +	{
   1.536 +public:
   1.537 +	static CTestMmfAclntARN1301* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.538 +	virtual TVerdict DoTestL();
   1.539 +	virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.540 +
   1.541 +protected:
   1.542 +	CTestMmfAclntARN1301( const TDesC& aTestName, const TDesC& aSectName );
   1.543 +	TVerdict PerformTestL();
   1.544 +	};
   1.545 +
   1.546 +/** 
   1.547 + * Cancel the request for notification with an unsupported event type.
   1.548 + *
   1.549 + * @class CTestMmfAclntARN1302
   1.550 + * 
   1.551 + */
   1.552 +class CTestMmfAclntARN1302 : public CTestMmfAclntAudioPlayerARN
   1.553 +	{
   1.554 +public:
   1.555 +	static CTestMmfAclntARN1302* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.556 +	virtual TVerdict DoTestL();
   1.557 +	virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.558 +
   1.559 +protected:
   1.560 +	CTestMmfAclntARN1302( const TDesC& aTestName, const TDesC& aSectName );
   1.561 +	TVerdict PerformTestL();
   1.562 +	};
   1.563 +
   1.564 +/** 
   1.565 + * Cancel when no resource Notification is requested.
   1.566 + *
   1.567 + * @class CTestMmfAclntARN1303
   1.568 + * 
   1.569 + */
   1.570 +class CTestMmfAclntARN1303 : public CTestMmfAclntAudioPlayerARN
   1.571 +	{
   1.572 +public:
   1.573 +	static CTestMmfAclntARN1303* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.574 +	virtual TVerdict DoTestL();
   1.575 +	virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.576 +
   1.577 +protected:
   1.578 +	CTestMmfAclntARN1303( const TDesC& aTestName, const TDesC& aSectName );
   1.579 +	TVerdict PerformTestL();
   1.580 +	};
   1.581 +
   1.582 +/** 
   1.583 + * Multiple Registration for notification for the same event type.
   1.584 + *
   1.585 + * @class CTestMmfAclntARN1304
   1.586 + * 
   1.587 + */
   1.588 +class CTestMmfAclntARN1304 : public CTestMmfAclntAudioPlayerARN
   1.589 +	{
   1.590 +public:
   1.591 +	static CTestMmfAclntARN1304* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.592 +	virtual TVerdict DoTestL();
   1.593 +	virtual void FsmL(TMmfAudioPlayerEvents aEventCode, TInt aError);
   1.594 +
   1.595 +protected:
   1.596 +	CTestMmfAclntARN1304( const TDesC& aTestName, const TDesC& aSectName );
   1.597 +	TVerdict PerformTestL();
   1.598 +	};
   1.599 +
   1.600 +//------------------------------------------------------------------------------
   1.601 +//*****************PREQ 797 - Audio Recorder Test Declarations******************
   1.602 +//------------------------------------------------------------------------------
   1.603 +
   1.604 +//
   1.605 +//ENUM DECLARATIONS//
   1.606 +//
   1.607 +
   1.608 +// Enum to decide which Event has occured.
   1.609 +enum TMmfAudioRecorderEvents
   1.610 +	{
   1.611 +	EIdleRecorder = 0,
   1.612 +	EMoscoStateChange1,
   1.613 +	EMoscoStateChange2,
   1.614 +	EMoscoStateChange3,
   1.615 +	EMarncResourceAvailableRec1,
   1.616 +	EMarncResourceAvailableRec2,
   1.617 +	EMarncResourceAvailableRec3
   1.618 +	};
   1.619 +
   1.620 +//
   1.621 +//BASE CLASS DECLARATIONS//
   1.622 +//
   1.623 +
   1.624 +/**
   1.625 + * Observer class to identify and pass events to the test step class
   1.626 + * 
   1.627 + * @class MTestAudioRecorderCallback
   1.628 + *
   1.629 + */
   1.630 +class MTestAudioRecorderCallback
   1.631 +	{
   1.632 +public :
   1.633 +	virtual void MoscoStateChangeEventTest(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode, CTestMdaAudioRecorderCallbackSupport& aMdaAudioRecorderCallbackSupport) = 0;
   1.634 +	virtual void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestMdaAudioRecorderCallbackSupport& aMdaAudioRecorderCallbackSupport) = 0;
   1.635 +	};
   1.636 +
   1.637 +/**
   1.638 + * Support class to pass the events to the test step class using the MTestAudioRecorderCallback
   1.639 + * 
   1.640 + * @class CTestMdaAudioRecorderCallbackSupport
   1.641 + *
   1.642 + */
   1.643 +class CTestMdaAudioRecorderCallbackSupport : public CBase, public MMdaObjectStateChangeObserver, public MMMFAudioResourceNotificationCallback
   1.644 +	{
   1.645 +public :
   1.646 +	static CTestMdaAudioRecorderCallbackSupport* NewL(MTestAudioRecorderCallback& aCallback);
   1.647 +	virtual void MoscoStateChangeEvent(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode);
   1.648 +	virtual void MarncResourceAvailable(TUid aNotificationEventId, const TDesC8& aNotificationData);
   1.649 +protected:
   1.650 +	CTestMdaAudioRecorderCallbackSupport(MTestAudioRecorderCallback& aCallback);
   1.651 +	void ConstructL();
   1.652 +private :
   1.653 +	MTestAudioRecorderCallback& iCallback;
   1.654 +	};
   1.655 +
   1.656 +/**
   1.657 + * Base Class for ARN functionality for most ARN audio recorder tests
   1.658 + * 
   1.659 + * @class CTestMmfAclntRecordARN
   1.660 + *
   1.661 + */
   1.662 +class CTestMmfAclntRecordARN : public CTestMmfAclntStep, public MTestAudioRecorderCallback
   1.663 +	{
   1.664 +public:
   1.665 +	// Constructor
   1.666 +	CTestMmfAclntRecordARN(const TDesC& aTestName, const TDesC& aSectName);
   1.667 +	// Virtual methods for Preamble and Postamble.
   1.668 +	virtual TVerdict DoTestStepPreambleL();
   1.669 +	virtual TVerdict DoTestStepPostambleL();
   1.670 +	// Virtual function to access test specific methods
   1.671 +	virtual TVerdict DoTestStepL();
   1.672 +	// Pure function to access test specific methods
   1.673 +	virtual TVerdict DoTestL()=0;
   1.674 +	// from MTestAudioRecorderCallback
   1.675 +	void MoscoStateChangeEventTest(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode, CTestMdaAudioRecorderCallbackSupport& aMdaAudioRecorderCallbackSupport);
   1.676 +	void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestMdaAudioRecorderCallbackSupport& aMdaAudioRecorderCallbackSupport);
   1.677 +	// Centralised State Handler
   1.678 +	virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone)=0;
   1.679 +	virtual TBool FsmCheck(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
   1.680 +protected:
   1.681 +	// StateInit Function
   1.682 +	void StateInit();
   1.683 +	// StateChange Function
   1.684 +	void StateChange(TMmfAudioRecorderEvents aExpectedEvent, CMdaAudioClipUtility::TState aExpectedRecorderState, TInt aExpectedError=KErrNone);
   1.685 +protected :	
   1.686 +	// CMdaAudioRecorderUtility instances
   1.687 +	CMdaAudioRecorderUtility* iTestAudioRecorder1;
   1.688 +	CMdaAudioRecorderUtility* iTestAudioRecorder2;
   1.689 +	CMdaAudioRecorderUtility* iTestAudioRecorder3;
   1.690 +	// CTestMdaAudioRecorderCallbackSupport instances
   1.691 +	CTestMdaAudioRecorderCallbackSupport* iMdaAudioRecorderCallbackSupport1;
   1.692 +	CTestMdaAudioRecorderCallbackSupport* iMdaAudioRecorderCallbackSupport2;
   1.693 +	CTestMdaAudioRecorderCallbackSupport* iMdaAudioRecorderCallbackSupport3;
   1.694 +	// Other class variable declarations
   1.695 +	TBuf<KSizeBuf>	iFilename1;
   1.696 +	TBuf<KSizeBuf>	iFilename2;
   1.697 +	TBuf<KSizeBuf>	iFilename3;
   1.698 +	TInt iError;
   1.699 +	TInt iState;
   1.700 +	TRequestStatus iRequestStatus;
   1.701 +	CCallBackTimer* iCallBackTimer;
   1.702 +	TMmfAudioRecorderEvents iExpectedEvent;
   1.703 +	CMdaAudioClipUtility::TState iExpectedRecorderState;
   1.704 +	TInt iExpectedError;
   1.705 +	TTimeIntervalMicroSeconds iDuration;
   1.706 +	TTimeIntervalMicroSeconds iPosition;
   1.707 +	TMmfAudioRecorderEvents iEventOccured;
   1.708 +	TBuf<KNameBufSize> iSectName;		// Section name for retrieving filename
   1.709 +	};
   1.710 +
   1.711 +//
   1.712 +//POSITIVE TESTS//
   1.713 +//
   1.714 +
   1.715 +/** 
   1.716 + * Register for notification, but make no request to play audio.
   1.717 + *
   1.718 + * @class CTestMmfAclntARN8011
   1.719 + * 
   1.720 + */
   1.721 +class CTestMmfAclntARN8011 : public CTestMmfAclntRecordARN
   1.722 +	{
   1.723 +public:
   1.724 +	static CTestMmfAclntARN8011* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.725 +	virtual TVerdict DoTestL();
   1.726 +	virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
   1.727 +	
   1.728 +protected:
   1.729 +	CTestMmfAclntARN8011( const TDesC& aTestName, const TDesC& aSectName );
   1.730 +	TVerdict PerformTestL();
   1.731 +	};
   1.732 +
   1.733 +
   1.734 +/** 
   1.735 + * Register (b4 play, after Open) and Receive Notification of a Resource Available Event.
   1.736 + * (when audio resource is currently unavailable and then available)	
   1.737 + *
   1.738 + * @class CTestMmfAclntARN8012
   1.739 + * 
   1.740 + */
   1.741 +class CTestMmfAclntARN8012 : public CTestMmfAclntRecordARN
   1.742 +	{
   1.743 +public:
   1.744 +	static CTestMmfAclntARN8012* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.745 +	virtual TVerdict DoTestL();
   1.746 +	virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
   1.747 +
   1.748 +protected:
   1.749 +	CTestMmfAclntARN8012( const TDesC& aTestName, const TDesC& aSectName );
   1.750 +	TVerdict PerformTestL();
   1.751 +	};
   1.752 +
   1.753 +/** 
   1.754 + * Register (at the time of Play) and Receive Notification of a Resource Available Event.
   1.755 + * (when audio resource is currently available and subsequently unavailable, and then available)
   1.756 + *
   1.757 + * @class CTestMmfAclntARN8013
   1.758 + * 
   1.759 + */
   1.760 +class CTestMmfAclntARN8013 : public CTestMmfAclntRecordARN
   1.761 +	{
   1.762 +public:
   1.763 +	static CTestMmfAclntARN8013* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.764 +	virtual TVerdict DoTestL();
   1.765 +	virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
   1.766 +
   1.767 +protected:
   1.768 +	CTestMmfAclntARN8013( const TDesC& aTestName, const TDesC& aSectName );
   1.769 +	TVerdict PerformTestL();
   1.770 +	};
   1.771 +
   1.772 +/** 
   1.773 + * Registration (b4 File Open) and Cancellation of  the notification request
   1.774 + *
   1.775 + * @class CTestMmfAclntARN8014
   1.776 + * 
   1.777 + */
   1.778 +class CTestMmfAclntARN8014 : public CTestMmfAclntRecordARN
   1.779 +	{
   1.780 +public:
   1.781 +	static CTestMmfAclntARN8014* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.782 +	virtual TVerdict DoTestL();
   1.783 +	virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
   1.784 +
   1.785 +protected:
   1.786 +	CTestMmfAclntARN8014( const TDesC& aTestName, const TDesC& aSectName );
   1.787 +	TVerdict PerformTestL();
   1.788 +	};
   1.789 +
   1.790 +/** 
   1.791 + * Get the actual position from where the paused audio can be resumed.
   1.792 + *
   1.793 + * @class CTestMmfAclntARN8015
   1.794 + * 
   1.795 + */
   1.796 +class CTestMmfAclntARN8015 : public CTestMmfAclntRecordARN
   1.797 +	{
   1.798 +public:
   1.799 +	static CTestMmfAclntARN8015* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.800 +	virtual TVerdict DoTestL();
   1.801 +	virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
   1.802 +	virtual TBool FsmCheck(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
   1.803 +
   1.804 +protected:
   1.805 +	CTestMmfAclntARN8015( const TDesC& aTestName, const TDesC& aSectName );
   1.806 +	TVerdict PerformTestL();
   1.807 +
   1.808 +private:
   1.809 +	TTimeIntervalMicroSeconds iPositionStop;
   1.810 +	TTimeIntervalMicroSeconds iPositionResume;
   1.811 +	};
   1.812 +
   1.813 +/** 
   1.814 + * Call WillResumePlay()
   1.815 + *
   1.816 + * @class CTestMmfAclntARN8016
   1.817 + * 
   1.818 + */
   1.819 +class CTestMmfAclntARN8016 : public CTestMmfAclntRecordARN
   1.820 +	{
   1.821 +public:
   1.822 +	static CTestMmfAclntARN8016* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.823 +	virtual TVerdict DoTestL();
   1.824 +	virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
   1.825 +	virtual TBool FsmCheck(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
   1.826 +
   1.827 +protected:
   1.828 +	CTestMmfAclntARN8016( const TDesC& aTestName, const TDesC& aSectName );
   1.829 +	TVerdict PerformTestL();
   1.830 +
   1.831 +private:
   1.832 +	TTimeIntervalMicroSeconds iPositionStop;
   1.833 +	TTimeIntervalMicroSeconds iPositionResume;
   1.834 +	};
   1.835 +
   1.836 +
   1.837 +//
   1.838 +//NEGATIVE TESTS//
   1.839 +//
   1.840 +
   1.841 +/** 
   1.842 + * Register for notification with an unsupported event type.
   1.843 + *
   1.844 + * @class CTestMmfAclntARN1311
   1.845 + * 
   1.846 + */
   1.847 +class CTestMmfAclntARN1311 : public CTestMmfAclntRecordARN
   1.848 +	{
   1.849 +public:
   1.850 +	static CTestMmfAclntARN1311* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.851 +	virtual TVerdict DoTestL();
   1.852 +	virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
   1.853 +
   1.854 +protected:
   1.855 +	CTestMmfAclntARN1311( const TDesC& aTestName, const TDesC& aSectName );
   1.856 +	TVerdict PerformTestL();
   1.857 +	};
   1.858 +
   1.859 +/** 
   1.860 + * Cancel the request for notification with an unsupported event type.
   1.861 + *
   1.862 + * @class CTestMmfAclntARN1312
   1.863 + * 
   1.864 + */
   1.865 +class CTestMmfAclntARN1312 : public CTestMmfAclntRecordARN
   1.866 +	{
   1.867 +public:
   1.868 +	static CTestMmfAclntARN1312* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.869 +	virtual TVerdict DoTestL();
   1.870 +	virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
   1.871 +
   1.872 +protected:
   1.873 +	CTestMmfAclntARN1312( const TDesC& aTestName, const TDesC& aSectName );
   1.874 +	TVerdict PerformTestL();
   1.875 +	};
   1.876 +
   1.877 +/** 
   1.878 + * Cancel when no resource Notification is requested.
   1.879 + *
   1.880 + * @class CTestMmfAclntARN1313
   1.881 + * 
   1.882 + */
   1.883 +class CTestMmfAclntARN1313 : public CTestMmfAclntRecordARN
   1.884 +	{
   1.885 +public:
   1.886 +	static CTestMmfAclntARN1313* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.887 +	virtual TVerdict DoTestL();
   1.888 +	virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
   1.889 +
   1.890 +protected:
   1.891 +	CTestMmfAclntARN1313( const TDesC& aTestName, const TDesC& aSectName );
   1.892 +	TVerdict PerformTestL();
   1.893 +	};
   1.894 +
   1.895 +/** 
   1.896 + * Multiple Registration for notification for the same event type.
   1.897 + *
   1.898 + * @class CTestMmfAclntARN1314
   1.899 + * 
   1.900 + */
   1.901 +class CTestMmfAclntARN1314 : public CTestMmfAclntRecordARN
   1.902 +	{
   1.903 +public:
   1.904 +	static CTestMmfAclntARN1314* NewL( const TDesC& aTestName, const TDesC& aSectName );
   1.905 +	virtual TVerdict DoTestL();
   1.906 +	virtual void FsmL(TMmfAudioRecorderEvents aEventCode, CMdaAudioClipUtility::TState aRecorderState, TInt aError=KErrNone);
   1.907 +
   1.908 +protected:
   1.909 +	CTestMmfAclntARN1314( const TDesC& aTestName, const TDesC& aSectName );
   1.910 +	TVerdict PerformTestL();
   1.911 +	};
   1.912 +
   1.913 +
   1.914 +//------------------------------------------------------------------------------
   1.915 +//***************PREQ 797 - Audio OutputStream Test Declarations****************
   1.916 +//------------------------------------------------------------------------------
   1.917 +
   1.918 +//
   1.919 +//ENUM DECLARATIONS//
   1.920 +//
   1.921 +
   1.922 +_LIT(KStreamRawFile1,"c:\\AclntITestData\\test.raw");
   1.923 +_LIT(KStreamRawFile2,"c:\\AclntITestData\\test2.raw");
   1.924 +_LIT(KStreamRawFile3,"c:\\AclntITestData\\test3.raw");
   1.925 +
   1.926 +// Enum to decide which Event has occured.
   1.927 +enum TMmfAudioOutputStreamEvents
   1.928 +	{
   1.929 +	EIdleOutputStream = 0,
   1.930 +	EMaoscOpenComplete1,
   1.931 +	EMaoscOpenComplete2,
   1.932 +	EMaoscOpenComplete3,
   1.933 +	EMaoscBufferCopied1,
   1.934 +	EMaoscBufferCopied2,
   1.935 +	EMaoscBufferCopied3,
   1.936 +	EMaoscPlayComplete1,
   1.937 +	EMaoscPlayComplete2,
   1.938 +	EMaoscPlayComplete3,
   1.939 +	EMarncResourceAvailableOS1,
   1.940 +	EMarncResourceAvailableOS2,
   1.941 +	EMarncResourceAvailableOS3,
   1.942 +	};
   1.943 +	
   1.944 +enum TFsmOutputStreamState
   1.945 +	{
   1.946 +	EStateIdle = 0,
   1.947 +	EStateOpening1,
   1.948 +	EStateOpening2,
   1.949 +	EStateOpening3,
   1.950 +	EStateOpenComplete1,
   1.951 +	EStateOpenComplete2,
   1.952 +	EStateOpenComplete3,
   1.953 +	EStateStreaming1,
   1.954 +	EStateStreaming2,
   1.955 +	EStateStreaming3,
   1.956 +	EStateResumeStreaming1,
   1.957 +	EStateResumeStreaming2,
   1.958 +	EStateResumeStreaming3,
   1.959 +	EStateBufferCopied1,
   1.960 +	EStateBufferCopied2,
   1.961 +	EStateBufferCopied3,
   1.962 +	EStateStreamingComplete1,
   1.963 +	EStateStreamingComplete1ErrInUse,
   1.964 +	EStateStreamingComplete1ErrUnderflow,
   1.965 +	EStateStreamingComplete2,
   1.966 +	EStateStreamingComplete2ErrInUse,
   1.967 +	EStateStreamingComplete2ErrUnderflow,
   1.968 +	EStateStreamingComplete3,
   1.969 +	EStateStreamingComplete3ErrInUse,
   1.970 +	EStateStreamingComplete3ErrUnderflow,
   1.971 +	EStateResourceAvailableOS1,
   1.972 +	EStateResourceAvailableOS2,
   1.973 +	EStateResourceAvailableOS3,
   1.974 +	EStateMonitoringEvents,
   1.975 +	EStateFinished
   1.976 +	};
   1.977 +
   1.978 +//
   1.979 +//BASE CLASS DECLARATIONS//
   1.980 +//
   1.981 +
   1.982 +/**
   1.983 + * Observer class to identify and pass events to the test step class
   1.984 + * 
   1.985 + * @class MTestAudioOutputStreamCallback
   1.986 + *
   1.987 + */
   1.988 +class MTestAudioOutputStreamCallback
   1.989 +	{
   1.990 +public :
   1.991 +	virtual void MaoscOpenCompleteTest(TInt aError, CTestMdaAudioOutputStreamCallbackSupport& aMdaAudioOutputStreamCallbackSupport) = 0;
   1.992 +	virtual void MaoscBufferCopiedTest(TInt aError, const TDesC8& aBuffer, CTestMdaAudioOutputStreamCallbackSupport& aMdaAudioOutputStreamCallbackSupport) = 0;
   1.993 +	virtual void MaoscPlayCompleteTest(TInt aError, CTestMdaAudioOutputStreamCallbackSupport& aMdaAudioOutputStreamCallbackSupport) = 0; 
   1.994 +	virtual void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestMdaAudioOutputStreamCallbackSupport& aMdaAudioOutputStreamCallbackSupport) = 0;
   1.995 +	};
   1.996 +
   1.997 +/**
   1.998 + * Support class to pass the events to the test step class using the MTestAudioOutputStreamCallback
   1.999 + * 
  1.1000 + * @class CTestMdaAudioOutputStreamCallbackSupport
  1.1001 + *
  1.1002 + */
  1.1003 +class CTestMdaAudioOutputStreamCallbackSupport : public CBase, public MMdaAudioOutputStreamCallback, public MMMFAudioResourceNotificationCallback
  1.1004 +	{
  1.1005 +public :
  1.1006 +	static CTestMdaAudioOutputStreamCallbackSupport* NewL(MTestAudioOutputStreamCallback& aCallback);
  1.1007 +	virtual void MaoscOpenComplete(TInt aError);
  1.1008 +	virtual void MaoscBufferCopied(TInt aError, const TDesC8& aBuffer);
  1.1009 +	virtual void MaoscPlayComplete(TInt aError); 
  1.1010 +	virtual void MarncResourceAvailable(TUid aNotificationEventId, const TDesC8& aNotificationData);
  1.1011 +protected:
  1.1012 +	CTestMdaAudioOutputStreamCallbackSupport(MTestAudioOutputStreamCallback& aCallback);
  1.1013 +	void ConstructL();
  1.1014 +private :
  1.1015 +	MTestAudioOutputStreamCallback& iCallback;
  1.1016 +	};
  1.1017 +
  1.1018 +
  1.1019 +/**
  1.1020 + * Base Class for ARN functionality for most ARN Audio Output Stream tests
  1.1021 + * 
  1.1022 + * @class CTestStepAudioOutputStreamARN
  1.1023 + *
  1.1024 + */
  1.1025 +class CTestStepAudioOutputStreamARN : public CTestMmfAclntStep, public MTestAudioOutputStreamCallback
  1.1026 +  {													           
  1.1027 +public:
  1.1028 +	// Virtual methods for Preamble and Postamble.
  1.1029 +	virtual enum TVerdict DoTestStepPreambleL();
  1.1030 +	virtual enum TVerdict DoTestStepPostambleL();
  1.1031 +	// Virtual function to access test specific methods
  1.1032 +	virtual TVerdict DoTestStepL();
  1.1033 +	// Pure function to access test specific methods
  1.1034 +	virtual TVerdict DoTestL()=0;
  1.1035 +	// from MTestAudioOutputStreamCallback
  1.1036 +	virtual void MaoscOpenCompleteTest(TInt aError, CTestMdaAudioOutputStreamCallbackSupport& aMdaAudioOutputStreamCallbackSupport);
  1.1037 +	virtual void MaoscBufferCopiedTest(TInt aError, const TDesC8& aBuffer, CTestMdaAudioOutputStreamCallbackSupport& aMdaAudioOutputStreamCallbackSupport);
  1.1038 +	virtual void MaoscPlayCompleteTest(TInt aError, CTestMdaAudioOutputStreamCallbackSupport& aMdaAudioOutputStreamCallbackSupport);
  1.1039 +	virtual void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestMdaAudioOutputStreamCallbackSupport& aMdaAudioOutputStreamCallbackSupport);
  1.1040 +	// Centralised State Handler
  1.1041 +	virtual void FsmL(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone)=0;
  1.1042 +	virtual TBool FsmCheck(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone);
  1.1043 +protected:
  1.1044 +	// Constructor
  1.1045 +	CTestStepAudioOutputStreamARN(const TDesC& aTestName);
  1.1046 +	// StateInit Function
  1.1047 +	void StateInit();
  1.1048 +	// StateChange Function
  1.1049 +	void StateChange(TMmfAudioOutputStreamEvents aExpectedEvent, TInt aExpectedError=KErrNone);
  1.1050 +	// CMdaAudioOutputStream instances
  1.1051 +	CMdaAudioOutputStream*		iTestAudioOutputStream1;
  1.1052 +	CMdaAudioOutputStream*		iTestAudioOutputStream2;
  1.1053 +	CMdaAudioOutputStream*		iTestAudioOutputStream3;
  1.1054 +	// CTestMdaAudioOutputStreamCallbackSupport instances
  1.1055 +	CTestMdaAudioOutputStreamCallbackSupport* iMdaAudioOutputStreamCallbackSupport1;
  1.1056 +	CTestMdaAudioOutputStreamCallbackSupport* iMdaAudioOutputStreamCallbackSupport2;
  1.1057 +	CTestMdaAudioOutputStreamCallbackSupport* iMdaAudioOutputStreamCallbackSupport3;
  1.1058 +	// Other class variable declarations
  1.1059 +	RFs							iFs;
  1.1060 +	RFile						iFile1;
  1.1061 +	RFile						iFile2;
  1.1062 +	RFile						iFile3;
  1.1063 +	TInt						iFileSize1;
  1.1064 +	TInt						iFileSize2;
  1.1065 +	TInt						iFileSize3;
  1.1066 +	RBuf8						iBuf1;
  1.1067 +	RBuf8						iBuf2;
  1.1068 +	RBuf8						iBuf3;
  1.1069 +	TInt 						iError;
  1.1070 +	TTimeIntervalMicroSeconds	iPosition;
  1.1071 +	TInt 						iState;
  1.1072 +	TRequestStatus 				iRequestStatus;
  1.1073 +	CCallBackTimer* 			iCallBackTimer;
  1.1074 +	TMmfAudioOutputStreamEvents iExpectedEvent;
  1.1075 +	TInt 						iExpectedError;
  1.1076 +	TMmfAudioOutputStreamEvents iEventOccured;
  1.1077 +	};
  1.1078 +
  1.1079 +
  1.1080 +class CFsmAudioOutputStreamClient;
  1.1081 +/**
  1.1082 + * Base Class for ARN functionality for most ARN Audio Output Stream tests
  1.1083 + * 
  1.1084 + * @class CTestStepAudioOutputStreamARN2
  1.1085 + *
  1.1086 + */
  1.1087 +class CTestStepAudioOutputStreamARN2 : public CTestMmfAclntStep
  1.1088 +  {													           
  1.1089 +public:
  1.1090 +	enum TFsmAosState
  1.1091 +	{
  1.1092 +	EStateIdle = 0,
  1.1093 +	EStateOpenComplete1,
  1.1094 +	EStateOpenComplete2,
  1.1095 +	EStateOpenComplete3,
  1.1096 +	EStateStreaming1,
  1.1097 +	EStateStreaming2,
  1.1098 +	EStateStreaming3,
  1.1099 +	EStateResumeStreaming1,
  1.1100 +	EStateResumeStreaming2,
  1.1101 +	EStateResumeStreaming3,
  1.1102 +	EStateBufferCopied1,
  1.1103 +	EStateBufferCopied2,
  1.1104 +	EStateBufferCopied3,
  1.1105 +	EStateStreamingComplete1,
  1.1106 +	EStateStreamingComplete1ErrInUse,
  1.1107 +	EStateStreamingComplete1ErrUnderflow,
  1.1108 +	EStateStreamingComplete2,
  1.1109 +	EStateStreamingComplete2ErrInUse,
  1.1110 +	EStateStreamingComplete2ErrUnderflow,
  1.1111 +	EStateStreamingComplete3,
  1.1112 +	EStateStreamingComplete3ErrInUse,
  1.1113 +	EStateStreamingComplete3ErrUnderflow,
  1.1114 +	EStateResourceAvailableOS1,
  1.1115 +	EStateResourceAvailableOS2,
  1.1116 +	EStateResourceAvailableOS3,
  1.1117 +	EStateMonitoringEvents,
  1.1118 +	EStateFinished,
  1.1119 +	};
  1.1120 +public:
  1.1121 +	virtual enum TVerdict DoTestStepPreambleL();
  1.1122 +	virtual enum TVerdict DoTestStepPostambleL();
  1.1123 +	virtual TVerdict DoTestStepL();
  1.1124 +	virtual TVerdict DoTestL()=0;
  1.1125 +	virtual void Fsm(TInt aClientNumber,TInt aEventCode, TInt aError=KErrNone)=0;
  1.1126 +	virtual TBool FsmCheck(TInt aClientNumber, TInt aEventCode, TInt aError);
  1.1127 +	void StopTest();
  1.1128 +protected:
  1.1129 +	CTestStepAudioOutputStreamARN2(const TDesC& aTestName);	
  1.1130 +	void StateChange(TFsmAosState aState);
  1.1131 +	void SetExpectedEvent(TInt aClientNumber, TInt aEvent,TInt aError);	
  1.1132 +	//Register client events to monitor
  1.1133 +	void RegisterClientEventToMonitor(TInt aClientnumber, TInt aEventCode, TInt aError, TFsmAosState aFsmState);
  1.1134 +	TBool IsMonitoringFinished();
  1.1135 +protected:
  1.1136 +	TInt iExpectedEvent;
  1.1137 +	TInt iExpectedError;
  1.1138 +	TFsmAosState iState;
  1.1139 +	TFixedArray <CFsmAudioOutputStreamClient*, 4> iClientList;
  1.1140 +	TFixedArray <TInt, 4> iClientEventsToMonitor;
  1.1141 +	TFixedArray <TInt, 4> iClientError;
  1.1142 +	TFixedArray <TFsmAosState, 4> iFsmStateforClient;
  1.1143 +	TInt iClientsRegistered;
  1.1144 +	RFs	 iFs;
  1.1145 +	TFixedArray<RFile,4> iFileHandle;
  1.1146 +	TFixedArray<TInt, 4> iFileSize;
  1.1147 +	TFixedArray<RBuf8, 4> iBuf; 
  1.1148 +	TInt 						iError;
  1.1149 +	TTimeIntervalMicroSeconds	iPosition;
  1.1150 +	TRequestStatus 				iRequestStatus;
  1.1151 +	CCallBackTimer* 			iCallBackTimer;
  1.1152 +	};
  1.1153 +
  1.1154 +class CFsmAudioOutputStreamClient : public CBase,public MMdaAudioOutputStreamCallback, public MMMFAudioResourceNotificationCallback
  1.1155 +	{
  1.1156 +public:
  1.1157 +	// Enum to decide which Event has occured.
  1.1158 +	enum TMmfAosStreamEvents
  1.1159 +		{
  1.1160 +		EIdleOutputStream = 0,
  1.1161 +		EAudioOuputStreamOpenComplete,
  1.1162 +		EAudioOutputStreamBufferCopied,
  1.1163 +		EAudioOutputStreamPlayComplete,
  1.1164 +		EAudioOutputStreamResourceAvailable,
  1.1165 +		};
  1.1166 +public:
  1.1167 +	CFsmAudioOutputStreamClient(TInt aClientNumber,TInt aPriority,TMdaPriorityPreference aPref,CTestStepAudioOutputStreamARN2* aParent );
  1.1168 +	~CFsmAudioOutputStreamClient();
  1.1169 +	static CFsmAudioOutputStreamClient* NewL(TInt aClientNumber, TInt aPriority,TMdaPriorityPreference aPref, CTestStepAudioOutputStreamARN2* aParent);
  1.1170 +	//Callback handlers
  1.1171 +	void MaoscOpenComplete(TInt aError);
  1.1172 +	void MaoscPlayComplete(TInt aError);
  1.1173 +	void MaoscBufferCopied(TInt aError, const TDesC8& aBuffer);
  1.1174 +	void MarncResourceAvailable(TUid aNotificationEventId, const TDesC8& aNotificationData);
  1.1175 +	
  1.1176 +	void TestOpen();
  1.1177 +	TInt TestRegisterAsClient();
  1.1178 +	TInt TestWrite(const TDesC8 &aData);
  1.1179 +	const TTimeIntervalMicroSeconds& GetCurrentPosition();
  1.1180 +	TTimeIntervalMicroSeconds& GetResumedPosition();
  1.1181 +	TInt BytesPlayed();
  1.1182 +private:
  1.1183 +	void ConstructL();
  1.1184 +private:
  1.1185 +	TMmfAosStreamEvents iEvent;
  1.1186 +	TInt iError;
  1.1187 +	TInt iClientNumber;
  1.1188 +	TInt iPriority;
  1.1189 +	TMdaPriorityPreference iPref;
  1.1190 +	CMdaAudioOutputStream* iMmfAudioOutputStream;
  1.1191 +	CTestStepAudioOutputStreamARN2* iParent;
  1.1192 +	TTimeIntervalMicroSeconds	iResumedPosition;
  1.1193 +	};
  1.1194 +//
  1.1195 +//POSITIVE TESTS//
  1.1196 +//
  1.1197 +
  1.1198 +/** 
  1.1199 + * Register for notification, but make no request to play audio.
  1.1200 + *
  1.1201 + * @class CTestMmfAclntARN8021
  1.1202 + * 
  1.1203 + */
  1.1204 +class CTestMmfAclntARN8021 : public CTestStepAudioOutputStreamARN
  1.1205 +	{
  1.1206 +public:
  1.1207 +	static CTestMmfAclntARN8021* NewL( const TDesC& aTestName );
  1.1208 +	virtual TVerdict DoTestL();
  1.1209 +	virtual void FsmL(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone);
  1.1210 +	
  1.1211 +protected:
  1.1212 +	CTestMmfAclntARN8021( const TDesC& aTestName );
  1.1213 +	TVerdict PerformTestL();
  1.1214 +	};
  1.1215 +
  1.1216 +
  1.1217 +/** 
  1.1218 + * Register (b4 play, after Open) and Receive Notification of a Resource Available Event.
  1.1219 + * (when audio resource is currently unavailable and then available)
  1.1220 + *
  1.1221 + * @class CTestMmfAclntARN8022
  1.1222 + * 
  1.1223 + */
  1.1224 +class CTestMmfAclntARN8022 : public CTestStepAudioOutputStreamARN2
  1.1225 +	{
  1.1226 +public:
  1.1227 +	static CTestMmfAclntARN8022* NewL( const TDesC& aTestName );
  1.1228 +	virtual TVerdict DoTestL();
  1.1229 +	void Fsm(TInt aClientNumber,TInt aEventCode, TInt aError=KErrNone);
  1.1230 +
  1.1231 +protected:
  1.1232 +	CTestMmfAclntARN8022( const TDesC& aTestName );
  1.1233 +	TVerdict PerformTestL();
  1.1234 +private:
  1.1235 +	void InitTest();
  1.1236 +	void StartTestL();
  1.1237 +	TVerdict HandleStateStreaming2();
  1.1238 +	TVerdict HandleStateStreamingComplete1ErrInUse();
  1.1239 +	TVerdict HandleStateResourceAvailableOS1();
  1.1240 +	TVerdict HandleStateStreamingComplete2ErrUnderflow();
  1.1241 +	TVerdict HandleStateOpenComplete2();
  1.1242 +	TVerdict HandleStateOpenComplete1();
  1.1243 +private:
  1.1244 +	typedef TVerdict (CTestMmfAclntARN8022::*fp)();//Function pointer for a StateHandler
  1.1245 +	TFixedArray<fp,30> iStateHandlers;
  1.1246 +	};
  1.1247 +
  1.1248 +/** 
  1.1249 + * Register (at the time of Play) and Receive Notification of a Resource Available Event.
  1.1250 + * (when audio resource is currently available and subsequently unavailable, and then available)
  1.1251 + *
  1.1252 + * @class CTestMmfAclntARN8023
  1.1253 + * 
  1.1254 + */
  1.1255 +class CTestMmfAclntARN8023 : public CTestStepAudioOutputStreamARN2
  1.1256 +	{
  1.1257 +public:
  1.1258 +	static CTestMmfAclntARN8023* NewL( const TDesC& aTestName );
  1.1259 +	virtual TVerdict DoTestL();
  1.1260 +	void Fsm(TInt aClientNumber,TInt aEventCode, TInt aError=KErrNone);
  1.1261 +
  1.1262 +protected:
  1.1263 +	CTestMmfAclntARN8023( const TDesC& aTestName );
  1.1264 +	TVerdict PerformTestL();
  1.1265 +private:
  1.1266 +	void InitTest();
  1.1267 +	void StartTestL();
  1.1268 +	TVerdict HandleStateStreaming1();
  1.1269 +	TVerdict HandleStateStreaming2();
  1.1270 +	TVerdict HandleStateStreamingComplete1ErrInUse();
  1.1271 +	TVerdict HandleStateResourceAvailableOS1();
  1.1272 +	TVerdict HandleStateStreamingComplete2ErrUnderflow();
  1.1273 +	TVerdict HandleStateOpenComplete2();
  1.1274 +	TVerdict HandleStateOpenComplete1();
  1.1275 +private:
  1.1276 +	typedef TVerdict (CTestMmfAclntARN8023::*fp)();
  1.1277 +	TFixedArray<fp,30> iStateHandlers;
  1.1278 +	};
  1.1279 +
  1.1280 +/** 
  1.1281 + * Registration (b4 File Open) and Cancellation of  the notification request
  1.1282 + *
  1.1283 + * @class CTestMmfAclntARN8024
  1.1284 + * 
  1.1285 + */
  1.1286 +class CTestMmfAclntARN8024 : public CTestStepAudioOutputStreamARN
  1.1287 +	{
  1.1288 +public:
  1.1289 +	static CTestMmfAclntARN8024* NewL( const TDesC& aTestName );
  1.1290 +	virtual TVerdict DoTestL();
  1.1291 +	virtual void FsmL(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone);
  1.1292 +
  1.1293 +protected:
  1.1294 +	CTestMmfAclntARN8024( const TDesC& aTestName );
  1.1295 +	TVerdict PerformTestL();
  1.1296 +	};
  1.1297 +
  1.1298 +/** 
  1.1299 + * Get the actual position from where the paused audio can be resumed.
  1.1300 + *
  1.1301 + * @class CTestMmfAclntARN8025
  1.1302 + * 
  1.1303 + */
  1.1304 +class CTestMmfAclntARN8025 : public CTestStepAudioOutputStreamARN2
  1.1305 +	{
  1.1306 +public:
  1.1307 +	static CTestMmfAclntARN8025* NewL( const TDesC& aTestName );
  1.1308 +	virtual TVerdict DoTestL();
  1.1309 +	void Fsm(TInt aClientNumber,TInt aEventCode, TInt aError=KErrNone);
  1.1310 +
  1.1311 +protected:
  1.1312 +	CTestMmfAclntARN8025( const TDesC& aTestName );
  1.1313 +	TVerdict PerformTestL();
  1.1314 +private:
  1.1315 +	void InitTest();
  1.1316 +	void StartTestL();
  1.1317 +	TVerdict HandleStateStreaming1();
  1.1318 +	TVerdict HandleStateStreaming2();
  1.1319 +	TVerdict HandleStateStreamingComplete1ErrInUse();
  1.1320 +	TVerdict HandleStateResourceAvailableOS1();
  1.1321 +	TVerdict HandleStateStreamingComplete2ErrUnderflow();
  1.1322 +	TVerdict HandleStateOpenComplete2();
  1.1323 +	TVerdict HandleStateOpenComplete1();
  1.1324 +private:
  1.1325 +	typedef TVerdict (CTestMmfAclntARN8025::*fp)();
  1.1326 +	TFixedArray<fp,30> iStateHandlers;
  1.1327 +	TTimeIntervalMicroSeconds iPositionStop;
  1.1328 +	TTimeIntervalMicroSeconds iPositionResume;
  1.1329 +	};
  1.1330 +
  1.1331 +/** 
  1.1332 + * Call WillResumePlay()
  1.1333 + *
  1.1334 + * @class CTestMmfAclntARN8026
  1.1335 + * 
  1.1336 + */
  1.1337 +class CTestMmfAclntARN8026 : public CTestStepAudioOutputStreamARN
  1.1338 +	{
  1.1339 +public:
  1.1340 +	static CTestMmfAclntARN8026* NewL( const TDesC& aTestName );
  1.1341 +	virtual TVerdict DoTestL();
  1.1342 +	virtual void FsmL(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone);
  1.1343 +	virtual TBool FsmCheck(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone);
  1.1344 +
  1.1345 +protected:
  1.1346 +	CTestMmfAclntARN8026( const TDesC& aTestName );
  1.1347 +	TVerdict PerformTestL();
  1.1348 +	};
  1.1349 +
  1.1350 +
  1.1351 +//
  1.1352 +//NEGATIVE TESTS//
  1.1353 +//
  1.1354 +
  1.1355 +/** 
  1.1356 + * Register for notification with an unsupported event type.
  1.1357 + *
  1.1358 + * @class CTestMmfAclntARN1321
  1.1359 + * 
  1.1360 + */
  1.1361 +class CTestMmfAclntARN1321 : public CTestStepAudioOutputStreamARN
  1.1362 +	{
  1.1363 +public:
  1.1364 +	static CTestMmfAclntARN1321* NewL( const TDesC& aTestName );
  1.1365 +	virtual TVerdict DoTestL();
  1.1366 +	virtual void FsmL(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone);
  1.1367 +
  1.1368 +protected:
  1.1369 +	CTestMmfAclntARN1321( const TDesC& aTestName );
  1.1370 +	TVerdict PerformTestL();
  1.1371 +	};
  1.1372 +
  1.1373 +/** 
  1.1374 + * Cancel the request for notification with an unsupported event type.
  1.1375 + *
  1.1376 + * @class CTestMmfAclntARN1322
  1.1377 + * 
  1.1378 + */
  1.1379 +class CTestMmfAclntARN1322 : public CTestStepAudioOutputStreamARN
  1.1380 +	{
  1.1381 +public:
  1.1382 +	static CTestMmfAclntARN1322* NewL( const TDesC& aTestName );
  1.1383 +	virtual TVerdict DoTestL();
  1.1384 +	virtual void FsmL(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone);
  1.1385 +
  1.1386 +protected:
  1.1387 +	CTestMmfAclntARN1322( const TDesC& aTestName );
  1.1388 +	TVerdict PerformTestL();
  1.1389 +	};
  1.1390 +
  1.1391 +/** 
  1.1392 + * Cancel when no resource Notification is requested.
  1.1393 + *
  1.1394 + * @class CTestMmfAclntARN1323
  1.1395 + * 
  1.1396 + */
  1.1397 +class CTestMmfAclntARN1323 : public CTestStepAudioOutputStreamARN
  1.1398 +	{
  1.1399 +public:
  1.1400 +	static CTestMmfAclntARN1323* NewL( const TDesC& aTestName );
  1.1401 +	virtual TVerdict DoTestL();
  1.1402 +	virtual void FsmL(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone);
  1.1403 +
  1.1404 +protected:
  1.1405 +	CTestMmfAclntARN1323( const TDesC& aTestName );
  1.1406 +	TVerdict PerformTestL();
  1.1407 +	};
  1.1408 +
  1.1409 +/** 
  1.1410 + * Multiple Registration for notification for the same event type.
  1.1411 + *
  1.1412 + * @class CTestMmfAclntARN1324
  1.1413 + * 
  1.1414 + */
  1.1415 +class CTestMmfAclntARN1324 : public CTestStepAudioOutputStreamARN
  1.1416 +	{
  1.1417 +public:
  1.1418 +	static CTestMmfAclntARN1324* NewL( const TDesC& aTestName );
  1.1419 +	virtual TVerdict DoTestL();
  1.1420 +	virtual void FsmL(TMmfAudioOutputStreamEvents aEventCode, TInt aError=KErrNone);
  1.1421 +
  1.1422 +protected:
  1.1423 +	CTestMmfAclntARN1324( const TDesC& aTestName );
  1.1424 +	TVerdict PerformTestL();
  1.1425 +	};
  1.1426 +
  1.1427 +
  1.1428 +//------------------------------------------------------------------------------
  1.1429 +//**************PREQ 797 - Multiple Audio Client Test Declarations**************
  1.1430 +//------------------------------------------------------------------------------
  1.1431 +	
  1.1432 +
  1.1433 +//
  1.1434 +//BASE CLASS DECLARATIONS//
  1.1435 +//
  1.1436 +
  1.1437 +/**
  1.1438 + * Observer class to identify and pass events to the test step class
  1.1439 + * 
  1.1440 + * @class MTestAudioResourceNotificationCallback
  1.1441 + *
  1.1442 + */
  1.1443 +class MTestAudioResourceNotificationCallback
  1.1444 +	{
  1.1445 +public :
  1.1446 +	virtual void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestMdaAudioMultiClientCallbackSupport& aMdaAudioMultiClientCallbackSupport) = 0;
  1.1447 +	};
  1.1448 +
  1.1449 +/**
  1.1450 + * Support class to pass the events to the test step class using the MTestAudioResourceNotificationCallback
  1.1451 + * 
  1.1452 + * @class CTestMdaAudioMultiClientCallbackSupport
  1.1453 + *
  1.1454 + */
  1.1455 +class CTestMdaAudioMultiClientCallbackSupport : public CBase, public MMMFAudioResourceNotificationCallback
  1.1456 +	{
  1.1457 +public :
  1.1458 +	static CTestMdaAudioMultiClientCallbackSupport* NewL(MTestAudioResourceNotificationCallback& aCallback);
  1.1459 +	virtual void MarncResourceAvailable(TUid aNotificationEventId, const TDesC8& aNotificationData);
  1.1460 +protected:
  1.1461 +	CTestMdaAudioMultiClientCallbackSupport(MTestAudioResourceNotificationCallback& aCallback);
  1.1462 +	void ConstructL();
  1.1463 +private :
  1.1464 +	MTestAudioResourceNotificationCallback& iCallback;
  1.1465 +	};
  1.1466 +
  1.1467 +/**
  1.1468 + * Base Class for ARN functionality for most ARN multiple client tests
  1.1469 + * 
  1.1470 + * @class CTestMmfAclntMultiClientARN
  1.1471 + *
  1.1472 + */
  1.1473 +class CTestMmfAclntMultiClientARN : public CTestMmfAclntStep, public MMdaAudioPlayerCallback, public MMdaObjectStateChangeObserver, public MMdaAudioOutputStreamCallback, public MTestAudioResourceNotificationCallback
  1.1474 +	{
  1.1475 +public:
  1.1476 +// Enum to decide which Event has occured.
  1.1477 +enum TMmfAudioMultiClientEvents
  1.1478 +	{
  1.1479 +	EIdleMulti = 0,
  1.1480 +	EMapcInitComplete,
  1.1481 +	EMapcPlayComplete,
  1.1482 +	EMoscoStateChangeEvent,
  1.1483 +	EMaoscOpenComplete,
  1.1484 +	EMaoscBufferCopied,
  1.1485 +	EMaoscPlayComplete,
  1.1486 +	EMarncResourceAvailablePlayer,
  1.1487 +	EMarncResourceAvailableRecorder,
  1.1488 +	EMarncResourceAvailableOS,
  1.1489 +	EImproperEvent
  1.1490 +	};
  1.1491 +
  1.1492 +// Enum to decide on state
  1.1493 +enum TMmfAudioMultiClientStates
  1.1494 +	{
  1.1495 +	EStateApInitComplete,
  1.1496 +	EStateApPlayComplete,
  1.1497 +	EStateApPlayCompleteKErrInUse,
  1.1498 +	EStateApResourceAvailable,
  1.1499 +	EStateRecoderOpen,
  1.1500 +	EStateRecoderPlaying,
  1.1501 +	EStateRecorderResumePlay,
  1.1502 +	EStateRecorderPlayComplete,
  1.1503 +	EStateRecorderrelease,
  1.1504 +	EStateAosOpenComplete,
  1.1505 +	EStateAosBufferCopiedKErrInUse,
  1.1506 +	EStateAosPlayCompleteKErrInUse,
  1.1507 +	EStateAosResourceAvailable
  1.1508 +	};
  1.1509 +public:
  1.1510 +	// Constructor
  1.1511 +	CTestMmfAclntMultiClientARN(const TDesC& aTestName, const TDesC& aSectName);
  1.1512 +	// Virtual methods for Preamble and Postamble.
  1.1513 +	virtual TVerdict DoTestStepPreambleL();
  1.1514 +	virtual TVerdict DoTestStepPostambleL();
  1.1515 +	// Virtual function to access test specific methods
  1.1516 +	virtual TVerdict DoTestStepL();
  1.1517 +	// Pure function to access test specific methods
  1.1518 +	virtual TVerdict DoTestL()=0;
  1.1519 +	// from MMdaAudioPlayerCallback
  1.1520 +	virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
  1.1521 +	virtual void MapcPlayComplete(TInt aError);
  1.1522 +	// from MMdaObjectStateChangeObserver
  1.1523 +	virtual void MoscoStateChangeEvent(CBase* aObject,TInt aPreviousState,TInt aCurrentState, TInt aErrorCode);
  1.1524 +	// from MTestAudioOutputStreamCallback
  1.1525 +	virtual void MaoscOpenComplete(TInt aError);
  1.1526 +	virtual void MaoscBufferCopied(TInt aError, const TDesC8& aBuffer);
  1.1527 +	virtual void MaoscPlayComplete(TInt aError);
  1.1528 +	// from MTestAudioResourceNotificationCallback
  1.1529 +	virtual void MarncResourceAvailableTest(TUid aNotificationEventId, const TDesC8& aNotificationData, CTestMdaAudioMultiClientCallbackSupport& aMdaAudioMultiClientCallbackSupport);
  1.1530 +	// Centralised State Handler
  1.1531 +	virtual void FsmL(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady)=0;
  1.1532 +	virtual TBool FsmCheck(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
  1.1533 +protected:
  1.1534 +	// StateInit Function
  1.1535 +	void StateInit();
  1.1536 +	// StateChange Function
  1.1537 +	void StateChange(TMmfAudioMultiClientEvents aExpectedEvent, TInt aExpectedError=KErrNone, CMdaAudioClipUtility::TState aExpectedRecorderState=CMdaAudioClipUtility::ENotReady);
  1.1538 +	// Audio Client Utilities declaration
  1.1539 +	CMdaAudioPlayerUtility* iTestAudioPlayer;
  1.1540 +	CMdaAudioRecorderUtility* iTestAudioRecorder;
  1.1541 +	CMdaAudioOutputStream* iTestAudioOutputStream;
  1.1542 +	// CTestMdaAudioMultiClientCallbackSupport instances
  1.1543 +	CTestMdaAudioMultiClientCallbackSupport* iMdaAudioPlayerCallbackSupport;
  1.1544 +	CTestMdaAudioMultiClientCallbackSupport* iMdaAudioRecorderCallbackSupport;
  1.1545 +	CTestMdaAudioMultiClientCallbackSupport* iMdaAudioOutputStreamCallbackSupport;
  1.1546 +	// Variables to hold the file names
  1.1547 +	TBuf<KSizeBuf>				iFilenamePlayer;
  1.1548 +	TBuf<KSizeBuf>				iFilenameRecorder;
  1.1549 +	TBuf<KSizeBuf>				iFilenameOutputStream;
  1.1550 +	// Common Class Variables
  1.1551 +	TInt 						iError;
  1.1552 +	TInt 						iState;
  1.1553 +	TRequestStatus 				iRequestStatus;
  1.1554 +	CCallBackTimer* 			iCallBackTimer;
  1.1555 +	// for checking the expected states
  1.1556 +	TMmfAudioMultiClientEvents 		iExpectedEvent;
  1.1557 +	CMdaAudioClipUtility::TState 	iExpectedRecorderState;
  1.1558 +	TInt 							iExpectedError;
  1.1559 +	TMmfAudioMultiClientEvents      iEventOccured;
  1.1560 +	// for Checking the duration
  1.1561 +	TTimeIntervalMicroSeconds 	iDuration;
  1.1562 +	TTimeIntervalMicroSeconds 	iPosition;
  1.1563 +	// for iAudioOutputStream
  1.1564 +	RFs							iFs;
  1.1565 +	RFile						iFile;
  1.1566 +	TInt						iFileSize;
  1.1567 +	RBuf8						iBuf;
  1.1568 +	TBuf<KNameBufSize> 			iSectName;		// Section name for retrieving filename
  1.1569 +	CMultiEventChecker*			iEventChecker;
  1.1570 +	};
  1.1571 +
  1.1572 +//
  1.1573 +//POSITIVE TESTS//
  1.1574 +//
  1.1575 +
  1.1576 +/** 
  1.1577 + * Receipt of Notification (on deleting the Audio Play Client instance of a Notified Client) 
  1.1578 + * of a Resource Available Event.
  1.1579 + *
  1.1580 + * @class CTestMmfAclntARN9001
  1.1581 + * 
  1.1582 + */
  1.1583 +class CTestMmfAclntARN9001 : public CTestMmfAclntMultiClientARN
  1.1584 +	{
  1.1585 +public:
  1.1586 +	static CTestMmfAclntARN9001* NewL( const TDesC& aTestName, const TDesC& aSectName );
  1.1587 +	virtual TVerdict DoTestL();
  1.1588 +	virtual void FsmL(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
  1.1589 +	virtual TBool FsmCheck(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
  1.1590 +
  1.1591 +protected:
  1.1592 +	CTestMmfAclntARN9001( const TDesC& aTestName, const TDesC& aSectName );
  1.1593 +	TVerdict PerformTestL();
  1.1594 +	};
  1.1595 +
  1.1596 +
  1.1597 +/** 
  1.1598 + * Receipt of Notification (on completion of play of a Notifed Client) of a Resource Available Event.
  1.1599 + *
  1.1600 + * @class CTestMmfAclntARN9002
  1.1601 + * 
  1.1602 + */
  1.1603 +class CTestMmfAclntARN9002 : public CTestMmfAclntMultiClientARN
  1.1604 +	{
  1.1605 +public:
  1.1606 +	static CTestMmfAclntARN9002* NewL( const TDesC& aTestName, const TDesC& aSectName );
  1.1607 +	virtual TVerdict DoTestL();
  1.1608 +	virtual void FsmL(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
  1.1609 +	virtual void DecideFsmState(TInt aClientNumber,CMultiEventChecker::TClientUtilityType aClientType, TInt aEventCode, TInt aError=KErrNone,CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
  1.1610 +
  1.1611 +protected:
  1.1612 +	CTestMmfAclntARN9002( const TDesC& aTestName, const TDesC& aSectName );
  1.1613 +	TVerdict PerformTestL();
  1.1614 +private:
  1.1615 +	void InitTest();
  1.1616 +	void StartTestL();
  1.1617 +	TVerdict HandleStateApInitComplete();
  1.1618 +	TVerdict HandleStateRecorderOpen();
  1.1619 +	TVerdict HandleStateRecorderPlaying();
  1.1620 +	TVerdict HandleApPlayCompleteKErrInUse();
  1.1621 +	TVerdict HandleStateAosOpenComplete();
  1.1622 +	TVerdict HandleStateAosBufferCopiedKErrInUse();
  1.1623 +	TVerdict HandleStateAosPlayCompleteKErrInUse();
  1.1624 +	TVerdict HandleStateRecorderrelease();
  1.1625 +	TVerdict HandleStateApResourceAvailable();
  1.1626 +	TVerdict HandleStateApPlayComplete();
  1.1627 +	TVerdict HandleStateAosResourceAvailable();
  1.1628 +	typedef TVerdict (CTestMmfAclntARN9002::*fp)();//Function pointer for a StateHandler
  1.1629 +	TFixedArray<fp,30> iStateHandlers;
  1.1630 +	};
  1.1631 +
  1.1632 +/** 
  1.1633 + * Receipt of Notification (on stopping play of a Notitifed Client) of a Resource Available Event.
  1.1634 + *
  1.1635 + * @class CTestMmfAclntARN9003
  1.1636 + * 
  1.1637 + */
  1.1638 +class CTestMmfAclntARN9003 : public CTestMmfAclntMultiClientARN
  1.1639 +	{
  1.1640 +public:
  1.1641 +	static CTestMmfAclntARN9003* NewL( const TDesC& aTestName, const TDesC& aSectName );
  1.1642 +	virtual TVerdict DoTestL();
  1.1643 +	virtual void FsmL(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
  1.1644 +protected:
  1.1645 +	CTestMmfAclntARN9003( const TDesC& aTestName, const TDesC& aSectName );
  1.1646 +	TVerdict PerformTestL();
  1.1647 +	};
  1.1648 +
  1.1649 +/** 
  1.1650 + * Receipt of Notification (chronological order for equal priority clients) of a Resource Available Event.
  1.1651 + *
  1.1652 + * @class CTestMmfAclntARN9004
  1.1653 + * 
  1.1654 + */
  1.1655 +class CTestMmfAclntARN9004 : public CTestMmfAclntMultiClientARN
  1.1656 +	{
  1.1657 +public:
  1.1658 +	static CTestMmfAclntARN9004* NewL( const TDesC& aTestName, const TDesC& aSectName );
  1.1659 +	virtual TVerdict DoTestL();
  1.1660 +	virtual void FsmL(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
  1.1661 +	virtual TBool FsmCheck(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
  1.1662 +
  1.1663 +protected:
  1.1664 +	CTestMmfAclntARN9004( const TDesC& aTestName, const TDesC& aSectName );
  1.1665 +	TVerdict PerformTestL();
  1.1666 +	};
  1.1667 +
  1.1668 +/** 
  1.1669 + * Non Receipt of Notification (on calling WillResumePlay() of a notified client) 
  1.1670 + * of a Resource Available Event. 
  1.1671 + *
  1.1672 + * @class CTestMmfAclntARN9005
  1.1673 + * 
  1.1674 + */
  1.1675 +class CTestMmfAclntARN9005 : public CTestMmfAclntMultiClientARN
  1.1676 +	{
  1.1677 +public:
  1.1678 +	static CTestMmfAclntARN9005* NewL( const TDesC& aTestName, const TDesC& aSectName );
  1.1679 +	virtual TVerdict DoTestL();
  1.1680 +	virtual void FsmL(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
  1.1681 +	virtual void DecideFsmState(TInt aClientNumber,CMultiEventChecker::TClientUtilityType aClientType, TInt aEventCode, TInt aError=KErrNone,CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
  1.1682 +protected:	
  1.1683 +	CTestMmfAclntARN9005( const TDesC& aTestName, const TDesC& aSectName );
  1.1684 +	TVerdict PerformTestL();
  1.1685 +private:
  1.1686 +	void InitTest();
  1.1687 +	void StartTestL();
  1.1688 +	TVerdict HandleStateApInitComplete();
  1.1689 +	TVerdict HandleStateRecorderOpen();
  1.1690 +	TVerdict HandleStateRecorderPlaying();
  1.1691 +	TVerdict HandleApPlayCompleteKErrInUse();
  1.1692 +	TVerdict HandleStateAosOpenComplete();
  1.1693 +	TVerdict HandleStateAosBufferCopiedKErrInUse();
  1.1694 +	TVerdict HandleStateAosPlayCompleteKErrInUse();
  1.1695 +	TVerdict HandleStateRecorderrelease();
  1.1696 +	TVerdict HandleStateApResourceAvailable();
  1.1697 +	TVerdict HandleStateApPlayComplete();
  1.1698 +	TVerdict HandleStateAosResourceAvailable();
  1.1699 +	typedef TVerdict (CTestMmfAclntARN9005::*fp)();//Function pointer for a StateHandler
  1.1700 +	TFixedArray<fp,30> iStateHandlers;
  1.1701 +	};
  1.1702 +
  1.1703 +/** 
  1.1704 + * Receipt of Notification (on timeout of a notified client, 1 sec assumed, call 
  1.1705 + * WillResumePlay() after 1 second) of a Resource Available Event.
  1.1706 + *
  1.1707 + * @class CTestMmfAclntARN9006
  1.1708 + * 
  1.1709 + */
  1.1710 +class CTestMmfAclntARN9006 : public CTestMmfAclntMultiClientARN
  1.1711 +	{
  1.1712 +public:
  1.1713 +	static CTestMmfAclntARN9006* NewL( const TDesC& aTestName, const TDesC& aSectName );
  1.1714 +	virtual TVerdict DoTestL();
  1.1715 +	virtual void FsmL(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
  1.1716 +	virtual void DecideFsmState(TInt aClientNumber,CMultiEventChecker::TClientUtilityType aClientType, TInt aEventCode, TInt aError=KErrNone,CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
  1.1717 +protected:
  1.1718 +	CTestMmfAclntARN9006( const TDesC& aTestName, const TDesC& aSectName );
  1.1719 +	TVerdict PerformTestL();
  1.1720 +private:
  1.1721 +	void InitTest();
  1.1722 +	void StartTestL();
  1.1723 +	TVerdict HandleStateApInitComplete();
  1.1724 +	TVerdict HandleStateRecorderOpen();
  1.1725 +	TVerdict HandleStateRecorderPlaying();
  1.1726 +	TVerdict HandleApPlayCompleteKErrInUse();
  1.1727 +	TVerdict HandleStateAosOpenComplete();
  1.1728 +	TVerdict HandleStateAosBufferCopiedKErrInUse();
  1.1729 +	TVerdict HandleStateAosPlayCompleteKErrInUse();
  1.1730 +	TVerdict HandleStateRecorderrelease();
  1.1731 +	TVerdict HandleStateApResourceAvailable();
  1.1732 +	TVerdict HandleStateAosResourceAvailable();
  1.1733 +	typedef TVerdict (CTestMmfAclntARN9006::*fp)();//Function pointer for a StateHandler
  1.1734 +	TFixedArray<fp,30> iStateHandlers;
  1.1735 +	};
  1.1736 +
  1.1737 +/** 
  1.1738 + * Receipt of Notification (on cancellation of the notification of a client that has 
  1.1739 + * requested for notification) of a Resource Available Event.  [Cancel before receipt of Notification]
  1.1740 + *
  1.1741 + * @class CTestMmfAclntARN9007
  1.1742 + * 
  1.1743 + */
  1.1744 +class CTestMmfAclntARN9007 : public CTestMmfAclntMultiClientARN
  1.1745 +	{
  1.1746 +public:
  1.1747 +	static CTestMmfAclntARN9007* NewL( const TDesC& aTestName, const TDesC& aSectName );
  1.1748 +	virtual TVerdict DoTestL();
  1.1749 +	virtual void FsmL(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
  1.1750 +	virtual TBool FsmCheck(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
  1.1751 +
  1.1752 +protected:
  1.1753 +	CTestMmfAclntARN9007( const TDesC& aTestName, const TDesC& aSectName );
  1.1754 +	TVerdict PerformTestL();
  1.1755 +	};
  1.1756 +
  1.1757 +/** 
  1.1758 + * Receipt of Notification (on cancellation of notification of a client that has just 
  1.1759 + * received notification) of a Resource Available Event. [Cancel after receipt of Notification]
  1.1760 + *
  1.1761 + * @class CTestMmfAclntARN9008
  1.1762 + * 
  1.1763 + */
  1.1764 +class CTestMmfAclntARN9008 : public CTestMmfAclntMultiClientARN
  1.1765 +	{
  1.1766 +public:
  1.1767 +	static CTestMmfAclntARN9008* NewL( const TDesC& aTestName, const TDesC& aSectName );
  1.1768 +	virtual TVerdict DoTestL();
  1.1769 +	virtual void FsmL(TMmfAudioMultiClientEvents aEventCode, TInt aError=KErrNone, CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
  1.1770 +	virtual void DecideFsmState(TInt aClientNumber,CMultiEventChecker::TClientUtilityType aClientType, TInt aEventCode, TInt aError=KErrNone,CMdaAudioClipUtility::TState aRecorderState=CMdaAudioClipUtility::ENotReady);
  1.1771 +
  1.1772 +protected:
  1.1773 +	CTestMmfAclntARN9008( const TDesC& aTestName, const TDesC& aSectName );
  1.1774 +	TVerdict PerformTestL();
  1.1775 +private:
  1.1776 +	void InitTest();
  1.1777 +	void StartTestL();
  1.1778 +	TVerdict HandleStateApInitComplete();
  1.1779 +	TVerdict HandleStateApPlayComplete();
  1.1780 +	TVerdict HandleStateRecorderOpen();
  1.1781 +	TVerdict HandleStateRecorderPlaying();
  1.1782 +	TVerdict HandleStateRecorderResumePlay();
  1.1783 +	TVerdict HandleApPlayCompleteKErrInUse();
  1.1784 +	TVerdict HandleStateAosOpenComplete();
  1.1785 +	TVerdict HandleStateAosBufferCopiedKErrInUse();
  1.1786 +	TVerdict HandleStateAosPlayCompleteKErrInUse();
  1.1787 +	TVerdict HandleStateRecorderrelease();
  1.1788 +	TVerdict HandleStateApResourceAvailable();
  1.1789 +	TVerdict HandleStateAosResourceAvailable();
  1.1790 +	TVerdict HandleStateRecorderPlayComplete();
  1.1791 +	typedef TVerdict (CTestMmfAclntARN9008::*fp)();//Function pointer for a StateHandler
  1.1792 +	TFixedArray<fp,30> iStateHandlers;
  1.1793 +	};
  1.1794 +
  1.1795 +#endif