os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevSoundTest/CIPlugins/src/gsmconfigtestdevice.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2007-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 GSMCONFIGTESTDEVICE_H
    17 #define GSMCONFIGTESTDEVICE_H
    18 
    19 #include <mmf/server/mmfswcodecwrapper.h>
    20 #include <mmf/server/devsoundstandardcustominterfaces.h>
    21 
    22 
    23 class CMMFGsmConfig : public CBase,
    24 					  public MMMFGsmConfig
    25 	{
    26 public:
    27 	//return Pointer to the CMMFGsmConfig class
    28 	static CMMFGsmConfig* NewL();
    29 
    30 	//Destructor
    31 	~CMMFGsmConfig();
    32 
    33 	// from MMMFGsmConfig
    34 	TInt SetConversionFormat(TMMFGsmConversionFormat aConvFormat);
    35 	TInt ConversionFormat(TMMFGsmConversionFormat& aConvFormat) const;
    36 
    37 private:
    38 	TMMFGsmConversionFormat iConvFormat;
    39 	};
    40 
    41 
    42 /*
    43 CGsmConfigTestDevice
    44 
    45 Test hw device used by the
    46 TSU_MMF_DEVSOUND_CIU_SUITE unit test harness.
    47 */
    48 class CGsmConfigTestDevice : public CMMFSwCodecWrapper,
    49 							 public MMMFGsmConfig
    50 	{
    51 public:
    52 	static CMMFHwDevice* NewL();
    53 	virtual ~CGsmConfigTestDevice();
    54 	virtual TInt Start(TDeviceFunc aFuncCmd, TDeviceFlow aFlowCmd);
    55 	virtual TInt Stop();
    56 	virtual TInt Pause();
    57 	virtual TInt Init(THwDeviceInitParams& aDevInfo);
    58 	virtual TAny* CustomInterface(TUid aInterfaceId);
    59 	virtual TInt ThisHwBufferFilled(CMMFBuffer& aFillBufferPtr);
    60 	virtual TInt ThisHwBufferEmptied(CMMFBuffer& aEmptyBufferPtr);
    61 	virtual TInt SetConfig(TTaskConfig& aConfig);
    62 	virtual TInt StopAndDeleteCodec();
    63 	virtual TInt DeleteCodec();
    64 
    65 	// from CMMFSwCodecWrapper
    66 	virtual CMMFSwCodec& Codec();
    67 
    68 	// MMMFGsmConfig
    69 	TInt SetConversionFormat(MMMFGsmConfig::TMMFGsmConversionFormat aConvFormat);
    70 	TInt ConversionFormat(MMMFGsmConfig::TMMFGsmConversionFormat& aConvFormat) const;
    71 
    72 private:
    73 	CGsmConfigTestDevice();
    74 	void ConstructL();
    75 
    76 private:
    77 	CMMFGsmConfig* iGsmConfig;
    78 	};
    79 
    80 #endif