imageeditor/ImageEditorManager/inc/ImageEditorPluginLocator.h
changeset 1 edfc90759b9f
equal deleted inserted replaced
0:57d4cdd99204 1:edfc90759b9f
       
     1 /*
       
     2 * Copyright (c) 2010 Ixonos Plc.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "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 * Ixonos Plc
       
    14 *
       
    15 * Description:  
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef IMAGEEDITORPLUGINLOCATOR_H
       
    22 #define IMAGEEDITORPLUGINLOCATOR_H
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32base.h>
       
    26 #include <fbs.h>
       
    27 
       
    28 #include "imageeditordebugutils.h"
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CPluginScanner;
       
    32 class CPluginStorage;
       
    33 class CPluginInfo;
       
    34 
       
    35 /*  CLASS: CPluginLocator
       
    36 *
       
    37 *	CPluginLocator represents plugin locator API for Image Editor software.
       
    38 *	It implements a facade design pattern to accommodate pluginlocator and
       
    39 *	pluginstorage classes and their functionality under the same API. Also,
       
    40 *	the facade further disconnects the implementation of the plug-in locating
       
    41 *	part and the application itself
       
    42 *
       
    43 */ 
       
    44 class CPluginLocator :	public CBase
       
    45 {
       
    46 
       
    47 public:
       
    48 
       
    49 /** @name Methods:*/
       
    50 //@{
       
    51 
       
    52 	/** NewL factory method, pops cleanupstack
       
    53 	*
       
    54 	*	@param -
       
    55 	*	@return pointer to created CPluginLocator object
       
    56 	*/
       
    57 	IMPORT_C static CPluginLocator * NewL ();
       
    58 
       
    59 	/** Destructor
       
    60 	*
       
    61 	*	@param -
       
    62 	*	@return -
       
    63 	*/
       
    64 	IMPORT_C virtual ~CPluginLocator ();
       
    65 
       
    66 
       
    67 	/*	
       
    68 	*
       
    69 	*	GENERAL PLUG-IN MANAGEMENT METHODS
       
    70 	*
       
    71 	*/
       
    72 
       
    73 
       
    74 	/** ScanPlugins
       
    75 	*
       
    76 	*	Scans all available plug-ins
       
    77 	*
       
    78 	*	@return -
       
    79 	*/
       
    80 	IMPORT_C void ScanPluginsL ();
       
    81 
       
    82 	/** CountPlugins
       
    83 	*
       
    84 	*	Counts the number of found plug-ins.
       
    85 	*
       
    86 	*	@param -
       
    87 	*	@return TInt - count of plug-ins
       
    88 	*/
       
    89     IMPORT_C TInt CountPlugins() const;
       
    90 
       
    91 
       
    92     /*	
       
    93 	*
       
    94 	*	PLUGIN QUERY METHODS 
       
    95 	*
       
    96 	*/
       
    97 
       
    98 
       
    99     /** GetPluginInfo
       
   100 	*
       
   101 	*	Returns a pointer to plug-in info object. 
       
   102 	*
       
   103 	*	@param aID - plug-in run-time ID [0, CountPlugins - 1]
       
   104 	*	@return - plug-in DLL file name
       
   105 	*/
       
   106 	IMPORT_C CPluginInfo * GetPluginInfo (const TInt aID);
       
   107 
       
   108 //@}
       
   109 
       
   110 protected:
       
   111 
       
   112 /** @name Methods:*/
       
   113 //@{
       
   114 
       
   115 //@}
       
   116 
       
   117 /** @name Members:*/
       
   118 //@{
       
   119 
       
   120 //@}
       
   121 
       
   122 private:
       
   123 
       
   124 /** @name Methods:*/
       
   125 //@{
       
   126 
       
   127 	/** Default constructor
       
   128 	*
       
   129 	*	@param -
       
   130 	*	@return -
       
   131 	*/
       
   132 	CPluginLocator ();
       
   133 
       
   134 	/** Second phase constructor, may leave
       
   135 	*
       
   136 	*	@param -
       
   137 	*	@return -
       
   138 	*/
       
   139 	void ConstructL ();
       
   140 
       
   141 	/** Copy constructor, disabled
       
   142 	*/
       
   143 	CPluginLocator (const CPluginLocator & rhs);
       
   144 
       
   145 	/** Assignment operator, disabled 
       
   146 	*/
       
   147 	CPluginLocator & operator= (const CPluginLocator & rhs);
       
   148 
       
   149 //@}
       
   150 
       
   151 /** @name Members:*/
       
   152 //@{
       
   153 
       
   154 	/// Plug-in locator 
       
   155 	CPluginScanner *	iScanner;
       
   156 
       
   157 	/// Plug-in storage
       
   158 	CPluginStorage *	iStorage;
       
   159 
       
   160 //@}
       
   161 
       
   162 };
       
   163 
       
   164 
       
   165 #endif