// webpifac.h
//
// Copyright (c) 1997-1999 Symbian Ltd.  All rights reserved.
//

// Definition of MWebPlugInFactory
//
//
//-----------------------------------------------------------------------------
// $Modtime:   24 Mar 1999 13:48:00  $  $Revision:   1.20  $  $Author:   davidh  $
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------

#if !defined(__WEBPIFAC_H__)
#define __WEBPIFAC_H__

//System includes

//Local includes
#if !defined(__WEBPIUTL_H__)
#include "webpiutl.h"	//For utility classes
#endif

//Forward declarations

//-----------------------------------------------------------------------------

/* Class MWebPlugInFactory
Interface defining all the functions the Plug In Registry
must implement in order to MANAGE the loading and
unloading of Plug Ins which are registered on the system.   */
class MWebPlugInFactory
	{
public:
	enum TWebPlugInFactoryError
		{
		EPlugInFactoryOK = 0,
		EPlugInNotEnabled,		//Plug in is not enabled, so can't beinstantiated
		EPlugInNotFound,		//Plug in was not found
		EPlugInWrongType		//A plug in of the wrong type was requested (eg asked for a UI PI via the Engine PI retrieval fn)
		};

	virtual MWebPlugIn* RetrievePlugInL(
		TInt aPIID, TWebPlugInFactoryError& aErrorCode,
		TInt aFrameID, MWebPlugIn* aContainer, CWebModel* aModel) =0;
	virtual TBool DestroyPlugIn (MWebPlugIn*& aPlugIn) =0;
	virtual MWebUIPlugIn* RetrieveUiPlugInL (
		TInt aPIID, TWebPlugInFactoryError& aErrorCode,
		CWebModel* aModel)=0;
	virtual TBool DestroyUiPlugIn (MWebUIPlugIn*& aPlugIn)=0;
	virtual TInt PtrToID(TAny* aPIPtr) =0;
	virtual TInt StoreLC(TInt aPIID, CDictionaryStore*& aStore) =0;
	virtual TInt StoreLC(MWebPlugIn* aPtr, CDictionaryStore*& aStore) =0;
	virtual TInt StoreLC(MWebUIPlugIn* aPtr, CDictionaryStore*& aStore) =0;

	IMPORT_C virtual void MWebPlugInFactory_Reserved1();
	IMPORT_C virtual void MWebPlugInFactory_Reserved2();

private:

	};

//-----------------------------------------------------------------------------




#endif  // !defined(__WEBPIFAC_H__)