sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include "g729decoderconfigtestdevice.h" sl@0: #include "devsoundciutestdevices.hrh" sl@0: sl@0: sl@0: /* sl@0: CMMFG729DecoderConfig implementation sl@0: */ sl@0: CMMFG729DecoderConfig* CMMFG729DecoderConfig::NewL() sl@0: { sl@0: CMMFG729DecoderConfig* self = new(ELeave) CMMFG729DecoderConfig(); sl@0: return self; sl@0: } sl@0: sl@0: CMMFG729DecoderConfig::~CMMFG729DecoderConfig() sl@0: { sl@0: } sl@0: sl@0: //Actual implementation of method BadLsfNextBuffer sl@0: TInt CMMFG729DecoderConfig::BadLsfNextBuffer() sl@0: { sl@0: return KErrNone; sl@0: } sl@0: sl@0: sl@0: /* sl@0: CG729DecoderConfigTestDevice implementation sl@0: */ sl@0: CMMFHwDevice* CG729DecoderConfigTestDevice::NewL() sl@0: { sl@0: CG729DecoderConfigTestDevice* self=new(ELeave) CG729DecoderConfigTestDevice(); sl@0: CleanupStack::PushL(self); sl@0: self->ConstructL(); sl@0: CleanupStack::Pop(self); sl@0: return self; sl@0: } sl@0: sl@0: CG729DecoderConfigTestDevice::~CG729DecoderConfigTestDevice() sl@0: { sl@0: delete iG729DecoderConfig; sl@0: } sl@0: sl@0: CG729DecoderConfigTestDevice::CG729DecoderConfigTestDevice() sl@0: { sl@0: } sl@0: sl@0: void CG729DecoderConfigTestDevice::ConstructL() sl@0: { sl@0: } sl@0: sl@0: TInt CG729DecoderConfigTestDevice::Start(TDeviceFunc /*aFuncCmd*/, TDeviceFlow /*aFlowCmd*/) sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: TInt CG729DecoderConfigTestDevice::Stop() sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: TInt CG729DecoderConfigTestDevice::Pause() sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: TInt CG729DecoderConfigTestDevice::Init(THwDeviceInitParams& /*aDevInfo*/) sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: TAny* CG729DecoderConfigTestDevice::CustomInterface(TUid aInterfaceId) sl@0: { sl@0: // Just return something non-NULL to keep the sl@0: // DevSound initialisation process happy sl@0: TAny* ret = static_cast(this); sl@0: sl@0: // Now for the CIs we want to test... sl@0: if (aInterfaceId == KUidG729DecoderIntfc) sl@0: { sl@0: if (!iG729DecoderConfig) sl@0: { sl@0: TRAPD(err, iG729DecoderConfig = CMMFG729DecoderConfig::NewL()); sl@0: if (err == KErrNone && iG729DecoderConfig) sl@0: { sl@0: MG729DecoderIntfc* ptr = this; sl@0: ret = static_cast(ptr); sl@0: } sl@0: else sl@0: { sl@0: ret = NULL; sl@0: } sl@0: } sl@0: } sl@0: sl@0: return ret; sl@0: } sl@0: sl@0: TInt CG729DecoderConfigTestDevice::ThisHwBufferFilled(CMMFBuffer& /*aFillBufferPtr*/) sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: TInt CG729DecoderConfigTestDevice::ThisHwBufferEmptied(CMMFBuffer& /*aEmptyBufferPtr*/) sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: TInt CG729DecoderConfigTestDevice::SetConfig(TTaskConfig& /*aConfig*/) sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: TInt CG729DecoderConfigTestDevice::StopAndDeleteCodec() sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: TInt CG729DecoderConfigTestDevice::DeleteCodec() sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: CMMFSwCodec& CG729DecoderConfigTestDevice::Codec() sl@0: { sl@0: return *iCodec; sl@0: } sl@0: sl@0: TInt CG729DecoderConfigTestDevice::BadLsfNextBuffer() sl@0: { sl@0: TInt result = KErrBadHandle; sl@0: sl@0: if (iG729DecoderConfig) sl@0: { sl@0: result = iG729DecoderConfig->BadLsfNextBuffer(); sl@0: } sl@0: sl@0: return result; sl@0: }