Add web camera plug-ins and test camera application. RCL_3
authorMasaki Hosaka <hosaka@isb.co.jp>
Thu, 25 Mar 2010 11:21:36 +0900
branchRCL_3
changeset 9 9ae0fe04e757
parent 8 bc06d8566074
child 35 ca251dbe8e03
child 64 92a82bc706f7
Add web camera plug-ins and test camera application.
mmplugins/cameraplugins/group/BLD.INF
mmplugins/cameraplugins/inc/ecam_webcameraplugin.iby
mmplugins/cameraplugins/mmpfiles/ecamwebcameraplugin.mmp
mmplugins/cameraplugins/source/webcamera/01000001.rss
mmplugins/cameraplugins/source/webcamera/ecamwebcameraactive.cpp
mmplugins/cameraplugins/source/webcamera/ecamwebcameraactive.h
mmplugins/cameraplugins/source/webcamera/ecamwebcameraadvset.cpp
mmplugins/cameraplugins/source/webcamera/ecamwebcameraadvset.h
mmplugins/cameraplugins/source/webcamera/ecamwebcamerabuffer.cpp
mmplugins/cameraplugins/source/webcamera/ecamwebcamerabuffer.h
mmplugins/cameraplugins/source/webcamera/ecamwebcameraplugin.cpp
mmplugins/cameraplugins/source/webcamera/ecamwebcameraplugin.h
mmplugins/cameraplugins/source/webcamera/ecamwebcamerapluginuids.hrh
mmplugins/cameraplugins/source/webcamera/ecamwebcameravfactive.cpp
mmplugins/cameraplugins/source/webcamera/ecamwebcameravfactive.h
mmplugins/cameraplugins/testapp/testcameraapps60/group/BLD.INF
mmplugins/cameraplugins/testapp/testcameraapps60/group/TestCameraApp.iby
mmplugins/cameraplugins/testapp/testcameraapps60/group/TestCameraAppS60.mmp
mmplugins/cameraplugins/testapp/testcameraapps60/inc/TestCameraApp.h
mmplugins/cameraplugins/testapp/testcameraapps60/inc/TestCameraApp.hrh
mmplugins/cameraplugins/testapp/testcameraapps60/src/AIF.RSS
mmplugins/cameraplugins/testapp/testcameraapps60/src/AP24.BMP
mmplugins/cameraplugins/testapp/testcameraapps60/src/AP24M.BMP
mmplugins/cameraplugins/testapp/testcameraapps60/src/AP32.BMP
mmplugins/cameraplugins/testapp/testcameraapps60/src/AP32M.BMP
mmplugins/cameraplugins/testapp/testcameraapps60/src/AP48.BMP
mmplugins/cameraplugins/testapp/testcameraapps60/src/AP48M.BMP
mmplugins/cameraplugins/testapp/testcameraapps60/src/TestCameraApp.cpp
mmplugins/cameraplugins/testapp/testcameraapps60/src/TestCameraApp.rss
mmplugins/cameraplugins/testapp/testcameraapps60/src/TestCameraApp_loc.RSS
mmplugins/cameraplugins/testapp/testcameraapps60/src/TestCameraApp_reg.rss
mmplugins/cameraplugins/testapp/testcameraapps60/src/test.bmp
mmplugins/cameraplugins/testapp/testcameraapps60/src/test1.bmp
--- a/mmplugins/cameraplugins/group/BLD.INF	Mon Mar 15 12:46:07 2010 +0200
+++ b/mmplugins/cameraplugins/group/BLD.INF	Thu Mar 25 11:21:36 2010 +0900
@@ -27,9 +27,11 @@
 PRJ_EXPORTS
 // ROM  buildsupport
 ../inc/ecam_stubplugin.iby  /epoc32/rom/include/ecam_stubplugin.iby
+../inc/ecam_webcameraplugin.iby  /epoc32/rom/include/ecam_webcameraplugin.iby
 
 PRJ_MMPFILES
 ../mmpfiles/ECamStubPlugin.mmp
+../mmpfiles/ecamwebcameraplugin.mmp
 
 PRJ_TESTMMPFILES
 ../mmpfiles/TestCamera.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/inc/ecam_webcameraplugin.iby	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,23 @@
+/*
+* Copyright (c) 2010 ISB.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* ISB - Initial contribution
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef ECAM_WEBCAMERA_IBY
+#define ECAM_WEBCAMERA_IBY
+
+ECOM_PLUGIN(ecamwebcameraplugin.dll,01000001.rss)
+
+#endif // ECAM_TEST_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/mmpfiles/ecamwebcameraplugin.mmp	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2010 ISB.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* ISB - Initial contribution
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+/**
+ @file
+*/
+
+#include "../source/webcamera/ecamwebcamerapluginuids.hrh"
+
+TARGET 		ecamwebcameraplugin.dll
+TARGETTYPE 	PLUGIN
+CAPABILITY	ALL -TCB
+
+// MAGIC Dll recognition UID followed by the unique UID for this dll
+UID 		0x10009D8D KUidOnboardWebCameraDll
+VENDORID	0x70000001
+
+SOURCEPATH	../source/webcamera
+SOURCE		ecamwebcameraplugin.cpp 
+SOURCE		ecamwebcameraadvset.cpp
+SOURCE		ecamwebcameraactive.cpp
+SOURCE		ecamwebcameravfactive.cpp
+SOURCE		ecamwebcamerabuffer.cpp
+
+USERINCLUDE		../source/webcamera
+SYSTEMINCLUDE 	/epoc32/include
+SYSTEMINCLUDE 	/epoc32/include/platform
+SYSTEMINCLUDE 	/epoc32/include/syborg
+
+START RESOURCE 	01000001.rss
+TARGET	ecamwebcameraplugin.rsc
+END
+
+LIBRARY		euser.lib
+LIBRARY		ecampluginsupport.lib
+LIBRARY		ecam.lib
+LIBRARY		fbscli.lib
+LIBRARY		efsrv.lib 
+LIBRARY		ws32.lib
+LIBRARY		bitgdi.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/source/webcamera/01000001.rss	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2010 ISB.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* ISB - Initial contribution
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <ecom/registryinfo.rh>
+#include <ecamuids.hrh>
+#include "ecamwebcamerapluginuids.hrh"
+
+RESOURCE REGISTRY_INFO theInfo
+	{
+	dll_uid = KUidOnboardWebCameraDll;
+	interfaces = 
+		{
+		INTERFACE_INFO
+			{
+			interface_uid = KUidOnboardCameraPlugin;
+			implementations = 
+				{
+				IMPLEMENTATION_INFO
+					{
+					implementation_uid = KUidOnboardWebCameraPlugin;
+					version_no = 4;
+					display_name = "ECam WebCamera Plugin";
+					opaque_data = "0;";
+					default_data="*";
+					}
+				};
+			},
+		INTERFACE_INFO
+			{
+			interface_uid = KUidOnboardCameraInfoPlugin;
+			implementations = 
+				{
+				IMPLEMENTATION_INFO
+					{
+					implementation_uid = KUidOnboardWebCameraInfo;
+					version_no = 4;
+					display_name = "ECam WebCamera InfoPlugin";
+					opaque_data = "0;";
+					default_data="*";
+					}
+				};
+			}
+		};
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/source/webcamera/ecamwebcameraactive.cpp	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,140 @@
+/*
+* Copyright (c) 2010 ISB.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* ISB - Initial contribution
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "ecamwebcameraactive.h"
+
+
+//
+// CWebCameraActive
+//
+CWebCameraActive* CWebCameraActive::NewL(MWebCameraActiveCallBack* aOwner, RWebcameraDevice& aDriver)
+	{
+	CWebCameraActive* self = new(ELeave) CWebCameraActive(aOwner, aDriver);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+
+	return self;
+	}
+
+CWebCameraActive::CWebCameraActive(MWebCameraActiveCallBack* aOwner, RWebcameraDevice& aDriver)
+				 :CActive(CActive::EPriorityStandard),
+				  iOwner(aOwner),
+				  iDriver(aDriver)
+	{
+	CActiveScheduler::Add(this);
+	}
+
+CWebCameraActive::~CWebCameraActive()
+	{
+	}
+
+/**
+* RunL.
+*/
+void CWebCameraActive::RunL()
+	{
+	TInt wError = iStatus.Int();
+
+	switch(iOperation)
+		{
+	case ECamActiveReserve:
+		iOwner->ReserveCallBack(wError);
+		break;
+
+	case ECamActivePowerOn:
+		iOwner->PowerOnCallBack(wError);
+		break;
+
+	case ECamActiveImageCapture:
+		iOwner->ImageCaptureCallBackL(wError);
+		break;
+		}
+	iOperation = ECamActiveIdle;
+	}
+
+void CWebCameraActive::DoCancel()
+	{
+	}
+
+void CWebCameraActive::ConstructL()
+	{
+	}
+
+/** 
+Asynchronous function that performs any required initialisation and reserves
+the camera for exclusive use.
+
+Calls CWebCamera::ReserveCallBack when complete. 
+*/
+void CWebCameraActive::Reserve()
+	{
+	iOperation = ECamActiveReserve;
+
+	//Because there is not a camera device, I do not handle it
+	TRequestStatus* status = &iStatus;
+	User::RequestComplete(status, KErrNone);
+	SetActive();
+	}
+
+/** 
+Asynchronous method to switch on camera power.
+
+User must have successfully called Reserve() prior to calling this function.
+
+Calls CWebCamera::PowerOnCallBack when power on is complete. 
+*/
+void CWebCameraActive::PowerOn()
+	{
+	iOperation = ECamActivePowerOn;
+
+	//Because there is not a camera device, I do not handle it	
+	TRequestStatus* status = &iStatus;
+	User::RequestComplete(status, KErrNone);
+	SetActive();
+	}
+
+/** 
+Cancels the asynchronous still image capture. 
+	
+Calls CWebCamera::ImageCaptureCallBackL when capture is complete. 
+	
+* @param aDes descriptor to store a capture image
+*/
+void CWebCameraActive::ImageCapture(TDes8& aDes)
+	{
+	iOperation = ECamActiveImageCapture;
+
+	// start capture image
+	// The division transfer is going to support in the next version. 
+	iDriver.Capture(iStatus, aDes);
+	SetActive();
+	}
+
+/** 
+Cancels the asynchronous still image capture. 
+	
+@see CWebCamera::CancelCaptureImage
+*/
+void CWebCameraActive::CancelCaptureImage()
+	{
+	iOperation = ECamActiveIdle;
+
+	iDriver.CaptureCancel();
+	SetActive();
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/source/webcamera/ecamwebcameraactive.h	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2010 ISB.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* ISB - Initial contribution
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef ECAMWEBCAMERAACTIVE_H
+#define ECAMWEBCAMERAACTIVE_H
+
+#include "ecamwebcameraplugin.h"
+
+/**
+ *  Perform an Async demand of the camera application
+ */
+class CWebCameraActive : public CActive
+	{
+private:
+	
+	/**
+    Active Operation of ECamWebCamera
+    */
+	enum TECamWebCameraActiveOperation
+		{
+		ECamActiveIdle = 0,
+		ECamActiveReserve,
+		ECamActivePowerOn,
+		ECamActiveImageCapture,
+		};
+
+public:
+    /** Constructor */
+    /**
+     * @param aOwner 
+     		  pointer to callback object.
+     * @param aDriver 
+     		  reference to driver.
+     */
+    CWebCameraActive(MWebCameraActiveCallBack* aOwner, RWebcameraDevice& aDriver);
+	
+	/**> Destructor */
+	~CWebCameraActive();
+	
+    /**
+     * Two-phased constructor.
+     * @param aOwner 
+     		  pointer to callback object.
+     * @param aDriver 
+     		  reference to driver.
+     */
+	static CWebCameraActive* NewL(MWebCameraActiveCallBack* aOwner, RWebcameraDevice& aDriver);
+
+	/** 
+	Asynchronous function that performs any required initialisation and reserves
+	the camera for exclusive use.
+
+	Calls CWebCamera::ReserveCallBack when complete. 
+	*/
+	void Reserve();
+
+	/** 
+	Asynchronous method to switch on camera power.
+
+	User must have successfully called Reserve() prior to calling this function.
+
+	Calls CWebCamera::PowerOnCallBack when power on is complete. 
+	*/
+	void PowerOn();
+	
+	/** 
+	Cancels the asynchronous still image capture. 
+	
+	Calls CWebCamera::ImageCaptureCallBack when capture is complete. 
+	
+	* @param aDes descriptor to store a capture image
+	*/
+	void ImageCapture(TDes8& aDes);
+	
+	/** 
+	Cancels the asynchronous still image capture. 
+	
+	@see CWebCamera::CancelCaptureImage
+	*/
+	void CancelCaptureImage();
+
+private:
+	void ConstructL();
+
+private:
+    /**
+     * RunL.
+     */
+	void RunL();
+	void DoCancel();
+	void ViewFinderComplete(TInt aError);
+
+private:
+
+	MWebCameraActiveCallBack*		iOwner;		// origin of start.
+	TECamWebCameraActiveOperation	iOperation;	// Status of the Active Operation of ECamWebCamera
+	RWebcameraDevice				iDriver;	// Camera driver
+	};
+
+
+#endif // ECAMWEBCAMERAPLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/source/webcamera/ecamwebcameraadvset.cpp	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,799 @@
+/*
+* Copyright (c) 2010 ISB.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* ISB - Initial contribution
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <w32std.h>
+#include <ecamerrors.h>
+#include "ecamwebcameraadvset.h"
+
+
+CWebCameraAdvSet::CWebCameraAdvSet(CWebCamera& aOwner)
+			   :iOwner(aOwner)
+	{
+	}
+	
+CWebCameraAdvSet::~CWebCameraAdvSet()
+	{
+	iSupportedISORates.Close();
+	}
+
+CWebCameraAdvSet* CWebCameraAdvSet::NewL(CWebCamera& aOwner)
+	{
+	CWebCameraAdvSet* self = new(ELeave) CWebCameraAdvSet(aOwner);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+
+	return self;
+	}
+
+void CWebCameraAdvSet::Release()
+	{
+	}
+	
+void CWebCameraAdvSet::Init()
+	{
+	}
+	
+void CWebCameraAdvSet::ConstructL()
+	{
+	iSupportedISORates.Reset();
+	iSupportedISORates.AppendL(KDefaultIsoRate);
+	}
+
+CCamera::CCameraAdvancedSettings::TCameraType CWebCameraAdvSet::CameraType() const
+	{
+	return CCamera::CCameraAdvancedSettings::ECameraPluggable;
+	}
+
+CCamera::CCameraAdvancedSettings::TCameraType CWebCameraAdvSet::CameraType(TInt /*aCameraIndex*/) const
+	{
+	return CCamera::CCameraAdvancedSettings::ECameraUnknown;
+	}
+	
+TBool CWebCameraAdvSet::IsCameraPresent() const
+	{
+	return EFalse;
+	}
+
+TBool CWebCameraAdvSet::IsCameraPresent(TInt /*aCameraIndex*/) const
+	{
+	return EFalse;
+	}
+	
+TInt CWebCameraAdvSet::CameraIndex() const
+	{
+	return KErrNotSupported;
+	}
+	
+TInt CWebCameraAdvSet::SupportedStabilizationModes() const
+	{
+	return 0;
+	}
+	
+CCamera::CCameraAdvancedSettings::TStabilizationMode CWebCameraAdvSet::StabilizationMode() const
+	{
+	return CCamera::CCameraAdvancedSettings::EStabilizationModeOff;
+	}
+	
+void CWebCameraAdvSet::SetStabilizationMode(CCamera::CCameraAdvancedSettings::TStabilizationMode /*aStabilizationMode*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::SupportedFocusModes() const
+	{
+	return KErrNotSupported;
+	}
+	
+CCamera::CCameraAdvancedSettings::TFocusMode CWebCameraAdvSet::FocusMode() const
+	{
+	return CCamera::CCameraAdvancedSettings::EFocusModeAuto;
+	}
+	
+void CWebCameraAdvSet::SetFocusMode(CCamera::CCameraAdvancedSettings::TFocusMode /*aFocusMode*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::SupportedFocusRanges() const
+	{
+	return KErrNotSupported;
+	}
+	
+CCamera::CCameraAdvancedSettings::TFocusRange CWebCameraAdvSet::FocusRange() const
+	{
+	return CCamera::CCameraAdvancedSettings::EFocusRangeAuto;
+	}
+	
+void CWebCameraAdvSet::SetFocusRange(CCamera::CCameraAdvancedSettings::TFocusRange /*aFocusRange*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::SupportedAutoFocusTypes() const
+	{
+	return KErrNotSupported;
+	}
+	
+CCamera::CCameraAdvancedSettings::TAutoFocusType CWebCameraAdvSet::AutoFocusType() const
+	{
+    return CCamera::CCameraAdvancedSettings::EAutoFocusTypeOff;
+	}
+	
+void CWebCameraAdvSet::SetAutoFocusType(CCamera::CCameraAdvancedSettings::TAutoFocusType /*aAutoFocusType*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::SupportedAutoFocusAreas() const
+	{
+	return KErrNotSupported;
+	}
+	
+CCamera::CCameraAdvancedSettings::TAutoFocusArea CWebCameraAdvSet::AutoFocusArea() const
+	{
+	return CCamera::CCameraAdvancedSettings::EAutoFocusTypeAuto;
+	}
+	
+void CWebCameraAdvSet::SetAutoFocusArea(CCamera::CCameraAdvancedSettings::TAutoFocusArea /*aAutoFocusArea*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::FocusDistance() const
+	{
+	return KErrNotSupported;
+	}
+	
+void CWebCameraAdvSet::SetFocusDistance(TInt /*aDistance*/) 
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::GetMinFocalLength() const
+	{
+	return KErrNotSupported;
+	}
+	
+void CWebCameraAdvSet::GetSupportedIsoRatesL(RArray<TInt>& aSupportedIsoRates) const
+	{
+	if(iSupportedISORates.Count() == 0)
+		{
+		User::Leave(KErrNotSupported);
+		}
+	
+	for(TInt index=0; index < iSupportedISORates.Count(); index++)
+		{
+		aSupportedIsoRates.AppendL(iSupportedISORates[index]);
+		}
+	}
+	
+TInt CWebCameraAdvSet::IsoRate() const
+	{
+	return KDefaultIsoRate;
+	}
+
+void CWebCameraAdvSet::SetIsoRate(TInt /*aRate*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+
+void CWebCameraAdvSet::GetSupportedISORateTypeL(TInt& /*aSupportedISORateTypes*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+		
+void CWebCameraAdvSet::SetISORate(CCamera::CCameraAdvancedSettings::TISORateType /*aISORateType*/, TInt /*aParam*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+
+void CWebCameraAdvSet::GetISORateL(CCamera::CCameraAdvancedSettings::TISORateType& /*aISORateType*/, TInt& /*aParam*/, TInt& /*aISORate*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::GetAperturesL(RArray<TInt>& /*aFStops*/, TValueInfo& /*aInfo*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::Aperture() const
+	{
+	return KErrNotSupported;
+	}
+
+void CWebCameraAdvSet::SetAperture(TInt /*aFStop*/)
+	{	
+	User::Leave(KErrNotSupported);
+	}	
+	
+void CWebCameraAdvSet::GetShutterSpeedsL(RArray<TInt>& /*aShutterSpeeds*/, TValueInfo& /*aInfo*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::ShutterSpeed() const
+	{
+	return KErrNotSupported;
+	}
+	
+void CWebCameraAdvSet::SetShutterSpeed(TInt /*aShutterSpeed*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::SupportedMeteringModes() const
+	{
+	return KErrNotSupported;
+	}
+	
+CCamera::CCameraAdvancedSettings::TMeteringMode CWebCameraAdvSet::MeteringMode() const
+	{
+	return CCamera::CCameraAdvancedSettings::EMeteringModeAuto;
+	}
+	
+void CWebCameraAdvSet::SetMeteringMode(CCamera::CCameraAdvancedSettings::TMeteringMode /*aMeteringMode*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::SupportedDriveModes() const
+	{
+	return KErrNotSupported;
+	}
+	
+CCamera::CCameraAdvancedSettings::TDriveMode CWebCameraAdvSet::DriveMode() const
+	{
+	return CCamera::CCameraAdvancedSettings::EDriveModeAuto;
+	}
+	
+void CWebCameraAdvSet::SetDriveMode(CCamera::CCameraAdvancedSettings::TDriveMode /*aDriveMode*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::SupportedBracketModes() const
+	{
+	return KErrNotSupported;
+	}
+	
+CCamera::CCameraAdvancedSettings::TBracketMode CWebCameraAdvSet::BracketMode() const
+	{
+	return CCamera::CCameraAdvancedSettings::EBracketModeOff;
+	}
+	
+void CWebCameraAdvSet::SetBracketMode(CCamera::CCameraAdvancedSettings::TBracketMode /*aBracketMode*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::SupportedBracketParameters() const
+	{
+	return KErrNotSupported;
+	}
+	
+CCamera::CCameraAdvancedSettings::TBracketParameter CWebCameraAdvSet::BracketParameter() const
+	{
+	return CCamera::CCameraAdvancedSettings::EBracketParameterNone;
+	}
+	
+void CWebCameraAdvSet::SetBracketParameter(CCamera::CCameraAdvancedSettings::TBracketParameter /*aBracketParameter*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::SupportedBracketSteps() const
+	{
+	return KErrNotSupported;
+	}
+	
+CCamera::CCameraAdvancedSettings::TBracketStep CWebCameraAdvSet::BracketStep() const
+	{
+	return CCamera::CCameraAdvancedSettings::EBracketStepNonConfig;
+	}
+	
+void CWebCameraAdvSet::SetBracketStep(CCamera::CCameraAdvancedSettings::TBracketStep /*aBracketStep*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::GetBracketMerge(TInt& /*aStartIndex*/, TInt& /*aFrames*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::SetBracketMerge(TInt /*aStartIndex*/ , TInt /*aFrames*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::SupportedFlashModes() const
+	{
+	return KErrNotSupported;
+	}
+	
+CCamera::TFlash CWebCameraAdvSet::FlashMode() const
+	{
+	return CCamera::EFlashNone;
+	}
+	
+void CWebCameraAdvSet::SetFlashMode(CCamera::TFlash /*aMode*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TBool CWebCameraAdvSet::RedEyeReduceOn() const
+	{
+	return EFalse;
+	}
+	
+void CWebCameraAdvSet::SetRedEyeReduceOn(TBool /*aState*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::GetFlashCompensationStepsL(RArray<TInt>& /*aFlashCompensationSteps*/, TValueInfo& /*aInfo*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::FlashCompensationStep() const
+	{
+	return KErrNotSupported;
+	}
+
+TInt CWebCameraAdvSet::GetFlashCompensationStep(TInt& /*aFlashCompensationStep*/) const
+	{
+	return KErrNotSupported;
+	}
+	
+void CWebCameraAdvSet::GetFlashCompensationRangeInSteps(TInt& /*aNegativeCompensation*/, TInt& /*aPositiveCompensation*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::SetFlashCompensationStep(TInt /*aFlashCompensationStep*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::FlashCompensation() const
+	{
+	return KErrNotSupported;
+	}
+	
+TInt CWebCameraAdvSet::GetFlashCompensation(TInt& /*aFlashCompensation*/) const
+	{
+	return KErrNotSupported;
+	}
+	
+void CWebCameraAdvSet::SetFlashCompensation(TInt /*aFlashCompensation*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TBool CWebCameraAdvSet::IsExternalFlashPresent() const
+	{
+	return EFalse;
+	}
+	
+void CWebCameraAdvSet::GetManualFlashPowerLevelsL(RArray<TInt>& /*aManualFlashPowerLevels*/, TValueInfo& /*aInfo*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::ManualFlashPowerLevel() const
+	{
+	return KErrNotSupported;
+	}
+	
+void CWebCameraAdvSet::SetManualFlashPowerLevel(TInt /*aManualFlashPowerLevel*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::SupportedExposureModes() const
+	{
+	return CCamera::EExposureAuto;
+	}
+	
+CCamera::TExposure CWebCameraAdvSet::ExposureMode() const
+	{
+	return CCamera::EExposureAuto;
+	}
+
+void CWebCameraAdvSet::SetExposureMode(CCamera::TExposure /*aExposureMode*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+
+void CWebCameraAdvSet::GetExposureCompensationStepsL(RArray<TInt>& aExposureCompensationSteps, TValueInfo& aInfo) const
+	{
+	aExposureCompensationSteps.Reset();
+	aInfo = ENotActive;
+	}
+
+void CWebCameraAdvSet::GetExposureCompensationRangeInSteps(TInt& /*aNegativeCompensation*/, TInt& /*aPositiveCompensation*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::ExposureCompensationStep() const
+	{
+	return 0;
+	}
+	
+TInt CWebCameraAdvSet::GetExposureCompensationStep(TInt& /*aExposureCompensationStep*/) const
+	{
+	return KErrNotSupported;
+	}
+	
+void CWebCameraAdvSet::SetExposureCompensationStep(TInt /*aExposureCompensationStep*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::ExposureCompensation() const
+	{
+	return KErrNotSupported;
+	}
+	
+TInt CWebCameraAdvSet::GetExposureCompensation(TInt& /*aExposureCompensation*/) const
+	{
+	return KErrNotSupported;
+	}
+	
+void CWebCameraAdvSet::SetExposureCompensation(TInt /*aExposureCompensation*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::SupportedWhiteBalanceModes() const
+	{
+	return KErrNotSupported;
+	}
+	
+CCamera::TWhiteBalance CWebCameraAdvSet::WhiteBalanceMode() const
+	{
+	return CCamera::EWBAuto;
+	}
+	
+void CWebCameraAdvSet::SetWhiteBalanceMode(CCamera::TWhiteBalance /*aWhiteBalanceMode*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TBool CWebCameraAdvSet::ApertureExposureLockOn() const
+	{
+	return EFalse;
+	}
+	
+void CWebCameraAdvSet::SetApertureExposureLockOn(TBool /*aAELock*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TBool CWebCameraAdvSet::ShootClickOn() const
+	{
+	return EFalse;
+	}
+	
+void CWebCameraAdvSet::SetShootClickOn(TBool /*aShootClickOn*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::GetTimerIntervalsL(RArray<TInt>& /*aTimerIntervals*/, TValueInfo& /*aInfo*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+
+TInt CWebCameraAdvSet::TimerInterval() const
+	{
+	return KErrNotSupported;
+	}
+	
+void CWebCameraAdvSet::SetTimerInterval(TInt /*aTimerInterval*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::GetTimeLapsePeriodRange(TTime& /*aTimeLapseMin*/, TTime& /*aTimeLapseMax*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::GetTimeLapse(TTime& /*aStart*/, TTime& /*aEnd*/, TTime& /*aInterval*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::SetTimeLapse(const TTime& /*aStart*/, const TTime& /*aEnd*/, const TTime& /*aInterval*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+CCamera::CCameraAdvancedSettings::TPictureOrientation CWebCameraAdvSet::PictureOrientation() const
+	{
+	return CCamera::CCameraAdvancedSettings::EPictureOrientationUnknown;
+	}
+	
+void CWebCameraAdvSet::SetPictureOrientation(CCamera::CCameraAdvancedSettings::TPictureOrientation /*aOrientation*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::SupportedPixelAspectRatios() const
+	{
+	return KErrNotSupported;
+	}
+	
+CCamera::CCameraAdvancedSettings::TPixelAspectRatio CWebCameraAdvSet::PixelAspectRatio() const
+	{
+	return CCamera::CCameraAdvancedSettings::EPixelAspectUnknown;
+	}
+	
+void CWebCameraAdvSet::SetPixelAspectRatio(CCamera::CCameraAdvancedSettings::TPixelAspectRatio /*aPixelAspectRatio*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::SupportedYuvRanges() const
+	{
+	return KErrNotSupported;
+	}
+	
+CCamera::CCameraAdvancedSettings::TYuvRange CWebCameraAdvSet::YuvRange() const
+	{
+	return CCamera::CCameraAdvancedSettings::EYuvRangeUnknown;
+	}
+	
+void CWebCameraAdvSet::SetYuvRange(CCamera::CCameraAdvancedSettings::TYuvRange /*aYuvRange*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::BurstImages() const
+	{
+	return KErrNotSupported;
+	}
+	
+void CWebCameraAdvSet::SetBurstImages(TInt /*aImages*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::GetOpticalZoomStepsL(RArray<TInt>& /*aOpticalZoomSteps*/, TValueInfo& /*aInfo*/) const
+	{	
+	User::Leave(KErrNotSupported);
+	}
+	
+TInt CWebCameraAdvSet::OpticalZoom() const
+	{
+	return KECamFineResolutionFactor;
+	}
+	
+void CWebCameraAdvSet::SetOpticalZoom(TInt /*aOpticalZoom*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::GetDigitalZoomStepsL(RArray<TInt>& aDigitalZoomSteps, TValueInfo& aInfo) const
+	{
+	aDigitalZoomSteps.Reset();
+	aDigitalZoomSteps.AppendL(KECamFineResolutionFactor);
+	aInfo = EDiscreteSteps;
+	}
+	
+void CWebCameraAdvSet::GetDigitalZoomStepsForStillL(RArray<TInt>& aDigitalZoomSteps, TValueInfo& aInfo, TInt /*aSizeIndex*/, 
+								 CCamera::TFormat /*aFormat*/, TBool& /*aIsInfluencePossible*/) const
+	{
+	aDigitalZoomSteps.Reset();
+	aDigitalZoomSteps.AppendL(KECamFineResolutionFactor);
+	aInfo = EDiscreteSteps;
+	}
+
+void CWebCameraAdvSet::GetDigitalZoomStepsForVideoL(RArray<TInt>& aDigitalZoomSteps, TValueInfo& aInfo, TInt /*aFrameRateIndex*/,
+								 TInt /*aSizeIndex*/, CCamera::TFormat /*aFormat*/, TBool& /*aIsInfluencePossible*/, CCamera::TExposure /*aExposure*/) const
+	{
+	aDigitalZoomSteps.Reset();
+	aDigitalZoomSteps.AppendL(KECamFineResolutionFactor);
+	aInfo = EDiscreteSteps;
+	}
+
+TInt CWebCameraAdvSet::DigitalZoom() const
+	{
+	return KErrNotSupported;
+	}
+
+void CWebCameraAdvSet::SetDigitalZoom(TInt /*aDigitalZoom*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+TBool CWebCameraAdvSet::ExposureLockOn() const
+	{
+	return EFalse;
+	}
+
+void CWebCameraAdvSet::SetExposureLockOn(TBool /*aState*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+		
+TBool CWebCameraAdvSet::AutoFocusLockOn() const
+	{
+	return EFalse;
+	}
+
+void CWebCameraAdvSet::SetAutoFocusLockOn(TBool /*aState*/)
+	{	
+	User::Leave(KErrNotSupported);
+	}
+
+void CWebCameraAdvSet::GetSupportedSettingsL(RArray<TUid>& /*aSettings*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+    
+void CWebCameraAdvSet::GetActiveSettingsL(RArray<TUid>& /*aActiveSettings*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+ 
+void CWebCameraAdvSet::GetDisabledSettingsL(RArray<TUid>& /*aDisbledSettings*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+	    
+void CWebCameraAdvSet::SetAutomaticSizeSelectionChangeOn(TBool /*aSetOn*/)
+	{
+	}
+	
+TBool CWebCameraAdvSet::AutomaticSizeSelectionChangeOn() const
+	{
+	return EFalse;
+	}
+
+void CWebCameraAdvSet::GetSupportedContinuousAutoFocusTimeoutsL(RArray<TInt>& /*aTimeouts*/, TValueInfo& /*aInfo*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::SetContinuousAutoFocusTimeout(TInt /*aTimeout*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::SetStabilizationEffect(CCamera::CCameraAdvancedSettings::TStabilizationEffect /*aEffect*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+CCamera::CCameraAdvancedSettings::TStabilizationEffect CWebCameraAdvSet::StabilizationEffect() const
+	{
+	return CCamera::CCameraAdvancedSettings::EStabilizationOff;
+	}
+
+TInt CWebCameraAdvSet::SupportedStabilizationEffects() const
+	{
+	return CCamera::CCameraAdvancedSettings::EStabilizationOff;
+	}
+
+TInt CWebCameraAdvSet::SupportedStabilizationComplexityValues() const
+	{
+	return CCamera::CCameraAdvancedSettings::EStabilizationOff;
+	}
+	
+CCamera::CCameraAdvancedSettings::TStabilizationAlgorithmComplexity CWebCameraAdvSet::StabilizationComplexity() const
+	{
+	return CCamera::CCameraAdvancedSettings::EStabilizationComplexityAuto;
+	}
+	
+void CWebCameraAdvSet::SetStabilizationComplexity(CCamera::CCameraAdvancedSettings::TStabilizationAlgorithmComplexity /*aComplexity*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+CCamera::CCameraAdvancedSettings::TWBUnits CWebCameraAdvSet::SupportedWBUnits() const
+	{
+	return CCamera::CCameraAdvancedSettings::EWBUnknown;
+	}
+	
+void CWebCameraAdvSet::SetWBRgbValue(const TRgb& /*aValue*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::GetWBRgbValue(TRgb& /*aValue*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::GetWBSupportedColorTemperaturesL(RArray<TInt>& /*aWBColorTemperatures*/, TValueInfo& /*aInfo*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::SetWBColorTemperature(TInt /*aColorTemperature*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+
+TInt CWebCameraAdvSet::WBColorTemperature() const
+	{
+	return KErrNotSupported;
+	}
+
+TInt CWebCameraAdvSet::ContinuousAutoFocusTimeout() const
+	{
+	return KErrNotSupported;
+	}
+
+TInt CWebCameraAdvSet::IsFlashReady(TBool& aReady) const
+	{
+	aReady = 0;
+	return KErrNone;
+	}
+
+void CWebCameraAdvSet::GetCurrentFocusModeStepsL(RArray<TInt>& /*aFocusModeSteps*/, TValueInfo& /*aInfo*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::SetReferenceScreen(CWsScreenDevice& /*aScreenDevice*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::GetPreCaptureWarningSupportedL(CCamera::CCameraAdvancedSettings::TCameraMode /*aCameraMode*/, TInt& /*aPreCaptureWarningSupported*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+
+void CWebCameraAdvSet::SubscribeToPreCaptureWarningL(TInt /*aPreCaptureWarning*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::UnSubscribePreCaptureWarningL()
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::GetPreCaptureWarningL(TInt& /*aPreCaptureWarning*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+void CWebCameraAdvSet::GetSupportedAFAssistantLightL(TInt& /*aSupportedAFAssistantLight*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+
+void CWebCameraAdvSet::GetAFAssistantLightL(CCamera::CCameraAdvancedSettings::TAFAssistantLight& /*aAFAssistantLight*/) const
+	{
+	User::Leave(KErrNotSupported);
+	}
+
+void CWebCameraAdvSet::SetAFAssistantLight(CCamera::CCameraAdvancedSettings::TAFAssistantLight /*aAFAssistantLight*/)
+	{
+	User::Leave(KErrNotSupported);
+	}
+	
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/source/webcamera/ecamwebcameraadvset.h	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,203 @@
+/*
+* Copyright (c) 2010 ISB.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* ISB - Initial contribution
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef ECAMWEBCAMERAADVSET_H
+#define ECAMWEBCAMERAADVSET_H
+
+#include <ecam/ecamadvsettingsintf.h>
+#include "ecamwebcameraplugin.h"
+
+
+const TInt KDefaultIsoRate = 200;
+
+// Implementations of the MCameraAdvancedSettings class
+class CWebCameraAdvSet : public CBase, 
+						 public MCameraAdvancedSettings,
+						 public MCameraAdvancedSettings2,
+						 public MCameraAdvancedSettings3
+	{
+	friend class CWebCamera;
+public:
+	static CWebCameraAdvSet* NewL(CWebCamera& aOwner);
+	~CWebCameraAdvSet();
+	
+protected:
+	//from MCameraAdvancedSettings
+	void Release();
+  	CCamera::CCameraAdvancedSettings::TCameraType CameraType() const;
+  	CCamera::CCameraAdvancedSettings::TCameraType CameraType(TInt aCameraIndex) const;
+	TBool IsCameraPresent() const;
+ 	TBool IsCameraPresent(TInt aCameraIndex) const;
+	TInt CameraIndex() const;	
+    TInt SupportedStabilizationModes() const;
+    CCamera::CCameraAdvancedSettings::TStabilizationMode StabilizationMode() const;
+    void SetStabilizationMode(CCamera::CCameraAdvancedSettings::TStabilizationMode aStabilizationMode);
+    TInt SupportedFocusModes() const;
+    CCamera::CCameraAdvancedSettings::TFocusMode FocusMode() const;
+  	void SetFocusMode(CCamera::CCameraAdvancedSettings::TFocusMode aFocusMode);
+  	TInt SupportedFocusRanges() const;
+    CCamera::CCameraAdvancedSettings::TFocusRange FocusRange() const;
+    void SetFocusRange(CCamera::CCameraAdvancedSettings::TFocusRange aFocusRange);
+    TInt SupportedAutoFocusTypes() const;
+    CCamera::CCameraAdvancedSettings::TAutoFocusType AutoFocusType() const;
+    void SetAutoFocusType(CCamera::CCameraAdvancedSettings::TAutoFocusType aAutoFocusType);
+	TInt SupportedAutoFocusAreas() const;
+    CCamera::CCameraAdvancedSettings::TAutoFocusArea AutoFocusArea() const;
+    void SetAutoFocusArea(CCamera::CCameraAdvancedSettings::TAutoFocusArea aAutoFocusArea);
+	TInt FocusDistance() const;
+	void SetFocusDistance(TInt aDistance);
+	TInt GetMinFocalLength() const;
+	void GetSupportedIsoRatesL(RArray<TInt>& aSupportedIsoRates) const;
+    TInt IsoRate() const;
+    void SetIsoRate(TInt aRate);
+    void GetAperturesL(RArray<TInt>& aFStops, TValueInfo& aInfo) const;
+    TInt Aperture() const; 
+    void SetAperture(TInt aFStop); 
+	void GetShutterSpeedsL(RArray<TInt>& aShutterSpeeds, TValueInfo& aInfo) const; 
+    TInt ShutterSpeed() const; 
+    void SetShutterSpeed(TInt aShutterSpeed); 
+    TInt SupportedMeteringModes() const;
+    CCamera::CCameraAdvancedSettings::TMeteringMode MeteringMode() const;
+    void SetMeteringMode(CCamera::CCameraAdvancedSettings::TMeteringMode aMeteringMode);
+    TInt SupportedDriveModes() const;
+    CCamera::CCameraAdvancedSettings::TDriveMode DriveMode() const;
+    void SetDriveMode(CCamera::CCameraAdvancedSettings::TDriveMode aDriveMode);
+    TInt SupportedBracketModes() const;
+    CCamera::CCameraAdvancedSettings::TBracketMode BracketMode() const;
+    void SetBracketMode(CCamera::CCameraAdvancedSettings::TBracketMode aBracketMode);
+    TInt SupportedBracketParameters() const;
+    CCamera::CCameraAdvancedSettings::TBracketParameter BracketParameter() const;
+    void SetBracketParameter(CCamera::CCameraAdvancedSettings::TBracketParameter aBracketParameter);
+    TInt SupportedBracketSteps() const;
+    CCamera::CCameraAdvancedSettings::TBracketStep BracketStep() const;
+    void SetBracketStep(CCamera::CCameraAdvancedSettings::TBracketStep aBracketStep);
+	void GetBracketMerge(TInt& aStartIndex, TInt& aFrames) const;
+	void SetBracketMerge(TInt aStartIndex, TInt aFrames);
+    TInt SupportedFlashModes() const;
+	CCamera::TFlash FlashMode() const;
+	void SetFlashMode(CCamera::TFlash aMode);
+    TBool RedEyeReduceOn() const;
+    void SetRedEyeReduceOn(TBool aState);
+	void GetFlashCompensationStepsL(RArray<TInt>& aFlashCompensationSteps, TValueInfo& aInfo) const; 
+	TInt FlashCompensationStep() const;
+	TInt GetFlashCompensationStep(TInt& aFlashCompensationStep) const;
+	void SetFlashCompensationStep(TInt aFlashCompensationStep);
+	void GetFlashCompensationRangeInSteps(TInt& aNegativeCompensation, TInt& aPositiveCompensation) const;
+	TInt FlashCompensation() const;
+	TInt GetFlashCompensation(TInt& aFlashCompensation) const;
+	void SetFlashCompensation(TInt aFlashCompensationSteps);
+	TBool IsExternalFlashPresent() const;
+    void GetManualFlashPowerLevelsL(RArray<TInt>& aManualFlashPowerLevels, TValueInfo& aInfo) const;
+    TInt ManualFlashPowerLevel() const;
+    void SetManualFlashPowerLevel(TInt aManualFlashPowerLevel);
+	TInt SupportedExposureModes() const;
+	CCamera::TExposure ExposureMode() const;
+	void SetExposureMode(CCamera::TExposure aExposureMode);
+	void GetExposureCompensationStepsL(RArray<TInt>& aExposureCompensationSteps, TValueInfo& aInfo) const; 
+	TInt ExposureCompensationStep() const;
+	TInt GetExposureCompensationStep(TInt& aExposureCompensationStep) const;
+	void SetExposureCompensationStep(TInt aExposureCompensationStep);
+	void GetExposureCompensationRangeInSteps(TInt& aNegativeCompensation, TInt& aPositiveCompensation) const;
+	TInt ExposureCompensation() const;
+	TInt GetExposureCompensation(TInt& aExposureCompensation) const;
+	void SetExposureCompensation(TInt aExposureCompensationSteps);
+	TInt SupportedWhiteBalanceModes() const;
+	CCamera::TWhiteBalance WhiteBalanceMode() const;
+	void SetWhiteBalanceMode(CCamera::TWhiteBalance aWhiteBalanceMode);
+	TBool ApertureExposureLockOn() const;
+	void SetApertureExposureLockOn(TBool aAELock);
+	TBool ShootClickOn() const;
+	void SetShootClickOn(TBool aShootClickOn);
+	void GetTimerIntervalsL(RArray<TInt>& aTimerIntervals, TValueInfo& aInfo) const;
+    TInt TimerInterval() const;  
+    void SetTimerInterval(TInt aTimerInterval); 
+	void GetTimeLapsePeriodRange(TTime& aTimeLapseMin, TTime& aTimeLapseMax) const;
+    void GetTimeLapse(TTime& aStart, TTime& aEnd, TTime& aInterval) const;  
+    void SetTimeLapse(const TTime& aStart, const TTime& aEnd, const TTime& aInterval); 
+    CCamera::CCameraAdvancedSettings::TPictureOrientation PictureOrientation() const;
+    void SetPictureOrientation(CCamera::CCameraAdvancedSettings::TPictureOrientation aOrientation); 
+    TInt SupportedPixelAspectRatios() const;
+    CCamera::CCameraAdvancedSettings::TPixelAspectRatio PixelAspectRatio() const;
+    void SetPixelAspectRatio(CCamera::CCameraAdvancedSettings::TPixelAspectRatio aPixelAspectRatio); 
+    TInt SupportedYuvRanges() const;
+    CCamera::CCameraAdvancedSettings::TYuvRange YuvRange() const;
+    void SetYuvRange(CCamera::CCameraAdvancedSettings::TYuvRange aYuvRange);
+    TInt BurstImages() const;
+    void SetBurstImages(TInt aImages);	
+	void GetOpticalZoomStepsL(RArray<TInt>& aOpticalZoomSteps, TValueInfo& aInfo) const;
+	TInt OpticalZoom() const;
+	void SetOpticalZoom(TInt aOpticalZoom);
+	void GetDigitalZoomStepsL(RArray<TInt>& aDigitalZoomSteps, TValueInfo& aInfo) const;
+	TInt DigitalZoom() const;
+	void SetDigitalZoom(TInt aDigitalZoom);
+	TBool ExposureLockOn() const;
+	void SetExposureLockOn(TBool aState);
+	TBool AutoFocusLockOn() const;
+	void SetAutoFocusLockOn(TBool aState);
+    void GetSupportedSettingsL(RArray<TUid>& aSettings) const;
+    void GetActiveSettingsL(RArray<TUid>& aActiveSettings) const;
+    void GetDisabledSettingsL(RArray<TUid>& aDisabledSettings) const;
+	TBool AutomaticSizeSelectionChangeOn() const;	
+	void SetAutomaticSizeSelectionChangeOn(TBool aSetOn);	
+    void GetSupportedContinuousAutoFocusTimeoutsL(RArray<TInt>& aTimeouts, TValueInfo& aInfo) const;
+    TInt ContinuousAutoFocusTimeout() const; 
+    void SetContinuousAutoFocusTimeout(TInt aTimeout);
+	TInt SupportedStabilizationEffects() const;
+	CCamera::CCameraAdvancedSettings::TStabilizationEffect StabilizationEffect() const;
+    void SetStabilizationEffect(CCamera::CCameraAdvancedSettings::TStabilizationEffect aEffect);
+	TInt SupportedStabilizationComplexityValues() const;
+	CCamera::CCameraAdvancedSettings::TStabilizationAlgorithmComplexity StabilizationComplexity() const;
+	void SetStabilizationComplexity(CCamera::CCameraAdvancedSettings::TStabilizationAlgorithmComplexity aComplexity);
+    CCamera::CCameraAdvancedSettings::TWBUnits SupportedWBUnits() const;
+    void GetWBRgbValue(TRgb& aValue) const;
+    void SetWBRgbValue(const TRgb& aValue);
+  	void GetWBSupportedColorTemperaturesL(RArray<TInt>& aWBColorTemperatures, TValueInfo& aInfo) const;
+ 	TInt WBColorTemperature() const;   
+	void SetWBColorTemperature(TInt aWBColorTemperature);
+	
+	//from MCameraAdvancedSettings2
+	TInt IsFlashReady(TBool& aReady) const;
+	void GetCurrentFocusModeStepsL(RArray<TInt>& aFocusModeSteps, TValueInfo& aInfo) const;
+	
+	//from MCameraAdvancedSettings3
+	void GetSupportedISORateTypeL(TInt& aSupportedISORateTypes) const;
+	void SetISORate(CCamera::CCameraAdvancedSettings::TISORateType aISORateType, TInt aParam);
+	void GetISORateL(CCamera::CCameraAdvancedSettings::TISORateType& aISORateType, TInt& aParam, TInt& aISORate) const;
+	void SetReferenceScreen(CWsScreenDevice& aScreenDevice);
+	void GetDigitalZoomStepsForStillL(RArray<TInt>& aDigitalZoomSteps, TValueInfo& aInfo, TInt aSizeIndex, 
+					CCamera::TFormat aFormat, TBool& aIsInfluencePossible) const;
+	void GetDigitalZoomStepsForVideoL(RArray<TInt>& aDigitalZoomSteps, TValueInfo& aInfo, TInt aFrameRateIndex, 
+					TInt aSizeIndex, CCamera::TFormat aFormat, TBool& aIsInfluencePossible, CCamera::TExposure aExposure) const;
+	void GetPreCaptureWarningSupportedL(CCamera::CCameraAdvancedSettings::TCameraMode aCameraMode, TInt& aPreCaptureWarningSupported) const;
+	void SubscribeToPreCaptureWarningL(TInt aPreCaptureWarning);
+	void UnSubscribePreCaptureWarningL();
+	void GetPreCaptureWarningL(TInt& aPreCaptureWarning) const;
+	void GetSupportedAFAssistantLightL(TInt& aSupportedAFAssistantLight) const;
+	void GetAFAssistantLightL(CCamera::CCameraAdvancedSettings::TAFAssistantLight& aAFAssistantLight) const;
+	void SetAFAssistantLight(CCamera::CCameraAdvancedSettings::TAFAssistantLight aAFAssistantLight);
+
+private:
+	CWebCameraAdvSet(CWebCamera& aOwner);
+	void Init();
+	void ConstructL();
+	
+private:
+	CWebCamera& iOwner;
+	RArray<TInt> iSupportedISORates;
+	};
+
+#endif // TESTADVANCEDSETTINGS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/source/webcamera/ecamwebcamerabuffer.cpp	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,224 @@
+/*
+* Copyright (c) 2010 ISB.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* ISB - Initial contribution
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <fbs.h>
+#include "ecamwebcamerabuffer.h"
+
+
+// ---------------------------------------------------------------------------
+// NewL
+// Takes ownership of aData, but not aBitmap
+// ---------------------------------------------------------------------------
+//
+CWebCameraBuffer* CWebCameraBuffer::NewL(const CFbsBitmap& aBitmap, HBufC8* aData)
+	{
+	CWebCameraBuffer* self = CWebCameraBuffer::NewLC( aBitmap, aData );
+	CleanupStack::Pop( self );
+	return self;
+	}
+
+// ---------------------------------------------------------------------------
+// NewLC
+// Takes ownership of aData, but not aBitmap
+// ---------------------------------------------------------------------------
+//
+CWebCameraBuffer* CWebCameraBuffer::NewLC(const CFbsBitmap& aBitmap, HBufC8* aData)
+	{
+	CWebCameraBuffer* self = new (ELeave) CWebCameraBuffer;
+	CleanupStack::PushL( self );
+	self->ConstructL( aBitmap, aData );
+	return self;
+	}
+
+
+// ---------------------------------------------------------------------------
+// NewL
+// Takes ownership of both objects.
+// ---------------------------------------------------------------------------
+//
+CWebCameraBuffer* CWebCameraBuffer::NewL(CFbsBitmap* aBitmap, HBufC8* aData)
+	{
+	CWebCameraBuffer* self = CWebCameraBuffer::NewLC( aBitmap, aData );
+	CleanupStack::Pop( self );
+	return self;
+	}
+
+// ---------------------------------------------------------------------------
+// NewLC
+// Takes ownership of both objects.
+// ---------------------------------------------------------------------------
+//
+CWebCameraBuffer* CWebCameraBuffer::NewLC(CFbsBitmap* aBitmap, HBufC8* aData)
+	{
+	CWebCameraBuffer* self = new (ELeave) CWebCameraBuffer;
+	CleanupStack::PushL( self );
+	self->ConstructL( aBitmap, aData );
+	return self;
+	}
+
+// ---------------------------------------------------------------------------
+// Constructor
+//
+// ---------------------------------------------------------------------------
+//
+CWebCameraBuffer::CWebCameraBuffer()
+	: iBitmap(NULL),
+	  iImageData(NULL),
+	  iOwnBitmap(ETrue),
+	  iOwnData(ETrue)
+	{
+	}
+
+// ---------------------------------------------------------------------------
+// Destructor
+// *private, because Release() is supposed to be used.*
+// ---------------------------------------------------------------------------
+//
+CWebCameraBuffer::~CWebCameraBuffer()
+	{
+	iChunk.Close();
+	delete iBitmap;
+	delete iImageData;
+	}
+
+// ---------------------------------------------------------------------------
+// ConstructL
+//
+// ---------------------------------------------------------------------------
+//
+void CWebCameraBuffer::ConstructL(const CFbsBitmap& aBitmap, HBufC8* aData)
+	{
+	iBitmap = new (ELeave) CFbsBitmap;
+	TInt error = iBitmap->Duplicate( aBitmap.Handle() );
+
+	iImageData = aData;
+
+	User::LeaveIfError( error );
+	}
+
+// ---------------------------------------------------------------------------
+// ConstructL
+//
+// ---------------------------------------------------------------------------
+//
+void CWebCameraBuffer::ConstructL(CFbsBitmap* aBitmap, HBufC8* aData)
+	{
+	iImageData = aData;
+	iBitmap    = aBitmap;
+	}
+
+// ---------------------------------------------------------------------------
+// NumFrames
+//
+// Number of frames available in the buffer.
+// ---------------------------------------------------------------------------
+//
+TInt 
+CWebCameraBuffer::NumFrames()
+	{
+	return 1;
+	}
+
+
+// ---------------------------------------------------------------------------
+// DataL
+//
+// Frame data as descriptor.
+// *not supported here*
+// ---------------------------------------------------------------------------
+//
+TDesC8* CWebCameraBuffer::DataL(TInt aFrameIndex)
+	{
+	if( aFrameIndex != 0 || !iImageData )
+		{
+		User::Leave( KErrNotSupported );
+		}
+
+	return iImageData; 
+	}
+
+// ---------------------------------------------------------------------------
+// BitmapL
+//
+// Frame data as bitmap.
+// ---------------------------------------------------------------------------
+//
+CFbsBitmap& CWebCameraBuffer::BitmapL(TInt aFrameIndex)
+	{
+	if( aFrameIndex != 0 || !iBitmap )
+		{
+		User::Leave( KErrNotFound );
+		}
+
+	return *iBitmap;
+	}
+
+// ---------------------------------------------------------------------------
+// DataL
+//
+// Frame data as chunk.
+// *not supported here*
+// ---------------------------------------------------------------------------
+//
+RChunk& CWebCameraBuffer::ChunkL()
+	{
+	User::Leave( KErrNotSupported );
+
+	return iChunk;
+	}
+
+// ---------------------------------------------------------------------------
+// ChunkOffsetL
+//
+// Frame data offset in chunk.
+// *not supported here*
+// ---------------------------------------------------------------------------
+//
+TInt 
+CWebCameraBuffer::ChunkOffsetL(TInt /*aFrameIndex*/)
+	{
+	User::Leave( KErrNotSupported );
+
+	return 0;
+	}
+
+// ---------------------------------------------------------------------------
+// FrameSize
+//
+// Frame data size.
+// *not supported here, as only bitmap supported*
+// ---------------------------------------------------------------------------
+//
+TInt CWebCameraBuffer::FrameSize(TInt /*aFrameIndex*/)
+	{
+	return -1;
+	}
+
+// ---------------------------------------------------------------------------
+// Release
+//
+// Release this buffer.
+// Simply deletes this object.
+// ---------------------------------------------------------------------------
+//
+void CWebCameraBuffer::Release()
+	{
+	delete this;
+	}
+
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/source/webcamera/ecamwebcamerabuffer.h	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2010 ISB.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* ISB - Initial contribution
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef ECAMWEBCAMERABUFFER_H
+#define ECAMWEBCAMERABUFFER_H
+
+#include <e32base.h>
+#include <ecam.h>
+
+
+class CFbsBitmap;
+class CWebCameraBuffer : public CBase
+					   , public MCameraBuffer
+	{
+public:
+	static CWebCameraBuffer* NewL(const CFbsBitmap& aBitmap, HBufC8* aData);
+	static CWebCameraBuffer* NewLC(const CFbsBitmap& aBitmap, HBufC8* aData);
+	static CWebCameraBuffer* NewL(CFbsBitmap* aBitmap, HBufC8* aData);
+	static CWebCameraBuffer* NewLC(CFbsBitmap* aBitmap, HBufC8* aData);
+
+public:
+	virtual TInt NumFrames();
+	virtual TDesC8* DataL( TInt aFrameIndex );
+	virtual CFbsBitmap& BitmapL( TInt aFrameIndex );
+	virtual RChunk& ChunkL();
+	virtual TInt ChunkOffsetL( TInt aFrameIndex );
+	virtual TInt FrameSize( TInt aFrameIndex );
+	virtual void Release();
+    ~CWebCameraBuffer();
+
+private:
+	void ConstructL(const CFbsBitmap& aBitmap, HBufC8* aData);
+	void ConstructL(CFbsBitmap* aBitmap, HBufC8* aData);
+    CWebCameraBuffer();
+
+private:
+	CFbsBitmap* iBitmap;
+	HBufC8*     iImageData;
+	RChunk      iChunk;
+
+	TBool iOwnBitmap;
+	TBool iOwnData;
+	};  
+
+#endif // ECAMWEBCAMERABUFFER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/source/webcamera/ecamwebcameraplugin.cpp	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,1332 @@
+/*
+* Copyright (c) 2010 ISB.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* ISB - Initial contribution
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <ecom/ecom.h>
+#include <ecom/implementationproxy.h>
+#include <ecamuids.hrh>
+#include <ecam.h>
+#include "ecamwebcameraplugin.h"
+#include "ecamwebcamerapluginuids.hrh"
+#include "ecamwebcamerabuffer.h"
+#include "ecamwebcameraadvset.h"
+#include "ecamwebcameraactive.h"
+#include "ecamwebcameravfactive.h"
+
+
+_LIT(KCameraDriverPddName, "webcamera.pdd");
+_LIT(KCameraDriverLddName, "ewebcamera.ldd");
+
+const TInt KCaptureWidth     = 160;					// Capture image width
+const TInt KCaptureHeight    = 120;					// Capture image height
+const TInt KCaptureLineBytes = KCaptureWidth * 3;	// bytes of one line
+
+//
+// CWebCamera class
+//
+
+CWebCamera::CWebCamera():
+	iCaptureBufPtr(NULL, 0)
+	{
+	iInfo.iHardwareVersion.iMajor = 0;
+	iInfo.iHardwareVersion.iMinor = 0;
+	iInfo.iHardwareVersion.iBuild = 0;
+	iInfo.iSoftwareVersion.iMajor = 0;
+	iInfo.iSoftwareVersion.iMinor = 0;
+	iInfo.iSoftwareVersion.iBuild = 0;
+	iInfo.iOrientation = TCameraInfo::EOrientationOutwards;
+
+	iInfo.iOptionsSupported = 0;
+	iInfo.iOptionsSupported |= TCameraInfo::EViewFinderDirectSupported;
+	iInfo.iOptionsSupported |= TCameraInfo::EViewFinderBitmapsSupported;
+	iInfo.iOptionsSupported |= TCameraInfo::EImageCaptureSupported;
+	iInfo.iOptionsSupported |= TCameraInfo::EVideoCaptureSupported;
+	iInfo.iOptionsSupported |= TCameraInfo::EContrastSupported;
+	iInfo.iOptionsSupported |= TCameraInfo::EBrightnessSupported;
+	iInfo.iOptionsSupported |= TCameraInfo::EViewFinderClippingSupported;
+
+	iInfo.iFlashModesSupported 			= 0; // Bitfield of TFlash values
+	iInfo.iExposureModesSupported		= 0; // Bitfield of TExposure values
+	iInfo.iWhiteBalanceModesSupported	= 0; // Bitfield of TWhiteBalance values
+
+	iInfo.iMinZoom = KMinTestCameraZoom;
+	// KMinTestCameraZoom is zero or negative
+	// note the algorithm for creating of zoom factor
+	iInfo.iMinZoomFactor = TReal32(1)/TReal32(1 << -KMinTestCameraZoom);
+	iInfo.iMaxZoom = KMaxTestCameraZoom;
+	iInfo.iMaxZoomFactor = 1 << KMaxTestCameraZoom;
+
+	iInfo.iMaxDigitalZoom = KMaxTestCameraDigitalZoom;
+	iInfo.iMaxDigitalZoomFactor = KMaxTestCameraDigitalZoomFactor;
+
+	iInfo.iImageFormatsSupported = 0;
+	iInfo.iImageFormatsSupported |= EFormatExif;
+	iInfo.iImageFormatsSupported |= EFormatFbsBitmapColor4K;
+	iInfo.iImageFormatsSupported |= EFormatFbsBitmapColor64K;
+	iInfo.iImageFormatsSupported |= EFormatFbsBitmapColor16M;
+
+	iInfo.iVideoFrameFormatsSupported = 0;
+	iInfo.iVideoFrameFormatsSupported |= EFormatFbsBitmapColor4K;
+	iInfo.iVideoFrameFormatsSupported |= EFormatFbsBitmapColor64K;
+	iInfo.iVideoFrameFormatsSupported |= EFormatFbsBitmapColor16M;
+	iInfo.iMaxFramesPerBufferSupported = 1;
+	iInfo.iMaxBuffersSupported = 2;
+	}
+	
+CWebCamera::~CWebCamera()
+	{
+	delete iCaptureBuf;
+	delete iAdvSettingsImpl;
+	delete iVfActive;
+	delete iActive;
+	iImageSizes.Close();
+	iDriver.Close();
+	}
+	
+CWebCamera* CWebCamera::NewL()
+	{
+	CWebCamera* self = new(ELeave) CWebCamera;
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+
+	return self;
+	}
+
+void CWebCamera::ConstructL()
+	{
+	RDebug::Print(_L("CWebCamera::ConstructL_S"));
+	// Open drivers.
+	TInt err;
+
+	err = User::LoadPhysicalDevice(KCameraDriverPddName);
+	RDebug::Print(_L("CWebCamera::ConstructL LoadPhysicalDevice[%d]"), err);
+
+	if (err != KErrNone && err != KErrAlreadyExists)
+		{
+		User::Leave(err);
+		}
+
+	err = User::LoadLogicalDevice(KCameraDriverLddName);
+	RDebug::Print(_L("CWebCamera::ConstructL LoadLogicalDevice[%d]"), err);
+
+	if (err != KErrNone && err != KErrAlreadyExists)
+		{
+		User::Leave(err);
+		}
+
+	RDebug::Print(_L("CWebCamera::ConstructL iDriver.Open()"));
+	iDriver.Open();
+
+	iActive = CWebCameraActive::NewL(this, iDriver);
+	iVfActive = CWebCameraVfActive::NewL(this, iDriver);
+
+	User::LeaveIfError(iImageSizes.Append(TSize(640, 480)));	// VGA
+	User::LeaveIfError(iImageSizes.Append(TSize(160, 120)));	// QQVGA
+	iInfo.iNumImageSizesSupported = iImageSizes.Count();
+
+	RDebug::Print(_L("CWebCamera::ConstructL_E"));
+	}
+
+/** 
+from CCameraPlugin
+
+A call to one of the factory functions firstly loads the plugin, followed by a
+call to this function to complete construction.
+
+Creates an object representing a camera.
+
+@param  aObserver
+        Reference to class derived from MCameraObserver2 designed to receive
+        notification of asynchronous event completion.
+@param	aCameraIndex
+        Index from 0 to CamerasAvailable()-1 inclusive specifying the
+        camera device to use.
+@return Pointer to a fully constructed CCamera object. Ownership is passed
+        to the caller.
+
+@leave  May leave with KErrNoMemory or KErrNotSupported if aCameraIndex is
+        out of range.	
+*/
+void CWebCamera::Construct2L(MCameraObserver& aObserver,TInt aCameraIndex)
+	{
+	iObserver = &aObserver;
+	iCameraIndex = aCameraIndex;
+	}
+
+/** 
+from CCameraPlugin
+
+A call to one of the factory functions firstly loads the plugin, followed by a
+call to this function to complete construction.
+
+Duplicates the original camera object for use by, for example, multimedia systems.
+
+May leave with KErrNoMemory or KErrNotFound if aCameraHandle is not valid.
+
+@param  aObserver
+        Reference to an observer.
+@param  aCameraHandle Handle of an existing camera object.
+
+@return Duplicate of the original camera object. 
+*/
+void CWebCamera::Construct2DupL(MCameraObserver& aObserver,TInt aCameraHandle)
+	{
+	iObserver = &aObserver;
+	iCameraHandle = aCameraHandle;
+	}
+
+ /** 
+from CCameraPlugin
+
+ A call to one of the factory functions firstly loads the plugin, followed by a
+call to this function to complete construction.
+ 
+Creates an object representing a camera.
+
+@param  aObserver
+        Reference to class derived from MCameraObserver2 designed to receive
+        notification of asynchronous event completion.
+@param	aCameraIndex
+        Index from 0 to CamerasAvailable()-1 inclusive specifying the
+        camera device to use.
+@param	aPriority
+        Value from -100 to 100 indicating relative priority of client to
+        use camera.
+
+@return Pointer to a fully constructed CCamera object. Ownership is passed
+        to the caller.
+
+@leave  May leave with KErrNoMemory or KErrNotSupported if aCameraIndex is
+        out of range.
+*/
+void CWebCamera::Construct2L(MCameraObserver2& aObserver,TInt aCameraIndex,TInt aPriority)
+	{
+	iObserver2 = &aObserver;
+	iCameraIndex = aCameraIndex;
+	iPriority = aPriority;
+	}
+	
+/** 
+from CCameraPlugin
+
+Duplicates the original camera object for use by, for example, multimedia systems.
+
+@leave  KErrNoMemory if out of memory.
+@leave  KErrNotFound if aCameraHandle is not valid.	   
+@leave  KErrPermissionDenied if the application does not have
+        the UserEnvironment capability.
+
+@param  aObserver
+        Reference to an observer.
+@param  aCameraHandle Handle of an existing camera object.
+
+@return Duplicate of the original camera object. 
+
+@capability	UserEnvironment
+			An application that creates a CCamera object must have
+			the UserEnvironment capability.
+			
+@note   Applications using this method to create camera object may not receive enums/uids added in future(after being baselined). 
+		To receive them, they should rather use New2L() or NewDuplicate2L(), in which case, they should prepare 
+		themselves to receive unrecognised values.
+*/
+void CWebCamera::Construct2DupL(MCameraObserver2& aObserver,TInt aCameraHandle)
+	{
+	iObserver2 = &aObserver;
+	iCameraHandle = aCameraHandle;
+	}
+
+//
+// virtual functions
+//
+
+/**
+from CCamera
+
+Gets information about the camera device.
+
+@param  aInfo 
+        On return, information about the camera device. See TCameraInfo. 
+*/
+void CWebCamera::CameraInfo(TCameraInfo& aInfo) const
+	{
+	aInfo = iInfo;
+	}
+
+/** 
+from CCamera
+
+Asynchronous function that performs any required initialisation and reserves
+the camera for exclusive use.
+
+Calls MCameraObserver:: ReserveComplete() when complete. 
+*/
+void CWebCamera::Reserve()
+	{
+	iActive->Reserve();
+	}
+
+/** 
+from CCamera
+
+De-initialises the camera, allowing it to be used by other clients. 
+*/
+void CWebCamera::Release()
+	{
+	StopViewFinder();
+	iReserved = EFalse;
+	}
+
+/** 
+from CCamera
+
+Asynchronous method to switch on camera power.
+
+User must have successfully called Reserve() prior to calling this function.
+
+Calls MCameraObserver::PowerOnComplete() when power on is complete. 
+*/
+void CWebCamera::PowerOn()
+	{
+	iActive->PowerOn();
+	}
+
+/** 
+from CCamera
+
+Synchronous function for switching off camera power. 
+*/
+void CWebCamera::PowerOff()
+	{
+	StopViewFinder();
+	iPowerOn = EFalse;
+	}
+
+/**
+from CCamera
+
+Gets the device-unique handle of this camera object.
+
+@return  The device-unique handle of this camera object. 
+*/
+TInt CWebCamera::Handle()
+	{
+	return 0;
+	}
+
+/** 
+from CCamera
+
+Sets the zoom factor.
+
+This must be in the range of TCameraInfo::iMinZoom to TCameraInfo::iMaxZoom
+inclusive. May leave with KErrNotSupported if the specified zoom factor is
+out of range.
+
+@param aZoomFactor 
+       Required zoom factor.
+*/
+void CWebCamera::SetZoomFactorL(TInt /*aZoomFactor = 0*/)
+	{
+	}
+
+/** 
+from CCamera
+
+Gets the currently set zoom factor.
+
+@return  The currently set zoom factor.
+*/
+TInt CWebCamera::ZoomFactor() const
+	{
+	return 0;
+	}
+
+/** 
+from CCamera
+
+Sets the digital zoom factor.
+
+This must be in the range of 0 to TCameraInfo::iMaxDigitalZoom inclusive.
+
+May leave with KErrNotSupported if the zoom factor is out of range.
+
+@param  aDigitalZoomFactor
+        The required digital zoom factor. 
+*/
+void CWebCamera::SetDigitalZoomFactorL(TInt /*aDigitalZoomFactor = 0*/)
+	{
+	}
+
+/** 
+from CCamera
+
+Gets the currently set digital zoom factor.
+
+@return  The currently set digital zoom factor. 
+*/
+TInt CWebCamera::DigitalZoomFactor() const
+	{
+	return 0;
+	}
+
+/**
+from CCamera
+
+Sets the contrast adjustment of the device.
+
+This must be in the range of -100 to +100 or EContrastAuto. May leave with
+KErrNotSupported if the specified contrast value is out of range.
+
+@param  aContrast 
+        Required contrast value. See TCameraInfo::iContrastSupported 
+*/
+void CWebCamera::SetContrastL(TInt /*aContrast*/)
+	{
+	}
+
+/** 
+from CCamera
+
+Gets the currently set contrast value.
+
+@return  The currently set contrast value.
+*/
+TInt CWebCamera::Contrast() const
+	{
+	return 0;
+	}
+
+/** 
+from CCamera
+
+Sets the brightness adjustment of the device.
+
+No effect if this is not supported, see TCameraInfo::iBrightnessSupported.
+
+This must be in the range of -100 to +100 or EBrightnessAuto. May leave
+with KErrNotSupported if the brightness adjustment is out of range.
+
+@param  aBrightness
+        The required brightness adjustment. 
+*/
+void CWebCamera::SetBrightnessL(TInt /*aBrightness*/)
+	{
+	}
+
+/** 
+from CCamera
+
+Gets the currently set brightness adjustment value.
+
+@return  The currently set brightness adjustment value. 
+*/
+TInt CWebCamera::Brightness() const
+	{
+	return 0;
+	}
+
+/** 
+from CCamera
+
+Sets the flash mode.
+
+No effect if this is not supported, see TCameraInfo::iFlashModesSupported.
+
+May leave with KErrNotSupported if the specified flash mode is invalid.
+
+@param  aFlash
+        The required flash mode. 
+*/
+void CWebCamera::SetFlashL(TFlash /*aFlash = EFlashNone*/)
+	{
+	}
+
+/** 
+from CCamera
+
+Gets the currently set flash mode.
+
+@return  The currently set flash mode. 
+@note	if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that 
+application is not prepared to receive extra added enum values (unrecognised). So, any extra enum value(unrecognised)
+(set in the ECAM implementation because of sharing clients) should not be returned from the ECAM implementation.
+To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() 
+to create camera object. ECAM implementation, after verifying this,(by checking version no.) may send new values, if set.
+In this case, application is assumed to be prepared to receive unrecognised enum values.
+
+@see CCamera::CCameraAdvancedSettings::FlashMode()	
+*/
+CCamera::TFlash CWebCamera::Flash() const
+	{
+	return EFlashNone;
+	}
+
+/** 
+from CCamera
+
+Sets the exposure adjustment of the device.
+
+No effect if this is not supported, see CameraInfo::iExposureModesSupported.
+
+May leave with KErrNotSupported if the specified exposure adjustment is invalid.
+
+@param  aExposure
+        The required exposure adjustment. 
+*/
+void CWebCamera::SetExposureL(TExposure /*aExposure = EExposureAuto*/)
+	{
+	}
+
+/** 
+from CCamera
+
+Gets the currently set exposure setting value.
+
+@return  The currently set exposure setting value. 
+*/
+CCamera::TExposure CWebCamera::Exposure() const
+	{
+	return EExposureAuto;
+	}
+
+/** 
+from CCamera
+
+Sets the white balance adjustment of the device.
+
+No effect if this is not supported, see TCameraInfo::iWhiteBalanceModesSupported.
+
+@param  aWhiteBalance
+        The required white balance adjustment.
+
+@leave  KErrNotSupported if the specified white balance adjustment
+        is invalid.
+*/
+void CWebCamera::SetWhiteBalanceL(TWhiteBalance /*aWhiteBalance = EWBAuto*/)
+	{
+	}
+
+/** 
+from CCamera
+
+Gets the currently set white balance adjustment value.
+
+@return  The currently set white balance adjustment value.
+
+@note	if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that 
+application is not prepared to receive extra added enum values (unrecognised). So, any extra enum value(unrecognised)
+(set in the ECAM implementation because of sharing clients) should not be returned from the ECAM implementation.
+To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() 
+to create camera object. ECAM implementation, after verifying this,(by checking version no.) may send new values, if set.
+In this case, application is assumed to be prepared to receive unrecognised enum values.
+Refer  CCamera::CCameraAdvancedSettings::WhiteBalanceMode() implementation
+
+@see CCamera::CCameraAdvancedSettings::WhiteBalanceMode()
+*/
+CCamera::TWhiteBalance CWebCamera::WhiteBalance() const
+	{
+	return EWBAuto;
+	}
+
+/** 
+from CCamera
+
+Starts transfer of view finder data to the given portion of the screen using
+direct screen access.
+
+The aScreenRect parameter is in screen co-ordinates and may be modified if,
+eg, the camera requires the destination to have a certain byte alignment, etc.
+
+@param  aWs 
+        Window server session.
+@param  aScreenDevice 
+        Screen device.
+@param  aWindow 
+        Displayable window.
+@param  aScreenRect 
+        Portion of the screen to which view finder data is to be
+        transferred. This is in screen co-ordinates and may be modified if, for example,
+        the camera requires the destination to have a certain byte alignment.
+
+@leave  KErrNotReady if PowerOn() has either not
+        been called, or has not yet completed.
+
+@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
+		refer viewfinders started using CCamera methods. 
+
+@see	CCamera::CCameraV2DirectViewFinder
+*/
+void CWebCamera::StartViewFinderDirectL(RWsSession& aWs, CWsScreenDevice& aScreenDevice, RWindowBase& aWindow, TRect& aScreenRect)
+	{
+	RDebug::Print(_L("CWebCamera::StartViewFinderDirectL"));
+	TRect emptyRect;
+	StartViewFinderDirectL(aWs, aScreenDevice, aWindow, aScreenRect, emptyRect);
+	}
+
+/** 
+from CCamera
+
+Starts transfer of view finder data to the given portion of the screen using
+direct screen access and also clips to the specified portion of the screen.
+
+The view finder has the same size and position as aScreenRect but is only
+visible in the intersection of aScreenRect and aClipRect. May leave with KErrNotSupported
+or KErrNotReady if Reserve() has not been called, or has not yet completed.
+
+@param  aWs 
+        Window server session.
+@param  aScreenDevice 
+        Screen device.
+@param  aWindow 
+        Displayable window.
+@param  aScreenRect 
+        Portion of the screen to which view finder data is to be
+        transferred. This is in screen co-ordinates and may be modified if, for example,
+        the camera requires the destination to have a certain byte alignment.
+@param  aClipRect
+        The rectangle to which the screen will be clipped.
+
+@leave  KErrNotReady if PowerOn() hasn't been called successfully. 
+
+@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
+		refer viewfinders started using CCamera methods.
+
+@see	CCamera::CCameraClientViewFinder
+*/
+void CWebCamera::StartViewFinderDirectL(RWsSession& aWs, CWsScreenDevice& aScreenDevice, RWindowBase& aWindow, TRect& aScreenRect, TRect& aClipRect)
+	{
+	RDebug::Print(_L("CWebCamera::StartViewFinderDirectL'"));
+	iVfActive->StartViewFinderDirectL(aWs, aScreenDevice, aWindow, aScreenRect, aClipRect);
+	}
+
+/** 
+from CCamera
+
+Starts transfer of view finder data.
+
+Bitmaps are returned by MCameraObserver::ViewFinderFrameReady().
+
+@param  aSize 
+        On return, the size used.
+@leave  KErrNotReady if PowerOn() has not been called, or has not yet completed.
+
+@note   This method is assumed to be meant for default display only. 
+
+@see	CCamera::CCameraClientViewFinder 
+*/
+void CWebCamera::StartViewFinderBitmapsL(TSize& /*aSize*/)
+	{
+	}
+	
+/** 
+from CCamera
+
+Starts transfer of view finder data and clips the bitmap to the specified clip
+rectangle.
+
+The bitmap is the size of the intersection of aSize and aClipRect, not simply
+aSize padded with white space.
+
+@param  aSize
+        On return, the size used.
+@param  aClipRect 
+        Required clip rectangle. May be modified if, for example,
+        the camera only supports certain byte alignments.
+
+@leave  KErrInUse if Reserve() hasn't been called successfully.
+@leave  KErrNotReady if PowerOn() hasn't been called successfully.
+
+@note   This method is assumed to be meant for default display only. 
+
+@see	CCamera::CCameraClientViewFinder
+*/
+void CWebCamera::StartViewFinderBitmapsL(TSize& /*aSize*/,TRect& /*aClipRect*/)
+	{
+	}
+
+/** 
+from CCamera
+
+Starts transfer of view finder data.
+
+Picture data is returned by MCameraObserver2::ViewFinderReady().
+
+@param  aImageFormat 
+        The image format requested by the client.
+@param  aSize 
+        On return, the size used.
+@leave  KErrNotSupported 
+@leave  KErrNotReady if Reserve() has not been
+        called, or has not yet completed. 
+
+@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
+		refer viewfinders started using CCamera methods.
+
+@see	CCamera::CCameraClientViewFinder
+*/
+void CWebCamera::StartViewFinderL(TFormat /*aImageFormat*/,TSize& /*aSize*/)
+	{
+	}
+
+/** 
+from CCamera
+
+Starts transfer of view finder data and clips the picture to the specified clip
+rectangle. Picture data is returned by MCameraObserver2::ViewFinderReady().
+
+The picture is the size of the intersection of aSize and aClipRect, not simply
+aSize padded with white space.
+
+@param  aImageFormat 
+        The image format.
+@param  aSize
+        On return, the size used.
+@param  aClipRect 
+        Required clip rectangle. May be modified if, for example,
+        the camera only supports certain byte alignments.
+
+@leave  KErrInUse if Reserve() hasn't been called successfully,
+@leave  KErrNotReady if PowerOn() hasn't been called successfully.
+
+@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
+		refer viewfinders started using CCamera methods.
+
+@see	CCamera::CCameraClientViewFinder
+*/
+void CWebCamera::StartViewFinderL(TFormat /*aImageFormat*/,TSize& /*aSize*/,TRect& /*aClipRect*/)
+	{
+	}
+
+/** 
+Stops transfer of view finder data to the screen. 
+
+@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
+		refer viewfinders started using CCamera methods.
+
+@see	CCamera::CCameraV2DirectViewFinder
+@see	CCamera::CCameraClientViewFinder
+*/
+void CWebCamera::StopViewFinder()
+	{
+	iVfActive->StopViewFinder();
+	}
+
+/** 
+from CCamera
+
+Queries whether the view finder is active.
+
+@return  ETrue if the view finder is active. EFalse if the view finder is not
+         active. 
+         
+@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
+		refer viewfinders started using CCamera methods.
+
+@see	CCamera::CCameraV2DirectViewFinder
+@see	CCamera::CCameraClientViewFinder
+*/
+TBool CWebCamera::ViewFinderActive() const
+	{
+	return iVfActive->ViewFinderActive();
+	}
+
+/** 
+from CCamera
+
+Sets whether view finder mirroring is on.
+
+Used to switch between what the camera sees and what you would see if the
+device were a mirror.
+
+@param  aMirror 
+        ETrue to set mirroring on, EFalse to set mirroring off.
+
+@leave  KErrNotSupported.
+
+@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
+		refer viewfinders started using CCamera methods.
+
+@see	CCamera::CCameraV2DirectViewFinder
+@see	CCamera::CCameraClientViewFinder
+*/
+void CWebCamera::SetViewFinderMirrorL(TBool /*aMirror*/)
+	{
+	}
+
+/** 
+from CCamera
+
+Gets whether view finder mirroring is active.
+
+@return  ETrue if mirroring is set, EFalse if mirroring is not set. 
+
+@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
+		refer viewfinders started using CCamera methods.
+
+@see	CCamera::CCameraV2DirectViewFinder
+@see	CCamera::CCameraClientViewFinder
+*/
+TBool CWebCamera::ViewFinderMirror() const
+	{
+	return EFalse;
+	}
+
+/** 
+from CCamera
+
+Performs setup and allocation of memory.
+
+Called prior to calling CaptureImage() to keep the latency of that function
+to a minimum.
+
+Needs to be called only once for multiple CaptureImage() calls. May leave
+with KErrNotSupported or KErrNoMemory or KErrInUse or KErrNotReady.
+
+The specified image format must be one of the formats supported
+(see TCameraInfo::iImageFormatsSupported).
+
+The specified size index must be in the range of 0 to TCameraInfo::iNumImageSizesSupported-1
+inclusive.
+
+@param  aImageFormat 
+        The image format.
+@param  aSizeIndex 
+        Size index.
+
+@leave  KErrNotSupported
+@leave  KErrNoMemory
+@leave  KErrNotReady if PowerOn() hasn't been called successfully.
+
+@see 	CCamera::CCameraPreImageCaptureControl::PrepareImageCapture(TPrepareImageParameters aPrepareImageParameters)
+*/
+void CWebCamera::PrepareImageCaptureL(TFormat /*aImageFormat*/,TInt /*aSizeIndex*/)
+	{
+	}
+
+/** 
+from CCamera
+
+Performs setup and allocation of memory and clips the image to the specified
+rectangle.
+
+No effect unless TCameraInfo::iImageClippingSupported is set to ETrue. The
+image captured is the intersection of aClipRect and the rectangle from (0,0)
+to aSize. Needs to be called only once for multiple CaptureImage() calls.
+May leave with KErrNotSupported or KErrNoMemory.
+
+The specified image format must be one of the formats supported (see TCameraInfo::iImageFormatsSupported).
+
+The specified size index must be in the range of 0 to TCameraInfo::iNumImageSizesSupported-1
+inclusive.
+
+@param  aImageFormat 
+        The image format.
+@param  aSizeIndex 
+        Size index.
+@param  aClipRect
+        The rectangle to which the image is to be clipped.
+
+@leave   KErrNotSupported
+@leave   KErrNoMemory
+@leave   KErrInUse if Reserve() hasn't been called successfully
+@leave   KErrNotReady if PowerOn()
+         hasn't been called successfully.
+
+@see 	CCamera::CCameraPreImageCaptureControl::PrepareImageCapture(TPrepareImageParameters aPrepareImageParameters)
+*/
+void CWebCamera::PrepareImageCaptureL(TFormat /*aImageFormat*/,TInt /*aSizeIndex*/,const TRect& /*aClipRect*/)
+	{
+	}
+
+/** 
+from CCamera
+
+Asynchronously performs still image capture.
+
+Calls MCameraObserver::ImageReady() when complete. 
+
+@see CCamera::CCameraImageCapture
+@see CCamera::CCameraPreImageCaptureControl
+*/
+void CWebCamera::CaptureImage()
+	{
+	delete iCaptureBuf;
+	iCaptureBuf = NULL;
+
+	iCaptureBuf = HBufC8::NewL(KMaxBufSize);
+	iCaptureBufPtr.Set(iCaptureBuf->Des());
+	iCaptureBufPtr.SetLength(0);
+
+	iActive->ImageCapture(iCaptureBufPtr);
+
+	iImageCaptureActive = ETrue;
+	}
+
+/** 
+from CCamera
+
+Cancels the asynchronous still image capture. 
+
+@see CCamera::CCameraImageCapture
+*/
+void CWebCamera::CancelCaptureImage()
+	{
+	iImageCaptureActive = EFalse;
+	}
+
+/** 
+from CCamera
+
+Enumerates through the available image capture sizes, based on the specified
+size index and format
+
+The size index must be in the range 0 to TCameraInfo::iNumImageSizesSupported-1
+inclusive.
+
+@param  aSize 
+        Image size.
+@param  aSizeIndex 
+        Size index.
+@param  aFormat 
+        The image format.
+*/
+void CWebCamera::EnumerateCaptureSizes(TSize& aSize, TInt aSizeIndex, TFormat aFormat) const
+	{
+	if (aSizeIndex < 0 || aSizeIndex >= iInfo.iNumImageSizesSupported ||
+		!(aFormat & iInfo.iImageFormatsSupported) )
+		{
+		aSize = TSize(0,0);
+		}
+	else
+		{
+		aSize = iImageSizes[aSizeIndex];
+		}
+	}
+
+/** 
+from CCamera
+
+Prepares for video capture.
+
+Performs setup and allocation of memory prior to calling StartVideoCapture()
+to keep the latency of that function to a minimum.
+
+May leave with KErrNotSupported or KErrNoMemory.
+
+@param  aFormat 
+        Format must be one of the video frame formats supported (see
+        TCameraInfo::iVideoFrameFormatsSupported).
+@param  aSizeIndex 
+        Size index  must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1
+        inclusive.
+@param  aRateIndex 
+        The rate must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1
+        inclusive.
+@param  aBuffersToUse 
+        The number of discrete buffers to use.
+@param  aFramesPerBuffer 
+        How large the buffers are to be. Must be less than
+        or equal to TCameraInfo::iMaxFramesPerBufferSupported. One buffer is returned
+        to MCameraObserver::FrameBufferReady() at a time.
+
+@leave  May leave with KErrNotSupported, KErrNoMemory, or KErrNotReady if PowerOn() 
+		hasn't been called successfully.
+
+@see 	CCamera::CCameraVideoCaptureControl::PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters)
+*/
+void CWebCamera::PrepareVideoCaptureL(TFormat /*aFormat*/,TInt /*aSizeIndex*/,TInt /*aRateIndex*/,TInt /*aBuffersToUse*/,TInt /*aFramesPerBuffer*/)
+	{
+	}
+
+/** 
+from CCamera
+
+Prepares for video capture and clips the frames to the given rectangle.
+
+Performs setup and allocation of memory prior to calling StartVideoCapture()
+to keep the latency of that function to a minimum.
+
+May leave with KErrNotSupported or KErrNoMemory.
+
+@param  aFormat 
+        Format must be one of the video frame formats supported (see
+        TCameraInfo::iVideoFrameFormatsSupported).
+@param  aSizeIndex 
+        Size index must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1
+        inclusive.
+@param  aRateIndex 
+        The rate must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1
+        inclusive.
+@param  aBuffersToUse 
+        The number of discrete buffers to use.
+@param  aFramesPerBuffer 
+        How large the buffers are to be. Must be less than
+        or equal to TCameraInfo::iMaxFramesPerBufferSupported. One buffer is returned
+        to MCameraObserver::FrameBufferReady() at a time.
+@param  aClipRect 
+        The rectangle to which the image is to be clipped.
+@leave  KErrNotSupported
+@leave  KErrNoMemory, 
+@leave  KErrInUse if Reserve() hasn't been called successfully
+@leave  KErrNotReady if PowerOn() hasn't been called successfully.
+
+@see 	CCamera::CCameraVideoCaptureControl::PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters)
+*/
+void CWebCamera::PrepareVideoCaptureL(TFormat /*aFormat*/,TInt /*aSizeIndex*/,TInt /*aRateIndex*/,TInt /*aBuffersToUse*/,TInt /*aFramesPerBuffer*/,const TRect& /*aClipRect*/)
+	{
+	}
+
+/** 
+from CCamera
+
+Starts capturing video.
+
+Calls MCameraObserver::FrameBufferReady() when each buffer has been filled
+with the required number of frames, as set by PrepareVideoCaptureL(). 
+*/
+void CWebCamera::StartVideoCapture()
+	{
+	}
+
+/** 
+from CCamera
+
+Stops video capture. 
+*/
+void CWebCamera::StopVideoCapture()
+	{
+	}
+
+/** 
+from CCamera
+
+Tests whether video capture is active.
+
+@return  ETrue if video capture is active. EFalse if video capture is not active 
+*/
+TBool CWebCamera::VideoCaptureActive() const
+	{
+	return EFalse;
+	}
+
+/** 
+from CCamera
+
+Enumerates through the available video frame sizes, based on the specified
+size index and format.
+
+@param  aSize 
+        On return the available video frame sizes. Sizes should be returned
+        in order, largest first, so clients do not have to iterate through every one.
+@param  aSizeIndex 
+        Size index. Must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1
+        inclusive
+@param  aFormat 
+        Image format. 
+*/
+void CWebCamera::EnumerateVideoFrameSizes(TSize& /*aSize*/,TInt /*aSizeIndex*/,TFormat /*aFormat*/) const
+	{
+	}
+
+/** 
+from CCamera
+
+Enumerates through the available video frame rates, based on the specified
+rate index, video frame format, size index and exposure mode.
+
+@param  aRate 
+        On return, the available video frame rates. Some rates may not
+        be available due to, for example, current flash mode setting. In those cases
+        a rate of 0 will be returned. Rates should be returned in order, highest first,
+        so clients do not have to iterate through every one.
+@param  aRateIndex 
+        The rate index. Must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1
+        inclusive.
+@param  aFormat 
+        The format.
+@param  aSizeIndex 
+        The size index.
+@param  aExposure 
+        The exposure mode. 
+*/
+void CWebCamera::EnumerateVideoFrameRates(TReal32& /*aRate*/,TInt /*aRateIndex*/,TFormat /*aFormat*/,TInt /*aSizeIndex*/,TExposure /*aExposure = EExposureAuto*/) const
+	{
+	}
+
+/** 
+from CCamera
+
+Gets the frame size currently in use.
+
+@param  aSize 
+        The frame size currently in use. 
+*/
+void CWebCamera::GetFrameSize(TSize& /*aSize*/) const
+	{
+	}
+
+/** 
+from CCamera
+
+Gets the frame rate currently in use.
+
+@return  The frame rate currently in use. 
+*/
+TReal32 CWebCamera::FrameRate() const
+	{
+	return 0.0;
+	}
+
+/** 
+from CCamera
+
+Gets the number of buffers currently in use.
+
+@return  The number of buffers currently in use. 
+*/
+TInt CWebCamera::BuffersInUse() const
+	{
+	return 0;
+	}
+
+/** 
+from CCamera
+
+Gets the number of frames per buffer currently in use.
+
+@return  The number of frames per buffer currently in use. 
+*/
+TInt CWebCamera::FramesPerBuffer() const
+	{
+	return 0;
+	}
+
+/** 
+from CCamera
+
+Sets the quality value to use if jpeg is a supported image for video format.
+
+Ignored if jpeg is not a supported image for video format.
+
+@param  aQuality
+        The quality value to use, clamped to the range 1 to 100.
+        
+@see	CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters::iImageMaxMemorySize
+*/
+void CWebCamera::SetJpegQuality(TInt /*aQuality*/)
+	{
+	}
+
+/**
+from CCamera
+
+Gets the currently set jpeg quality value.
+
+Returns 0 if not supported.
+
+@return The currently set jpeg quality value.
+
+@see    CCamera::CCameraPreImageCaptureControl::GetImageMaxMemorySizeL(TUint& aMemorySize)
+*/
+TInt CWebCamera::JpegQuality() const
+	{
+	return 0;
+	}
+
+/**
+from CCamera
+
+Gets a custom interface. The client has to cast the returned pointer
+to the appropriate type.
+
+@param aInterface
+	   The Uid of the particular interface function required.
+
+@return Custom interface pointer. NULL if the requested interface is not supported.
+*/
+TAny* CWebCamera::CustomInterface(TUid aInterface)
+	{
+	switch(aInterface.iUid)
+		{
+	// advanced settings interface pointers
+	case KECamMCameraAdvancedSettingsUidValue:
+		iAdvSettingsImpl = CWebCameraAdvSet::NewL(*this);
+		return static_cast<MCameraAdvancedSettings*>(iAdvSettingsImpl);
+
+	case KECamMCameraAdvancedSettings2UidValue:
+		iAdvSettingsImpl = CWebCameraAdvSet::NewL(*this);
+		return static_cast<MCameraAdvancedSettings2*>(iAdvSettingsImpl);
+
+	case KECamMCameraAdvancedSettings3UidValue:
+		iAdvSettingsImpl = CWebCameraAdvSet::NewL(*this);
+		return static_cast<MCameraAdvancedSettings3*>(iAdvSettingsImpl);
+
+	default:
+		return NULL;
+		}
+	}
+
+/**
+from MWebCameraActiveCallBack
+
+CallBack function of the Reserve
+*/
+void CWebCamera::ReserveCallBack(TInt aError)
+	{
+	RDebug::Print(_L("CWebCamera::ReserveCallBack"));
+
+	if (iObserver)
+		{
+		iObserver->ReserveComplete(aError);
+		}
+	else if (iObserver2)
+		{
+		const TECAMEvent wEvent(KUidECamEventReserveComplete, aError);
+		iObserver2->HandleEvent(wEvent);
+		}
+	}
+
+/**
+from MWebCameraActiveCallBack
+
+CallBack function of the PowerOn
+*/
+void CWebCamera::PowerOnCallBack(TInt aError)
+	{
+	RDebug::Print(_L("CWebCamera::PowerOnCallBack"));
+
+	if (iObserver)
+		{
+		iObserver->PowerOnComplete(aError);
+		}
+	else if (iObserver2)
+		{
+		const TECAMEvent wEvent(KUidECamEventPowerOnComplete, aError);
+		iObserver2->HandleEvent(wEvent);
+		}
+	}
+
+/**
+from MWebCameraActiveCallBack
+
+CallBack function of the ImageCapture
+*/
+void CWebCamera::ImageCaptureCallBackL(TInt aError)
+	{
+	RDebug::Print(_L("CWebCamera::ImageCaptureCallBack_S"));
+
+	iImageCaptureActive = EFalse;
+
+	iCaptureBitmap = NULL;
+	CFbsBitmap* image = new (ELeave) CFbsBitmap();
+	CleanupStack::PushL(image);
+	User::LeaveIfError(image->Create(TSize(KCaptureWidth, KCaptureHeight), EColor16M));
+	CleanupStack::Pop(image);
+	iCaptureBitmap = image;
+
+////////////////////////////////////////////////////////////////////////////////////////
+// output receive data log
+//	RDebug::Print(_L("CWebCameraVfActive::ImageCaptureCallBack iCaptureBufPtr[%d]"), iCaptureBufPtr.Length());
+//	TBuf<256> hexBuf;
+//	for (TInt i = 0; i < iCaptureBufPtr.Length(); i++)
+//		{
+//		hexBuf.AppendFormat(_L("%02X "), iCaptureBufPtr[i]);
+//		if ((i % 16) == 15)
+//			{
+//			RDebug::Print(hexBuf);
+//			hexBuf = KNullDesC;
+//			}
+//		}
+//	RDebug::Print(hexBuf);
+////////////////////////////////////////////////////////////////////////////////////////
+
+	RDebug::Print(_L("CWebCamera::ImageCaptureCallBack start setscanline_S"));
+	for (TInt height=0; height<KCaptureHeight; height++)
+		{
+		TInt pos = height * KCaptureLineBytes;
+		TPtrC8 posptr = iCaptureBuf->Mid(pos, KCaptureLineBytes);
+		TBuf8<KCaptureLineBytes>  buf;
+		buf.Copy(posptr);
+		iCaptureBitmap->SetScanLine(buf, ((KCaptureHeight-1)-height));
+		}
+	RDebug::Print(_L("CWebCamera::ImageCaptureCallBack start setscanline_E"));
+
+	if (iObserver)
+		{
+		iObserver->ImageReady(iCaptureBitmap, iCaptureBuf, aError);
+		}
+	else if (iObserver2)
+		{
+		iObserver2->ImageBufferReady(*iCaptureCameraBuf, aError);
+		}
+
+	RDebug::Print(_L("CWebCamera::ImageCaptureCallBack_E"));
+	}
+
+//from MWebCameraVfActiveCallBack
+void CWebCamera::ViewFinderCallBack(TInt /*aError*/)
+	{
+	RDebug::Print(_L("CWebCamera::ViewFinderCallBack"));
+	}
+
+
+//
+// CWebCameraInfo class
+//
+
+CWebCameraInfo::CWebCameraInfo()
+	{
+	}
+	
+CWebCameraInfo::~CWebCameraInfo()
+	{
+	}
+	
+CWebCameraInfo* CWebCameraInfo::NewL()
+	{
+	return new (ELeave) CWebCameraInfo;
+	}
+
+/** 
+from CCameraInfoPlugin
+
+Determines the number of cameras on the device.
+
+@return Count of cameras present on the device.
+*/
+TInt CWebCameraInfo::CamerasAvailable()
+	{
+	return 1;
+	}
+
+
+// __________________________________________________________________________
+// Exported proxy for instantiation method resolution
+// Define the interface UIDs
+const TImplementationProxy ImplementationTable[] = 
+	{
+		IMPLEMENTATION_PROXY_ENTRY(KUidOnboardWebCameraPlugin,	CWebCamera::NewL),
+		IMPLEMENTATION_PROXY_ENTRY(KUidOnboardWebCameraInfo,	CWebCameraInfo::NewL)
+	};
+
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+	{
+	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+
+	return ImplementationTable;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/source/webcamera/ecamwebcameraplugin.h	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,1027 @@
+/*
+* Copyright (c) 2010 ISB.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* ISB - Initial contribution
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef ECAMWEBCAMERAPLUGIN_H
+#define ECAMWEBCAMERAPLUGIN_H
+
+#include <w32std.h>
+#include <bitdev.h>
+#include <ecam/ecamplugin.h>
+#include <ecam/ecaminfoplugin.h>
+#include <webcamera_driver.h>
+
+
+class CWebCameraBuffer;
+class CWebCameraActive;
+class CWebCameraVfActive;
+class CWebCameraAdvSet;
+
+/**  Min of Camera Zoom */
+const TInt KMinTestCameraZoom = -3;
+/**  Max of Camera Zoom */
+const TInt KMaxTestCameraZoom = 3;
+/**  Max of Camera Digital Zoom Factor */
+const TReal32 KMaxTestCameraDigitalZoomFactor = 1.0;
+/**  Max of Camera Digital Zoom */
+const TInt KMaxTestCameraDigitalZoom = 0;
+/**  Size of Viewfinder buffer, Capture buffer */
+const TInt KMaxBufSize = 1024 * 100;
+
+
+// Callback Class of WebCameraActive
+class MWebCameraActiveCallBack
+	{
+public:
+	virtual void ReserveCallBack(TInt aError) = 0;
+	virtual void PowerOnCallBack(TInt aError) = 0;
+	virtual void ImageCaptureCallBackL(TInt aError) = 0;
+	};
+
+// Callback Class of WebCameraVfActive
+class MWebCameraVfActiveCallBack
+	{
+public:
+	virtual void ViewFinderCallBack(TInt aError) = 0;
+	};
+
+/**
+ *  Perform WebCamera function.
+ */
+class CWebCamera : public CCameraPlugin
+				 , public MWebCameraActiveCallBack
+				 , public MWebCameraVfActiveCallBack
+	{
+public:
+	static CWebCamera* NewL();
+	~CWebCamera();
+	
+protected:
+
+	//from CCameraPlugin
+	/** 
+	from CCameraPlugin
+	
+	A call to one of the factory functions firstly loads the plugin, followed by a
+	call to this function to complete construction.
+	
+	Creates an object representing a camera.
+	
+	@param  aObserver
+	        Reference to class derived from MCameraObserver2 designed to receive
+	        notification of asynchronous event completion.
+	@param	aCameraIndex
+	        Index from 0 to CamerasAvailable()-1 inclusive specifying the
+	        camera device to use.
+	@return Pointer to a fully constructed CCamera object. Ownership is passed
+	        to the caller.
+
+	@leave  May leave with KErrNoMemory or KErrNotSupported if aCameraIndex is
+	        out of range.	
+	*/
+	void Construct2L(MCameraObserver& aObserver,TInt aCameraIndex);
+
+	/** 
+	from CCameraPlugin
+
+	A call to one of the factory functions firstly loads the plugin, followed by a
+	call to this function to complete construction.
+	
+	Duplicates the original camera object for use by, for example, multimedia systems.
+
+	May leave with KErrNoMemory or KErrNotFound if aCameraHandle is not valid.
+
+	@param  aObserver
+	        Reference to an observer.
+	@param  aCameraHandle Handle of an existing camera object.
+
+	@return Duplicate of the original camera object. 
+	*/
+	void Construct2DupL(MCameraObserver& aObserver,TInt aCameraHandle);
+
+    /** 
+	from CCameraPlugin
+
+    A call to one of the factory functions firstly loads the plugin, followed by a
+	call to this function to complete construction.
+    
+	Creates an object representing a camera.
+	
+	@param  aObserver
+	        Reference to class derived from MCameraObserver2 designed to receive
+	        notification of asynchronous event completion.
+	@param	aCameraIndex
+	        Index from 0 to CamerasAvailable()-1 inclusive specifying the
+	        camera device to use.
+	@param	aPriority
+	        Value from -100 to 100 indicating relative priority of client to
+	        use camera.
+
+	@return Pointer to a fully constructed CCamera object. Ownership is passed
+	        to the caller.
+
+	@leave  May leave with KErrNoMemory or KErrNotSupported if aCameraIndex is
+	        out of range.
+	*/
+	void Construct2L(MCameraObserver2& aObserver,TInt aCameraIndex,TInt aPriority);
+
+	/** 
+	from CCameraPlugin
+
+	Duplicates the original camera object for use by, for example, multimedia systems.
+
+	@leave  KErrNoMemory if out of memory.
+	@leave  KErrNotFound if aCameraHandle is not valid.	   
+	@leave  KErrPermissionDenied if the application does not have
+	        the UserEnvironment capability.
+
+	@param  aObserver
+	        Reference to an observer.
+	@param  aCameraHandle Handle of an existing camera object.
+
+	@return Duplicate of the original camera object. 
+	
+	@capability	UserEnvironment
+				An application that creates a CCamera object must have
+				the UserEnvironment capability.
+				
+	@note   Applications using this method to create camera object may not receive enums/uids added in future(after being baselined). 
+			To receive them, they should rather use New2L() or NewDuplicate2L(), in which case, they should prepare 
+			themselves to receive unrecognised values.
+	*/
+	void Construct2DupL(MCameraObserver2& aObserver,TInt aCameraHandle);
+
+	// from CCamera
+	/**
+	from CCamera
+	
+	Gets information about the camera device.
+
+	@param  aInfo 
+	        On return, information about the camera device. See TCameraInfo. 
+	*/
+	void CameraInfo(TCameraInfo& aInfo) const;
+	
+	/** 
+	from CCamera
+
+	Asynchronous function that performs any required initialisation and reserves
+	the camera for exclusive use.
+
+	Calls MCameraObserver:: ReserveComplete() when complete. 
+	*/
+	void Reserve();
+
+	/** 
+	from CCamera
+
+	De-initialises the camera, allowing it to be used by other clients. 
+	*/
+	void Release();
+
+
+	/** 
+	from CCamera
+
+	Asynchronous method to switch on camera power.
+
+	User must have successfully called Reserve() prior to calling this function.
+
+	Calls MCameraObserver::PowerOnComplete() when power on is complete. 
+	*/
+	void PowerOn();
+
+	/** 
+	from CCamera
+
+	Synchronous function for switching off camera power. 
+	*/
+	void PowerOff();
+
+
+	/**
+	from CCamera
+
+	Gets the device-unique handle of this camera object.
+
+	@return  The device-unique handle of this camera object. 
+	*/
+	TInt Handle();
+
+
+	/** 
+	from CCamera
+
+	Sets the zoom factor.
+
+	This must be in the range of TCameraInfo::iMinZoom to TCameraInfo::iMaxZoom
+	inclusive. May leave with KErrNotSupported if the specified zoom factor is
+	out of range.
+
+	@param aZoomFactor 
+	       Required zoom factor.
+	*/
+	void SetZoomFactorL(TInt aZoomFactor = 0);
+
+
+	/** 
+	from CCamera
+
+	Gets the currently set zoom factor.
+
+	@return  The currently set zoom factor.
+	*/
+	TInt ZoomFactor() const;
+
+	/** 
+	from CCamera
+
+	Sets the digital zoom factor.
+
+	This must be in the range of 0 to TCameraInfo::iMaxDigitalZoom inclusive.
+
+	May leave with KErrNotSupported if the zoom factor is out of range.
+
+	@param  aDigitalZoomFactor
+	        The required digital zoom factor. 
+	*/
+	void SetDigitalZoomFactorL(TInt aDigitalZoomFactor = 0);
+
+
+	/** 
+	from CCamera
+
+	Gets the currently set digital zoom factor.
+
+	@return  The currently set digital zoom factor. 
+	*/
+	TInt DigitalZoomFactor() const;
+
+
+	/**
+	from CCamera
+
+	Sets the contrast adjustment of the device.
+
+	This must be in the range of -100 to +100 or EContrastAuto. May leave with
+	KErrNotSupported if the specified contrast value is out of range.
+
+	@param  aContrast 
+	        Required contrast value. See TCameraInfo::iContrastSupported 
+	*/
+	void SetContrastL(TInt aContrast);
+
+
+	/** 
+	from CCamera
+
+	Gets the currently set contrast value.
+
+	@return  The currently set contrast value.
+	*/
+	TInt Contrast() const;
+
+	/** 
+	from CCamera
+
+	Sets the brightness adjustment of the device.
+
+	No effect if this is not supported, see TCameraInfo::iBrightnessSupported.
+
+	This must be in the range of -100 to +100 or EBrightnessAuto. May leave
+	with KErrNotSupported if the brightness adjustment is out of range.
+
+	@param  aBrightness
+	        The required brightness adjustment. 
+	*/
+	void SetBrightnessL(TInt aBrightness);
+
+	/** 
+	from CCamera
+
+	Gets the currently set brightness adjustment value.
+
+	@return  The currently set brightness adjustment value. 
+	*/
+	TInt Brightness() const;
+
+	/** 
+	from CCamera
+
+	Sets the flash mode.
+
+	No effect if this is not supported, see TCameraInfo::iFlashModesSupported.
+
+	May leave with KErrNotSupported if the specified flash mode is invalid.
+
+	@param  aFlash
+	        The required flash mode. 
+	*/
+	void SetFlashL(TFlash aFlash = EFlashNone);
+
+	/** 
+	from CCamera
+
+	Gets the currently set flash mode.
+
+	@return  The currently set flash mode. 
+	@note	if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that 
+    application is not prepared to receive extra added enum values (unrecognised). So, any extra enum value(unrecognised)
+    (set in the ECAM implementation because of sharing clients) should not be returned from the ECAM implementation.
+    To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() 
+    to create camera object. ECAM implementation, after verifying this,(by checking version no.) may send new values, if set.
+    In this case, application is assumed to be prepared to receive unrecognised enum values.
+    
+    @see CCamera::CCameraAdvancedSettings::FlashMode()	
+	*/
+	TFlash Flash() const;
+
+	/** 
+	from CCamera
+
+	Sets the exposure adjustment of the device.
+
+	No effect if this is not supported, see CameraInfo::iExposureModesSupported.
+
+	May leave with KErrNotSupported if the specified exposure adjustment is invalid.
+
+	@param  aExposure
+	        The required exposure adjustment. 
+	*/
+	void SetExposureL(TExposure aExposure = EExposureAuto);
+
+	/** 
+	from CCamera
+
+	Gets the currently set exposure setting value.
+
+	@return  The currently set exposure setting value. 
+	*/
+	TExposure Exposure() const;
+
+	/** 
+	from CCamera
+
+	Sets the white balance adjustment of the device.
+
+	No effect if this is not supported, see TCameraInfo::iWhiteBalanceModesSupported.
+
+	@param  aWhiteBalance
+	        The required white balance adjustment.
+
+	@leave  KErrNotSupported if the specified white balance adjustment
+	        is invalid.
+	*/
+	void SetWhiteBalanceL(TWhiteBalance aWhiteBalance = EWBAuto);
+
+	/** 
+	from CCamera
+
+	Gets the currently set white balance adjustment value.
+
+	@return  The currently set white balance adjustment value.
+	
+	@note	if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that 
+    application is not prepared to receive extra added enum values (unrecognised). So, any extra enum value(unrecognised)
+    (set in the ECAM implementation because of sharing clients) should not be returned from the ECAM implementation.
+    To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() 
+    to create camera object. ECAM implementation, after verifying this,(by checking version no.) may send new values, if set.
+    In this case, application is assumed to be prepared to receive unrecognised enum values.
+    Refer  CCamera::CCameraAdvancedSettings::WhiteBalanceMode() implementation
+    
+    @see CCamera::CCameraAdvancedSettings::WhiteBalanceMode()
+    */
+	TWhiteBalance WhiteBalance() const;
+
+	/** 
+	from CCamera
+
+	Starts transfer of view finder data to the given portion of the screen using
+	direct screen access.
+
+	The aScreenRect parameter is in screen co-ordinates and may be modified if,
+	eg, the camera requires the destination to have a certain byte alignment, etc.
+
+    @param  aWs 
+	        Window server session.
+	@param  aScreenDevice 
+	        Screen device.
+	@param  aWindow 
+	        Displayable window.
+	@param  aScreenRect 
+	        Portion of the screen to which view finder data is to be
+	        transferred. This is in screen co-ordinates and may be modified if, for example,
+	        the camera requires the destination to have a certain byte alignment.
+
+	@leave  KErrNotReady if PowerOn() has either not
+	        been called, or has not yet completed.
+	
+	@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
+			refer viewfinders started using CCamera methods. 
+	
+	@see	CCamera::CCameraV2DirectViewFinder
+	*/
+	void StartViewFinderDirectL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWindow,TRect& aScreenRect);
+
+	/** 
+	from CCamera
+
+	Starts transfer of view finder data to the given portion of the screen using
+	direct screen access and also clips to the specified portion of the screen.
+
+	The view finder has the same size and position as aScreenRect but is only
+	visible in the intersection of aScreenRect and aClipRect. May leave with KErrNotSupported
+	or KErrNotReady if Reserve() has not been called, or has not yet completed.
+
+	@param  aWs 
+	        Window server session.
+	@param  aScreenDevice 
+	        Screen device.
+	@param  aWindow 
+	        Displayable window.
+	@param  aScreenRect 
+	        Portion of the screen to which view finder data is to be
+	        transferred. This is in screen co-ordinates and may be modified if, for example,
+	        the camera requires the destination to have a certain byte alignment.
+	@param  aClipRect
+	        The rectangle to which the screen will be clipped.
+
+    @leave  KErrNotReady if PowerOn() hasn't been called successfully. 
+    
+    @note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
+    		refer viewfinders started using CCamera methods.
+	
+	@see	CCamera::CCameraClientViewFinder
+	*/
+	void StartViewFinderDirectL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWindow,TRect& aScreenRect,TRect& aClipRect);
+
+	/** 
+	from CCamera
+
+	Starts transfer of view finder data.
+
+	Bitmaps are returned by MCameraObserver::ViewFinderFrameReady().
+
+	@param  aSize 
+	        On return, the size used.
+	@leave  KErrNotReady if PowerOn() has not been called, or has not yet completed.
+	
+	@note   This method is assumed to be meant for default display only. 
+	
+	@see	CCamera::CCameraClientViewFinder 
+	*/
+	void StartViewFinderBitmapsL(TSize& aSize);	
+
+	/** 
+	from CCamera
+
+	Starts transfer of view finder data and clips the bitmap to the specified clip
+	rectangle.
+
+	The bitmap is the size of the intersection of aSize and aClipRect, not simply
+	aSize padded with white space.
+
+	@param  aSize
+	        On return, the size used.
+	@param  aClipRect 
+	        Required clip rectangle. May be modified if, for example,
+	        the camera only supports certain byte alignments.
+
+	@leave  KErrInUse if Reserve() hasn't been called successfully.
+	@leave  KErrNotReady if PowerOn() hasn't been called successfully.
+	
+	@note   This method is assumed to be meant for default display only. 
+	
+	@see	CCamera::CCameraClientViewFinder
+	*/
+	void StartViewFinderBitmapsL(TSize& aSize,TRect& aClipRect);
+
+	/** 
+	from CCamera
+
+	Starts transfer of view finder data.
+
+	Picture data is returned by MCameraObserver2::ViewFinderReady().
+
+	@param  aImageFormat 
+	        The image format requested by the client.
+	@param  aSize 
+	        On return, the size used.
+	@leave  KErrNotSupported 
+	@leave  KErrNotReady if Reserve() has not been
+	        called, or has not yet completed. 
+	
+	@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
+			refer viewfinders started using CCamera methods.
+	
+	@see	CCamera::CCameraClientViewFinder
+	*/
+	void StartViewFinderL(TFormat aImageFormat,TSize& aSize);
+
+	/** 
+	from CCamera
+
+	Starts transfer of view finder data and clips the picture to the specified clip
+	rectangle. Picture data is returned by MCameraObserver2::ViewFinderReady().
+
+	The picture is the size of the intersection of aSize and aClipRect, not simply
+	aSize padded with white space.
+
+	@param  aImageFormat 
+	        The image format.
+	@param  aSize
+	        On return, the size used.
+	@param  aClipRect 
+	        Required clip rectangle. May be modified if, for example,
+	        the camera only supports certain byte alignments.
+
+	@leave  KErrInUse if Reserve() hasn't been called successfully,
+	@leave  KErrNotReady if PowerOn() hasn't been called successfully.
+	
+	@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
+			refer viewfinders started using CCamera methods.
+	
+	@see	CCamera::CCameraClientViewFinder
+	*/
+	void StartViewFinderL(TFormat aImageFormat,TSize& aSize,TRect& aClipRect);
+
+	/** 
+	Stops transfer of view finder data to the screen. 
+	
+	@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
+			refer viewfinders started using CCamera methods.
+	
+	@see	CCamera::CCameraV2DirectViewFinder
+	@see	CCamera::CCameraClientViewFinder
+	*/
+	void StopViewFinder();
+
+	/** 
+	from CCamera
+
+	Queries whether the view finder is active.
+
+	@return  ETrue if the view finder is active. EFalse if the view finder is not
+	         active. 
+	         
+	@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
+			refer viewfinders started using CCamera methods.
+	
+	@see	CCamera::CCameraV2DirectViewFinder
+	@see	CCamera::CCameraClientViewFinder
+	*/
+	TBool ViewFinderActive() const;
+
+	/** 
+	from CCamera
+
+	Sets whether view finder mirroring is on.
+
+	Used to switch between what the camera sees and what you would see if the
+	device were a mirror.
+
+	@param  aMirror 
+	        ETrue to set mirroring on, EFalse to set mirroring off.
+
+	@leave  KErrNotSupported.
+	
+	@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
+			refer viewfinders started using CCamera methods.
+	
+	@see	CCamera::CCameraV2DirectViewFinder
+	@see	CCamera::CCameraClientViewFinder
+	*/
+	void SetViewFinderMirrorL(TBool aMirror);
+
+	/** 
+	from CCamera
+
+	Gets whether view finder mirroring is active.
+
+	@return  ETrue if mirroring is set, EFalse if mirroring is not set. 
+	
+	@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
+			refer viewfinders started using CCamera methods.
+	
+	@see	CCamera::CCameraV2DirectViewFinder
+	@see	CCamera::CCameraClientViewFinder
+	*/
+	TBool ViewFinderMirror() const;
+
+	/** 
+	from CCamera
+
+	Performs setup and allocation of memory.
+
+	Called prior to calling CaptureImage() to keep the latency of that function
+	to a minimum.
+
+	Needs to be called only once for multiple CaptureImage() calls. May leave
+	with KErrNotSupported or KErrNoMemory or KErrInUse or KErrNotReady.
+
+	The specified image format must be one of the formats supported
+	(see TCameraInfo::iImageFormatsSupported).
+
+	The specified size index must be in the range of 0 to TCameraInfo::iNumImageSizesSupported-1
+	inclusive.
+
+	@param  aImageFormat 
+	        The image format.
+	@param  aSizeIndex 
+	        Size index.
+
+	@leave  KErrNotSupported
+	@leave  KErrNoMemory
+	@leave  KErrNotReady if PowerOn() hasn't been called successfully.
+	
+	@see 	CCamera::CCameraPreImageCaptureControl::PrepareImageCapture(TPrepareImageParameters aPrepareImageParameters)
+	*/
+	void PrepareImageCaptureL(TFormat aImageFormat,TInt aSizeIndex);
+
+	/** 
+	from CCamera
+
+	Performs setup and allocation of memory and clips the image to the specified
+	rectangle.
+
+	No effect unless TCameraInfo::iImageClippingSupported is set to ETrue. The
+	image captured is the intersection of aClipRect and the rectangle from (0,0)
+	to aSize. Needs to be called only once for multiple CaptureImage() calls.
+	May leave with KErrNotSupported or KErrNoMemory.
+
+	The specified image format must be one of the formats supported (see TCameraInfo::iImageFormatsSupported).
+
+	The specified size index must be in the range of 0 to TCameraInfo::iNumImageSizesSupported-1
+	inclusive.
+
+	@param  aImageFormat 
+	        The image format.
+	@param  aSizeIndex 
+	        Size index.
+	@param  aClipRect
+	        The rectangle to which the image is to be clipped.
+
+	@leave   KErrNotSupported
+	@leave   KErrNoMemory
+	@leave   KErrInUse if Reserve() hasn't been called successfully
+	@leave   KErrNotReady if PowerOn()
+	         hasn't been called successfully.
+	
+	@see 	CCamera::CCameraPreImageCaptureControl::PrepareImageCapture(TPrepareImageParameters aPrepareImageParameters)
+	*/
+	void PrepareImageCaptureL(TFormat aImageFormat,TInt aSizeIndex,const TRect& aClipRect);
+
+	/** 
+	from CCamera
+
+	Asynchronously performs still image capture.
+
+	Calls MCameraObserver::ImageReady() when complete. 
+	
+	@see CCamera::CCameraImageCapture
+	@see CCamera::CCameraPreImageCaptureControl
+	*/
+	void CaptureImage();
+
+	/** 
+	from CCamera
+
+	Cancels the asynchronous still image capture. 
+	
+	@see CCamera::CCameraImageCapture
+	*/
+	void CancelCaptureImage();
+
+	/** 
+	from CCamera
+
+	Enumerates through the available image capture sizes, based on the specified
+	size index and format
+
+	The size index must be in the range 0 to TCameraInfo::iNumImageSizesSupported-1
+	inclusive.
+
+	@param  aSize 
+	        Image size.
+	@param  aSizeIndex 
+	        Size index.
+	@param  aFormat 
+	        The image format.
+	*/
+	void EnumerateCaptureSizes(TSize& aSize,TInt aSizeIndex,TFormat aFormat) const;
+
+	/** 
+	from CCamera
+
+	Prepares for video capture.
+
+	Performs setup and allocation of memory prior to calling StartVideoCapture()
+	to keep the latency of that function to a minimum.
+
+	May leave with KErrNotSupported or KErrNoMemory.
+
+	@param  aFormat 
+	        Format must be one of the video frame formats supported (see
+	        TCameraInfo::iVideoFrameFormatsSupported).
+	@param  aSizeIndex 
+	        Size index  must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1
+	        inclusive.
+	@param  aRateIndex 
+	        The rate must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1
+	        inclusive.
+	@param  aBuffersToUse 
+	        The number of discrete buffers to use.
+	@param  aFramesPerBuffer 
+	        How large the buffers are to be. Must be less than
+	        or equal to TCameraInfo::iMaxFramesPerBufferSupported. One buffer is returned
+	        to MCameraObserver::FrameBufferReady() at a time.
+
+	@leave  May leave with KErrNotSupported, KErrNoMemory, or KErrNotReady if PowerOn() 
+			hasn't been called successfully.
+	
+	@see 	CCamera::CCameraVideoCaptureControl::PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters)
+	*/
+	void PrepareVideoCaptureL(TFormat aFormat,TInt aSizeIndex,TInt aRateIndex,TInt aBuffersToUse,TInt aFramesPerBuffer);
+
+	/** 
+	from CCamera
+
+	Prepares for video capture and clips the frames to the given rectangle.
+
+	Performs setup and allocation of memory prior to calling StartVideoCapture()
+	to keep the latency of that function to a minimum.
+
+	May leave with KErrNotSupported or KErrNoMemory.
+
+	@param  aFormat 
+	        Format must be one of the video frame formats supported (see
+	        TCameraInfo::iVideoFrameFormatsSupported).
+	@param  aSizeIndex 
+	        Size index must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1
+	        inclusive.
+	@param  aRateIndex 
+	        The rate must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1
+	        inclusive.
+	@param  aBuffersToUse 
+	        The number of discrete buffers to use.
+	@param  aFramesPerBuffer 
+	        How large the buffers are to be. Must be less than
+	        or equal to TCameraInfo::iMaxFramesPerBufferSupported. One buffer is returned
+	        to MCameraObserver::FrameBufferReady() at a time.
+	@param  aClipRect 
+	        The rectangle to which the image is to be clipped.
+	@leave  KErrNotSupported
+	@leave  KErrNoMemory, 
+	@leave  KErrInUse if Reserve() hasn't been called successfully
+	@leave  KErrNotReady if PowerOn() hasn't been called successfully.
+
+	@see 	CCamera::CCameraVideoCaptureControl::PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters)
+	*/
+	void PrepareVideoCaptureL(TFormat aFormat,TInt aSizeIndex,TInt aRateIndex,TInt aBuffersToUse,TInt aFramesPerBuffer,const TRect& aClipRect);
+
+	/** 
+	from CCamera
+
+	Starts capturing video.
+
+	Calls MCameraObserver::FrameBufferReady() when each buffer has been filled
+	with the required number of frames, as set by PrepareVideoCaptureL(). 
+	*/
+	void StartVideoCapture();
+
+	/** 
+	from CCamera
+
+	Stops video capture. 
+	*/
+	void StopVideoCapture();
+
+	/** 
+	from CCamera
+
+	Tests whether video capture is active.
+
+	@return  ETrue if video capture is active. EFalse if video capture is not active 
+	*/
+	TBool VideoCaptureActive() const;
+
+	/** 
+	from CCamera
+
+	Enumerates through the available video frame sizes, based on the specified
+	size index and format.
+
+	@param  aSize 
+	        On return the available video frame sizes. Sizes should be returned
+	        in order, largest first, so clients do not have to iterate through every one.
+	@param  aSizeIndex 
+	        Size index. Must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1
+	        inclusive
+	@param  aFormat 
+	        Image format. 
+	*/
+	void EnumerateVideoFrameSizes(TSize& aSize,TInt aSizeIndex,TFormat aFormat) const;
+
+	/** 
+	from CCamera
+
+	Enumerates through the available video frame rates, based on the specified
+	rate index, video frame format, size index and exposure mode.
+
+	@param  aRate 
+	        On return, the available video frame rates. Some rates may not
+	        be available due to, for example, current flash mode setting. In those cases
+	        a rate of 0 will be returned. Rates should be returned in order, highest first,
+	        so clients do not have to iterate through every one.
+	@param  aRateIndex 
+	        The rate index. Must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1
+	        inclusive.
+	@param  aFormat 
+	        The format.
+	@param  aSizeIndex 
+	        The size index.
+	@param  aExposure 
+	        The exposure mode. 
+	*/
+	void EnumerateVideoFrameRates(TReal32& aRate,TInt aRateIndex,TFormat aFormat,TInt aSizeIndex,TExposure aExposure = EExposureAuto) const;
+
+	/** 
+	from CCamera
+
+	Gets the frame size currently in use.
+
+	@param  aSize 
+	        The frame size currently in use. 
+	*/
+	void GetFrameSize(TSize& aSize) const;
+
+	/** 
+	from CCamera
+
+	Gets the frame rate currently in use.
+
+	@return  The frame rate currently in use. 
+	*/
+	TReal32 FrameRate() const;
+
+	/** 
+	from CCamera
+
+	Gets the number of buffers currently in use.
+
+	@return  The number of buffers currently in use. 
+	*/
+	TInt BuffersInUse() const;
+
+	/** 
+	from CCamera
+
+	Gets the number of frames per buffer currently in use.
+
+	@return  The number of frames per buffer currently in use. 
+	*/
+	TInt FramesPerBuffer() const;
+
+	/** 
+	from CCamera
+
+	Sets the quality value to use if jpeg is a supported image for video format.
+
+	Ignored if jpeg is not a supported image for video format.
+
+	@param  aQuality
+	        The quality value to use, clamped to the range 1 to 100.
+	        
+	@see	CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters::iImageMaxMemorySize
+	*/
+	void SetJpegQuality(TInt aQuality);
+
+	/**
+	from CCamera
+
+	Gets the currently set jpeg quality value.
+
+	Returns 0 if not supported.
+
+	@return The currently set jpeg quality value.
+	
+	@see    CCamera::CCameraPreImageCaptureControl::GetImageMaxMemorySizeL(TUint& aMemorySize)
+	*/
+	TInt JpegQuality() const;
+
+    /**
+	from CCamera
+
+	Gets a custom interface. The client has to cast the returned pointer
+	to the appropriate type.
+
+	@param aInterface
+		   The Uid of the particular interface function required.
+
+	@return Custom interface pointer. NULL if the requested interface is not supported.
+	*/
+	TAny* CustomInterface(TUid aInterface);
+
+private:
+	CWebCamera();
+	void ConstructL();
+
+private: // from MWebCameraActiveCallBack
+	/**
+	from MWebCameraActiveCallBack
+	
+	CallBack function of the Reserve
+	*/
+	virtual void ReserveCallBack(TInt aError);
+
+	/**
+	from MWebCameraActiveCallBack
+	
+	CallBack function of the PowerOn
+	*/
+	virtual void PowerOnCallBack(TInt aError);
+
+	/**
+	from MWebCameraActiveCallBack
+	
+	CallBack function of the ImageCapture
+	*/
+	virtual void ImageCaptureCallBackL(TInt aError);
+
+private: // from MWebCameraActiveCallBack
+	/**
+	from MWebCameraActiveCallBack
+	
+	CallBack function of the ViewFinder
+	*/
+	virtual void ViewFinderCallBack(TInt aError);
+
+private:
+	
+	RWebcameraDevice		iDriver;			///< Camera driver.
+	MCameraObserver*		iObserver;			///< The callback 'notify' party
+	MCameraObserver2*		iObserver2;			///< The callback 'notify' party(V2).
+	CWebCameraActive*		iActive;			///< For async demand.
+	CWebCameraVfActive*		iVfActive;			///< For viewfinder.
+	CWebCameraAdvSet* 		iAdvSettingsImpl;	///< Expansion setting class.
+
+	TCameraInfo				iInfo;				///< Camera Information.
+	TInt					iCameraIndex;		///< Camera Index.
+	TInt					iCameraHandle;		///< Camera handle.
+	TInt					iPriority;			///< priority.
+
+	TBool					iReserved;			///< Reserved Flag.
+	TBool					iPowerOn;			///< PowerOn Flag.
+	TBool					iImageCaptureActive;///< Flag during the still image .
+
+	CWebCameraBuffer*		iCaptureCameraBuf;	///< Camera buffer for capture.
+	CFbsBitmap*				iCaptureBitmap;		///< Bitmap Data for capture.
+	HBufC8*					iCaptureBuf;		///< Data buffer for capture.
+	TPtr8					iCaptureBufPtr;		///< pointer to Data buffer for capture.
+
+	RArray<TSize>			iImageSizes;		///< Image size.
+	};
+
+
+class CWebCameraInfo : public CCameraInfoPlugin
+	{
+public:
+
+    /**
+     * Two-phased constructor.
+     */
+	static CWebCameraInfo* NewL();
+	
+	/**> Destructor */
+	~CWebCameraInfo();
+
+// from CCameraInfoPlugin
+public:
+	/** 
+	from CCameraInfoPlugin
+	
+	Determines the number of cameras on the device.
+
+    @return Count of cameras present on the device.
+	*/
+	TInt CamerasAvailable();
+
+private:
+	CWebCameraInfo();
+	};
+
+
+#endif // ECAMWEBCAMERAPLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/source/webcamera/ecamwebcamerapluginuids.hrh	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2010 ISB.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* ISB - Initial contribution
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef ECAMWEBCAMERAUIDS_HRH
+#define ECAMWEBCAMERAUIDS_HRH
+
+
+#define KUidOnboardWebCameraDll		0x10000001
+#define KUidOnboardWebCameraPlugin	0x10000002
+#define KUidOnboardWebCameraInfo	0x10000003
+
+#endif // ECAMWEBCAMERAUIDS_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/source/webcamera/ecamwebcameravfactive.cpp	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,246 @@
+/*
+* Copyright (c) 2010 ISB.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* ISB - Initial contribution
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "ecamwebcameravfactive.h"
+
+const TInt KVfWidth     = 160;			// viewfinder image width
+const TInt KVfHeight    = 120;			// viewfinder image height
+const TInt KVfLineBytes = KVfWidth * 3;	// bytes of one line
+
+//
+// CWebCameraVfActive
+//
+CWebCameraVfActive* CWebCameraVfActive::NewL(MWebCameraVfActiveCallBack* aOwner, RWebcameraDevice& aDriver)
+	{
+	CWebCameraVfActive* self = new(ELeave) CWebCameraVfActive(aOwner, aDriver);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+
+	return self;
+	}
+
+CWebCameraVfActive::CWebCameraVfActive(MWebCameraVfActiveCallBack* aOwner, RWebcameraDevice& aDriver)
+				   :CActive(CActive::EPriorityStandard),
+				    iOwner(aOwner),
+				    iDriver(aDriver),
+				    iVfBufPtr(NULL, 0)
+	{
+	CActiveScheduler::Add(this);
+	}
+
+CWebCameraVfActive::~CWebCameraVfActive()
+	{
+	delete iVfBitmap;
+	delete iDSA;
+	delete iVfBuf;
+	}
+
+void CWebCameraVfActive::ConstructL()
+	{
+	}
+
+/**
+* RunL.
+*/
+void CWebCameraVfActive::RunL()
+	{
+	TInt wError = iStatus.Int();
+	RDebug::Print(_L("CWebCameraVfActive::RunL wError = %d"), wError);
+
+	if (iViewFinderActive)
+		{
+		//The whole view finder start repeats screen update and the data acquisition.
+		UpdateViewL();
+		Start();
+		}
+	}
+
+void CWebCameraVfActive::DoCancel()
+	{
+	iDriver.StopViewFinder();
+	}
+
+/** 
+Starts transfer of view finder data to the given portion of the screen using
+direct screen access.
+
+The aScreenRect parameter is in screen co-ordinates and may be modified if,
+eg, the camera requires the destination to have a certain byte alignment, etc.
+
+@param  aWs 
+        Window server session.
+@param  aScreenDevice 
+        Screen device.
+@param  aWindow 
+        Displayable window.
+@param  aScreenRect 
+        Portion of the screen to which view finder data is to be
+        transferred. This is in screen co-ordinates and may be modified if, for example,
+        the camera requires the destination to have a certain byte alignment.
+*/
+void CWebCameraVfActive::StartViewFinderDirectL(RWsSession& aWs, CWsScreenDevice& aScreenDevice, RWindowBase& aWindow, TRect& aScreenRect, TRect& aClipRect)
+	{
+	iScreenRect = aScreenRect;
+	iClipRect = aClipRect;
+
+	// create buffer for view finder data
+	iVfBuf = HBufC8::NewL(KMaxBufSize);
+
+	// create DirectScreenAccess
+	delete iDSA;
+	iDSA = NULL;
+	iViewFinderActive = EFalse;
+	iDSA = CDirectScreenAccess::NewL(aWs, aScreenDevice, aWindow, *this);
+	iDSA->StartL();
+	iViewFinderActive = ETrue;
+
+	iDSA->Gc()->SetOrigin();
+	if (!iClipRect.IsEmpty())
+		{
+		iDSA->Gc()->SetClippingRect(iClipRect);
+		}
+
+	// start view finder
+	// The division transfer is going to support in the next version. 
+	Start();
+	}
+
+/** 
+Stops transfer of view finder data to the screen. 
+*/
+void CWebCameraVfActive::StopViewFinder()
+	{
+	if (!iViewFinderActive)
+		{
+		return;
+		}
+
+	iViewFinderActive = EFalse;
+
+	delete iDSA;
+	iDSA = NULL;
+
+	delete iVfBuf;
+	iVfBuf = NULL;
+
+	//Stop view finder
+	iDriver.StopViewFinder();
+	Cancel();
+	}
+
+/** 
+Queries whether the view finder is active.
+
+@return  ETrue if the view finder is active. EFalse if the view finder is not
+         active. 
+*/
+TBool CWebCameraVfActive::ViewFinderActive()
+	{
+	return iViewFinderActive;
+	}
+
+/** 
+Start viewfinder process.
+*/
+void CWebCameraVfActive::Start()
+	{
+	RDebug::Print(_L("CWebCameraVfActive::Start"));
+
+	iVfBufPtr.Set(iVfBuf->Des());
+	iVfBufPtr.SetLength(0);
+	//Start view finder
+	iDriver.StartViewFinder(iStatus, iVfBufPtr);
+
+	SetActive();
+	}
+
+/** 
+Draw the image of the view finder on screen.
+*/
+void CWebCameraVfActive::UpdateViewL()
+	{
+	RDebug::Print(_L("CWebCameraVfActive::UpdateViewL"));
+
+	delete iVfBitmap;
+	iVfBitmap = NULL;
+
+	CFbsBitmap* image = new (ELeave) CFbsBitmap();
+	CleanupStack::PushL(image);
+	User::LeaveIfError(image->Create(TSize(KVfWidth, KVfHeight), EColor16M));
+	CleanupStack::Pop(image);
+
+	iVfBitmap = image;
+
+// output received data log
+//	RDebug::Print(_L("CWebCameraVfActive::UpdateView iVfBufLength[%d]"), iVfBufPtr.Length());
+//	TBuf<256> hexBuf;
+//	for (TInt i = 0; i < iVfBufPtr.Length(); i++)
+//		{
+//		hexBuf.AppendFormat(_L("%02X "), iVfBufPtr[i]);
+//		if ((i % 16) == 15)
+//			{
+//			RDebug::Print(hexBuf);
+//			hexBuf = KNullDesC;
+//			}
+//		}
+//	RDebug::Print(hexBuf);
+
+	// convert buffer data to Bitmap
+	for (TInt height=0; height<KVfHeight; height++)
+		{
+		TInt pos = height * KVfLineBytes;
+		TPtrC8 posptr = iVfBuf->Mid(pos, KVfLineBytes);
+		TBuf8<KVfLineBytes>  buf;
+		buf.Copy(posptr);
+		iVfBitmap->SetScanLine(buf, (KVfHeight-1)-height);
+		}
+
+	// view position setting for test application
+	iScreenRect.iTl.iY = 50;
+	iScreenRect.iBr.iY = 169;
+
+	// update view
+	iDSA->Gc()->DrawBitmap(iScreenRect, iVfBitmap);
+	iDSA->ScreenDevice()->Update();
+	}
+
+/** 
+from MAbortDirectScreenAccess
+
+This function is called by the window server when direct screen access must stop
+(for example because a dialogue is moved in front of the area where direct screen access is taking place).
+
+@param  aScreenDevice 
+		The reason why direct screen access was terminated. 
+*/
+void CWebCameraVfActive::AbortNow(RDirectScreenAccess::TTerminationReasons /*aReason*/)
+	{
+	}
+
+/** 
+from 	from MDirectScreenAccess
+
+This function is called by the window server as soon as direct screen access can resume.
+
+@param  aScreenDevice 
+		Provides the reason why direct screen access was terminated. 
+*/
+void CWebCameraVfActive::Restart(RDirectScreenAccess::TTerminationReasons /*aReason*/)
+	{
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/source/webcamera/ecamwebcameravfactive.h	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,132 @@
+/*
+* Copyright (c) 2010 ISB.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* ISB - Initial contribution
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef ECAMWEBCAMERAVFACTIVE_H
+#define ECAMWEBCAMERAVFACTIVE_H
+
+#include "ecamwebcameraplugin.h"
+
+/**
+ *  Perform a viewfinder function.
+ */
+class CWebCameraVfActive : public CActive
+						 , public MDirectScreenAccess
+	{
+public:
+	 /**
+     * Two-phased constructor.
+     * @param aOwner pointer to callback object.
+     * @param aDriver reference to driver.
+     */
+	static CWebCameraVfActive* NewL(MWebCameraVfActiveCallBack* aOwner, RWebcameraDevice& aDriver);
+
+	CWebCameraVfActive(MWebCameraVfActiveCallBack* aOwner, RWebcameraDevice& aDriver);
+
+	/**> Destructor */
+	~CWebCameraVfActive();
+
+	/** 
+	Starts transfer of view finder data to the given portion of the screen using
+	direct screen access.
+
+	The aScreenRect parameter is in screen co-ordinates and may be modified if,
+	eg, the camera requires the destination to have a certain byte alignment, etc.
+
+    @param  aWs 
+	        Window server session.
+	@param  aScreenDevice 
+	        Screen device.
+	@param  aWindow 
+	        Displayable window.
+	@param  aScreenRect 
+	        Portion of the screen to which view finder data is to be
+	        transferred. This is in screen co-ordinates and may be modified if, for example,
+	        the camera requires the destination to have a certain byte alignment.
+	*/
+	void StartViewFinderDirectL(RWsSession& aWs, CWsScreenDevice& aScreenDevice, RWindowBase& aWindow, TRect& aScreenRect, TRect& aClipRect);
+
+	/** 
+	Stops transfer of view finder data to the screen. 
+	*/
+	void StopViewFinder();
+
+	/** 
+	Queries whether the view finder is active.
+
+	@return  ETrue if the view finder is active. EFalse if the view finder is not
+	         active. 
+	*/
+	TBool ViewFinderActive();
+
+private:
+	/** 
+	from MAbortDirectScreenAccess
+	
+	This function is called by the window server when direct screen access must stop
+	(for example because a dialogue is moved in front of the area where direct screen access is taking place).
+	
+	@param  aScreenDevice 
+			The reason why direct screen access was terminated. 
+	*/
+	virtual void AbortNow(RDirectScreenAccess::TTerminationReasons aReason);
+
+private: 
+	/** 
+	from 	from MDirectScreenAccess
+	
+	This function is called by the window server as soon as direct screen access can resume.
+	
+	@param  aScreenDevice 
+			Provides the reason why direct screen access was terminated. 
+	*/
+	virtual void Restart(RDirectScreenAccess::TTerminationReasons aReason);
+
+private:
+	void ConstructL();
+	
+	/** 
+	Start viewfinder process.
+	*/
+	void Start();
+	
+	/** 
+	Draw the image of the view finder on screen.
+	*/
+	void UpdateViewL();
+
+private:
+	void RunL();
+	void DoCancel();
+
+private:
+	MWebCameraVfActiveCallBack*		iOwner;				///< origin of start.
+	TBool							iViewFinderActive;	///< Status of viewfinder
+	RWebcameraDevice				iDriver;			///< Camera driver
+
+	CFbsBitmap*						iVfBitmap;			///< Bitmap data of viewfinder.
+	HBufC8*							iVfBuf;				///< Data buffer of viewfinder.
+	TPtr8							iVfBufPtr;			///< Pointer to data buffer of viewfinder.
+
+	CDirectScreenAccess*			iDSA;				///< DirectScreenAccess object.
+	TRect							iScreenRect;		///< The region to draw.
+	TRect							iClipRect;			///< The clipping region to draw.
+
+	TBool							iTestFlug;			///< for test
+	};
+
+
+#endif // ECAMWEBCAMERAPLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/testapp/testcameraapps60/group/BLD.INF	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,28 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Symbian Foundation License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// On board camera API
+// 
+//
+
+
+
+/**
+ @file
+*/
+
+PRJ_EXPORTS
+../group/TestCameraApp.iby	/epoc32/rom/include/TestCameraApp.iby
+
+PRJ_MMPFILES
+../group/TestCameraAppS60.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/testapp/testcameraapps60/group/TestCameraApp.iby	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,28 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Symbian Foundation License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#ifndef __TESTCAMERAAPP_IBY__
+#define __TESTCAMERAAPP_IBY__
+
+// Application
+S60_APP_EXE(TestCameraApp)
+
+// Resources (not localised)
+S60_APP_RESOURCE(TestCameraApp)
+
+// Application information files
+S60_APP_AIF_RSC(TestCameraApp)
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/testapp/testcameraapps60/group/TestCameraAppS60.mmp	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,64 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Symbian Foundation License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+TARGET			TestCameraApp.exe
+TARGETTYPE		exe
+
+CAPABILITY		ALL -TCB
+//UID             0x100039CE 0x101F7D32
+UID             0x100039CE 0x101F857A
+VENDORID		0x70000001
+
+USERINCLUDE		../inc
+
+SYSTEMINCLUDE	/epoc32/include
+SYSTEMINCLUDE	/epoc32/include/mw
+SYSTEMINCLUDE	/epoc32/include/platform
+SYSTEMINCLUDE	/epoc32/include/platform/mw
+
+SOURCEPATH		../src
+SOURCE			TestCameraApp.cpp
+
+START RESOURCE	TestCameraApp.rss
+HEADER
+TARGETPATH		/resource/apps
+lang			sc
+END
+
+LIBRARY         euser.lib fbscli.lib
+LIBRARY         apparc.lib ws32.lib cone.lib 
+LIBRARY         avkon.lib
+LIBRARY         eikcore.lib
+LIBRARY         ecam.lib
+
+
+
+SOURCEPATH		../src
+START RESOURCE	testcameraapp_reg.rss
+TARGETPATH		/private/10003a3f/apps
+END
+   
+START RESOURCE	testcameraapp_loc.RSS
+TARGETPATH		/resource/apps
+lang sc
+END
+
+START BITMAP	TestCameraApp.mbm
+HEADER
+TARGETPATH		/resource/apps
+SOURCEPATH		../src
+SOURCE			c8 AP24.BMP AP24M.BMP AP32.BMP AP32M.BMP AP48.BMP AP48M.BMP
+END 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/testapp/testcameraapps60/inc/TestCameraApp.h	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,92 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Symbian Foundation License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#ifndef __TESTCAMERAAPP_H__
+#define __TESTCAMERAAPP_H__
+
+#include <coecntrl.h>
+#include <aknappui.h>
+#include <aknapp.h>
+#include <akndoc.h>
+
+#include <ECam.h>
+
+//const TUid KUidTestCameraApp={ 268450181 };
+//const TUid KUidTestCameraApp={ 270499122 };
+//const TUid KUidTestCameraApp={ 0x101F7D32 };
+#define KUidTestCameraApp 0x101F857A
+
+// class CTCamAppView
+
+class CTCamAppView : public CCoeControl
+    {
+public:
+	CTCamAppView();
+	~CTCamAppView();
+    void ConstructL(const TRect& aRect);
+	void DrawImage(CFbsBitmap* aImage) const;
+	TPoint DrawBorders(const TSize& aSize) const;
+private:
+	// from CCoeControl
+	void Draw(const TRect& /*aRect*/) const;
+    };
+
+// CTCamAppUi
+
+class CTCamAppUi : public CAknAppUi, public MCameraObserver
+    {
+public:
+    void ConstructL();
+	~CTCamAppUi();
+private:
+	// From CEikAppUi
+	virtual void HandleCommandL(TInt aCommand);
+	// New functions
+	void ViewFinderL();
+	void CaptureImageL();
+	void CaptureVideoL();
+	// From MCameraObserver
+	virtual void ReserveComplete(TInt aError);
+	virtual void PowerOnComplete(TInt aError);
+	virtual void ViewFinderFrameReady(CFbsBitmap& aFrame);
+	virtual void ImageReady(CFbsBitmap* aBitmap,HBufC8* aData,TInt aError);
+	virtual void FrameBufferReady(MFrameBuffer* aFrameBuffer,TInt aError);
+private:
+	CCamera* iCamera;
+    CTCamAppView* iAppView;
+    };
+
+// CTCamDocument
+
+class CTCamDocument : public CAknDocument
+	{
+public:
+	CTCamDocument(CEikApplication& aApp);
+private:
+	 // from CEikDocument
+	CEikAppUi* CreateAppUiL();
+	};
+
+// CTCamApp
+
+class CTCamApp : public CAknApplication
+	{
+private:
+	// from CApaApplication
+	CApaDocument* CreateDocumentL();
+	TUid AppDllUid() const;
+	};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/testapp/testcameraapps60/inc/TestCameraApp.hrh	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,29 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Symbian Foundation License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+enum
+	{
+	ETCamCmdPowerOn=1,
+	ETCamCmdPowerOff,
+	ETCamCmdViewFinder,
+	ETCamCmdCaptureImage,
+	ETCamCmdCaptureVideo,
+	ETCamCmdIncBrightness,
+	ETCamCmdIncContrast,
+	ETCamCmdDecBrightness,
+	ETCamCmdDecContrast,
+	ETCamCmdResetBrightness,
+	ETCamCmdResetContrast
+	};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/testapp/testcameraapps60/src/AIF.RSS	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,33 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Symbian Foundation License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include <aiftool.rh>
+
+RESOURCE AIF_DATA
+	{
+	caption_list=
+		{ 
+		CAPTION { code=ELangEnglish; caption="TestCameraApp"; }
+		};
+	//
+//	app_uid=268450181;
+	app_uid=0x101F857A;
+	//
+	num_icons=3;
+	//
+	hidden=KAppNotHidden;
+	embeddability=KAppNotEmbeddable;
+	newfile=KAppDoesNotSupportNewFile;
+	}
Binary file mmplugins/cameraplugins/testapp/testcameraapps60/src/AP24.BMP has changed
Binary file mmplugins/cameraplugins/testapp/testcameraapps60/src/AP24M.BMP has changed
Binary file mmplugins/cameraplugins/testapp/testcameraapps60/src/AP32.BMP has changed
Binary file mmplugins/cameraplugins/testapp/testcameraapps60/src/AP32M.BMP has changed
Binary file mmplugins/cameraplugins/testapp/testcameraapps60/src/AP48.BMP has changed
Binary file mmplugins/cameraplugins/testapp/testcameraapps60/src/AP48M.BMP has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/testapp/testcameraapps60/src/TestCameraApp.cpp	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,389 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Symbian Foundation License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include <eikenv.h>
+#include <TestCameraApp.rsg>
+#include "TestCameraApp.h"
+#include "TestCameraApp.hrh"
+
+const TInt KMaxErrLength=50;
+_LIT(KErrorFormat,"Error - %d (%S)");
+
+//
+//  CTCamAppUi
+//
+
+void CTCamAppUi::ConstructL()
+	{
+	RDebug::Print(_L("CTCamAppUi::ConstructL()_S"));
+
+    BaseConstructL();
+	iAppView = new(ELeave) CTCamAppView;
+	iAppView->ConstructL(ClientRect());
+	AddToStackL(iAppView);
+
+	RDebug::Print(_L("CTCamAppUi::ConstructL() CCamera::NewL()_S"));
+	iCamera = CCamera::NewL(*this,0);
+	RDebug::Print(_L("CTCamAppUi::ConstructL() CCamera::NewL()_E"));
+
+	RDebug::Print(_L("CTCamAppUi::ConstructL() iCamera->Reserve()_S"));
+	iCamera->Reserve();
+	RDebug::Print(_L("CTCamAppUi::ConstructL() iCamera->Reserve()_E"));
+
+	RDebug::Print(_L("CTCamAppUi::ConstructL()_E"));
+	}
+
+CTCamAppUi::~CTCamAppUi()
+	{
+	RDebug::Print(_L("CTCamAppUi::~CTCamAppUi()_S"));
+
+	RDebug::Print(_L("CTCamAppUi::~CTCamAppUi() iCamera->Release()_S"));
+	iCamera->Release();
+	RDebug::Print(_L("CTCamAppUi::~CTCamAppUi() iCamera->Release()_E"));
+
+	RDebug::Print(_L("CTCamAppUi::~CTCamAppUi() delete iCamera_S"));
+	delete iCamera;
+	RDebug::Print(_L("CTCamAppUi::~CTCamAppUi() delete iCamera_E"));
+
+	if (iAppView)
+		{
+		RemoveFromStack(iAppView);
+		delete iAppView;
+		}
+	RDebug::Print(_L("CTCamAppUi::~CTCamAppUi()_E"));
+	}
+
+void CTCamAppUi::HandleCommandL(TInt aCommand)
+	{
+	switch (aCommand)
+		{
+	case ETCamCmdPowerOn:
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdPowerOn)"));
+
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->PowerOn()_S"));
+		iCamera->PowerOn();
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->PowerOn()_E"));
+		break;
+
+	case ETCamCmdPowerOff:
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdPowerOff)"));
+
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->PowerOff()_S"));
+		iCamera->PowerOff();
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->PowerOff()_E"));
+		break;
+
+	case ETCamCmdViewFinder:
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdViewFinder)"));
+
+		ViewFinderL();
+		break;
+
+	case ETCamCmdCaptureImage:
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdCaptureImage)"));
+
+		CaptureImageL();
+		break;
+
+	case ETCamCmdCaptureVideo:
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdCaptureVideo)"));
+
+		CaptureVideoL();
+		break;
+
+	case ETCamCmdIncBrightness:
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdIncBrightness)"));
+
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetBrightnessL()_S"));
+		iCamera->SetBrightnessL(iCamera->Brightness() + 10);
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetBrightnessL()_E"));
+		break;
+
+	case ETCamCmdIncContrast:
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdIncContrast)"));
+
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetContrastL()_S"));
+		iCamera->SetContrastL(iCamera->Contrast() + 10);
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetContrastL()_E"));
+		break;
+
+	case ETCamCmdDecBrightness:
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdDecBrightness)"));
+
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetBrightnessL()_S"));
+		iCamera->SetBrightnessL(iCamera->Brightness() - 10);
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetBrightnessL()_E"));
+		break;
+
+	case ETCamCmdDecContrast:
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdDecContrast)"));
+
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetContrastL()_S"));
+		iCamera->SetContrastL(iCamera->Contrast() - 10);
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetContrastL()_E"));
+		break;
+
+	case ETCamCmdResetBrightness:
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdResetBrightness)"));
+
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetBrightnessL()_S"));
+		iCamera->SetBrightnessL(0);
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetBrightnessL()_E"));
+		break;
+
+	case ETCamCmdResetContrast:
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL(ETCamCmdResetContrast)"));
+
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetContrastL()_S"));
+		iCamera->SetContrastL(0);
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL() iCamera->SetContrastL()_E"));
+		break;
+
+	case EAknSoftkeyBack:
+		RDebug::Print(_L("CTCamAppUi::HandleCommandL(EAknSoftkeyBack)"));
+
+		Exit();
+		break;
+		}
+	}
+
+void CTCamAppUi::ViewFinderL()
+	{
+	TSize imageSize;
+
+	RDebug::Print(_L("CTCamAppUi::ViewFinderL() iCamera->EnumerateCaptureSizes()_S"));
+	iCamera->EnumerateCaptureSizes(imageSize,1,CCamera::EFormatFbsBitmapColor16M);
+	RDebug::Print(_L("CTCamAppUi::ViewFinderL() iCamera->EnumerateCaptureSizes()_E"));
+
+	const TPoint pos = iAppView->DrawBorders(imageSize);
+	TRect screenRect(pos,imageSize);
+	TRect clipRect;
+
+	if (!iCamera->ViewFinderActive())
+		{
+		RDebug::Print(_L("CTCamAppUi::ViewFinderL() iCamera->StartViewFinderDirectL()_S"));
+		iCamera->StartViewFinderDirectL(iCoeEnv->WsSession(),*iCoeEnv->ScreenDevice(),*iAppView->DrawableWindow(),screenRect,clipRect);
+		RDebug::Print(_L("CTCamAppUi::ViewFinderL() iCamera->StartViewFinderDirectL()_E"));
+		}
+	else
+		{
+		RDebug::Print(_L("CTCamAppUi::ViewFinderL() iCamera->StopViewFinder()_S"));
+		iCamera->StopViewFinder();
+		RDebug::Print(_L("CTCamAppUi::ViewFinderL() iCamera->StopViewFinder()_E"));
+		}
+	}
+
+void CTCamAppUi::CaptureImageL()
+	{
+	TSize size;
+	RDebug::Print(_L("CTCamAppUi::CaptureImageL() iCamera->EnumerateCaptureSizes()_S"));
+	iCamera->EnumerateCaptureSizes(size,1,CCamera::EFormatFbsBitmapColor16M);
+	RDebug::Print(_L("CTCamAppUi::CaptureImageL() iCamera->EnumerateCaptureSizes()_E"));
+
+	RDebug::Print(_L("CTCamAppUi::CaptureImageL() iCamera->PrepareImageCaptureL()_S"));
+	iCamera->PrepareImageCaptureL(CCamera::EFormatFbsBitmapColor16M,1);
+	RDebug::Print(_L("CTCamAppUi::CaptureImageL() iCamera->PrepareImageCaptureL()_E"));
+
+	RDebug::Print(_L("CTCamAppUi::CaptureImageL() iCamera->CaptureImage()_S"));
+	iCamera->CaptureImage();
+	RDebug::Print(_L("CTCamAppUi::CaptureImageL() iCamera->CaptureImage()_E"));
+	}
+
+void CTCamAppUi::CaptureVideoL()
+	{
+	if (!iCamera->VideoCaptureActive())
+		{
+		TSize size;
+		TReal32 rate = 0;
+		iCamera->EnumerateVideoFrameSizes(size,0,CCamera::EFormatFbsBitmapColor16M);
+		iCamera->EnumerateVideoFrameRates(rate,0,CCamera::EFormatFbsBitmapColor16M,0);
+		iCamera->PrepareVideoCaptureL(CCamera::EFormatFbsBitmapColor16M,0,0,2,1);
+		iCamera->StartVideoCapture();
+		}
+	else
+		iCamera->StopVideoCapture();
+	}
+
+void CTCamAppUi::ReserveComplete(TInt /*aError*/)
+	{
+	RDebug::Print(_L("CTCamAppUi::ReserveComplete()"));
+	}
+
+void CTCamAppUi::PowerOnComplete(TInt /*aError*/)
+	{
+	RDebug::Print(_L("CTCamAppUi::PowerOnComplete()"));
+	}
+
+void CTCamAppUi::ViewFinderFrameReady(CFbsBitmap& /*aFrame*/)
+	{
+	}
+
+void CTCamAppUi::ImageReady(CFbsBitmap* aBitmap,HBufC8* /*aData*/,TInt aError)
+	{
+	RDebug::Print(_L("CTCamAppUi::ImageReady()_S"));
+
+	TBuf<KMaxErrLength> msgBuffer;
+	_LIT(KErrMessage,"CTCamAppUi::ImageReady");
+	if (aBitmap)
+		{
+		iAppView->DrawImage(aBitmap);
+		delete aBitmap;
+		}
+	if (aError)
+		{
+		msgBuffer.Format(KErrorFormat,aError,&KErrMessage);
+		iEikonEnv->InfoMsg(msgBuffer);
+		}
+
+	RDebug::Print(_L("CTCamAppUi::ImageReady()_E"));
+	}
+
+void CTCamAppUi::FrameBufferReady(MFrameBuffer* aFrameBuffer,TInt aError)
+	{
+	RDebug::Print(_L("CTCamAppUi::FrameBufferReady()_S"));
+
+	TBuf<KMaxErrLength> msgBuffer;
+	_LIT(KErrMessage,"CTCamAppUi::FrameBufferReady");
+	if (aError)
+		{
+		msgBuffer.Format(KErrorFormat,aError,&KErrMessage);
+		iEikonEnv->InfoMsg(msgBuffer);
+		return;
+		}
+	TRAPD(error,iAppView->DrawImage(aFrameBuffer->FrameL(0)));
+	aFrameBuffer->Release();
+	if (error)
+		{
+		msgBuffer.Format(KErrorFormat,error,&KErrMessage);
+		iEikonEnv->InfoMsg(msgBuffer);
+		}
+
+	RDebug::Print(_L("CTCamAppUi::FrameBufferReady()_E"));
+	}
+
+//_LIT(KContrastDialogTitle,"Contrast");
+//_LIT(KBrightnessDialogTitle,"Brightness");
+
+//
+// CTCamAppView
+//
+
+CTCamAppView::CTCamAppView():
+	CCoeControl()
+	{}
+
+void CTCamAppView::ConstructL(const TRect& aRect)
+	{
+	CreateWindowL();
+    SetRect(aRect);
+	EnableDragEvents();
+	ActivateL();
+	}
+
+CTCamAppView::~CTCamAppView()
+	{}
+
+void CTCamAppView::DrawImage(CFbsBitmap* aImage) const
+	{
+	CWindowGc& gc = SystemGc();
+	gc.Activate(Window());
+	TRect drawRect(Rect());
+	TPoint pos;
+	pos.iX = (drawRect.iBr.iX - aImage->SizeInPixels().iWidth) / 2;
+//	pos.iY = (drawRect.iBr.iY - aImage->SizeInPixels().iHeight) / 2;
+	pos.iY = ((drawRect.iBr.iY + 122) - aImage->SizeInPixels().iHeight) / 2;
+	gc.BitBlt(pos,aImage);
+	gc.Deactivate();
+	iCoeEnv->WsSession().Flush();
+	}
+
+void CTCamAppView::Draw(const TRect& /*aRect*/) const
+	{
+	CWindowGc& gc = SystemGc();
+	TRect drawRect(Rect());
+	drawRect.Shrink(1,1);
+	gc.DrawRect(drawRect);
+	gc.Clear();
+	}
+
+TPoint CTCamAppView::DrawBorders(const TSize& aSize) const
+	{
+	CWindowGc& gc = SystemGc();
+	gc.Activate(Window());
+	TRect drawRect(Rect());
+	TPoint pos;
+	pos.iX = (drawRect.iBr.iX - aSize.iWidth) / 2;
+//	pos.iY = (drawRect.iBr.iY - aSize.iHeight) / 2;
+	pos.iY = ((drawRect.iBr.iY + 122) - aSize.iHeight) / 2;
+	TRect border(pos,aSize);
+	border.Grow(1,1);
+	gc.SetPenColor(KRgbBlack);
+	gc.DrawRect(border);
+	gc.Deactivate();
+	iCoeEnv->WsSession().Flush();
+	return pos;
+	}
+
+//
+// CTCamDocument
+//
+
+CTCamDocument::CTCamDocument(CEikApplication& aApp)
+		: CAknDocument(aApp)
+	{
+	}
+
+CEikAppUi* CTCamDocument::CreateAppUiL()
+	{
+	RDebug::Print(_L("CTCamDocument::CreateAppUiL()"));
+    return (static_cast<CEikAppUi*>(new (ELeave) CTCamAppUi));
+	}
+
+//
+// CTCamApp
+//
+
+TUid CTCamApp::AppDllUid() const
+	{
+	return TUid::Uid(KUidTestCameraApp);
+	}
+
+CApaDocument* CTCamApp::CreateDocumentL()
+	{
+//	return new(ELeave) CTCamDocument(*this);
+	RDebug::Print(_L("CTCamApp::CreateDocumentL()"));
+	return (static_cast<CApaDocument*>(new(ELeave) CTCamDocument(*this)));
+	}
+
+
+//
+// Base factory function
+//
+
+#include <eikstart.h>
+LOCAL_C CApaApplication* NewApplication()
+	{
+	RDebug::Print(_L("CApaApplication* NewApplication()"));
+	return new CTCamApp;
+	}
+
+//
+// EXE Entry point
+//
+
+GLDEF_C TInt E32Main()
+	{
+	return EikStart::RunApplication(NewApplication);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/testapp/testcameraapps60/src/TestCameraApp.rss	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,75 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Symbian Foundation License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+NAME TCAM
+
+#include <eikon.rh>
+#include <avkon.rsg>
+#include <avkon.rh>
+#include <avkon.mbg>
+
+#include "TestCameraApp.hrh"
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf=""; }
+
+RESOURCE EIK_APP_INFO
+	{
+	menubar=r_tcam_menubar;
+	cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
+	}
+
+RESOURCE MENU_BAR r_tcam_menubar
+	{
+	titles=
+		{
+		MENU_TITLE { menu_pane=r_tcam_main_menu; txt="Options"; }
+		};
+	}
+
+RESOURCE MENU_BAR r_tcam_main_menu
+	{
+	titles=
+		{
+		MENU_ITEM { cascade=r_tcam_control_menu; txt="Control"; },
+		MENU_ITEM { cascade=r_tcam_settings_menu; txt="Settings"; }
+		};
+	}
+
+RESOURCE MENU_PANE r_tcam_control_menu
+	{
+	items=
+		{
+		MENU_ITEM { command=ETCamCmdPowerOn; txt="Power on"; },
+		MENU_ITEM { command=ETCamCmdPowerOff; txt="Power off"; },
+		MENU_ITEM { command=ETCamCmdViewFinder; txt="View finder"; },
+		MENU_ITEM { command=ETCamCmdCaptureImage; txt="Capture image"; },
+		MENU_ITEM { command=ETCamCmdCaptureVideo; txt="Toggle video"; }
+		};
+	}
+
+RESOURCE MENU_PANE r_tcam_settings_menu
+	{
+	items=
+		{
+		MENU_ITEM { command=ETCamCmdIncContrast; txt="Contrast+"; },
+		MENU_ITEM { command=ETCamCmdDecContrast; txt="Contrast-"; },
+		MENU_ITEM { command=ETCamCmdResetContrast; txt="Reset contrast"; },
+		MENU_ITEM { command=ETCamCmdIncBrightness; txt="Brightness+"; },
+		MENU_ITEM { command=ETCamCmdDecBrightness; txt="Brightness-"; },
+		MENU_ITEM { command=ETCamCmdResetBrightness; txt="Reset brightness"; }
+		};
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/testapp/testcameraapps60/src/TestCameraApp_loc.RSS	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,30 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Symbian Foundation License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include <appinfo.rh>
+
+RESOURCE LOCALISABLE_APP_INFO
+	{
+	short_caption = "TestCamera";
+	caption_and_icon =
+		{
+		CAPTION_AND_ICON_INFO 
+			{
+			caption="TestCameraAPP";
+			number_of_icons=3;
+			icon_file="z:\\resource\\apps\\testcameraapp.mbm";
+			}
+		};
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/cameraplugins/testapp/testcameraapps60/src/TestCameraApp_reg.rss	Thu Mar 25 11:21:36 2010 +0900
@@ -0,0 +1,34 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Symbian Foundation License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// TestCameraApp application's registration resource file 
+// 
+//
+
+#include <appinfo.rh>
+#include <testcameraapp.rsg>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x101F857A
+
+RESOURCE APP_REGISTRATION_INFO 
+	{
+	app_file="TestCameraApp";
+	//
+	localisable_resource_file="\\resource\\apps\\TestCameraApp_loc";
+    localisable_resource_id = 0x5bf50006;
+	//
+	hidden=KAppNotHidden;
+	embeddability=KAppNotEmbeddable;
+	newfile=KAppDoesNotSupportNewFile;
+	}
Binary file mmplugins/cameraplugins/testapp/testcameraapps60/src/test.bmp has changed
Binary file mmplugins/cameraplugins/testapp/testcameraapps60/src/test1.bmp has changed