harvester/common/inc/harvesterpluginfactory.h
changeset 0 c53acadfccc6
child 3 6752808b2036
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/harvester/common/inc/harvesterpluginfactory.h	Mon Jan 18 20:34:07 2010 +0200
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __CHARVESTERPLUGINFACTORY_H__
+#define __CHARVESTERPLUGINFACTORY_H__
+
+#include <e32base.h>
+
+// FORWARD DECLARATION 
+class CHarvesterPluginInfo;
+class CHarvesterPlugin;
+class CHarvesterData;
+class CHarvesterBlacklist;
+
+NONSHARABLE_CLASS( CHarvesterPluginFactory ) : public CBase
+	{
+	public:
+
+		IMPORT_C static CHarvesterPluginFactory* NewL();
+		virtual ~CHarvesterPluginFactory();
+		
+		IMPORT_C void GetObjectDefL( CHarvesterData& aHD, TDes& aObjectDef );
+		IMPORT_C void GetMimeType(const TDesC& aUri, TDes& aMimeType);
+		IMPORT_C TInt HarvestL( CHarvesterData* aHD );
+		IMPORT_C RPointerArray<CHarvesterPluginInfo>& GetPluginInfos();
+		IMPORT_C void SetBlacklist( CHarvesterBlacklist& aBlacklist );
+		IMPORT_C TBool IsSupportedFileExtension( const TDesC& aFileName );
+		IMPORT_C TBool IsContainerFileL( const TDesC& aURI );
+
+	private:
+		CHarvesterPluginFactory();
+		void ConstructL();
+		void SetupHarvesterPluginInfoL();
+		void AddNewPluginL( const TDesC8& aType, const TDesC8& aOpaque, TUid aPluginUid );
+		void GetSupportedPluginsL( RPointerArray<CHarvesterPluginInfo>& aSupportedPlugins, const TDesC& aExt );
+		
+	private:
+		RPointerArray<CHarvesterPluginInfo> iHarvesterPluginInfoArray;
+		CHarvesterBlacklist* iBlacklist;
+	};
+
+#endif
+