os/mm/imagingandcamerafws/cameraunittest/src/ECamUnitTestPlugin/extended_functionality.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/imagingandcamerafws/cameraunittest/src/ECamUnitTestPlugin/extended_functionality.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,840 @@
     1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// extendedfunctionality.h
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#ifndef EXTENDEDFUNCTIONALITY_H
    1.22 +#define EXTENDEDFUNCTIONALITY_H
    1.23 +
    1.24 +#include <ecam/ecamplugin.h>
    1.25 +#include <ecam/ecaminfoplugin.h>
    1.26 +
    1.27 +#include "ECamUnitTestPlugin.h"
    1.28 +#include <fbs.h>
    1.29 +
    1.30 +#include <ecam/mcamerahistogram.h>
    1.31 +#include <ecam/mcamerasnapshot.h>
    1.32 +#include <ecam/ecamcapturecontrolintf.h>
    1.33 +#include <ecam/ecamimageprocessingintf.h>
    1.34 +#include <ecam/ecamviewfinderintf.h>
    1.35 +#include <ecam/implementationfactoryintf.h>
    1.36 +
    1.37 +class CCamUnitTestPlugin;
    1.38 +
    1.39 +const TInt KSupportedDirectVCType		= 0;
    1.40 +const TInt KSupportedClientVCType		= 1;
    1.41 +
    1.42 +//
    1.43 +// camera buffer 2
    1.44 +class RCamBuffer2 : public MCameraBuffer2
    1.45 +	{
    1.46 +public:
    1.47 +	RCamBuffer2(CFbsBitmap*& aFrame): iAvailable(ETrue), iFrame(aFrame) {}
    1.48 +	virtual TInt NumFrames() {return 0;}
    1.49 +	virtual TDesC8* DataL(TInt aFrameIndex) {if (aFrameIndex != 0) { User::Leave(KErrArgument); } return NULL; }
    1.50 +	virtual CFbsBitmap& BitmapL(TInt aFrameIndex) {if (aFrameIndex != 0) { User::Leave(KErrArgument); } return *iFrame;}
    1.51 + 	virtual	RChunk& ChunkL() { return iChunk;}
    1.52 +	virtual TInt ChunkOffsetL(TInt aFrameIndex) {if (aFrameIndex != 0) { User::Leave(KErrArgument); } return 0;}
    1.53 +	virtual TInt FrameSize(TInt aFrameIndex) {if (aFrameIndex != 0) { User::Leave(KErrArgument); } return 0; }
    1.54 +	virtual void Release() {iAvailable = ETrue;}
    1.55 +	
    1.56 +	virtual TInt GetInterfaceUids(RArray<TUid>& aInterfaceUids) {aInterfaceUids.Reset(); return KErrNotSupported;}
    1.57 +	virtual TInt CustomInterface(TUid /*aInterface*/, TAny*& aPtrInterface) {aPtrInterface = NULL; return KErrNotSupported;}
    1.58 +	
    1.59 +public:	
    1.60 +	TBool iAvailable;
    1.61 +	CFbsBitmap*& iFrame;
    1.62 +	RChunk iChunk;
    1.63 +	};
    1.64 +
    1.65 +//
    1.66 +//pre image capture control impl
    1.67 +class CCamPreImageCaptureControl: public CBase, public MCameraPreImageCaptureControl
    1.68 +	{
    1.69 +public:
    1.70 +	static CCamPreImageCaptureControl* NewL(CCamUnitTestPlugin& aOwner);
    1.71 +	~CCamPreImageCaptureControl();
    1.72 +	
    1.73 +	void Release();
    1.74 +	void SetPreImageCaptureControlObserver(MPreImageCaptureControlObserver& aPreImageCaptureControlObserver);
    1.75 +	void GetDirectSnapshotSupportInfoL(TUint& aDirectSnapshotSupportInfo) const;
    1.76 +	void GetSupportedEmbeddedStillCaptureSettingsL(RArray<TUid>& aSupportedEmbeddedStillCaptureSettings) const;
    1.77 +	void GetSupportedDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl::TDirectSavingType& aSupportedDirectSavingType) const;
    1.78 +	void SetSequentialImageFilenameL(const TDesC8& aFilename, TInt aStartingSequenceNumber);
    1.79 +	void SetLowerResolutionSequentialImageFilenameL(const TDesC8& aLowerResolutionFilename, TInt aStartingSequenceNumber);
    1.80 +	void GetDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl::TDirectSavingType& aDirectSavingType) const;
    1.81 +	void SetDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl::TDirectSavingType aDirectSavingType);
    1.82 +	void GetCaptureEventSupportInfoL(TUint& aSupportedDriveModes) const;
    1.83 +	void GetImageFormatsSupportedL(TUint& aImageFormatsSupported, const TSize& aSize) const;
    1.84 +	void GetPixelAspectsSupportedL(TUint& aPixelAspectsSupported, CCamera::TFormat aImageFormat, const TSize& aSize) const;
    1.85 +	void PrepareImageCapture(const CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters& 
    1.86 +										aPrepareImageParameters, MCaptureImageObserver& aCaptureImageObserver);
    1.87 +	void GetImageMaxMemorySizeSettingSupportInfoL(TBool& aIsImageMaxMemorySizeSettingSupported) const;
    1.88 +	void GetImageMaxMemorySizeL(TUint& aMemorySize) const;
    1.89 +	void GetSupportedProcessingOptionsL(TUint& aSupportedProcessingOptions) const;
    1.90 +	
    1.91 +	inline MPreImageCaptureControlObserver* PreImageCaptureControlObserver() {return iPreImageCaptureControlObserver;}
    1.92 +	
    1.93 +private:	
    1.94 +	CCamPreImageCaptureControl(CCamUnitTestPlugin& aOwner);
    1.95 +	
    1.96 +	void CreateCaptureImageL(CCamera::CCameraImageCapture*& aCameraImageCapture, const CCamera::CCameraPreImageCaptureControl::
    1.97 +			TPrepareImageParameters& aPrepareImageParameters, MCaptureImageObserver& aCaptureImageObserver);
    1.98 +	
    1.99 +private:
   1.100 +	CCamUnitTestPlugin& iOwner;
   1.101 +	MPreImageCaptureControlObserver* iPreImageCaptureControlObserver;
   1.102 +	};
   1.103 +
   1.104 +//
   1.105 +//image capture impl	
   1.106 +class CCamSnapshotForImage;
   1.107 +class CCamImgProcImpForImage;
   1.108 +class CCamPostImageCaptureControl;
   1.109 +
   1.110 +class CCamImageCapture: public CBase, public MCameraImageCapture
   1.111 +	{
   1.112 +friend class CSnapshotFactoryForImage;
   1.113 +friend class CImgProcFactoryForImage;
   1.114 +friend class CCamPostImageCaptureControl;
   1.115 +
   1.116 +public:
   1.117 +	static CCamImageCapture* NewL(CCamUnitTestPlugin& aOwner);
   1.118 +	~CCamImageCapture();
   1.119 +	
   1.120 +	void Release(CCamera::CCameraImageCapture* aCameraImageCapture);
   1.121 +	void CreateHistogramImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
   1.122 +	void GetSnapshotImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
   1.123 +	void GetImageProcessingImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
   1.124 +	void SetCaptureImageObserver(MCaptureImageObserver& aCaptureImageObserver);
   1.125 +	void GetPrepareImageParametersL(CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters& aPrepareImageParameters) const;
   1.126 +	void SetPrepareImageParameters(const CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters& aPrepareImageParameters);
   1.127 +	TAny* CreatePostImageCaptureControlImpl(TUid aInterface, TPostCaptureControlId aPostCaptureControlId);
   1.128 +	void CaptureImage(CCamera::CCameraImageCapture* aCameraImageCapture);
   1.129 +	void CancelCaptureImage();
   1.130 +	void GetNumImagesExposedL(TUint& aNumImagesExposed) const;
   1.131 +	void GetNumTotalImagesL(TUint& aNumTotalImages) const;
   1.132 +	void GetPostCaptureControlHandleL(CCamera::CCameraPostImageCaptureControl*& aPostCaptureControlHandle, 
   1.133 +									TPostCaptureControlId aPostCaptureControlId) const;
   1.134 +	void SetCaptureImagePriorityL(TECamImagePriority aCaptureImagePriority);
   1.135 +	void GetCaptureImagePriorityL(TECamImagePriority& aCaptureImagePriority) const;
   1.136 +	void PauseProcessing(TUint aProcessingType);
   1.137 +	void ResumeProcessingL(TUint aProcessingType);
   1.138 +	
   1.139 +	inline MCaptureImageObserver* CaptureImageObserver() {return iCaptureImageObserver;}
   1.140 +	inline CCamera::CCameraImageCapture* CameraImageCapture() {return iCameraImageCapture;}
   1.141 +	inline CCamUnitTestPlugin& Owner() {return iOwner;}
   1.142 +
   1.143 +private:
   1.144 +	CCamImageCapture(CCamUnitTestPlugin& aOwner);
   1.145 +	void CreatePostImageCaptureControlL(CCamera::CCameraPostImageCaptureControl*& aPostCaptureControlHandle, 
   1.146 +						TPostCaptureControlId aPostCaptureControlId);
   1.147 +	
   1.148 +private:
   1.149 +	CCamUnitTestPlugin& iOwner;
   1.150 +	MCaptureImageObserver* iCaptureImageObserver;
   1.151 +	CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters iPrepareImageParameters;
   1.152 +	
   1.153 +	mutable CCamSnapshotForImage* iSnapshotImpForImage;
   1.154 +	CCamImgProcImpForImage* iCamImgProcImpForImage;
   1.155 +	RArray<TInt> iArrayPostCaptureControlId;
   1.156 +	RArray<CCamPostImageCaptureControl*> iArrayPostCaptureControlImpl;
   1.157 +	RArray<CCamera::CCameraPostImageCaptureControl*> iArrayPostCaptureControlHandle;
   1.158 +
   1.159 +	CCamera::CCameraImageCapture* iCameraImageCapture;
   1.160 +	};
   1.161 +
   1.162 +//
   1.163 +//post image capture control impl
   1.164 +class CCamPostImageCaptureControl: public CBase, public MCameraPostImageCaptureControl
   1.165 +	{
   1.166 +public:
   1.167 +	static CCamPostImageCaptureControl* NewL(CCamImageCapture& aCamImageCaptureImpl);
   1.168 +	~CCamPostImageCaptureControl();
   1.169 +	
   1.170 +	void Release(TPostCaptureControlId aPostCaptureControlId);
   1.171 +	void GetImageSequenceNumberL(TUint& aSequenceNumber) const;
   1.172 +	void CancelImage();
   1.173 +	void SetImagePriorityL(TECamImagePriority aImagePriority);
   1.174 +	void GetImagePriorityL(TECamImagePriority& aImagePriority) const;
   1.175 +	void PauseProcessing(TUint aProcessingType);
   1.176 +	void ResumeProcessingL(TUint aProcessingType);
   1.177 +	void GetImageBufferL(MCameraImageBuffer& aCameraImageBuffer) const;
   1.178 +	void GetImageStateL(CCamera::CCameraPostImageCaptureControl::TImageState& aImageState) const;
   1.179 +	void GetBufferStateL(CCamera::CCameraPostImageCaptureControl::TBufferState& aBufferState) const;
   1.180 +
   1.181 +	inline CCamImageCapture& CamImageCaptureImpl() {return iCamImageCaptureImpl;}
   1.182 +
   1.183 +private:
   1.184 +	CCamPostImageCaptureControl(CCamImageCapture& aCamImageCaptureImpl);
   1.185 +	
   1.186 +private:
   1.187 +	CCamImageCapture& iCamImageCaptureImpl;
   1.188 +	};
   1.189 +
   1.190 +//
   1.191 +//video capture control impl
   1.192 +class CCamSnapshotForVideo;	
   1.193 +class CCamVideoCaptureControl : public CBase, public MCameraVideoCaptureControl
   1.194 +	{
   1.195 +friend class CSnapshotFactoryForVideo;
   1.196 +
   1.197 +public:
   1.198 +	static CCamVideoCaptureControl* NewL(CCamUnitTestPlugin& aOwner);
   1.199 +	~CCamVideoCaptureControl();
   1.200 +	
   1.201 +	void Release();
   1.202 +	void CreateHistogramImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
   1.203 +	void GetSnapshotImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
   1.204 +	void GetImageProcessingImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
   1.205 +	void SetCaptureVideoObserver(MCaptureVideoObserver& aCaptureVideoObserver);
   1.206 +	void GetVideoFormatsSupportedL(TUint& aVideoFormatsSupported, const TSize& aSize) const;
   1.207 +	void GetPixelAspectsSupportedL(TUint& aPixelAspectsSupported, CCamera::TFormat aVideoFormat, const TSize& aSize) const;
   1.208 +	void GetEmbeddedStillCaptureSupportInfoL(TInt& aSupportedEmbeddedStillCaptureTypes) const;
   1.209 +	void PrepareVideoCapture(const CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters& aPrepareVideoParameters);
   1.210 +	void GetRangeAffectedSettingsL(RArray<TUid>& aRangeAffectedSettings) const;
   1.211 +	void GetValueAffectedSettingsL(RArray<TUid>& aValueAffectedSettings) const;
   1.212 +	void GetDisabledSettingsL(RArray<TUid>& aDisabledSettings) const;
   1.213 +	void ReleaseVideoResource();
   1.214 +	void StartVideoCaptureL();
   1.215 +	void StopVideoCapture();
   1.216 +	void PauseVideoCapture();
   1.217 +	void ResumeVideoCaptureL();
   1.218 +	void GetFadingEffectStateL(CCamera::CCameraVideoCaptureControl::TFadingEffectState& aFadingEffectState) const;
   1.219 +	void SetFadingEffectState(CCamera::CCameraVideoCaptureControl::TFadingEffectState aFadingEffectState);
   1.220 +	void GetVideoCaptureStateL(CCamera::CCameraVideoCaptureControl::TVideoCaptureState& aVideoCaptureState) const;
   1.221 +	void GetVideoCaptureSupportInfoL(TInt& aSupportedVideoCaptureTypes) const;
   1.222 +	void GetPrepareVideoParametersL(CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters& aPrepareVideoParameters) const;
   1.223 +
   1.224 +	inline MCaptureVideoObserver* CaptureVideoObserver() {return iCaptureVideoObserver;}
   1.225 +	inline CCamUnitTestPlugin& Owner() {return iOwner;}
   1.226 +	
   1.227 +private:
   1.228 +	CCamVideoCaptureControl(CCamUnitTestPlugin& aOwner);
   1.229 +	void ConstructL();
   1.230 +	
   1.231 +private:
   1.232 +	CCamUnitTestPlugin& iOwner;	
   1.233 +	MCaptureVideoObserver* iCaptureVideoObserver;
   1.234 +	CCamSnapshotForVideo* iSnapshotImpForVideo;
   1.235 +	CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters iPrepareVideoParameters;
   1.236 +	CFbsBitmap* iBitmap;
   1.237 +	};
   1.238 +	
   1.239 +//	
   1.240 +//direct snapshot implementation to be used by version2 direct viewfinder.
   1.241 +class CCamDirectSnapshot : public CBase, public MCameraDirectSnapshot
   1.242 +	{
   1.243 +public:
   1.244 +	
   1.245 +	static CCamDirectSnapshot* NewL();
   1.246 +	~CCamDirectSnapshot();
   1.247 +
   1.248 +	void Release();
   1.249 +	void SetDirectViewFinder(const CCamera::CCameraV2DirectViewFinder* aDirectViewFinder);
   1.250 +	void GetDirectViewFinderL(CCamera::CCameraV2DirectViewFinder*& aDirectViewFinder) const;
   1.251 +	void EnableDirectSnapshotL(CCamera::CCameraDirectSnapshot::TDirectSnapshotParameters& aDirectSnapshotParameters);
   1.252 +	void DisableDirectSnapshot();
   1.253 +	void GetDirectSnapshotStateL(CCamera::CCameraDirectSnapshot::TDirectSnapshotState& aDirectSnapshotState) const;
   1.254 +	void GetDirectSnapshotParametersL(CCamera::CCameraDirectSnapshot::TDirectSnapshotParameters& aDirectSnapshotParameters) const;
   1.255 +	void SetDirectSnapshotParametersL(const CCamera::CCameraDirectSnapshot::TDirectSnapshotParameters& aDirectSnapshotParameters);
   1.256 +	
   1.257 +private:
   1.258 +	CCamDirectSnapshot();
   1.259 +
   1.260 +private:
   1.261 +	const CCamera::CCameraV2DirectViewFinder* iCameraV2DirectVF;
   1.262 +	CCamera::CCameraDirectSnapshot::TDirectSnapshotParameters iDirectSnapshotParameters;
   1.263 +	CCamera::CCameraDirectSnapshot::TDirectSnapshotState iDirectSnapshotState;
   1.264 +	};
   1.265 +	
   1.266 +//
   1.267 +//V2 direct viewfinder impl
   1.268 +class CCamV2DirectViewFinder: public CBase, public MCameraViewFinder, public MCameraV2DirectViewFinder
   1.269 +	{
   1.270 +public:
   1.271 +	static CCamV2DirectViewFinder* NewL(CCamUnitTestPlugin& aOwner);
   1.272 +	~CCamV2DirectViewFinder();
   1.273 +	
   1.274 +	void Release(CCamera::CCameraV2DirectViewFinder* aDirectViewFinderHandle);
   1.275 +	void Release();
   1.276 +	void GetViewFinderFadingCapabilitiesL(CCameraViewFinder::TViewFinderFadingCapabilities& aVFFadingCapabilities) const;
   1.277 +	void GetViewFinderFadingEffectL(CCameraViewFinder::TViewFinderFadingEffect& aCurrentVFFadingEffect) const;
   1.278 +	void SetViewFinderFadingEffect(const CCameraViewFinder::TViewFinderFadingEffect& aVFFadingEffect);
   1.279 +	void GetViewFinderHandleL(TInt& aVFHandle) const;
   1.280 +	
   1.281 +	void CreateHistogramImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
   1.282 +	void GetImageProcessingImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
   1.283 +	void SetDirectViewFinderObserver(MDirectViewFinderObserver& aDirectViewFinderObserver);
   1.284 +	void SetDirectViewFinderHandle(CCamera::CCameraV2DirectViewFinder* aDirectViewFinderHandle);
   1.285 +	void StartViewFinderDirectL(RWsSession& aWs, CWsScreenDevice& aScreenDevice, RWindowBase& aWindow, TRect& aScreenRect);
   1.286 +	void StartViewFinderDirectL(RWsSession& aWs, CWsScreenDevice& aScreenDevice, RWindowBase& aWindow, TRect& aScreenRect, TRect& aClipRect);
   1.287 +	void GetDirectViewFinderPropertiesL(TInt& aScreenNumber, TRect& aScreenRect, TRect& aClipRect) const;
   1.288 +	void PauseViewFinderDirect();
   1.289 +	void ResumeViewFinderDirect();
   1.290 +	void GetViewFinderStateL(CCamera::CCameraV2DirectViewFinder::TViewFinderState& aViewFinderState) const;
   1.291 +	void StopDirectViewFinder();
   1.292 +	TAny* GetDirectSnapshotImpl(TUid aInterface) const;
   1.293 +		
   1.294 +	inline MDirectViewFinderObserver* DirectViewFinderObserver() {return iDirectViewFinderObserver;}
   1.295 +	inline CCamera::CCameraV2DirectViewFinder& DirectViewFinderHandle() {return *iDirectViewFinderHandle;}
   1.296 +	inline CCamUnitTestPlugin& Owner() {return iOwner;}
   1.297 +	
   1.298 +private:
   1.299 +	CCamV2DirectViewFinder(CCamUnitTestPlugin& aOwner);
   1.300 +
   1.301 +public:
   1.302 +	TInt iRefCount;
   1.303 +
   1.304 +private:
   1.305 +	CCamUnitTestPlugin& iOwner;
   1.306 +	MDirectViewFinderObserver* iDirectViewFinderObserver;
   1.307 +	CCamera::CCameraV2DirectViewFinder* iDirectViewFinderHandle;
   1.308 +	TInt iVFHandle;
   1.309 +	mutable CCamDirectSnapshot* iDirectSnapshot;
   1.310 +	};
   1.311 +
   1.312 +//
   1.313 +//client viewfinder impl
   1.314 +class CCamClientViewFinder: public CBase, public MCameraViewFinder, public MCameraClientViewFinder
   1.315 +	{
   1.316 +public:
   1.317 +	static CCamClientViewFinder* NewL(CCamUnitTestPlugin& aOwner);
   1.318 +	~CCamClientViewFinder();
   1.319 +	
   1.320 +	void Release(CCamera::CCameraClientViewFinder* aClientViewFinderHandle);
   1.321 +	void Release();
   1.322 +	void GetViewFinderFadingCapabilitiesL(CCameraViewFinder::TViewFinderFadingCapabilities& aVFFadingCapabilities) const;
   1.323 +	void GetViewFinderFadingEffectL(CCameraViewFinder::TViewFinderFadingEffect& aCurrentVFFadingEffect) const;
   1.324 +	void SetViewFinderFadingEffect(const CCameraViewFinder::TViewFinderFadingEffect& aVFFadingEffect);
   1.325 +	void GetViewFinderHandleL(TInt& aVFHandle) const;
   1.326 +	
   1.327 +	void CreateHistogramImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
   1.328 +	void GetImageProcessingImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
   1.329 +	void SetClientViewFinderObserver(MClientViewFinderObserver& aClientViewFinderObserver);
   1.330 +	void SetClientViewFinderHandle(CCamera::CCameraClientViewFinder* aClientViewFinderHandle);
   1.331 +	
   1.332 +	void StartClientViewFinderL(TInt aScreenNumber, CCamera::TFormat aImageFormat, TSize& aSize);
   1.333 +	void StartClientViewFinderL(TInt aScreenNumber, CCamera::TFormat aImageFormat, TSize& aSize, TRect& aClipRect);
   1.334 +	void GetClientViewFinderStateL(TBool& aIsActive) const;
   1.335 +	void GetClientViewFinderPropertiesL(TInt& aScreenNumber, CCamera::TFormat& aImageFormat, TSize& aSize, TRect& aClipRect) const;
   1.336 +	void StopClientViewFinder();
   1.337 +	void GetViewFinderBufferL(MCameraBuffer2& aClientViewFinderBuffer) const;
   1.338 +	
   1.339 +	inline MClientViewFinderObserver* ClientViewFinderObserver() {return iClientViewFinderObserver;}
   1.340 +	inline CCamera::CCameraClientViewFinder& ClientViewFinderHandle() {return *iClientViewFinderHandle;}
   1.341 +	inline CCamUnitTestPlugin& Owner() {return iOwner;}
   1.342 +	
   1.343 +private:
   1.344 +	CCamClientViewFinder(CCamUnitTestPlugin& aOwner);
   1.345 +
   1.346 +public:
   1.347 +	TInt iRefCount;
   1.348 +
   1.349 +private:
   1.350 +	CCamUnitTestPlugin& iOwner;
   1.351 +	MClientViewFinderObserver* iClientViewFinderObserver;
   1.352 +	CCamera::CCameraClientViewFinder* iClientViewFinderHandle;
   1.353 +	TInt iVFHandle;
   1.354 +	};
   1.355 +	
   1.356 +//
   1.357 +//snapshot impl for image
   1.358 +class CCamSnapshotForImage : public CBase, public MCameraSnapshot, public MCameraSnapshot2
   1.359 +	{
   1.360 +friend class CHistogramImpForImageSnapshot;
   1.361 +
   1.362 +public:	
   1.363 +	static CCamSnapshotForImage* NewL(CCamUnitTestPlugin& aOwner, CCamImageCapture& aCamImageCaptureImpl);
   1.364 +	~CCamSnapshotForImage();
   1.365 +	
   1.366 +	TUint32 SupportedFormats();
   1.367 +    void PrepareSnapshotL(CCamera::TFormat aFormat, const TPoint& aPosition, const TSize& aSize, const TRgb& aBgColor, TBool aMaintainAspectRatio);
   1.368 +    void PrepareSnapshotL(CCamera::TFormat aFormat, const TSize& aSize, TBool aMaintainAspectRatio);
   1.369 +    
   1.370 +    void SetBgColorL(const TRgb& aBgColor); 
   1.371 +	void SetPositionL(const TPoint& aPosition);
   1.372 +	
   1.373 +    TBool IsSnapshotActive() const;
   1.374 +    void StartSnapshot();
   1.375 +	void StopSnapshot();
   1.376 +	MCameraBuffer& SnapshotDataL(RArray<TInt>& aFrameIndexOrder);
   1.377 +	
   1.378 +	void CreateHistogramImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
   1.379 +	void PrepareSnapshotL(const CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters);
   1.380 +	void GetSnapshotParametersL(CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters);
   1.381 +	void SetSnapshotParametersL(const CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters);
   1.382 +	void GetSnapshotStatusL(CCamera::CCameraSnapshot::TSnapshotState& aSnapshotState) const;
   1.383 +	void SelectSnapshotVideoFramesL(CCamera::CCameraSnapshot::TSnapshotVideoFrames aSnapshotVideoFrames);
   1.384 +	void EnableSnapshot();
   1.385 +	void DisableSnapshot();
   1.386 +	void SetClientViewFinderId(TInt aClientViewFinderId);
   1.387 +	
   1.388 +	void Release();
   1.389 +	
   1.390 +	inline CCamImageCapture& CamImageCaptureImpl() {return iCamImageCaptureImpl;}
   1.391 +	inline CCamera::CCameraImageCapture& CameraImageCapture() {return *(CamImageCaptureImpl().CameraImageCapture());}
   1.392 +	inline CCamUnitTestPlugin& Owner() {return iOwner;}
   1.393 +private:	
   1.394 +	CCamSnapshotForImage(CCamUnitTestPlugin& aOwner, CCamImageCapture& aCamImageCaptureImpl);
   1.395 +	void ConstructL();
   1.396 +
   1.397 +private:
   1.398 +	CCamUnitTestPlugin& iOwner;
   1.399 +	CCamImageCapture& iCamImageCaptureImpl;
   1.400 +	CFbsBitmap* iBitmap;
   1.401 +	RCamBuffer2 iSnapshotbuffer;
   1.402 +	CCamera::CCameraSnapshot::TSnapshotParameters iSnapshotParameters;
   1.403 +	
   1.404 +	TInt iRefCount;
   1.405 +	};
   1.406 +
   1.407 +//
   1.408 +//snapshot factory for image
   1.409 +class CSnapshotFactoryForImage : public CBase, public MImplementationFactory
   1.410 +	{
   1.411 +public:
   1.412 +	static CSnapshotFactoryForImage* NewL(CCamImageCapture& aCamImageCaptureImpl, CCamSnapshotForImage* aSnapshotImpForImage);
   1.413 +	~CSnapshotFactoryForImage();
   1.414 +	
   1.415 +	TInt GetImpl(TAny*& aIfPtr, TUid aIfaceUid) const;
   1.416 +	TInt GetImpl1(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1) const;
   1.417 +	TInt GetImpl2(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1, TECamImplFactoryParam aParam2) const;
   1.418 +	void Release();
   1.419 +	
   1.420 +private:
   1.421 +	CSnapshotFactoryForImage();
   1.422 +	void ConstructL(CCamImageCapture& aCamImageCaptureImpl, CCamSnapshotForImage* aSnapshotImpForImage);
   1.423 +
   1.424 +private:
   1.425 +	CCamSnapshotForImage* iSnapshotImpForImage;
   1.426 +	mutable TBool iIsSnapshotImpPassed;
   1.427 +	};
   1.428 +
   1.429 +//
   1.430 +//snapshot impl for video
   1.431 +class CCamSnapshotForVideo : public CBase, public MCameraSnapshot, public MCameraSnapshot2
   1.432 +	{
   1.433 +public:	
   1.434 +	static CCamSnapshotForVideo* NewL(CCamUnitTestPlugin& aOwner, CCamVideoCaptureControl& aCamVideoCaptureControlImpl);
   1.435 +	~CCamSnapshotForVideo();
   1.436 +	
   1.437 +	TUint32 SupportedFormats();
   1.438 +    void PrepareSnapshotL(CCamera::TFormat aFormat, const TPoint& aPosition, const TSize& aSize, const TRgb& aBgColor, TBool aMaintainAspectRatio);
   1.439 +    void PrepareSnapshotL(CCamera::TFormat aFormat, const TSize& aSize, TBool aMaintainAspectRatio);
   1.440 +    
   1.441 +    void SetBgColorL(const TRgb& aBgColor); 
   1.442 +	void SetPositionL(const TPoint& aPosition);
   1.443 +	
   1.444 +    TBool IsSnapshotActive() const;
   1.445 +    void StartSnapshot();
   1.446 +	void StopSnapshot();
   1.447 +	MCameraBuffer& SnapshotDataL(RArray<TInt>& aFrameIndexOrder);
   1.448 +	
   1.449 +	void CreateHistogramImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
   1.450 +	void PrepareSnapshotL(const CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters);
   1.451 +	void GetSnapshotParametersL(CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters);
   1.452 +	void SetSnapshotParametersL(const CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters);
   1.453 +	void GetSnapshotStatusL(CCamera::CCameraSnapshot::TSnapshotState& aSnapshotState) const;
   1.454 +	void SelectSnapshotVideoFramesL(CCamera::CCameraSnapshot::TSnapshotVideoFrames aSnapshotVideoFrames);
   1.455 +	void EnableSnapshot();
   1.456 +	void DisableSnapshot();
   1.457 +	void SetClientViewFinderId(TInt aClientViewFinderId);
   1.458 +	
   1.459 +	void Release();
   1.460 +	
   1.461 +	inline CCamVideoCaptureControl& CamVideoCaptureControlImpl() {return iCamVideoCaptureControlImpl;}
   1.462 +
   1.463 +private:	
   1.464 +	CCamSnapshotForVideo(CCamUnitTestPlugin& aOwner, CCamVideoCaptureControl& aCamVideoCaptureControlImpl);
   1.465 +	void ConstructL();
   1.466 +	
   1.467 +private:
   1.468 +	CCamUnitTestPlugin& iOwner;
   1.469 +	CCamVideoCaptureControl& iCamVideoCaptureControlImpl;
   1.470 +	CFbsBitmap* iBitmap;
   1.471 +	RCamBuffer2 iSnapshotbuffer;
   1.472 +	CCamera::CCameraSnapshot::TSnapshotParameters iSnapshotParameters;
   1.473 +	
   1.474 +	TInt iRefCount;
   1.475 +	};
   1.476 +
   1.477 +//
   1.478 +//snapshot factory for video
   1.479 +class CSnapshotFactoryForVideo : public CBase, public MImplementationFactory
   1.480 +	{
   1.481 +public:
   1.482 +	static CSnapshotFactoryForVideo* NewL(CCamVideoCaptureControl& aCamVideoCaptureControlImpl, CCamSnapshotForVideo* aSnapshotImpForVideo);
   1.483 +	~CSnapshotFactoryForVideo();
   1.484 +	
   1.485 +	TInt GetImpl(TAny*& aIfPtr, TUid aIfaceUid) const;
   1.486 +	TInt GetImpl1(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1) const;
   1.487 +	TInt GetImpl2(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1, TECamImplFactoryParam aParam2) const;
   1.488 +	void Release();
   1.489 +	
   1.490 +private:
   1.491 +	CSnapshotFactoryForVideo();
   1.492 +	void ConstructL(CCamVideoCaptureControl& aCamVideoCaptureControlImpl, CCamSnapshotForVideo* aSnapshotImpForVideo);
   1.493 +
   1.494 +private:
   1.495 +	CCamSnapshotForVideo* iSnapshotImpForVideo;
   1.496 +	mutable TBool iIsSnapshotImpPassed;
   1.497 +	};
   1.498 +
   1.499 +//
   1.500 +// V2 buffer for histogram: MHistogramV2Buffer
   1.501 +class RCamHistogramV2Buffer : public MHistogramV2Buffer
   1.502 +	{
   1.503 +
   1.504 +public:
   1.505 +	RCamHistogramV2Buffer(): iAvailable(ETrue) {}
   1.506 +	CCamera::CCameraV2Histogram::THistogramType Type() {return CCamera::CCameraV2Histogram::EHistNone;}
   1.507 +	TInt ElementSize() {return -5;}
   1.508 +	TInt NumOfElements() {return -5;}
   1.509 +	TDesC8* DataL() {User::Leave(KErrNotSupported); return NULL;}
   1.510 +	RChunk& ChunkL() {User::Leave(KErrNotSupported); return iChunk;}
   1.511 +	TInt ChunkOffsetL() {User::Leave(KErrNotSupported); return -5;}
   1.512 +	void Release() {iAvailable = EFalse;}
   1.513 +
   1.514 +public:
   1.515 +
   1.516 +	TBool iAvailable;
   1.517 +	RChunk iChunk;	
   1.518 +	};
   1.519 +	
   1.520 +//	
   1.521 +//histogram impl for video
   1.522 +class CHistogramImpForVideo : public CBase, public MCameraV2Histogram 
   1.523 +	{
   1.524 +
   1.525 +public:
   1.526 +	static CHistogramImpForVideo* NewL(CCamUnitTestPlugin& aOwner, CCamVideoCaptureControl& aCamVideoCaptureControlImpl);
   1.527 +	~CHistogramImpForVideo();
   1.528 +	
   1.529 +	void Release(CCamera::CCameraV2Histogram* aHistogramHandle);
   1.530 +	void SetHistogramHandle(CCamera::CCameraV2Histogram* aHistogramHandle);
   1.531 +	void GetSupportedHistogramsL(TUint& aSupportedHistogramType) const;
   1.532 +	void GetDirectHistogramSupportInfoL(TBool& aIsDirectHistogramSupported) const;
   1.533 +	void PrepareClientHistogramL(CCamera::CCameraV2Histogram::THistogramType aType);
   1.534 +	void PrepareDirectHistogramL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);	
   1.535 +	void UpdateDirectHistogramPropertiesL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);
   1.536 +	void GetDirectHistogramPropertiesL(CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters) const;
   1.537 +	void StartHistogram();
   1.538 +	void StopHistogram();
   1.539 +	void GetHistogramStateL(TBool& aIsHistogramActive) const;
   1.540 +	
   1.541 +	inline CCamVideoCaptureControl& CamVideoCaptureControlImpl() {return iCamVideoCaptureControlImpl;}
   1.542 +	
   1.543 +private:
   1.544 +	CHistogramImpForVideo(CCamUnitTestPlugin& aOwner, CCamVideoCaptureControl& aCamVideoCaptureControlImpl);
   1.545 +
   1.546 +private:
   1.547 +	CCamUnitTestPlugin& iOwner;
   1.548 +	CCamVideoCaptureControl& iCamVideoCaptureControlImpl;
   1.549 +	};
   1.550 +
   1.551 +//	
   1.552 +//histogram factory for video	
   1.553 +class CHistogramFactoryForVideo : public CBase, public MImplementationFactory
   1.554 +	{
   1.555 +public:
   1.556 +	static CHistogramFactoryForVideo* NewL(CCamVideoCaptureControl& aCamVideoCaptureControlImpl);
   1.557 +	~CHistogramFactoryForVideo();
   1.558 +	
   1.559 +	TInt GetImpl(TAny*& aIfPtr, TUid aIfaceUid) const;
   1.560 +	TInt GetImpl1(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1) const;
   1.561 +	TInt GetImpl2(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1, TECamImplFactoryParam aParam2) const;
   1.562 +	void Release();
   1.563 +	
   1.564 +private:
   1.565 +	CHistogramFactoryForVideo();
   1.566 +	void ConstructL(CCamVideoCaptureControl& aCamVideoCaptureControlImpl);
   1.567 +
   1.568 +private:
   1.569 +	CHistogramImpForVideo* iHistogramImpForVideo;
   1.570 +	mutable TBool iIsHistogramImpPassed;
   1.571 +	};
   1.572 +	
   1.573 +//	
   1.574 +//histogram impl for image
   1.575 +class CHistogramImpForImage : public CBase, public MCameraV2Histogram 
   1.576 +	{
   1.577 +
   1.578 +public:
   1.579 +	static CHistogramImpForImage* NewL(CCamUnitTestPlugin& aOwner, CCamImageCapture& aCamImageCaptureImpl);
   1.580 +	~CHistogramImpForImage();
   1.581 +	
   1.582 +	void Release(CCamera::CCameraV2Histogram* aHistogramHandle);
   1.583 +	void SetHistogramHandle(CCamera::CCameraV2Histogram* aHistogramHandle);
   1.584 +	void GetSupportedHistogramsL(TUint& aSupportedHistogramType) const;
   1.585 +	void GetDirectHistogramSupportInfoL(TBool& aIsDirectHistogramSupported) const;
   1.586 +	void PrepareClientHistogramL(CCamera::CCameraV2Histogram::THistogramType aType);
   1.587 +	void PrepareDirectHistogramL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);	
   1.588 +	void UpdateDirectHistogramPropertiesL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);
   1.589 +	void GetDirectHistogramPropertiesL(CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters) const;
   1.590 +	void StartHistogram();
   1.591 +	void StopHistogram();
   1.592 +	void GetHistogramStateL(TBool& aIsHistogramActive) const;
   1.593 +	
   1.594 +	inline CCamImageCapture& CamImageCaptureImpl() {return iCamImageCaptureImpl;}
   1.595 +	inline CCamera::CCameraImageCapture& CameraImageCapture() {return *(CamImageCaptureImpl().CameraImageCapture());}
   1.596 +	
   1.597 +private:
   1.598 +	CHistogramImpForImage(CCamUnitTestPlugin& aOwner, CCamImageCapture& aCamImageCaptureImpl);
   1.599 +
   1.600 +private:
   1.601 +	CCamUnitTestPlugin& iOwner;
   1.602 +	CCamImageCapture& iCamImageCaptureImpl;
   1.603 +	CCamera::CCameraV2Histogram* iHistogramHandle;
   1.604 +	};
   1.605 +
   1.606 +//	
   1.607 +//histogram factory for image	
   1.608 +class CHistogramFactoryForImage : public CBase, public MImplementationFactory
   1.609 +	{
   1.610 +public:
   1.611 +	static CHistogramFactoryForImage* NewL(CCamImageCapture& aCamImageCaptureImpl);
   1.612 +	~CHistogramFactoryForImage();
   1.613 +	
   1.614 +	TInt GetImpl(TAny*& aIfPtr, TUid aIfaceUid) const;
   1.615 +	TInt GetImpl1(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1) const;
   1.616 +	TInt GetImpl2(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1, TECamImplFactoryParam aParam2) const;
   1.617 +	void Release();
   1.618 +	
   1.619 +private:
   1.620 +	CHistogramFactoryForImage();
   1.621 +	void ConstructL(CCamImageCapture& aCamImageCaptureImpl);
   1.622 +
   1.623 +private:
   1.624 +	CHistogramImpForImage* iHistogramImpForImage;
   1.625 +	mutable TBool iIsHistogramImpPassed;
   1.626 +	};
   1.627 +	
   1.628 +//	
   1.629 +//histogram impl for DirectViewFinder
   1.630 +class CHistogramImpForDirectViewFinder : public CBase, public MCameraV2Histogram 
   1.631 +	{
   1.632 +
   1.633 +public:
   1.634 +	static CHistogramImpForDirectViewFinder* NewL(CCamUnitTestPlugin& aOwner, CCamV2DirectViewFinder& aCamV2DirectViewFinderImpl);
   1.635 +	~CHistogramImpForDirectViewFinder();
   1.636 +	
   1.637 +	void Release(CCamera::CCameraV2Histogram* aHistogramHandle);
   1.638 +	void SetHistogramHandle(CCamera::CCameraV2Histogram* aHistogramHandle);
   1.639 +	void GetSupportedHistogramsL(TUint& aSupportedHistogramType) const;
   1.640 +	void GetDirectHistogramSupportInfoL(TBool& aIsDirectHistogramSupported) const;
   1.641 +	void PrepareClientHistogramL(CCamera::CCameraV2Histogram::THistogramType aType);
   1.642 +	void PrepareDirectHistogramL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);	
   1.643 +	void UpdateDirectHistogramPropertiesL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);
   1.644 +	void GetDirectHistogramPropertiesL(CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters) const;
   1.645 +	void StartHistogram();
   1.646 +	void StopHistogram();
   1.647 +	void GetHistogramStateL(TBool& aIsHistogramActive) const;
   1.648 +	
   1.649 +	inline CCamV2DirectViewFinder& DirectViewFinderImpl() {return iCamV2DirectViewFinderImpl;}
   1.650 +	
   1.651 +private:
   1.652 +	CHistogramImpForDirectViewFinder(CCamUnitTestPlugin& aOwner, CCamV2DirectViewFinder& aCamV2DirectViewFinderImpl);
   1.653 +
   1.654 +private:
   1.655 +	CCamUnitTestPlugin& iOwner;
   1.656 +	CCamV2DirectViewFinder& iCamV2DirectViewFinderImpl;
   1.657 +	CCamera::CCameraV2Histogram* iHistogramHandle;
   1.658 +	};
   1.659 +
   1.660 +//	
   1.661 +//histogram factory for DirectViewFinder
   1.662 +class CHistogramFactoryForDirectViewFinder : public CBase, public MImplementationFactory
   1.663 +	{
   1.664 +public:
   1.665 +	static CHistogramFactoryForDirectViewFinder* NewL(CCamV2DirectViewFinder& aCamV2DirectViewFinderImpl);
   1.666 +	~CHistogramFactoryForDirectViewFinder();
   1.667 +	
   1.668 +	TInt GetImpl(TAny*& aIfPtr, TUid aIfaceUid) const;
   1.669 +	TInt GetImpl1(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1) const;
   1.670 +	TInt GetImpl2(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1, TECamImplFactoryParam aParam2) const;
   1.671 +	void Release();
   1.672 +	
   1.673 +private:
   1.674 +	CHistogramFactoryForDirectViewFinder();
   1.675 +	void ConstructL(CCamV2DirectViewFinder& aCamV2DirectViewFinderImpl);
   1.676 +
   1.677 +private:
   1.678 +	CHistogramImpForDirectViewFinder* iHistogramImpForDirectViewFinder;
   1.679 +	mutable TBool iIsHistogramImpPassed;
   1.680 +	};
   1.681 +
   1.682 +//	
   1.683 +//histogram impl for ClientViewFinder
   1.684 +class CHistogramImpForClientViewFinder : public CBase, public MCameraV2Histogram 
   1.685 +	{
   1.686 +
   1.687 +public:
   1.688 +	static CHistogramImpForClientViewFinder* NewL(CCamUnitTestPlugin& aOwner, CCamClientViewFinder& aCamClientViewFinderImpl);
   1.689 +	~CHistogramImpForClientViewFinder();
   1.690 +	
   1.691 +	void Release(CCamera::CCameraV2Histogram* aHistogramHandle);
   1.692 +	void SetHistogramHandle(CCamera::CCameraV2Histogram* aHistogramHandle);
   1.693 +	void GetSupportedHistogramsL(TUint& aSupportedHistogramType) const;
   1.694 +	void GetDirectHistogramSupportInfoL(TBool& aIsDirectHistogramSupported) const;
   1.695 +	void PrepareClientHistogramL(CCamera::CCameraV2Histogram::THistogramType aType);
   1.696 +	void PrepareDirectHistogramL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);	
   1.697 +	void UpdateDirectHistogramPropertiesL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);
   1.698 +	void GetDirectHistogramPropertiesL(CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters) const;
   1.699 +	void StartHistogram();
   1.700 +	void StopHistogram();
   1.701 +	void GetHistogramStateL(TBool& aIsHistogramActive) const;
   1.702 +	
   1.703 +	inline CCamClientViewFinder& ClientViewFinderImpl() {return iCamClientViewFinderImpl;}
   1.704 +	inline CCamera::CCameraClientViewFinder& ClientViewFinderHandle() {return ClientViewFinderImpl().ClientViewFinderHandle();}
   1.705 +	
   1.706 +private:
   1.707 +	CHistogramImpForClientViewFinder(CCamUnitTestPlugin& aOwner, CCamClientViewFinder& aCamClientViewFinderImpl);
   1.708 +
   1.709 +private:
   1.710 +	CCamUnitTestPlugin& iOwner;
   1.711 +	CCamClientViewFinder& iCamClientViewFinderImpl;
   1.712 +	CCamera::CCameraV2Histogram* iHistogramHandle;
   1.713 +	};
   1.714 +
   1.715 +//	
   1.716 +//histogram factory for ClientViewFinder		
   1.717 +class CHistogramFactoryForClientViewFinder : public CBase, public MImplementationFactory
   1.718 +	{
   1.719 +public:
   1.720 +	static CHistogramFactoryForClientViewFinder* NewL(CCamClientViewFinder& aCamClientViewFinderImpl);
   1.721 +	~CHistogramFactoryForClientViewFinder();
   1.722 +	
   1.723 +	TInt GetImpl(TAny*& aIfPtr, TUid aIfaceUid) const;
   1.724 +	TInt GetImpl1(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1) const;
   1.725 +	TInt GetImpl2(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1, TECamImplFactoryParam aParam2) const;
   1.726 +	void Release();
   1.727 +	
   1.728 +private:
   1.729 +	CHistogramFactoryForClientViewFinder();
   1.730 +	void ConstructL(CCamClientViewFinder& aCamClientViewFinderImpl);
   1.731 +
   1.732 +private:
   1.733 +	CHistogramImpForClientViewFinder* iHistogramImpForClientViewFinder;
   1.734 +	mutable TBool iIsHistogramImpPassed;
   1.735 +	};
   1.736 +
   1.737 +//	
   1.738 +//histogram impl for image snapshot
   1.739 +class CHistogramImpForImageSnapshot : public CBase, public MCameraV2Histogram 
   1.740 +	{
   1.741 +
   1.742 +public:
   1.743 +	static CHistogramImpForImageSnapshot* NewL(CCamUnitTestPlugin& aOwner, CCamSnapshotForImage& aCamSnapshotForImageImpl);
   1.744 +	~CHistogramImpForImageSnapshot();
   1.745 +	
   1.746 +	void Release(CCamera::CCameraV2Histogram* aHistogramHandle);
   1.747 +	void SetHistogramHandle(CCamera::CCameraV2Histogram* aHistogramHandle);
   1.748 +	void GetSupportedHistogramsL(TUint& aSupportedHistogramType) const;
   1.749 +	void GetDirectHistogramSupportInfoL(TBool& aIsDirectHistogramSupported) const;
   1.750 +	void PrepareClientHistogramL(CCamera::CCameraV2Histogram::THistogramType aType);
   1.751 +	void PrepareDirectHistogramL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);	
   1.752 +	void UpdateDirectHistogramPropertiesL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);
   1.753 +	void GetDirectHistogramPropertiesL(CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters) const;
   1.754 +	void StartHistogram();
   1.755 +	void StopHistogram();
   1.756 +	void GetHistogramStateL(TBool& aIsHistogramActive) const;
   1.757 +	
   1.758 +	inline CCamSnapshotForImage& CamSnapshotForImageImpl() {return iCamSnapshotForImageImpl;}
   1.759 +	inline CCamera::CCameraV2Histogram* HistogramHandle() {return iHistogramHandle;}
   1.760 +	inline CCamImageCapture& CamImageCaptureImpl() {return CamSnapshotForImageImpl().CamImageCaptureImpl();}
   1.761 +	inline CCamera::CCameraImageCapture& CameraImageCapture() {return *(CamImageCaptureImpl().CameraImageCapture());}
   1.762 +	
   1.763 +private:
   1.764 +	CHistogramImpForImageSnapshot(CCamUnitTestPlugin& aOwner, CCamSnapshotForImage& aCamSnapshotForImageImpl);
   1.765 +
   1.766 +private:
   1.767 +	CCamUnitTestPlugin& iOwner;
   1.768 +	CCamSnapshotForImage& iCamSnapshotForImageImpl;
   1.769 +	CCamera::CCameraV2Histogram* iHistogramHandle;
   1.770 +	};	
   1.771 +
   1.772 +//	
   1.773 +//histogram factory for image snapshot
   1.774 +class CHistogramFactoryForImageSnapshot : public CBase, public MImplementationFactory
   1.775 +	{
   1.776 +public:
   1.777 +	static CHistogramFactoryForImageSnapshot* NewL(CCamSnapshotForImage& aCamSnapshotForImageImpl);
   1.778 +	~CHistogramFactoryForImageSnapshot();
   1.779 +	
   1.780 +	TInt GetImpl(TAny*& aIfPtr, TUid aIfaceUid) const;
   1.781 +	TInt GetImpl1(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1) const;
   1.782 +	TInt GetImpl2(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1, TECamImplFactoryParam aParam2) const;
   1.783 +	void Release();
   1.784 +	
   1.785 +private:
   1.786 +	CHistogramFactoryForImageSnapshot();
   1.787 +	void ConstructL(CCamSnapshotForImage& aCamSnapshotForImageImpl);
   1.788 +
   1.789 +private:
   1.790 +	CHistogramImpForImageSnapshot* iHistogramImpForImageSnapshot;
   1.791 +	mutable TBool iIsHistogramImpPassed;
   1.792 +	};
   1.793 +
   1.794 +//	
   1.795 +//img proc impl for still images.
   1.796 +class CCamImgProcImpForImage : public CBase, public MCameraImageProcessing
   1.797 +	{
   1.798 +public:
   1.799 +	static CCamImgProcImpForImage* NewL(CCamUnitTestPlugin& aOwner);
   1.800 +	~CCamImgProcImpForImage();
   1.801 +	
   1.802 +	void Release();
   1.803 +	void GetSupportedTransformationsL(RArray<TUid>& aTransformations) const;
   1.804 +	void GetActiveTransformationsL(RArray<TUid>& aTransformations) const;
   1.805 +	void GetTransformationSupportedValuesL(TUid aTransformation, RArray<TInt>& aValues, TValueInfo& aInfo) const;
   1.806 +	TInt TransformationValue(TUid aTransformation) const;
   1.807 +	TInt GetTransformationValue(TUid aTransformation, TInt& aTransformationValue) const;
   1.808 +	void SetTransformationValue(TUid aTransformation, TInt aValue);
   1.809 +	void GetActiveTransformSequenceL(RArray<TUid>& aTransformSequence) const;
   1.810 +	void SetActiveTransformSequenceL(RArray<TUid>& aTransformSequence);
   1.811 +	void SetSourceRect(const TRect& aRect);
   1.812 +	void GetSourceRect(TRect& aRect) const;
   1.813 +
   1.814 +private:
   1.815 +	CCamImgProcImpForImage(CCamUnitTestPlugin& aOwner);
   1.816 +	
   1.817 +private:
   1.818 +	CCamUnitTestPlugin& iOwner;
   1.819 +	};
   1.820 +
   1.821 +//	
   1.822 +//img proc factory for still images.
   1.823 +class CImgProcFactoryForImage : public CBase, public MImplementationFactory
   1.824 +	{
   1.825 +public:
   1.826 +	static CImgProcFactoryForImage* NewL(CCamImageCapture& aCamImageCaptureImpl, CCamImgProcImpForImage* aCamImgProcImpForImage);
   1.827 +	~CImgProcFactoryForImage();
   1.828 +	
   1.829 +	TInt GetImpl(TAny*& aIfPtr, TUid aIfaceUid) const;
   1.830 +	TInt GetImpl1(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1) const;
   1.831 +	TInt GetImpl2(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1, TECamImplFactoryParam aParam2) const;
   1.832 +	void Release();
   1.833 +	
   1.834 +private:
   1.835 +	CImgProcFactoryForImage();
   1.836 +	void ConstructL(CCamImageCapture& aCamImageCaptureImpl, CCamImgProcImpForImage* aCamImgProcImpForImage);
   1.837 +
   1.838 +private:
   1.839 +	CCamImgProcImpForImage* iCamImgProcImpForImage;
   1.840 +	mutable TBool iIsImgProcImpPassed;
   1.841 +	};
   1.842 +
   1.843 +#endif // EXTENDEDFUNCTIONALITY_H