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 "underflowautostopcontroltestdevice.h" sl@0: #include "devsoundciutestdevices.hrh" sl@0: sl@0: sl@0: /* sl@0: CMMFUnderflowAutoStopControl implementation sl@0: */ sl@0: CMMFUnderflowAutoStopControl* CMMFUnderflowAutoStopControl::NewL() sl@0: { sl@0: CMMFUnderflowAutoStopControl* self = new(ELeave) CMMFUnderflowAutoStopControl(); sl@0: return self; sl@0: } sl@0: sl@0: CMMFUnderflowAutoStopControl::~CMMFUnderflowAutoStopControl() sl@0: { sl@0: } sl@0: sl@0: // Actual implementation of method sl@0: TInt CMMFUnderflowAutoStopControl::MmuascTurnOffUnderflowAutoStop() sl@0: { sl@0: return KErrNone; sl@0: } sl@0: sl@0: sl@0: /* sl@0: CUnderflowAutoStopControlTestDevice Implementation sl@0: */ sl@0: CMMFHwDevice* CUnderflowAutoStopControlTestDevice::NewL() sl@0: { sl@0: CUnderflowAutoStopControlTestDevice* self=new(ELeave) CUnderflowAutoStopControlTestDevice(); sl@0: CleanupStack::PushL(self); sl@0: self->ConstructL(); sl@0: CleanupStack::Pop(self); sl@0: return self; sl@0: } sl@0: sl@0: CUnderflowAutoStopControlTestDevice::~CUnderflowAutoStopControlTestDevice() sl@0: { sl@0: delete iUnderflowAutoStopCtrl; sl@0: } sl@0: sl@0: CUnderflowAutoStopControlTestDevice::CUnderflowAutoStopControlTestDevice() sl@0: { sl@0: } sl@0: sl@0: void CUnderflowAutoStopControlTestDevice::ConstructL() sl@0: { sl@0: } sl@0: sl@0: TInt CUnderflowAutoStopControlTestDevice::Start(TDeviceFunc /*aFuncCmd*/, TDeviceFlow /*aFlowCmd*/) sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: TInt CUnderflowAutoStopControlTestDevice::Stop() sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: TInt CUnderflowAutoStopControlTestDevice::Pause() sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: TInt CUnderflowAutoStopControlTestDevice::Init(THwDeviceInitParams& /*aDevInfo*/) sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: TAny* CUnderflowAutoStopControlTestDevice::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 == KUidUnderflowAutoStopControl) sl@0: { sl@0: if (!iUnderflowAutoStopCtrl) sl@0: { sl@0: TRAPD(err, iUnderflowAutoStopCtrl = CMMFUnderflowAutoStopControl::NewL()); sl@0: if (err == KErrNone && iUnderflowAutoStopCtrl) sl@0: { sl@0: MMMFUnderflowAutoStopControl* 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 CUnderflowAutoStopControlTestDevice::ThisHwBufferFilled(CMMFBuffer& /*aFillBufferPtr*/) sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: TInt CUnderflowAutoStopControlTestDevice::ThisHwBufferEmptied(CMMFBuffer& /*aEmptyBufferPtr*/) sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: TInt CUnderflowAutoStopControlTestDevice::SetConfig(TTaskConfig& /*aConfig*/) sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: TInt CUnderflowAutoStopControlTestDevice::StopAndDeleteCodec() sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: TInt CUnderflowAutoStopControlTestDevice::DeleteCodec() sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: CMMFSwCodec& CUnderflowAutoStopControlTestDevice::Codec() sl@0: { sl@0: return *iCodec; sl@0: } sl@0: sl@0: TInt CUnderflowAutoStopControlTestDevice::MmuascTurnOffUnderflowAutoStop() sl@0: { sl@0: TInt result = KErrBadHandle; sl@0: sl@0: if (iUnderflowAutoStopCtrl) sl@0: { sl@0: result = iUnderflowAutoStopCtrl->MmuascTurnOffUnderflowAutoStop(); sl@0: } sl@0: sl@0: return result; sl@0: }