sl@0: /* sl@0: * Copyright (c) 2006 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: Audio input proxy implementation sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: // INCLUDE FILES sl@0: #include "AudioInputProxy.h" sl@0: #include "AudioInputMessageTypes.h" sl@0: #include sl@0: #include sl@0: sl@0: sl@0: sl@0: sl@0: // ================= MEMBER FUNCTIONS ======================= sl@0: sl@0: // C++ default constructor can NOT contain any code, that sl@0: // might leave. sl@0: // sl@0: CAudioInputProxy::CAudioInputProxy(TMMFMessageDestinationPckg aMessageHandler, sl@0: MCustomCommand& aCustomCommand, sl@0: CCustomInterfaceUtility* aCustomInterfaceUtility) : sl@0: iCustomCommand(&aCustomCommand), sl@0: iInputArray(4), sl@0: iMessageHandler(aMessageHandler), sl@0: iCustomInterfaceUtility(aCustomInterfaceUtility) sl@0: { sl@0: } sl@0: sl@0: // Two-phased constructor. sl@0: EXPORT_C CAudioInputProxy* CAudioInputProxy::NewL(TMMFMessageDestinationPckg aMessageHandler, sl@0: MCustomCommand& aCustomCommand, sl@0: CCustomInterfaceUtility* aCustomInterfaceUtility) sl@0: { sl@0: CAudioInputProxy* self = new(ELeave) CAudioInputProxy(aMessageHandler,aCustomCommand,aCustomInterfaceUtility); sl@0: sl@0: return self; sl@0: } sl@0: sl@0: sl@0: // Destructor sl@0: CAudioInputProxy::~CAudioInputProxy() sl@0: { sl@0: sl@0: iInputArray.Reset(); sl@0: if(iCustomCommand) sl@0: iCustomCommand->CustomCommandSync(iMessageHandler, EAifDelete, KNullDesC8, KNullDesC8); sl@0: if(iCustomInterfaceUtility) sl@0: iCustomInterfaceUtility->RemoveCustomInterface(iMessageHandler); sl@0: delete iCustomInterfaceUtility; sl@0: } sl@0: sl@0: EXPORT_C const TUid CAudioInputProxy::Uid() sl@0: { sl@0: return KUidAudioInput; sl@0: } sl@0: sl@0: // --------------------------------------------------------- sl@0: // CAudioInput::AudioInput sl@0: // ?implementation_description sl@0: // (other items were commented in a header). sl@0: // --------------------------------------------------------- sl@0: // sl@0: CAudioInput::TAudioInputArray CAudioInputProxy::AudioInput() sl@0: { sl@0: return iInputArray.Array(); sl@0: } sl@0: sl@0: // --------------------------------------------------------- sl@0: // CAudioInput::SetAudioInputL sl@0: // ?implementation_description sl@0: // (other items were commented in a header). sl@0: // --------------------------------------------------------- sl@0: // sl@0: void CAudioInputProxy::SetAudioInputL(TAudioInputArray aAudioInputs) sl@0: { sl@0: iInputArray.Reset(); sl@0: TInt count = aAudioInputs.Count(); sl@0: sl@0: sl@0: for(int i=0; i countPckg(count); sl@0: sl@0: User::LeaveIfError(iCustomCommand->CustomCommandSync(iMessageHandler, EAifSetInputs, countPckg, inputArrayPtr)); sl@0: } sl@0: sl@0: sl@0: // ========================== OTHER EXPORTED FUNCTIONS ========================= sl@0: sl@0: sl@0: sl@0: sl@0: // End of File