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 error concealment. sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: // INCLUDE FILES sl@0: #include "ErrorConcealmentIntfcProxy.h" sl@0: #include "ErrorConcealmentIntfcMsgs.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: // CErrorConcealmentIntfcProxy::CErrorConcealmentIntfcProxy sl@0: // C++ default constructor can NOT contain any code, that sl@0: // might leave. sl@0: // ----------------------------------------------------------------------------- sl@0: // sl@0: CErrorConcealmentIntfcProxy::CErrorConcealmentIntfcProxy( 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: // CErrorConcealmentIntfcProxy::ConstructL sl@0: // Symbian 2nd phase constructor can leave. sl@0: // ----------------------------------------------------------------------------- sl@0: // sl@0: void CErrorConcealmentIntfcProxy::ConstructL() sl@0: { sl@0: } sl@0: sl@0: // ----------------------------------------------------------------------------- sl@0: // CErrorConcealmentIntfcProxy::NewL sl@0: // Two-phased constructor. sl@0: // ----------------------------------------------------------------------------- sl@0: // sl@0: EXPORT_C CErrorConcealmentIntfcProxy* CErrorConcealmentIntfcProxy::NewL( sl@0: TMMFMessageDestinationPckg aMessageHandler, sl@0: MCustomCommand& aCustomCommand, sl@0: CCustomInterfaceUtility* aCustomInterfaceUtility) sl@0: { sl@0: CErrorConcealmentIntfcProxy* self = new(ELeave) CErrorConcealmentIntfcProxy( 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 CErrorConcealmentIntfcProxy::~CErrorConcealmentIntfcProxy() sl@0: { sl@0: iCustomInterfaceUtility->RemoveCustomInterface(iMessageHandler); sl@0: delete iCustomInterfaceUtility; sl@0: } sl@0: sl@0: // --------------------------------------------------------- sl@0: // CErrorConcealmentIntfcProxy::ConcealErrorForNextBuffer 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 CErrorConcealmentIntfcProxy::ConcealErrorForNextBuffer() sl@0: { sl@0: TInt status = iCustomCommand.CustomCommandSync(iMessageHandler, sl@0: EEcimConcealError, sl@0: KNullDesC8, sl@0: KNullDesC8); sl@0: return status; sl@0: sl@0: } sl@0: sl@0: // --------------------------------------------------------- sl@0: // CErrorConcealmentIntfcProxy::SetFrameMode 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 CErrorConcealmentIntfcProxy::SetFrameMode(TBool aFrameMode) sl@0: { sl@0: TPckgBuf frameModePckgBuf(aFrameMode); sl@0: TInt status = iCustomCommand.CustomCommandSync(iMessageHandler, sl@0: EEcimSetFrameMode, sl@0: frameModePckgBuf, sl@0: KNullDesC8); sl@0: return status; sl@0: sl@0: } sl@0: sl@0: // --------------------------------------------------------- sl@0: // CErrorConcealmentIntfcProxy::FrameModeRqrdForEC 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 CErrorConcealmentIntfcProxy::FrameModeRqrdForEC( sl@0: TBool& aFrameModeRqrd) sl@0: { sl@0: TBool frameModeRqrd = EFalse; sl@0: TPckgBuf frameModeRqrdPckg(frameModeRqrd); sl@0: TInt status = iCustomCommand.CustomCommandSync(iMessageHandler, sl@0: EEcimFrameModeRqrd, sl@0: KNullDesC8, sl@0: KNullDesC8, sl@0: frameModeRqrdPckg); sl@0: aFrameModeRqrd = frameModeRqrdPckg(); sl@0: return status; sl@0: } sl@0: sl@0: sl@0: sl@0: // End of File