phoneclientserver/callui/inc/cauiplugin/cauiplugin.h
changeset 51 12bc758d6a02
parent 48 78df25012fda
child 53 25b8d29b7c59
equal deleted inserted replaced
48:78df25012fda 51:12bc758d6a02
     1 /*
       
     2 * Copyright (c) 2004 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 "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:  Provides ECOM interface implementation for CallUI.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CAUIPLUGIN_H
       
    20 #define CAUIPLUGIN_H
       
    21 
       
    22 
       
    23 //  INCLUDES
       
    24 #include    <aiwserviceifmenu.h>
       
    25 #include    <aiwcommon.h>               // AIW dialdata.
       
    26 #include    <spdefinitions.h>  //TServiceId
       
    27 #include    "cauidialresultobserver.h"
       
    28 #include    "caui.hrh"
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CCaUiEngApi;
       
    32 class MAiwNotifyCallback;
       
    33 class CAiwMenuPane;
       
    34 
       
    35 
       
    36 
       
    37 // CLASS DECLARATION
       
    38 
       
    39 /**
       
    40 *  CaUiPlugin implementation.
       
    41 *
       
    42 *  @since 2.6
       
    43 */
       
    44 class CCaUiPlugin 
       
    45 :   public CAiwServiceIfMenu,
       
    46     public MCaUiDialResultObserver 
       
    47     {
       
    48     public:  // Constructors and destructor
       
    49 
       
    50         /**
       
    51         * Two-phased constructor.
       
    52         * 
       
    53         * @return An instance of CaUiPlugin.
       
    54         */
       
    55         static CCaUiPlugin* NewL();
       
    56         
       
    57         /**
       
    58         * Destructor.
       
    59         */
       
    60         virtual ~CCaUiPlugin();
       
    61 
       
    62 
       
    63     public: // Functions from base classes
       
    64 
       
    65         /**
       
    66         * @see CAiwServiceIfMenu::InitialiseL.
       
    67         */
       
    68         void InitialiseL(
       
    69             MAiwNotifyCallback& aFrameworkCallback,
       
    70             const RCriteriaArray& aInterest );
       
    71 
       
    72         /**
       
    73         * @see CAiwServiceIfMenu::HandleServiceCmdL.
       
    74         */
       
    75         void HandleServiceCmdL(
       
    76             const TInt& aCmdId,
       
    77             const CAiwGenericParamList& aInParamList,
       
    78             CAiwGenericParamList& aOutParamList,
       
    79             TUint aCmdOptions = 0,
       
    80             const MAiwNotifyCallback* aCallback = NULL );
       
    81 
       
    82         /**
       
    83         * @see CAiwServiceIfMenu::InitializeMenuPaneL.
       
    84         */
       
    85         void InitializeMenuPaneL(
       
    86         CAiwMenuPane& aMenuPane,
       
    87             TInt aIndex,
       
    88             TInt aCascadeId,
       
    89             const CAiwGenericParamList& aInParamList );
       
    90 
       
    91         /**
       
    92         * @see CAiwServiceIfMenu::HandleMenuCmdL.
       
    93         */
       
    94         void HandleMenuCmdL(
       
    95             TInt aMenuCmdId,
       
    96             const CAiwGenericParamList& aInParamList,
       
    97             CAiwGenericParamList& aOutParamList,
       
    98             TUint aCmdOptions = 0,
       
    99             const MAiwNotifyCallback* aCallback = NULL );
       
   100 
       
   101         /**
       
   102         * @see MCaUiDialResultObserver::HandleDialResultL.
       
   103         */
       
   104         void HandleDialResultL( const TInt aStatus );
       
   105 
       
   106 
       
   107     private:
       
   108 
       
   109         /**
       
   110         * C++ default constructor.
       
   111         */
       
   112         CCaUiPlugin();
       
   113 
       
   114         /**
       
   115         * By default Symbian 2nd phase constructor is private.
       
   116         */
       
   117         void ConstructL();
       
   118 
       
   119         /**
       
   120         * Adds a new call sub menu items. If the call type is internet call 
       
   121         * and there is only one service, the service's provider ID is used 
       
   122         * in menu item.
       
   123         * @param aMenuPane Menu pane to insert commands
       
   124         * @param aIndex The index of call sub menu
       
   125         * @param aType The type of item being added
       
   126         * @param aServiceId The service ID of VoIP call item, needed when 
       
   127         *        getting the service name
       
   128         */
       
   129         void AddAiwMenuItemL(
       
   130             CAiwMenuPane& aMenuPane,
       
   131             TInt aIndex,
       
   132             EMenuItemType aType,
       
   133             TServiceId aServiceId = 0 );
       
   134 
       
   135     private:    // Data
       
   136 
       
   137         // The library loader.
       
   138         RLibrary                        iLibrary;
       
   139 
       
   140         // CaUiEngine.
       
   141         CCaUiEngApi*                    iCaUiEngine;
       
   142 
       
   143         // The AIW callback instance.
       
   144         const MAiwNotifyCallback*       iAiwNotifyCallback;
       
   145 
       
   146         // AIW Input parameters.
       
   147         const CAiwGenericParamList*     iInParamList;
       
   148 
       
   149         // AIW Output parameters, result of call is returned here.
       
   150         CAiwGenericParamList*           iOutParamList;
       
   151 
       
   152         // The menu command given to HandleMenuCmdL.
       
   153         TInt                            iMenuCmdId;
       
   154     };
       
   155 
       
   156 #endif  // CAUIPLUGIN_H
       
   157 
       
   158 // End of file