mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevdpextnmap.cpp
changeset 0 d0791faffa3f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevdpextnmap.cpp	Tue Feb 02 01:11:40 2010 +0200
@@ -0,0 +1,65 @@
+// Copyright (c) 2008-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:
+//
+
+/**
+ @file
+ @internalComponent
+*/
+
+#include "cmtpdevdpextnmap.h"
+
+CDevDpExtnPluginMap* CDevDpExtnPluginMap::NewL(MExtnDevPluginCallback& aDevdp, TUid aUid)
+	{
+	CDevDpExtnPluginMap* self = new (ELeave) CDevDpExtnPluginMap();
+	CleanupStack::PushL(self);
+	self->ConstructL(aDevdp, aUid);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+void CDevDpExtnPluginMap::ConstructL(MExtnDevPluginCallback& aDevdp, TUid aUid)
+	{
+	CMtpExtnDevicePropPlugin* extnPlugin = CMtpExtnDevicePropPlugin::NewL(aUid);
+	extnPlugin->SetCallback(aDevdp);
+	SetExtPlugin(extnPlugin);
+	}
+
+void CDevDpExtnPluginMap::SetExtPlugin(CMtpExtnDevicePropPlugin* aPlugin)
+	{
+	iPlugin = aPlugin;
+	}
+
+
+CMtpExtnDevicePropPlugin* CDevDpExtnPluginMap::ExtPlugin()
+	{
+	return iPlugin;
+	}
+ 	
+CDevDpExtnPluginMap::~CDevDpExtnPluginMap()
+	{
+	iSupportedOpCodes.Close();
+
+	if(NULL != iPlugin)
+		{
+		delete iPlugin;
+		iPlugin = NULL;
+		}
+	} 	
+ 	
+RArray<TUint>* CDevDpExtnPluginMap::SupportedOpCodes()
+	{
+	return &iSupportedOpCodes;
+	}
+