homescreensrv_plat/sapi_actionhandler/actionhandlerservice/inc/actionhandlerinterface.h
changeset 93 82b66994846c
parent 92 782e3408c2ab
child 94 dbb8300717f7
equal deleted inserted replaced
92:782e3408c2ab 93:82b66994846c
     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 
       
    19 #ifndef C_ACTIONHANDLERINTERFACE_H
       
    20 #define C_ACTIONHANDLERINTERFACE_H
       
    21 
       
    22 #include <liwcommon.h>
       
    23 
       
    24 class CPluginValidator;
       
    25 class CLiwMap;
       
    26 
       
    27 /**
       
    28  *  Class implements Action Handler Service Interface
       
    29  *
       
    30  *  Action Handler itself is a component which enables
       
    31  *  to execute different kind of actions.
       
    32  *
       
    33  *  @since S60 v3.2
       
    34  */
       
    35 class CActionHandlerInterface : public CBase, public MLiwInterface
       
    36     {
       
    37 public:
       
    38 
       
    39     static CActionHandlerInterface* NewL();
       
    40 
       
    41     static CActionHandlerInterface* NewLC();
       
    42 
       
    43     ~CActionHandlerInterface();
       
    44 
       
    45     // from base class MLiwInterface
       
    46 
       
    47     /**
       
    48      * The consumer application should call this method to execute a service 
       
    49      * command directly on the interface. 
       
    50      *
       
    51      * @param aCmdName the name of the service command to invoke
       
    52      * @param aInParamList the input parameter list, can be empty list
       
    53      * @param [in,out] aOutParamList the output parameter list, can be empty.
       
    54      * @param aCmdOptions Options for the command
       
    55      * @param aCallback callback to be registered by consumer application
       
    56      *
       
    57      */
       
    58     void ExecuteCmdL( const TDesC8& aCmdName,
       
    59         const CLiwGenericParamList& aInParamList,
       
    60         CLiwGenericParamList& aOutParamList, TUint aCmdOptions,
       
    61         MLiwNotifyCallback* aCallback );
       
    62 
       
    63     /**
       
    64      * The consumer application should call this method if there 
       
    65      * are no more service commands to be executed on the interface.
       
    66      *
       
    67      */
       
    68     virtual void Close();
       
    69 
       
    70 private:
       
    71 
       
    72     CActionHandlerInterface();
       
    73 
       
    74     void ConstructL();
       
    75 
       
    76     /**
       
    77      * Get uid of the required plugin from aInParamList
       
    78      *
       
    79      * @since S60 v3.2
       
    80      * @param aInParamList param received from service client
       
    81      * @param aUid source for the extracted uid of the plugin
       
    82      * @return errCode
       
    83      */
       
    84     TInt ExtractUid( const CLiwGenericParamList& aInParamList, TUid& aUid );
       
    85 
       
    86     /**
       
    87      * Get map from aInParamList
       
    88      *
       
    89      * @since S60 v3.2
       
    90      * @param aInParamList param received from service client
       
    91      * @param aMap source for the exctracted map
       
    92      * @return errCode
       
    93      */
       
    94     TInt ExtractMap( const CLiwGenericParamList& aInParamList, CLiwMap* aMap );
       
    95 
       
    96     TInt32 ErrCodeConversion( TInt code );
       
    97 
       
    98     void ExecuteActionL( const TUid aUid, const CLiwMap* aMap );
       
    99 
       
   100 private:
       
   101     
       
   102     // data
       
   103     CPluginValidator* iPluginManager;
       
   104 
       
   105     };
       
   106 
       
   107 #endif // C_ACTIONHANDLERINTERFACE_H