menufw/menufwui/mmextensions/mmextensionmanager/inc/mmextensionplugin.h
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     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: Menu Framework extension plugin
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_MM_EXTENSION_PLUGIN_H_
       
    20 #define C_MM_EXTENSION_PLUGIN_H_
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <ecom/ecom.h>
       
    24 #include "mmextensionplugindef.h"
       
    25 
       
    26 class CLiwGenericParamList;
       
    27 
       
    28 /**
       
    29  * CMMExtensionPlugin is a class representing ECom plugin.
       
    30  * Class has virtual function responsible for executing
       
    31  * command. It can also returns array of all implementations.
       
    32  * Class is deriving by all ECom plugin implementations.
       
    33  *
       
    34  * @since S60 5.0
       
    35  * @ingroup group_mmextensions
       
    36  */
       
    37 NONSHARABLE_CLASS( CMMExtensionPlugin ) : public CBase
       
    38 	{
       
    39 public:
       
    40  	/** 
       
    41  	* Instantiates an object of this type.
       
    42     * @param aUid ECom plugin's UID.
       
    43     * @param aParams The plugin's parameters.
       
    44     * @return Instance of the CMMExtensionPlugin class.
       
    45     */
       
    46  	static CMMExtensionPlugin* NewL( TUid aUid ,  TAny* aParams );
       
    47 
       
    48  	/**
       
    49  	 * Virtual C++ Destructor.
       
    50  	 */
       
    51     virtual ~CMMExtensionPlugin();
       
    52     
       
    53 	/** 
       
    54 	* Request a list of all available implementations which 
       
    55 	* satisfy this given interface.
       
    56     * @param aImplInfoArray ECom plugin implementations array.
       
    57     */
       
    58 	static void ListAllImplementationsL( RImplInfoPtrArray& aImplInfoArray );
       
    59 
       
    60     /**
       
    61      * Executes provided action.
       
    62      * @param aCommand Command which has to be executed on the plugin.
       
    63      *                 Request to the Service.
       
    64      * @param aEventParamList Pointer to a list of the event parameters. 
       
    65      *                        Its ownership is held in extension manager,
       
    66      *                        so if one wishes to use it in asynchronous operations
       
    67      *                        then he needs to keep a copy of the data.
       
    68      * @return Error code.
       
    69      */
       
    70     virtual TInt ExecuteActionL( 
       
    71         const TDesC& aCommand,
       
    72         CLiwGenericParamList* aEventParamList ) = 0;
       
    73 
       
    74 protected:
       
    75 	/**
       
    76 	 * Default constructor.
       
    77 	 */
       
    78 	inline CMMExtensionPlugin();
       
    79 
       
    80 private:
       
    81 	/**
       
    82 	 * Unique instance identifier key.
       
    83 	 */
       
    84 	TUid iDtor_ID_Key;
       
    85 	};
       
    86 	
       
    87 #include "mmextensionplugin.inl"
       
    88 
       
    89 #endif /* C_MMEXTENSIONPLUGIN_H_ */
       
    90 
       
    91 // End of file