os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevSoundTest/CIPlugins/src/ilbcdecoderconfigtestdevice.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 ILBCDECODERCONFIGTESTDEVICE_H
    17 #define ILBCDECODERCONFIGTESTDEVICE_H
    18 
    19 #include <mmf/server/mmfswcodecwrapper.h>
    20 #include <mmf/server/devsoundstandardcustominterfaces.h>
    21 
    22 
    23 class CMMFIlbcDecoderConfig : public CBase,
    24 							  public MIlbcDecoderIntfc
    25 	{
    26 public:
    27 	//return Pointer to the CMMFIlbcDecoderConfig class
    28 	static CMMFIlbcDecoderConfig* NewL();
    29 
    30 	//Destructor
    31 	~CMMFIlbcDecoderConfig();
    32 
    33 	// from mirror MIlbcDecoderIntfc method.
    34 	TInt SetDecoderMode(TDecodeMode aDecodeMode);
    35 	TInt SetComfortNoiseGeneration(TBool aCng);
    36 	TInt GetComfortNoiseGeneration(TBool& aCng);
    37 
    38 private:
    39 	TDecodeMode iDecodeMode;
    40 	TBool iCng;
    41 	};
    42 
    43 
    44 /*
    45 CIlbcDecoderConfigTestDevice
    46 
    47 Test hw device used by the
    48 TSU_MMF_DEVSOUND_CIU_SUITE unit test harness.
    49 */
    50 class CIlbcDecoderConfigTestDevice : public CMMFSwCodecWrapper,
    51 									 public MIlbcDecoderIntfc
    52 	{
    53 public:
    54 	static CMMFHwDevice* NewL();
    55 	virtual ~CIlbcDecoderConfigTestDevice();
    56 	virtual TInt Start(TDeviceFunc aFuncCmd, TDeviceFlow aFlowCmd);
    57 	virtual TInt Stop();
    58 	virtual TInt Pause();
    59 	virtual TInt Init(THwDeviceInitParams& aDevInfo);
    60 	virtual TAny* CustomInterface(TUid aInterfaceId);
    61 	virtual TInt ThisHwBufferFilled(CMMFBuffer& aFillBufferPtr);
    62 	virtual TInt ThisHwBufferEmptied(CMMFBuffer& aEmptyBufferPtr);
    63 	virtual TInt SetConfig(TTaskConfig& aConfig);
    64 	virtual TInt StopAndDeleteCodec();
    65 	virtual TInt DeleteCodec();
    66 
    67 	// from CMMFSwCodecWrapper
    68 	virtual CMMFSwCodec& Codec();
    69 
    70 	// from mirror MIlbcDecoderIntfc method.
    71 	TInt SetDecoderMode(TDecodeMode aDecodeMode);
    72 	TInt SetComfortNoiseGeneration(TBool aCng);
    73 	TInt GetComfortNoiseGeneration(TBool& aCng);
    74 
    75 private:
    76 	CIlbcDecoderConfigTestDevice();
    77 	void ConstructL();
    78 
    79 private:
    80 	CMMFIlbcDecoderConfig* iIlbcDecoderConfig;
    81 	};
    82 
    83 #endif