uifw/AvKon/tsrc/bc/bctestdom3.2/bctestdomaiwakn/inc/bctestdomaiwserviceifmenu.h
branchRCL_3
changeset 56 d48ab3b357f1
equal deleted inserted replaced
55:aecbbf00d063 56:d48ab3b357f1
       
     1 /*
       
     2 * Copyright (c) 2007 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_CBCTESTDOMAIWSERVICEIFMENU_H
       
    19 #define C_CBCTESTDOMAIWSERVICEIFMENU_H
       
    20 
       
    21 
       
    22 #include <aiwserviceifmenu.h> 
       
    23  
       
    24 
       
    25 /**
       
    26  *  test CAiwServiceIfMenu and CAiwServiceIfBase.
       
    27  *  
       
    28  *
       
    29  *  @code
       
    30  *    
       
    31  *  @endcode
       
    32  *
       
    33  *  @lib   
       
    34  *  @since S60 v5.0
       
    35  */ 
       
    36 class CBCTestDomAiwServiceIfMenu : public CAiwServiceIfMenu
       
    37     {
       
    38 
       
    39 
       
    40 public:
       
    41 
       
    42     IMPORT_C static CBCTestDomAiwServiceIfMenu* NewL();
       
    43 
       
    44     IMPORT_C static CBCTestDomAiwServiceIfMenu* NewLC();
       
    45 
       
    46     /**
       
    47      * Destructor.
       
    48      */
       
    49     IMPORT_C virtual ~CBCTestDomAiwServiceIfMenu();
       
    50 
       
    51     /**
       
    52      * test ExtensionInterface
       
    53      *  
       
    54      * @since S60 v5.0       
       
    55      */
       
    56     void TestFuncExtensionInterface() ;
       
    57 
       
    58 // from base class CAiwServiceIfBase  
       
    59     /**
       
    60      * From CAiwServiceIfBase.      
       
    61      * Called by the AIW framework to initialise provider with necessary
       
    62      * information from the Service Handler. This method is called when 
       
    63      * the consumer makes the attach operation.
       
    64      *
       
    65      * @since S60 v5.0       
       
    66      * @param aFrameworkCallback Framework provided callback for provider 
       
    67      *                  to send events to framework.
       
    68      * @param aInterest List of criteria items which invoked the provider.
       
    69      */
       
    70      virtual void InitialiseL(
       
    71          MAiwNotifyCallback& aFrameworkCallback,
       
    72          const RCriteriaArray& aInterest) ;
       
    73      
       
    74     /**
       
    75      * From CAiwServiceIfBase.      
       
    76      * Executes generic service commands included in criteria.
       
    77      *
       
    78      * @since S60 v5.0       
       
    79      * @param aCmdId Command to be executed.
       
    80      * @param aInParamList Input parameters, can be an empty list.
       
    81      * @param aOutParamList Output parameters, can be an empty list.
       
    82      * @param aCmdOptions Options for the command, see KAiwOpt* in 
       
    83      *        AiwCommon.hrh.
       
    84      * @param aCallback Callback for asynchronous command handling, 
       
    85      *        parameter checking, etc.
       
    86      * @leave KErrArgument Callback is missing when required.
       
    87      * @leave KErrNotSupported No provider supports service.
       
    88      */
       
    89      virtual void HandleServiceCmdL(
       
    90          const TInt& aCmdId,
       
    91          const CAiwGenericParamList& aInParamList,
       
    92          CAiwGenericParamList& aOutParamList,
       
    93          TUint aCmdOptions = 0,
       
    94          const MAiwNotifyCallback* aCallback = NULL) ;
       
    95     
       
    96 // from base class CAiwServiceIfMenu    
       
    97      
       
    98     /**
       
    99      * From CAiwServiceIfMenu.    
       
   100      * Provider should implement this method to initialise a menu pane by 
       
   101      * adding provider specific menu items. The AIW framework gives the 
       
   102      * parameters to beused in the addition process.
       
   103      *
       
   104      * @since S60 v5.0     
       
   105      * @param aMenuPane Menu pane handle.
       
   106      * @param aIndex The position of the item where to add menu items.
       
   107      * @param aCascadeId ID of cascade menu item.
       
   108      * @param aInParamList Input parameter list for provider's parameter
       
   109      *         checking.
       
   110      */
       
   111      virtual void InitializeMenuPaneL(
       
   112          CAiwMenuPane& aMenuPane,
       
   113          TInt aIndex,
       
   114          TInt aCascadeId,
       
   115          const CAiwGenericParamList& aInParamList);
       
   116 
       
   117     /**
       
   118      * From CAiwServiceIfMenu.    
       
   119      * Provider should implement this method to handle a menu command. 
       
   120      * Called by the Service Handler when a consumer calls ExecuteMenuCmdL().
       
   121      *
       
   122      * @since S60 v5.0     
       
   123      * @param aMenuCmdId Original provider specific ommand ID for the menu
       
   124      *              command.Defined in the provider's menu item resource.
       
   125      * @param aInParamList Input parameters, can be an empty list.
       
   126      * @param aOutParamList Output parameters, can be an empty list.
       
   127      * @param aCmdOptions Options for the command, see KAiwCmdOpt* in
       
   128      *         AiwCommon.hrh.
       
   129      * @param aCallback Callback if asynchronous command handling is wanted by
       
   130      *             consumer.The provider may or may not support this. A 
       
   131      *             provider should leave with KErrNotSupported, if not.
       
   132      * @leave KErrNotSupported Callback is not supported.
       
   133      */
       
   134      virtual void HandleMenuCmdL(
       
   135          TInt aMenuCmdId,
       
   136          const CAiwGenericParamList& aInParamList,
       
   137          CAiwGenericParamList& aOutParamList,
       
   138          TUint aCmdOptions = 0,
       
   139          const MAiwNotifyCallback* aCallback = NULL); 
       
   140         
       
   141 
       
   142 private:
       
   143 
       
   144     CBCTestDomAiwServiceIfMenu();
       
   145 
       
   146     void ConstructL();
       
   147 
       
   148     };
       
   149 
       
   150 #endif // C_CBCTESTDOMAIWSERVICEIFMENU_H