menufw/menufwui/mmextensions/mmextensionmanager/inc/mmextensionmanager.h
branchv5backport
changeset 14 1abc632eb502
parent 13 6205fd287e8a
child 20 636d517f67e6
equal deleted inserted replaced
13:6205fd287e8a 14:1abc632eb502
     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 Framewrok extension manager
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_MM_EXTENSION_MANAGER_H
       
    20 #define C_MM_EXTENSION_MANAGER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include "mmecomobserver.h"
       
    24 #include <e32std.h>
       
    25 #include <e32base.h>
       
    26 #include <e32hashtab.h>
       
    27 
       
    28 class CMMExtensionPlugin;
       
    29 class CLiwGenericParamList;
       
    30 class MMmActionRequest;
       
    31 
       
    32 /**
       
    33  * CMMExtensionManager is a class derived from MHNEcomInstallNotifierCallback.
       
    34  * It is responsible for loading, keeping and managing all ECom plugin
       
    35  * implementations. Additionaly, CMMExtensionManager receives command from UI
       
    36  * and decides which plugin have to handle the event.
       
    37  *
       
    38  * @since S60 5.0
       
    39  * @ingroup group_mmextensions
       
    40  */
       
    41 NONSHARABLE_CLASS( CMMExtensionManager ):
       
    42     public CBase,
       
    43     public MHNEcomInstallNotifierCallback
       
    44 	{
       
    45 public: // Constructors and destructor
       
    46 
       
    47 	/**
       
    48 	 * Standard C++ Destructor.
       
    49 	 */
       
    50 	~CMMExtensionManager();
       
    51 
       
    52 	/**
       
    53 	 * Two-phased constructor.
       
    54      * @return Instance of the CMMExtensionManager class.
       
    55      * @param aActionRequest Interface enabling to issues request to App UI.
       
    56 	 */
       
    57 	IMPORT_C static CMMExtensionManager* NewL( MMmActionRequest& aActionRequest );
       
    58 
       
    59 	/**
       
    60 	 * Two-phased constructor.
       
    61      * @return Instance of the CMMExtensionManager class.
       
    62      * @param aActionRequest Interface enabling to issues request to App UI.
       
    63 	 */
       
    64 	static CMMExtensionManager* NewLC( MMmActionRequest& aActionRequest );
       
    65 	
       
    66 public:
       
    67 
       
    68 	/** Pure interface method.
       
    69 	* Representative of a method provided on the interface by 
       
    70 	* the interface definer.
       
    71 	* @param aUid UID of the ECom plugin's.
       
    72 	* @param aCommand Command which has to be executed on the plugin.
       
    73 	*                 Request to the Service.
       
    74 	* @param aEventParamList List of the event parameters needed to
       
    75 	*                        execute action. Extention Manager is its owner.
       
    76 	* @return Number representing error code.
       
    77 	*/
       
    78 	virtual TInt ExecuteActionL( 
       
    79 		const TUid aUid,
       
    80         const TDesC& aCommand,
       
    81         CLiwGenericParamList* aEventParamList );
       
    82 	
       
    83 	/**
       
    84 	 * Refreshes list of MultimediaMenu plugins implementations.
       
    85 	 */
       
    86 	void EcomChangedL();
       
    87 
       
    88 private:
       
    89 
       
    90 	/**
       
    91 	 * Constructor for performing 1st stage construction.
       
    92 	 * @param aActionRequest Interface enabling to issues request to App UI.
       
    93 	 */
       
    94 	CMMExtensionManager( MMmActionRequest& aActionRequest );
       
    95 	
       
    96 	/**
       
    97 	 * EPOC default constructor for performing 2nd stage construction.
       
    98 	 *
       
    99 	 */
       
   100 	void ConstructL();
       
   101 	
       
   102 	/**
       
   103 	 * Loads MultimediaMenu plugins implementations.
       
   104 	 */
       
   105 	void LoadPluginsL( );
       
   106 	
       
   107 	/**
       
   108 	 * Gets ECom plugin implementation.
       
   109 	 * @param aUid Id of the ECom plugin.
       
   110 	 * @return ECom extension plugin.
       
   111 	 */
       
   112 	CMMExtensionPlugin* GetImplementationL( const TUid aUid );
       
   113 	
       
   114 private:
       
   115 	
       
   116 	/**
       
   117 	 * Pointer to plugin map.
       
   118 	 * Own.
       
   119 	 */
       
   120 	RHashMap< TInt32, CMMExtensionPlugin*> iPluginMap;
       
   121 	
       
   122     /**
       
   123 	 * Not Own.
       
   124 	 * Reference to the App UI.
       
   125 	 */	
       
   126 	MMmActionRequest& iActionRequest;
       
   127 	
       
   128 	/**
       
   129 	 * Pointer to ECom observer.
       
   130 	 * Own.
       
   131 	 */
       
   132     CMMEcomObserver *iEcomObserver;
       
   133 };
       
   134 
       
   135 #endif // C_MM_EXTENSION_MANAGER_H
       
   136 
       
   137 // End of file