mmlibs/mmfw/tsrc/mmfintegrationtest/DSCapTestServer/DevSoundServerTestStep.h
changeset 0 40261b775718
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __DEVSOUNDSERVERTESTSTEP_H__
       
    17 #define __DEVSOUNDSERVERTESTSTEP_H__
       
    18 
       
    19 
       
    20 #include <simulprocserver.h>
       
    21 #include <mmf/server/sounddevice.h>
       
    22 
       
    23 
       
    24 class CSDevSoundTestStep1 : public CSimulProcTestStep, public MDevSoundObserver
       
    25 	{
       
    26 public:
       
    27 	static CSDevSoundTestStep1* NewL();
       
    28 	void ConstructL();
       
    29 	virtual void StartProcessing(TRequestStatus& aStatus);
       
    30 	virtual TVerdict EndProcessingAndReturnResult(TDes8& aMessage);		
       
    31 	virtual ~CSDevSoundTestStep1();
       
    32 
       
    33 
       
    34 protected:
       
    35 	void InitializeComplete (TInt aError);
       
    36 	void ToneFinished (TInt aError);
       
    37 	void BufferToBeFilled (CMMFBuffer* aBuffer);
       
    38 	void PlayError (TInt aError);
       
    39 	void BufferToBeEmptied (CMMFBuffer* aBuffer);
       
    40 	void RecordError (TInt aError);
       
    41 	void ConvertError (TInt aError);
       
    42 	void DeviceMessage (TUid aMessageType, const TDesC8& aMsg);
       
    43 
       
    44 	TVerdict TestInitialize(TMMFState aMode);
       
    45 	TVerdict TestPlayTone(TInt aFreq, TTimeIntervalMicroSeconds aDur);
       
    46 	TVerdict DoPlaySimpleTone();
       
    47 
       
    48 protected:
       
    49 	enum TCallback 
       
    50 		{
       
    51 		EInitComplete,
       
    52 		EToneFinished,
       
    53 		EBuffToFill,
       
    54 		EPlayError,
       
    55 		EBuffToEmpty,
       
    56 		ERecError,
       
    57 		EConvertMsg,
       
    58 		EDeviceMsg
       
    59 		};
       
    60 
       
    61 	
       
    62 protected:
       
    63 	//CMMFDevSound* iMMFDevSound;
       
    64 
       
    65 	TRequestStatus* iStatus;
       
    66 	TVerdict iVerdict;
       
    67 
       
    68 	TFixedArray<TInt, 7> iCallbackArray;
       
    69 	void ResetCallbacks();
       
    70 	TInt GetCallbackTotal();
       
    71 
       
    72 	CMMFBuffer* iBuffer;
       
    73 
       
    74 	CMMFDevSound* iMMFDevSound;
       
    75 	TInt iExpectedValue;
       
    76 	TInt iCallbackError;
       
    77 	RChunk iChunk;
       
    78 	};
       
    79 	
       
    80 	
       
    81 #endif
       
    82