os/mm/mmlibs/mmfw/tsrc/mmfintegrationtest/DSCapTestServer/DevSoundServerTestStep.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/DSCapTestServer/DevSoundServerTestStep.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,82 @@
     1.4 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __DEVSOUNDSERVERTESTSTEP_H__
    1.20 +#define __DEVSOUNDSERVERTESTSTEP_H__
    1.21 +
    1.22 +
    1.23 +#include <simulprocserver.h>
    1.24 +#include <mmf/server/sounddevice.h>
    1.25 +
    1.26 +
    1.27 +class CSDevSoundTestStep1 : public CSimulProcTestStep, public MDevSoundObserver
    1.28 +	{
    1.29 +public:
    1.30 +	static CSDevSoundTestStep1* NewL();
    1.31 +	void ConstructL();
    1.32 +	virtual void StartProcessing(TRequestStatus& aStatus);
    1.33 +	virtual TVerdict EndProcessingAndReturnResult(TDes8& aMessage);		
    1.34 +	virtual ~CSDevSoundTestStep1();
    1.35 +
    1.36 +
    1.37 +protected:
    1.38 +	void InitializeComplete (TInt aError);
    1.39 +	void ToneFinished (TInt aError);
    1.40 +	void BufferToBeFilled (CMMFBuffer* aBuffer);
    1.41 +	void PlayError (TInt aError);
    1.42 +	void BufferToBeEmptied (CMMFBuffer* aBuffer);
    1.43 +	void RecordError (TInt aError);
    1.44 +	void ConvertError (TInt aError);
    1.45 +	void DeviceMessage (TUid aMessageType, const TDesC8& aMsg);
    1.46 +
    1.47 +	TVerdict TestInitialize(TMMFState aMode);
    1.48 +	TVerdict TestPlayTone(TInt aFreq, TTimeIntervalMicroSeconds aDur);
    1.49 +	TVerdict DoPlaySimpleTone();
    1.50 +
    1.51 +protected:
    1.52 +	enum TCallback 
    1.53 +		{
    1.54 +		EInitComplete,
    1.55 +		EToneFinished,
    1.56 +		EBuffToFill,
    1.57 +		EPlayError,
    1.58 +		EBuffToEmpty,
    1.59 +		ERecError,
    1.60 +		EConvertMsg,
    1.61 +		EDeviceMsg
    1.62 +		};
    1.63 +
    1.64 +	
    1.65 +protected:
    1.66 +	//CMMFDevSound* iMMFDevSound;
    1.67 +
    1.68 +	TRequestStatus* iStatus;
    1.69 +	TVerdict iVerdict;
    1.70 +
    1.71 +	TFixedArray<TInt, 7> iCallbackArray;
    1.72 +	void ResetCallbacks();
    1.73 +	TInt GetCallbackTotal();
    1.74 +
    1.75 +	CMMFBuffer* iBuffer;
    1.76 +
    1.77 +	CMMFDevSound* iMMFDevSound;
    1.78 +	TInt iExpectedValue;
    1.79 +	TInt iCallbackError;
    1.80 +	RChunk iChunk;
    1.81 +	};
    1.82 +	
    1.83 +	
    1.84 +#endif
    1.85 +