sl@0: /* sl@0: * Copyright (c) 2002-2004 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: Interface proxy for AAC decoder configuration. sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: // INCLUDE FILES sl@0: #include "AacDecoderConfigProxy.h" sl@0: #include "AacDecoderConfigMsgs.h" sl@0: #include sl@0: #include sl@0: sl@0: // EXTERNAL DATA STRUCTURES sl@0: sl@0: // EXTERNAL FUNCTION PROTOTYPES sl@0: sl@0: // CONSTANTS sl@0: sl@0: // MACROS sl@0: sl@0: // LOCAL CONSTANTS AND MACROS sl@0: sl@0: // MODULE DATA STRUCTURES sl@0: sl@0: // LOCAL FUNCTION PROTOTYPES sl@0: sl@0: // FORWARD DECLARATIONS sl@0: sl@0: // ============================= LOCAL FUNCTIONS =============================== sl@0: sl@0: // ================= MEMBER FUNCTIONS ======================= sl@0: sl@0: // ----------------------------------------------------------------------------- sl@0: // CAacDecoderConfigProxy::CAacDecoderConfigProxy sl@0: // C++ default constructor can NOT contain any code, that sl@0: // might leave. sl@0: // ----------------------------------------------------------------------------- sl@0: // sl@0: CAacDecoderConfigProxy::CAacDecoderConfigProxy( sl@0: TMMFMessageDestinationPckg aMessageHandler, sl@0: MCustomCommand& aCustomCommand, sl@0: CCustomInterfaceUtility* aCustomInterfaceUtility) : sl@0: iCustomCommand(aCustomCommand), sl@0: iMessageHandler(aMessageHandler), sl@0: iCustomInterfaceUtility(aCustomInterfaceUtility) sl@0: { sl@0: } sl@0: sl@0: sl@0: // ----------------------------------------------------------------------------- sl@0: // CAacDecoderConfigProxy::ConstructL sl@0: // Symbian 2nd phase constructor can leave. sl@0: // ----------------------------------------------------------------------------- sl@0: // sl@0: void CAacDecoderConfigProxy::ConstructL() sl@0: { sl@0: } sl@0: sl@0: // ----------------------------------------------------------------------------- sl@0: // CAacDecoderConfigProxy::NewL sl@0: // Two-phased constructor. sl@0: // ----------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C CAacDecoderConfigProxy* CAacDecoderConfigProxy::NewL( sl@0: TMMFMessageDestinationPckg aMessageHandler, sl@0: MCustomCommand& aCustomCommand, sl@0: CCustomInterfaceUtility* aCustomInterfaceUtility) sl@0: { sl@0: CAacDecoderConfigProxy* self = new(ELeave) CAacDecoderConfigProxy( sl@0: aMessageHandler, sl@0: aCustomCommand, sl@0: aCustomInterfaceUtility); sl@0: CleanupStack::PushL( self ); sl@0: self->ConstructL(); sl@0: CleanupStack::Pop( self ); sl@0: return self; sl@0: } sl@0: sl@0: // Destructor sl@0: EXPORT_C CAacDecoderConfigProxy::~CAacDecoderConfigProxy() sl@0: { sl@0: iCustomInterfaceUtility->RemoveCustomInterface(iMessageHandler); sl@0: delete iCustomInterfaceUtility; sl@0: } sl@0: sl@0: // --------------------------------------------------------- sl@0: // CAacDecoderConfigProxy::SetAudioConfig sl@0: // Sends the custom command for this function to its message handler. sl@0: // (other items were commented in a header). sl@0: // --------------------------------------------------------- sl@0: // sl@0: EXPORT_C TInt CAacDecoderConfigProxy::SetAudioConfig(TAudioConfig& aAudioConfig) sl@0: { sl@0: TPckgBuf audioConfigPckgBuf(aAudioConfig); sl@0: TInt status = iCustomCommand.CustomCommandSync(iMessageHandler, sl@0: EAdcmSetConfig, sl@0: audioConfigPckgBuf, sl@0: KNullDesC8); sl@0: return status; sl@0: } sl@0: sl@0: sl@0: // End of File