os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevSoundTest/CIPlugins/src/g711encoderconfigtestdevice.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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 G711ENCODERCONFIGTESTDEVICE_H
    17 #define G711ENCODERCONFIGTESTDEVICE_H
    18 
    19 #include <mmf/server/mmfswcodecwrapper.h>
    20 #include <mmf/server/devsoundstandardcustominterfaces.h>
    21 
    22 
    23 class CMMFG711EncoderConfig : public CBase,
    24 							  public MG711EncoderIntfc
    25 	{
    26 public:
    27 	//return Pointer to the CMMFG711EncoderConfig class
    28 	static CMMFG711EncoderConfig* NewL();
    29 
    30 	//Destructor
    31 	~CMMFG711EncoderConfig();
    32 
    33 	// from MG711EncoderIntfc
    34 	TInt SetEncoderMode(TEncodeMode aEncodeMode);
    35 	TInt SetVadMode(TBool aVadModeOn);
    36 	TInt GetVadMode(TBool& aVadModeOn);
    37 
    38 private:
    39 	TBool iVadModeOn;
    40 	};
    41 
    42 
    43 /*
    44 CG711EncoderConfigTestDevice
    45 
    46 Test hw device used by the
    47 TSU_MMF_DEVSOUND_CIU_SUITE unit test harness.
    48 */
    49 class CG711EncoderConfigTestDevice : public CMMFSwCodecWrapper,
    50 									 public MG711EncoderIntfc
    51 	{
    52 public:
    53 	static CMMFHwDevice* NewL();
    54 	virtual ~CG711EncoderConfigTestDevice();
    55 	virtual TInt Start(TDeviceFunc aFuncCmd, TDeviceFlow aFlowCmd);
    56 	virtual TInt Stop();
    57 	virtual TInt Pause();
    58 	virtual TInt Init(THwDeviceInitParams& aDevInfo);
    59 	virtual TAny* CustomInterface(TUid aInterfaceId);
    60 	virtual TInt ThisHwBufferFilled(CMMFBuffer& aFillBufferPtr);
    61 	virtual TInt ThisHwBufferEmptied(CMMFBuffer& aEmptyBufferPtr);
    62 	virtual TInt SetConfig(TTaskConfig& aConfig);
    63 	virtual TInt StopAndDeleteCodec();
    64 	virtual TInt DeleteCodec();
    65 
    66 	// from CMMFSwCodecWrapper
    67 	virtual CMMFSwCodec& Codec();
    68 
    69 	// MG711EncoderIntfc
    70 	TInt SetEncoderMode(TEncodeMode aEncodeMode);
    71 	TInt SetVadMode(TBool aVadModeOn);
    72 	TInt GetVadMode(TBool& aVadModeOn);
    73 
    74 private:
    75 	CG711EncoderConfigTestDevice();
    76 	void ConstructL();
    77 
    78 private:
    79 	CMMFG711EncoderConfig* iG711EncoderConfig;
    80 	};
    81 
    82 #endif