languageinterworkingfw/servicehandler/src/liwserviceifmenu.cpp
changeset 57 61b27eec6533
parent 45 7aa6007702af
equal deleted inserted replaced
45:7aa6007702af 57:61b27eec6533
     1 /*
       
     2 * Copyright (c) 2003-2005 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:       Implements service API for providers offering menu services 
       
    15 *                for consumers.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 #include <ecom/ecom.h>
       
    25 #include "liwserviceifmenu.h"
       
    26 #include "liwmenu.h"
       
    27 
       
    28 
       
    29 void CLiwServiceIfMenu::InitializeMenuPaneHookL(
       
    30     CLiwMenuPane* aMenuPane,
       
    31     TInt aIndex,
       
    32     TInt aCascadeId,
       
    33     const CLiwGenericParamList& aInParamList)
       
    34     {
       
    35     iMenuPane = aMenuPane;  
       
    36 
       
    37     // Trapping prevents a leaving provider from breaking the whole consumer menu.  
       
    38     TRAPD(err, InitializeMenuPaneL(*aMenuPane, aIndex, aCascadeId, aInParamList));
       
    39     if(err)
       
    40         {
       
    41 #ifdef _DEBUG
       
    42         RDebug::Print(_L("LIW PROVIDER ERROR: CLiwServiceIfMenu::InitializeMenuPaneL() failed, leave code:%d"), err);
       
    43 #endif        
       
    44         }
       
    45     }
       
    46 
       
    47 
       
    48 
       
    49 void CLiwServiceIfMenu::HandleMenuCmdHookL(
       
    50     CLiwMenuPane* aMenuPane,
       
    51     TInt aMenuCmdId,
       
    52     const CLiwGenericParamList& aInParamList,
       
    53     CLiwGenericParamList& aOutParamList,
       
    54     TUint aCmdOptions,
       
    55     const MLiwNotifyCallback* aCallback)
       
    56     {
       
    57     if (!iMenuPane)
       
    58         {
       
    59         return;
       
    60         }
       
    61 
       
    62     HandleMenuCmdL(aMenuPane->MenuCmdId(aMenuCmdId), aInParamList, aOutParamList,
       
    63         aCmdOptions, aCallback);
       
    64     }       
       
    65 
       
    66 
       
    67 EXPORT_C const CLiwMenuPane* CLiwServiceIfMenu::MenuPane() const
       
    68     {
       
    69     return iMenuPane;
       
    70     }
       
    71 
       
    72 
       
    73 EXPORT_C CLiwServiceIfMenu::~CLiwServiceIfMenu()
       
    74     {
       
    75     }
       
    76     
       
    77     
       
    78 EXPORT_C void* CLiwServiceIfMenu::ExtensionInterface(TUid /*aInterface*/)
       
    79     {
       
    80     return NULL;
       
    81     }    
       
    82 
       
    83 // End of file