idlefw/plugins/mcsplugin/handler/inc/mcspluginhandler.h
changeset 0 79c6a41cd166
child 8 d0529222e3f0
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 2009 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 __MCSPLUGINHANDLER_H__
       
    19 #define __MCSPLUGINHANDLER_H__
       
    20 
       
    21 #include <mcsmenuhandlerplugin.h>
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <viewcli.h> // For CVwsSessionWrapper
       
    25 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    26 #include <viewclipartner.h>
       
    27 #endif
       
    28 
       
    29 #include <vwsdef.h>  // For TVwsViewId
       
    30 
       
    31 
       
    32 class CEikonEnv;
       
    33 class CVwsSessionWrapper;
       
    34 
       
    35 /**
       
    36  *  @ingroup group_mcsplugin
       
    37  *
       
    38 * Handler for menu items of type "menu:shortcut" "menu:folder" and "menu:suite".
       
    39  *
       
    40  *  @since S60 9.1
       
    41 */
       
    42 NONSHARABLE_CLASS( CMCSPluginHandler ): public CMenuHandlerPlugin
       
    43     {
       
    44 
       
    45 public:     // construction
       
    46 
       
    47     /**
       
    48     * Destructor.
       
    49     */
       
    50     virtual ~CMCSPluginHandler();
       
    51 
       
    52     /**
       
    53     * Two-phased constructor. Leaves on failure.
       
    54     * @param aMenu Menu.
       
    55     * @return The constructed object.
       
    56     */
       
    57     static CMCSPluginHandler* NewL( RMenu &aMenu );
       
    58 
       
    59 protected:  // construction
       
    60 
       
    61     /**
       
    62     * Constructor.
       
    63     * @param aMenu Menu.
       
    64     */
       
    65     CMCSPluginHandler( RMenu &aMenu );
       
    66 
       
    67     /**
       
    68     * Second-phase constructor.
       
    69     */
       
    70     void ConstructL();
       
    71 
       
    72 public:     // from CMenuHandler
       
    73 
       
    74     /**
       
    75     * Query support for item type.
       
    76     * @param aType Type.
       
    77     * @return ETrue if handler supports this type, EFalse otherwise.
       
    78     */
       
    79     TBool SupportsType( const TDesC& aType );
       
    80 
       
    81     /**
       
    82     * Handle command.
       
    83     * @param aItem Item of supported type.
       
    84     * @param aCommand Command.
       
    85     * @param aParams. Command parameters.
       
    86     * @param aStatus Observer request status. When the operation completes,
       
    87     * this status will be completed with the resulting error code.
       
    88     * @return Asynchronous operation. Owned by the caller.
       
    89     */
       
    90     CMenuOperation* HandleCommandL(
       
    91         CMenuItem& aItem,
       
    92         const TDesC8& aCommand,
       
    93         const TDesC8& aParams,
       
    94         TRequestStatus& aStatus );
       
    95         
       
    96 private:    // internal
       
    97 
       
    98     void LaunchShortcutL( CMenuItem& aItem );
       
    99 
       
   100 private:    // data
       
   101     
       
   102     CEikonEnv* iEikEnv;
       
   103     
       
   104     /**
       
   105      * View server session wrapper.
       
   106      * Own
       
   107      */
       
   108     CVwsSessionWrapper* iVwsSession;
       
   109 
       
   110     };
       
   111 
       
   112 #endif // __MCSPLUGINHANDLER_H__