languageinterworkingfw/servicehandler/src/liwserviceifmenu.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 17 Dec 2009 09:09:59 +0200
changeset 24 9d9a9d54f8c7
parent 0 99ef825efeca
permissions -rw-r--r--
Revision: 200949 Kit: 200951

/*
* Copyright (c) 2003-2005 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:       Implements service API for providers offering menu services 
*                for consumers.
*
*/






#include <ecom/ecom.h>
#include "liwserviceifmenu.h"
#include "liwmenu.h"


void CLiwServiceIfMenu::InitializeMenuPaneHookL(
    CLiwMenuPane* aMenuPane,
    TInt aIndex,
    TInt aCascadeId,
    const CLiwGenericParamList& aInParamList)
    {
    iMenuPane = aMenuPane;  

    // Trapping prevents a leaving provider from breaking the whole consumer menu.  
    TRAPD(err, InitializeMenuPaneL(*aMenuPane, aIndex, aCascadeId, aInParamList));
    if(err)
        {
#ifdef _DEBUG
        RDebug::Print(_L("LIW PROVIDER ERROR: CLiwServiceIfMenu::InitializeMenuPaneL() failed, leave code:%d"), err);
#endif        
        }
    }



void CLiwServiceIfMenu::HandleMenuCmdHookL(
    CLiwMenuPane* aMenuPane,
    TInt aMenuCmdId,
    const CLiwGenericParamList& aInParamList,
    CLiwGenericParamList& aOutParamList,
    TUint aCmdOptions,
    const MLiwNotifyCallback* aCallback)
    {
    if (!iMenuPane)
        {
        return;
        }

    HandleMenuCmdL(aMenuPane->MenuCmdId(aMenuCmdId), aInParamList, aOutParamList,
        aCmdOptions, aCallback);
    }       


EXPORT_C const CLiwMenuPane* CLiwServiceIfMenu::MenuPane() const
    {
    return iMenuPane;
    }


EXPORT_C CLiwServiceIfMenu::~CLiwServiceIfMenu()
    {
    }
    
    
EXPORT_C void* CLiwServiceIfMenu::ExtensionInterface(TUid /*aInterface*/)
    {
    return NULL;
    }    

// End of file