os/mm/imagingandcamerafws/cameraunittest/src/ECamUnitTestPlugin/extended_functionality.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// extendedfunctionality.h
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
#ifndef EXTENDEDFUNCTIONALITY_H
sl@0
    19
#define EXTENDEDFUNCTIONALITY_H
sl@0
    20
sl@0
    21
#include <ecam/ecamplugin.h>
sl@0
    22
#include <ecam/ecaminfoplugin.h>
sl@0
    23
sl@0
    24
#include "ECamUnitTestPlugin.h"
sl@0
    25
#include <fbs.h>
sl@0
    26
sl@0
    27
#include <ecam/mcamerahistogram.h>
sl@0
    28
#include <ecam/mcamerasnapshot.h>
sl@0
    29
#include <ecam/ecamcapturecontrolintf.h>
sl@0
    30
#include <ecam/ecamimageprocessingintf.h>
sl@0
    31
#include <ecam/ecamviewfinderintf.h>
sl@0
    32
#include <ecam/implementationfactoryintf.h>
sl@0
    33
sl@0
    34
class CCamUnitTestPlugin;
sl@0
    35
sl@0
    36
const TInt KSupportedDirectVCType		= 0;
sl@0
    37
const TInt KSupportedClientVCType		= 1;
sl@0
    38
sl@0
    39
//
sl@0
    40
// camera buffer 2
sl@0
    41
class RCamBuffer2 : public MCameraBuffer2
sl@0
    42
	{
sl@0
    43
public:
sl@0
    44
	RCamBuffer2(CFbsBitmap*& aFrame): iAvailable(ETrue), iFrame(aFrame) {}
sl@0
    45
	virtual TInt NumFrames() {return 0;}
sl@0
    46
	virtual TDesC8* DataL(TInt aFrameIndex) {if (aFrameIndex != 0) { User::Leave(KErrArgument); } return NULL; }
sl@0
    47
	virtual CFbsBitmap& BitmapL(TInt aFrameIndex) {if (aFrameIndex != 0) { User::Leave(KErrArgument); } return *iFrame;}
sl@0
    48
 	virtual	RChunk& ChunkL() { return iChunk;}
sl@0
    49
	virtual TInt ChunkOffsetL(TInt aFrameIndex) {if (aFrameIndex != 0) { User::Leave(KErrArgument); } return 0;}
sl@0
    50
	virtual TInt FrameSize(TInt aFrameIndex) {if (aFrameIndex != 0) { User::Leave(KErrArgument); } return 0; }
sl@0
    51
	virtual void Release() {iAvailable = ETrue;}
sl@0
    52
	
sl@0
    53
	virtual TInt GetInterfaceUids(RArray<TUid>& aInterfaceUids) {aInterfaceUids.Reset(); return KErrNotSupported;}
sl@0
    54
	virtual TInt CustomInterface(TUid /*aInterface*/, TAny*& aPtrInterface) {aPtrInterface = NULL; return KErrNotSupported;}
sl@0
    55
	
sl@0
    56
public:	
sl@0
    57
	TBool iAvailable;
sl@0
    58
	CFbsBitmap*& iFrame;
sl@0
    59
	RChunk iChunk;
sl@0
    60
	};
sl@0
    61
sl@0
    62
//
sl@0
    63
//pre image capture control impl
sl@0
    64
class CCamPreImageCaptureControl: public CBase, public MCameraPreImageCaptureControl
sl@0
    65
	{
sl@0
    66
public:
sl@0
    67
	static CCamPreImageCaptureControl* NewL(CCamUnitTestPlugin& aOwner);
sl@0
    68
	~CCamPreImageCaptureControl();
sl@0
    69
	
sl@0
    70
	void Release();
sl@0
    71
	void SetPreImageCaptureControlObserver(MPreImageCaptureControlObserver& aPreImageCaptureControlObserver);
sl@0
    72
	void GetDirectSnapshotSupportInfoL(TUint& aDirectSnapshotSupportInfo) const;
sl@0
    73
	void GetSupportedEmbeddedStillCaptureSettingsL(RArray<TUid>& aSupportedEmbeddedStillCaptureSettings) const;
sl@0
    74
	void GetSupportedDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl::TDirectSavingType& aSupportedDirectSavingType) const;
sl@0
    75
	void SetSequentialImageFilenameL(const TDesC8& aFilename, TInt aStartingSequenceNumber);
sl@0
    76
	void SetLowerResolutionSequentialImageFilenameL(const TDesC8& aLowerResolutionFilename, TInt aStartingSequenceNumber);
sl@0
    77
	void GetDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl::TDirectSavingType& aDirectSavingType) const;
sl@0
    78
	void SetDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl::TDirectSavingType aDirectSavingType);
sl@0
    79
	void GetCaptureEventSupportInfoL(TUint& aSupportedDriveModes) const;
sl@0
    80
	void GetImageFormatsSupportedL(TUint& aImageFormatsSupported, const TSize& aSize) const;
sl@0
    81
	void GetPixelAspectsSupportedL(TUint& aPixelAspectsSupported, CCamera::TFormat aImageFormat, const TSize& aSize) const;
sl@0
    82
	void PrepareImageCapture(const CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters& 
sl@0
    83
										aPrepareImageParameters, MCaptureImageObserver& aCaptureImageObserver);
sl@0
    84
	void GetImageMaxMemorySizeSettingSupportInfoL(TBool& aIsImageMaxMemorySizeSettingSupported) const;
sl@0
    85
	void GetImageMaxMemorySizeL(TUint& aMemorySize) const;
sl@0
    86
	void GetSupportedProcessingOptionsL(TUint& aSupportedProcessingOptions) const;
sl@0
    87
	
sl@0
    88
	inline MPreImageCaptureControlObserver* PreImageCaptureControlObserver() {return iPreImageCaptureControlObserver;}
sl@0
    89
	
sl@0
    90
private:	
sl@0
    91
	CCamPreImageCaptureControl(CCamUnitTestPlugin& aOwner);
sl@0
    92
	
sl@0
    93
	void CreateCaptureImageL(CCamera::CCameraImageCapture*& aCameraImageCapture, const CCamera::CCameraPreImageCaptureControl::
sl@0
    94
			TPrepareImageParameters& aPrepareImageParameters, MCaptureImageObserver& aCaptureImageObserver);
sl@0
    95
	
sl@0
    96
private:
sl@0
    97
	CCamUnitTestPlugin& iOwner;
sl@0
    98
	MPreImageCaptureControlObserver* iPreImageCaptureControlObserver;
sl@0
    99
	};
sl@0
   100
sl@0
   101
//
sl@0
   102
//image capture impl	
sl@0
   103
class CCamSnapshotForImage;
sl@0
   104
class CCamImgProcImpForImage;
sl@0
   105
class CCamPostImageCaptureControl;
sl@0
   106
sl@0
   107
class CCamImageCapture: public CBase, public MCameraImageCapture
sl@0
   108
	{
sl@0
   109
friend class CSnapshotFactoryForImage;
sl@0
   110
friend class CImgProcFactoryForImage;
sl@0
   111
friend class CCamPostImageCaptureControl;
sl@0
   112
sl@0
   113
public:
sl@0
   114
	static CCamImageCapture* NewL(CCamUnitTestPlugin& aOwner);
sl@0
   115
	~CCamImageCapture();
sl@0
   116
	
sl@0
   117
	void Release(CCamera::CCameraImageCapture* aCameraImageCapture);
sl@0
   118
	void CreateHistogramImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
sl@0
   119
	void GetSnapshotImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
sl@0
   120
	void GetImageProcessingImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
sl@0
   121
	void SetCaptureImageObserver(MCaptureImageObserver& aCaptureImageObserver);
sl@0
   122
	void GetPrepareImageParametersL(CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters& aPrepareImageParameters) const;
sl@0
   123
	void SetPrepareImageParameters(const CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters& aPrepareImageParameters);
sl@0
   124
	TAny* CreatePostImageCaptureControlImpl(TUid aInterface, TPostCaptureControlId aPostCaptureControlId);
sl@0
   125
	void CaptureImage(CCamera::CCameraImageCapture* aCameraImageCapture);
sl@0
   126
	void CancelCaptureImage();
sl@0
   127
	void GetNumImagesExposedL(TUint& aNumImagesExposed) const;
sl@0
   128
	void GetNumTotalImagesL(TUint& aNumTotalImages) const;
sl@0
   129
	void GetPostCaptureControlHandleL(CCamera::CCameraPostImageCaptureControl*& aPostCaptureControlHandle, 
sl@0
   130
									TPostCaptureControlId aPostCaptureControlId) const;
sl@0
   131
	void SetCaptureImagePriorityL(TECamImagePriority aCaptureImagePriority);
sl@0
   132
	void GetCaptureImagePriorityL(TECamImagePriority& aCaptureImagePriority) const;
sl@0
   133
	void PauseProcessing(TUint aProcessingType);
sl@0
   134
	void ResumeProcessingL(TUint aProcessingType);
sl@0
   135
	
sl@0
   136
	inline MCaptureImageObserver* CaptureImageObserver() {return iCaptureImageObserver;}
sl@0
   137
	inline CCamera::CCameraImageCapture* CameraImageCapture() {return iCameraImageCapture;}
sl@0
   138
	inline CCamUnitTestPlugin& Owner() {return iOwner;}
sl@0
   139
sl@0
   140
private:
sl@0
   141
	CCamImageCapture(CCamUnitTestPlugin& aOwner);
sl@0
   142
	void CreatePostImageCaptureControlL(CCamera::CCameraPostImageCaptureControl*& aPostCaptureControlHandle, 
sl@0
   143
						TPostCaptureControlId aPostCaptureControlId);
sl@0
   144
	
sl@0
   145
private:
sl@0
   146
	CCamUnitTestPlugin& iOwner;
sl@0
   147
	MCaptureImageObserver* iCaptureImageObserver;
sl@0
   148
	CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters iPrepareImageParameters;
sl@0
   149
	
sl@0
   150
	mutable CCamSnapshotForImage* iSnapshotImpForImage;
sl@0
   151
	CCamImgProcImpForImage* iCamImgProcImpForImage;
sl@0
   152
	RArray<TInt> iArrayPostCaptureControlId;
sl@0
   153
	RArray<CCamPostImageCaptureControl*> iArrayPostCaptureControlImpl;
sl@0
   154
	RArray<CCamera::CCameraPostImageCaptureControl*> iArrayPostCaptureControlHandle;
sl@0
   155
sl@0
   156
	CCamera::CCameraImageCapture* iCameraImageCapture;
sl@0
   157
	};
sl@0
   158
sl@0
   159
//
sl@0
   160
//post image capture control impl
sl@0
   161
class CCamPostImageCaptureControl: public CBase, public MCameraPostImageCaptureControl
sl@0
   162
	{
sl@0
   163
public:
sl@0
   164
	static CCamPostImageCaptureControl* NewL(CCamImageCapture& aCamImageCaptureImpl);
sl@0
   165
	~CCamPostImageCaptureControl();
sl@0
   166
	
sl@0
   167
	void Release(TPostCaptureControlId aPostCaptureControlId);
sl@0
   168
	void GetImageSequenceNumberL(TUint& aSequenceNumber) const;
sl@0
   169
	void CancelImage();
sl@0
   170
	void SetImagePriorityL(TECamImagePriority aImagePriority);
sl@0
   171
	void GetImagePriorityL(TECamImagePriority& aImagePriority) const;
sl@0
   172
	void PauseProcessing(TUint aProcessingType);
sl@0
   173
	void ResumeProcessingL(TUint aProcessingType);
sl@0
   174
	void GetImageBufferL(MCameraImageBuffer& aCameraImageBuffer) const;
sl@0
   175
	void GetImageStateL(CCamera::CCameraPostImageCaptureControl::TImageState& aImageState) const;
sl@0
   176
	void GetBufferStateL(CCamera::CCameraPostImageCaptureControl::TBufferState& aBufferState) const;
sl@0
   177
sl@0
   178
	inline CCamImageCapture& CamImageCaptureImpl() {return iCamImageCaptureImpl;}
sl@0
   179
sl@0
   180
private:
sl@0
   181
	CCamPostImageCaptureControl(CCamImageCapture& aCamImageCaptureImpl);
sl@0
   182
	
sl@0
   183
private:
sl@0
   184
	CCamImageCapture& iCamImageCaptureImpl;
sl@0
   185
	};
sl@0
   186
sl@0
   187
//
sl@0
   188
//video capture control impl
sl@0
   189
class CCamSnapshotForVideo;	
sl@0
   190
class CCamVideoCaptureControl : public CBase, public MCameraVideoCaptureControl
sl@0
   191
	{
sl@0
   192
friend class CSnapshotFactoryForVideo;
sl@0
   193
sl@0
   194
public:
sl@0
   195
	static CCamVideoCaptureControl* NewL(CCamUnitTestPlugin& aOwner);
sl@0
   196
	~CCamVideoCaptureControl();
sl@0
   197
	
sl@0
   198
	void Release();
sl@0
   199
	void CreateHistogramImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
sl@0
   200
	void GetSnapshotImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
sl@0
   201
	void GetImageProcessingImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
sl@0
   202
	void SetCaptureVideoObserver(MCaptureVideoObserver& aCaptureVideoObserver);
sl@0
   203
	void GetVideoFormatsSupportedL(TUint& aVideoFormatsSupported, const TSize& aSize) const;
sl@0
   204
	void GetPixelAspectsSupportedL(TUint& aPixelAspectsSupported, CCamera::TFormat aVideoFormat, const TSize& aSize) const;
sl@0
   205
	void GetEmbeddedStillCaptureSupportInfoL(TInt& aSupportedEmbeddedStillCaptureTypes) const;
sl@0
   206
	void PrepareVideoCapture(const CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters& aPrepareVideoParameters);
sl@0
   207
	void GetRangeAffectedSettingsL(RArray<TUid>& aRangeAffectedSettings) const;
sl@0
   208
	void GetValueAffectedSettingsL(RArray<TUid>& aValueAffectedSettings) const;
sl@0
   209
	void GetDisabledSettingsL(RArray<TUid>& aDisabledSettings) const;
sl@0
   210
	void ReleaseVideoResource();
sl@0
   211
	void StartVideoCaptureL();
sl@0
   212
	void StopVideoCapture();
sl@0
   213
	void PauseVideoCapture();
sl@0
   214
	void ResumeVideoCaptureL();
sl@0
   215
	void GetFadingEffectStateL(CCamera::CCameraVideoCaptureControl::TFadingEffectState& aFadingEffectState) const;
sl@0
   216
	void SetFadingEffectState(CCamera::CCameraVideoCaptureControl::TFadingEffectState aFadingEffectState);
sl@0
   217
	void GetVideoCaptureStateL(CCamera::CCameraVideoCaptureControl::TVideoCaptureState& aVideoCaptureState) const;
sl@0
   218
	void GetVideoCaptureSupportInfoL(TInt& aSupportedVideoCaptureTypes) const;
sl@0
   219
	void GetPrepareVideoParametersL(CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters& aPrepareVideoParameters) const;
sl@0
   220
sl@0
   221
	inline MCaptureVideoObserver* CaptureVideoObserver() {return iCaptureVideoObserver;}
sl@0
   222
	inline CCamUnitTestPlugin& Owner() {return iOwner;}
sl@0
   223
	
sl@0
   224
private:
sl@0
   225
	CCamVideoCaptureControl(CCamUnitTestPlugin& aOwner);
sl@0
   226
	void ConstructL();
sl@0
   227
	
sl@0
   228
private:
sl@0
   229
	CCamUnitTestPlugin& iOwner;	
sl@0
   230
	MCaptureVideoObserver* iCaptureVideoObserver;
sl@0
   231
	CCamSnapshotForVideo* iSnapshotImpForVideo;
sl@0
   232
	CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters iPrepareVideoParameters;
sl@0
   233
	CFbsBitmap* iBitmap;
sl@0
   234
	};
sl@0
   235
	
sl@0
   236
//	
sl@0
   237
//direct snapshot implementation to be used by version2 direct viewfinder.
sl@0
   238
class CCamDirectSnapshot : public CBase, public MCameraDirectSnapshot
sl@0
   239
	{
sl@0
   240
public:
sl@0
   241
	
sl@0
   242
	static CCamDirectSnapshot* NewL();
sl@0
   243
	~CCamDirectSnapshot();
sl@0
   244
sl@0
   245
	void Release();
sl@0
   246
	void SetDirectViewFinder(const CCamera::CCameraV2DirectViewFinder* aDirectViewFinder);
sl@0
   247
	void GetDirectViewFinderL(CCamera::CCameraV2DirectViewFinder*& aDirectViewFinder) const;
sl@0
   248
	void EnableDirectSnapshotL(CCamera::CCameraDirectSnapshot::TDirectSnapshotParameters& aDirectSnapshotParameters);
sl@0
   249
	void DisableDirectSnapshot();
sl@0
   250
	void GetDirectSnapshotStateL(CCamera::CCameraDirectSnapshot::TDirectSnapshotState& aDirectSnapshotState) const;
sl@0
   251
	void GetDirectSnapshotParametersL(CCamera::CCameraDirectSnapshot::TDirectSnapshotParameters& aDirectSnapshotParameters) const;
sl@0
   252
	void SetDirectSnapshotParametersL(const CCamera::CCameraDirectSnapshot::TDirectSnapshotParameters& aDirectSnapshotParameters);
sl@0
   253
	
sl@0
   254
private:
sl@0
   255
	CCamDirectSnapshot();
sl@0
   256
sl@0
   257
private:
sl@0
   258
	const CCamera::CCameraV2DirectViewFinder* iCameraV2DirectVF;
sl@0
   259
	CCamera::CCameraDirectSnapshot::TDirectSnapshotParameters iDirectSnapshotParameters;
sl@0
   260
	CCamera::CCameraDirectSnapshot::TDirectSnapshotState iDirectSnapshotState;
sl@0
   261
	};
sl@0
   262
	
sl@0
   263
//
sl@0
   264
//V2 direct viewfinder impl
sl@0
   265
class CCamV2DirectViewFinder: public CBase, public MCameraViewFinder, public MCameraV2DirectViewFinder
sl@0
   266
	{
sl@0
   267
public:
sl@0
   268
	static CCamV2DirectViewFinder* NewL(CCamUnitTestPlugin& aOwner);
sl@0
   269
	~CCamV2DirectViewFinder();
sl@0
   270
	
sl@0
   271
	void Release(CCamera::CCameraV2DirectViewFinder* aDirectViewFinderHandle);
sl@0
   272
	void Release();
sl@0
   273
	void GetViewFinderFadingCapabilitiesL(CCameraViewFinder::TViewFinderFadingCapabilities& aVFFadingCapabilities) const;
sl@0
   274
	void GetViewFinderFadingEffectL(CCameraViewFinder::TViewFinderFadingEffect& aCurrentVFFadingEffect) const;
sl@0
   275
	void SetViewFinderFadingEffect(const CCameraViewFinder::TViewFinderFadingEffect& aVFFadingEffect);
sl@0
   276
	void GetViewFinderHandleL(TInt& aVFHandle) const;
sl@0
   277
	
sl@0
   278
	void CreateHistogramImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
sl@0
   279
	void GetImageProcessingImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
sl@0
   280
	void SetDirectViewFinderObserver(MDirectViewFinderObserver& aDirectViewFinderObserver);
sl@0
   281
	void SetDirectViewFinderHandle(CCamera::CCameraV2DirectViewFinder* aDirectViewFinderHandle);
sl@0
   282
	void StartViewFinderDirectL(RWsSession& aWs, CWsScreenDevice& aScreenDevice, RWindowBase& aWindow, TRect& aScreenRect);
sl@0
   283
	void StartViewFinderDirectL(RWsSession& aWs, CWsScreenDevice& aScreenDevice, RWindowBase& aWindow, TRect& aScreenRect, TRect& aClipRect);
sl@0
   284
	void GetDirectViewFinderPropertiesL(TInt& aScreenNumber, TRect& aScreenRect, TRect& aClipRect) const;
sl@0
   285
	void PauseViewFinderDirect();
sl@0
   286
	void ResumeViewFinderDirect();
sl@0
   287
	void GetViewFinderStateL(CCamera::CCameraV2DirectViewFinder::TViewFinderState& aViewFinderState) const;
sl@0
   288
	void StopDirectViewFinder();
sl@0
   289
	TAny* GetDirectSnapshotImpl(TUid aInterface) const;
sl@0
   290
		
sl@0
   291
	inline MDirectViewFinderObserver* DirectViewFinderObserver() {return iDirectViewFinderObserver;}
sl@0
   292
	inline CCamera::CCameraV2DirectViewFinder& DirectViewFinderHandle() {return *iDirectViewFinderHandle;}
sl@0
   293
	inline CCamUnitTestPlugin& Owner() {return iOwner;}
sl@0
   294
	
sl@0
   295
private:
sl@0
   296
	CCamV2DirectViewFinder(CCamUnitTestPlugin& aOwner);
sl@0
   297
sl@0
   298
public:
sl@0
   299
	TInt iRefCount;
sl@0
   300
sl@0
   301
private:
sl@0
   302
	CCamUnitTestPlugin& iOwner;
sl@0
   303
	MDirectViewFinderObserver* iDirectViewFinderObserver;
sl@0
   304
	CCamera::CCameraV2DirectViewFinder* iDirectViewFinderHandle;
sl@0
   305
	TInt iVFHandle;
sl@0
   306
	mutable CCamDirectSnapshot* iDirectSnapshot;
sl@0
   307
	};
sl@0
   308
sl@0
   309
//
sl@0
   310
//client viewfinder impl
sl@0
   311
class CCamClientViewFinder: public CBase, public MCameraViewFinder, public MCameraClientViewFinder
sl@0
   312
	{
sl@0
   313
public:
sl@0
   314
	static CCamClientViewFinder* NewL(CCamUnitTestPlugin& aOwner);
sl@0
   315
	~CCamClientViewFinder();
sl@0
   316
	
sl@0
   317
	void Release(CCamera::CCameraClientViewFinder* aClientViewFinderHandle);
sl@0
   318
	void Release();
sl@0
   319
	void GetViewFinderFadingCapabilitiesL(CCameraViewFinder::TViewFinderFadingCapabilities& aVFFadingCapabilities) const;
sl@0
   320
	void GetViewFinderFadingEffectL(CCameraViewFinder::TViewFinderFadingEffect& aCurrentVFFadingEffect) const;
sl@0
   321
	void SetViewFinderFadingEffect(const CCameraViewFinder::TViewFinderFadingEffect& aVFFadingEffect);
sl@0
   322
	void GetViewFinderHandleL(TInt& aVFHandle) const;
sl@0
   323
	
sl@0
   324
	void CreateHistogramImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
sl@0
   325
	void GetImageProcessingImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
sl@0
   326
	void SetClientViewFinderObserver(MClientViewFinderObserver& aClientViewFinderObserver);
sl@0
   327
	void SetClientViewFinderHandle(CCamera::CCameraClientViewFinder* aClientViewFinderHandle);
sl@0
   328
	
sl@0
   329
	void StartClientViewFinderL(TInt aScreenNumber, CCamera::TFormat aImageFormat, TSize& aSize);
sl@0
   330
	void StartClientViewFinderL(TInt aScreenNumber, CCamera::TFormat aImageFormat, TSize& aSize, TRect& aClipRect);
sl@0
   331
	void GetClientViewFinderStateL(TBool& aIsActive) const;
sl@0
   332
	void GetClientViewFinderPropertiesL(TInt& aScreenNumber, CCamera::TFormat& aImageFormat, TSize& aSize, TRect& aClipRect) const;
sl@0
   333
	void StopClientViewFinder();
sl@0
   334
	void GetViewFinderBufferL(MCameraBuffer2& aClientViewFinderBuffer) const;
sl@0
   335
	
sl@0
   336
	inline MClientViewFinderObserver* ClientViewFinderObserver() {return iClientViewFinderObserver;}
sl@0
   337
	inline CCamera::CCameraClientViewFinder& ClientViewFinderHandle() {return *iClientViewFinderHandle;}
sl@0
   338
	inline CCamUnitTestPlugin& Owner() {return iOwner;}
sl@0
   339
	
sl@0
   340
private:
sl@0
   341
	CCamClientViewFinder(CCamUnitTestPlugin& aOwner);
sl@0
   342
sl@0
   343
public:
sl@0
   344
	TInt iRefCount;
sl@0
   345
sl@0
   346
private:
sl@0
   347
	CCamUnitTestPlugin& iOwner;
sl@0
   348
	MClientViewFinderObserver* iClientViewFinderObserver;
sl@0
   349
	CCamera::CCameraClientViewFinder* iClientViewFinderHandle;
sl@0
   350
	TInt iVFHandle;
sl@0
   351
	};
sl@0
   352
	
sl@0
   353
//
sl@0
   354
//snapshot impl for image
sl@0
   355
class CCamSnapshotForImage : public CBase, public MCameraSnapshot, public MCameraSnapshot2
sl@0
   356
	{
sl@0
   357
friend class CHistogramImpForImageSnapshot;
sl@0
   358
sl@0
   359
public:	
sl@0
   360
	static CCamSnapshotForImage* NewL(CCamUnitTestPlugin& aOwner, CCamImageCapture& aCamImageCaptureImpl);
sl@0
   361
	~CCamSnapshotForImage();
sl@0
   362
	
sl@0
   363
	TUint32 SupportedFormats();
sl@0
   364
    void PrepareSnapshotL(CCamera::TFormat aFormat, const TPoint& aPosition, const TSize& aSize, const TRgb& aBgColor, TBool aMaintainAspectRatio);
sl@0
   365
    void PrepareSnapshotL(CCamera::TFormat aFormat, const TSize& aSize, TBool aMaintainAspectRatio);
sl@0
   366
    
sl@0
   367
    void SetBgColorL(const TRgb& aBgColor); 
sl@0
   368
	void SetPositionL(const TPoint& aPosition);
sl@0
   369
	
sl@0
   370
    TBool IsSnapshotActive() const;
sl@0
   371
    void StartSnapshot();
sl@0
   372
	void StopSnapshot();
sl@0
   373
	MCameraBuffer& SnapshotDataL(RArray<TInt>& aFrameIndexOrder);
sl@0
   374
	
sl@0
   375
	void CreateHistogramImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
sl@0
   376
	void PrepareSnapshotL(const CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters);
sl@0
   377
	void GetSnapshotParametersL(CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters);
sl@0
   378
	void SetSnapshotParametersL(const CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters);
sl@0
   379
	void GetSnapshotStatusL(CCamera::CCameraSnapshot::TSnapshotState& aSnapshotState) const;
sl@0
   380
	void SelectSnapshotVideoFramesL(CCamera::CCameraSnapshot::TSnapshotVideoFrames aSnapshotVideoFrames);
sl@0
   381
	void EnableSnapshot();
sl@0
   382
	void DisableSnapshot();
sl@0
   383
	void SetClientViewFinderId(TInt aClientViewFinderId);
sl@0
   384
	
sl@0
   385
	void Release();
sl@0
   386
	
sl@0
   387
	inline CCamImageCapture& CamImageCaptureImpl() {return iCamImageCaptureImpl;}
sl@0
   388
	inline CCamera::CCameraImageCapture& CameraImageCapture() {return *(CamImageCaptureImpl().CameraImageCapture());}
sl@0
   389
	inline CCamUnitTestPlugin& Owner() {return iOwner;}
sl@0
   390
private:	
sl@0
   391
	CCamSnapshotForImage(CCamUnitTestPlugin& aOwner, CCamImageCapture& aCamImageCaptureImpl);
sl@0
   392
	void ConstructL();
sl@0
   393
sl@0
   394
private:
sl@0
   395
	CCamUnitTestPlugin& iOwner;
sl@0
   396
	CCamImageCapture& iCamImageCaptureImpl;
sl@0
   397
	CFbsBitmap* iBitmap;
sl@0
   398
	RCamBuffer2 iSnapshotbuffer;
sl@0
   399
	CCamera::CCameraSnapshot::TSnapshotParameters iSnapshotParameters;
sl@0
   400
	
sl@0
   401
	TInt iRefCount;
sl@0
   402
	};
sl@0
   403
sl@0
   404
//
sl@0
   405
//snapshot factory for image
sl@0
   406
class CSnapshotFactoryForImage : public CBase, public MImplementationFactory
sl@0
   407
	{
sl@0
   408
public:
sl@0
   409
	static CSnapshotFactoryForImage* NewL(CCamImageCapture& aCamImageCaptureImpl, CCamSnapshotForImage* aSnapshotImpForImage);
sl@0
   410
	~CSnapshotFactoryForImage();
sl@0
   411
	
sl@0
   412
	TInt GetImpl(TAny*& aIfPtr, TUid aIfaceUid) const;
sl@0
   413
	TInt GetImpl1(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1) const;
sl@0
   414
	TInt GetImpl2(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1, TECamImplFactoryParam aParam2) const;
sl@0
   415
	void Release();
sl@0
   416
	
sl@0
   417
private:
sl@0
   418
	CSnapshotFactoryForImage();
sl@0
   419
	void ConstructL(CCamImageCapture& aCamImageCaptureImpl, CCamSnapshotForImage* aSnapshotImpForImage);
sl@0
   420
sl@0
   421
private:
sl@0
   422
	CCamSnapshotForImage* iSnapshotImpForImage;
sl@0
   423
	mutable TBool iIsSnapshotImpPassed;
sl@0
   424
	};
sl@0
   425
sl@0
   426
//
sl@0
   427
//snapshot impl for video
sl@0
   428
class CCamSnapshotForVideo : public CBase, public MCameraSnapshot, public MCameraSnapshot2
sl@0
   429
	{
sl@0
   430
public:	
sl@0
   431
	static CCamSnapshotForVideo* NewL(CCamUnitTestPlugin& aOwner, CCamVideoCaptureControl& aCamVideoCaptureControlImpl);
sl@0
   432
	~CCamSnapshotForVideo();
sl@0
   433
	
sl@0
   434
	TUint32 SupportedFormats();
sl@0
   435
    void PrepareSnapshotL(CCamera::TFormat aFormat, const TPoint& aPosition, const TSize& aSize, const TRgb& aBgColor, TBool aMaintainAspectRatio);
sl@0
   436
    void PrepareSnapshotL(CCamera::TFormat aFormat, const TSize& aSize, TBool aMaintainAspectRatio);
sl@0
   437
    
sl@0
   438
    void SetBgColorL(const TRgb& aBgColor); 
sl@0
   439
	void SetPositionL(const TPoint& aPosition);
sl@0
   440
	
sl@0
   441
    TBool IsSnapshotActive() const;
sl@0
   442
    void StartSnapshot();
sl@0
   443
	void StopSnapshot();
sl@0
   444
	MCameraBuffer& SnapshotDataL(RArray<TInt>& aFrameIndexOrder);
sl@0
   445
	
sl@0
   446
	void CreateHistogramImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const;
sl@0
   447
	void PrepareSnapshotL(const CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters);
sl@0
   448
	void GetSnapshotParametersL(CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters);
sl@0
   449
	void SetSnapshotParametersL(const CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters);
sl@0
   450
	void GetSnapshotStatusL(CCamera::CCameraSnapshot::TSnapshotState& aSnapshotState) const;
sl@0
   451
	void SelectSnapshotVideoFramesL(CCamera::CCameraSnapshot::TSnapshotVideoFrames aSnapshotVideoFrames);
sl@0
   452
	void EnableSnapshot();
sl@0
   453
	void DisableSnapshot();
sl@0
   454
	void SetClientViewFinderId(TInt aClientViewFinderId);
sl@0
   455
	
sl@0
   456
	void Release();
sl@0
   457
	
sl@0
   458
	inline CCamVideoCaptureControl& CamVideoCaptureControlImpl() {return iCamVideoCaptureControlImpl;}
sl@0
   459
sl@0
   460
private:	
sl@0
   461
	CCamSnapshotForVideo(CCamUnitTestPlugin& aOwner, CCamVideoCaptureControl& aCamVideoCaptureControlImpl);
sl@0
   462
	void ConstructL();
sl@0
   463
	
sl@0
   464
private:
sl@0
   465
	CCamUnitTestPlugin& iOwner;
sl@0
   466
	CCamVideoCaptureControl& iCamVideoCaptureControlImpl;
sl@0
   467
	CFbsBitmap* iBitmap;
sl@0
   468
	RCamBuffer2 iSnapshotbuffer;
sl@0
   469
	CCamera::CCameraSnapshot::TSnapshotParameters iSnapshotParameters;
sl@0
   470
	
sl@0
   471
	TInt iRefCount;
sl@0
   472
	};
sl@0
   473
sl@0
   474
//
sl@0
   475
//snapshot factory for video
sl@0
   476
class CSnapshotFactoryForVideo : public CBase, public MImplementationFactory
sl@0
   477
	{
sl@0
   478
public:
sl@0
   479
	static CSnapshotFactoryForVideo* NewL(CCamVideoCaptureControl& aCamVideoCaptureControlImpl, CCamSnapshotForVideo* aSnapshotImpForVideo);
sl@0
   480
	~CSnapshotFactoryForVideo();
sl@0
   481
	
sl@0
   482
	TInt GetImpl(TAny*& aIfPtr, TUid aIfaceUid) const;
sl@0
   483
	TInt GetImpl1(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1) const;
sl@0
   484
	TInt GetImpl2(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1, TECamImplFactoryParam aParam2) const;
sl@0
   485
	void Release();
sl@0
   486
	
sl@0
   487
private:
sl@0
   488
	CSnapshotFactoryForVideo();
sl@0
   489
	void ConstructL(CCamVideoCaptureControl& aCamVideoCaptureControlImpl, CCamSnapshotForVideo* aSnapshotImpForVideo);
sl@0
   490
sl@0
   491
private:
sl@0
   492
	CCamSnapshotForVideo* iSnapshotImpForVideo;
sl@0
   493
	mutable TBool iIsSnapshotImpPassed;
sl@0
   494
	};
sl@0
   495
sl@0
   496
//
sl@0
   497
// V2 buffer for histogram: MHistogramV2Buffer
sl@0
   498
class RCamHistogramV2Buffer : public MHistogramV2Buffer
sl@0
   499
	{
sl@0
   500
sl@0
   501
public:
sl@0
   502
	RCamHistogramV2Buffer(): iAvailable(ETrue) {}
sl@0
   503
	CCamera::CCameraV2Histogram::THistogramType Type() {return CCamera::CCameraV2Histogram::EHistNone;}
sl@0
   504
	TInt ElementSize() {return -5;}
sl@0
   505
	TInt NumOfElements() {return -5;}
sl@0
   506
	TDesC8* DataL() {User::Leave(KErrNotSupported); return NULL;}
sl@0
   507
	RChunk& ChunkL() {User::Leave(KErrNotSupported); return iChunk;}
sl@0
   508
	TInt ChunkOffsetL() {User::Leave(KErrNotSupported); return -5;}
sl@0
   509
	void Release() {iAvailable = EFalse;}
sl@0
   510
sl@0
   511
public:
sl@0
   512
sl@0
   513
	TBool iAvailable;
sl@0
   514
	RChunk iChunk;	
sl@0
   515
	};
sl@0
   516
	
sl@0
   517
//	
sl@0
   518
//histogram impl for video
sl@0
   519
class CHistogramImpForVideo : public CBase, public MCameraV2Histogram 
sl@0
   520
	{
sl@0
   521
sl@0
   522
public:
sl@0
   523
	static CHistogramImpForVideo* NewL(CCamUnitTestPlugin& aOwner, CCamVideoCaptureControl& aCamVideoCaptureControlImpl);
sl@0
   524
	~CHistogramImpForVideo();
sl@0
   525
	
sl@0
   526
	void Release(CCamera::CCameraV2Histogram* aHistogramHandle);
sl@0
   527
	void SetHistogramHandle(CCamera::CCameraV2Histogram* aHistogramHandle);
sl@0
   528
	void GetSupportedHistogramsL(TUint& aSupportedHistogramType) const;
sl@0
   529
	void GetDirectHistogramSupportInfoL(TBool& aIsDirectHistogramSupported) const;
sl@0
   530
	void PrepareClientHistogramL(CCamera::CCameraV2Histogram::THistogramType aType);
sl@0
   531
	void PrepareDirectHistogramL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);	
sl@0
   532
	void UpdateDirectHistogramPropertiesL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);
sl@0
   533
	void GetDirectHistogramPropertiesL(CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters) const;
sl@0
   534
	void StartHistogram();
sl@0
   535
	void StopHistogram();
sl@0
   536
	void GetHistogramStateL(TBool& aIsHistogramActive) const;
sl@0
   537
	
sl@0
   538
	inline CCamVideoCaptureControl& CamVideoCaptureControlImpl() {return iCamVideoCaptureControlImpl;}
sl@0
   539
	
sl@0
   540
private:
sl@0
   541
	CHistogramImpForVideo(CCamUnitTestPlugin& aOwner, CCamVideoCaptureControl& aCamVideoCaptureControlImpl);
sl@0
   542
sl@0
   543
private:
sl@0
   544
	CCamUnitTestPlugin& iOwner;
sl@0
   545
	CCamVideoCaptureControl& iCamVideoCaptureControlImpl;
sl@0
   546
	};
sl@0
   547
sl@0
   548
//	
sl@0
   549
//histogram factory for video	
sl@0
   550
class CHistogramFactoryForVideo : public CBase, public MImplementationFactory
sl@0
   551
	{
sl@0
   552
public:
sl@0
   553
	static CHistogramFactoryForVideo* NewL(CCamVideoCaptureControl& aCamVideoCaptureControlImpl);
sl@0
   554
	~CHistogramFactoryForVideo();
sl@0
   555
	
sl@0
   556
	TInt GetImpl(TAny*& aIfPtr, TUid aIfaceUid) const;
sl@0
   557
	TInt GetImpl1(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1) const;
sl@0
   558
	TInt GetImpl2(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1, TECamImplFactoryParam aParam2) const;
sl@0
   559
	void Release();
sl@0
   560
	
sl@0
   561
private:
sl@0
   562
	CHistogramFactoryForVideo();
sl@0
   563
	void ConstructL(CCamVideoCaptureControl& aCamVideoCaptureControlImpl);
sl@0
   564
sl@0
   565
private:
sl@0
   566
	CHistogramImpForVideo* iHistogramImpForVideo;
sl@0
   567
	mutable TBool iIsHistogramImpPassed;
sl@0
   568
	};
sl@0
   569
	
sl@0
   570
//	
sl@0
   571
//histogram impl for image
sl@0
   572
class CHistogramImpForImage : public CBase, public MCameraV2Histogram 
sl@0
   573
	{
sl@0
   574
sl@0
   575
public:
sl@0
   576
	static CHistogramImpForImage* NewL(CCamUnitTestPlugin& aOwner, CCamImageCapture& aCamImageCaptureImpl);
sl@0
   577
	~CHistogramImpForImage();
sl@0
   578
	
sl@0
   579
	void Release(CCamera::CCameraV2Histogram* aHistogramHandle);
sl@0
   580
	void SetHistogramHandle(CCamera::CCameraV2Histogram* aHistogramHandle);
sl@0
   581
	void GetSupportedHistogramsL(TUint& aSupportedHistogramType) const;
sl@0
   582
	void GetDirectHistogramSupportInfoL(TBool& aIsDirectHistogramSupported) const;
sl@0
   583
	void PrepareClientHistogramL(CCamera::CCameraV2Histogram::THistogramType aType);
sl@0
   584
	void PrepareDirectHistogramL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);	
sl@0
   585
	void UpdateDirectHistogramPropertiesL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);
sl@0
   586
	void GetDirectHistogramPropertiesL(CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters) const;
sl@0
   587
	void StartHistogram();
sl@0
   588
	void StopHistogram();
sl@0
   589
	void GetHistogramStateL(TBool& aIsHistogramActive) const;
sl@0
   590
	
sl@0
   591
	inline CCamImageCapture& CamImageCaptureImpl() {return iCamImageCaptureImpl;}
sl@0
   592
	inline CCamera::CCameraImageCapture& CameraImageCapture() {return *(CamImageCaptureImpl().CameraImageCapture());}
sl@0
   593
	
sl@0
   594
private:
sl@0
   595
	CHistogramImpForImage(CCamUnitTestPlugin& aOwner, CCamImageCapture& aCamImageCaptureImpl);
sl@0
   596
sl@0
   597
private:
sl@0
   598
	CCamUnitTestPlugin& iOwner;
sl@0
   599
	CCamImageCapture& iCamImageCaptureImpl;
sl@0
   600
	CCamera::CCameraV2Histogram* iHistogramHandle;
sl@0
   601
	};
sl@0
   602
sl@0
   603
//	
sl@0
   604
//histogram factory for image	
sl@0
   605
class CHistogramFactoryForImage : public CBase, public MImplementationFactory
sl@0
   606
	{
sl@0
   607
public:
sl@0
   608
	static CHistogramFactoryForImage* NewL(CCamImageCapture& aCamImageCaptureImpl);
sl@0
   609
	~CHistogramFactoryForImage();
sl@0
   610
	
sl@0
   611
	TInt GetImpl(TAny*& aIfPtr, TUid aIfaceUid) const;
sl@0
   612
	TInt GetImpl1(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1) const;
sl@0
   613
	TInt GetImpl2(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1, TECamImplFactoryParam aParam2) const;
sl@0
   614
	void Release();
sl@0
   615
	
sl@0
   616
private:
sl@0
   617
	CHistogramFactoryForImage();
sl@0
   618
	void ConstructL(CCamImageCapture& aCamImageCaptureImpl);
sl@0
   619
sl@0
   620
private:
sl@0
   621
	CHistogramImpForImage* iHistogramImpForImage;
sl@0
   622
	mutable TBool iIsHistogramImpPassed;
sl@0
   623
	};
sl@0
   624
	
sl@0
   625
//	
sl@0
   626
//histogram impl for DirectViewFinder
sl@0
   627
class CHistogramImpForDirectViewFinder : public CBase, public MCameraV2Histogram 
sl@0
   628
	{
sl@0
   629
sl@0
   630
public:
sl@0
   631
	static CHistogramImpForDirectViewFinder* NewL(CCamUnitTestPlugin& aOwner, CCamV2DirectViewFinder& aCamV2DirectViewFinderImpl);
sl@0
   632
	~CHistogramImpForDirectViewFinder();
sl@0
   633
	
sl@0
   634
	void Release(CCamera::CCameraV2Histogram* aHistogramHandle);
sl@0
   635
	void SetHistogramHandle(CCamera::CCameraV2Histogram* aHistogramHandle);
sl@0
   636
	void GetSupportedHistogramsL(TUint& aSupportedHistogramType) const;
sl@0
   637
	void GetDirectHistogramSupportInfoL(TBool& aIsDirectHistogramSupported) const;
sl@0
   638
	void PrepareClientHistogramL(CCamera::CCameraV2Histogram::THistogramType aType);
sl@0
   639
	void PrepareDirectHistogramL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);	
sl@0
   640
	void UpdateDirectHistogramPropertiesL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);
sl@0
   641
	void GetDirectHistogramPropertiesL(CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters) const;
sl@0
   642
	void StartHistogram();
sl@0
   643
	void StopHistogram();
sl@0
   644
	void GetHistogramStateL(TBool& aIsHistogramActive) const;
sl@0
   645
	
sl@0
   646
	inline CCamV2DirectViewFinder& DirectViewFinderImpl() {return iCamV2DirectViewFinderImpl;}
sl@0
   647
	
sl@0
   648
private:
sl@0
   649
	CHistogramImpForDirectViewFinder(CCamUnitTestPlugin& aOwner, CCamV2DirectViewFinder& aCamV2DirectViewFinderImpl);
sl@0
   650
sl@0
   651
private:
sl@0
   652
	CCamUnitTestPlugin& iOwner;
sl@0
   653
	CCamV2DirectViewFinder& iCamV2DirectViewFinderImpl;
sl@0
   654
	CCamera::CCameraV2Histogram* iHistogramHandle;
sl@0
   655
	};
sl@0
   656
sl@0
   657
//	
sl@0
   658
//histogram factory for DirectViewFinder
sl@0
   659
class CHistogramFactoryForDirectViewFinder : public CBase, public MImplementationFactory
sl@0
   660
	{
sl@0
   661
public:
sl@0
   662
	static CHistogramFactoryForDirectViewFinder* NewL(CCamV2DirectViewFinder& aCamV2DirectViewFinderImpl);
sl@0
   663
	~CHistogramFactoryForDirectViewFinder();
sl@0
   664
	
sl@0
   665
	TInt GetImpl(TAny*& aIfPtr, TUid aIfaceUid) const;
sl@0
   666
	TInt GetImpl1(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1) const;
sl@0
   667
	TInt GetImpl2(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1, TECamImplFactoryParam aParam2) const;
sl@0
   668
	void Release();
sl@0
   669
	
sl@0
   670
private:
sl@0
   671
	CHistogramFactoryForDirectViewFinder();
sl@0
   672
	void ConstructL(CCamV2DirectViewFinder& aCamV2DirectViewFinderImpl);
sl@0
   673
sl@0
   674
private:
sl@0
   675
	CHistogramImpForDirectViewFinder* iHistogramImpForDirectViewFinder;
sl@0
   676
	mutable TBool iIsHistogramImpPassed;
sl@0
   677
	};
sl@0
   678
sl@0
   679
//	
sl@0
   680
//histogram impl for ClientViewFinder
sl@0
   681
class CHistogramImpForClientViewFinder : public CBase, public MCameraV2Histogram 
sl@0
   682
	{
sl@0
   683
sl@0
   684
public:
sl@0
   685
	static CHistogramImpForClientViewFinder* NewL(CCamUnitTestPlugin& aOwner, CCamClientViewFinder& aCamClientViewFinderImpl);
sl@0
   686
	~CHistogramImpForClientViewFinder();
sl@0
   687
	
sl@0
   688
	void Release(CCamera::CCameraV2Histogram* aHistogramHandle);
sl@0
   689
	void SetHistogramHandle(CCamera::CCameraV2Histogram* aHistogramHandle);
sl@0
   690
	void GetSupportedHistogramsL(TUint& aSupportedHistogramType) const;
sl@0
   691
	void GetDirectHistogramSupportInfoL(TBool& aIsDirectHistogramSupported) const;
sl@0
   692
	void PrepareClientHistogramL(CCamera::CCameraV2Histogram::THistogramType aType);
sl@0
   693
	void PrepareDirectHistogramL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);	
sl@0
   694
	void UpdateDirectHistogramPropertiesL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);
sl@0
   695
	void GetDirectHistogramPropertiesL(CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters) const;
sl@0
   696
	void StartHistogram();
sl@0
   697
	void StopHistogram();
sl@0
   698
	void GetHistogramStateL(TBool& aIsHistogramActive) const;
sl@0
   699
	
sl@0
   700
	inline CCamClientViewFinder& ClientViewFinderImpl() {return iCamClientViewFinderImpl;}
sl@0
   701
	inline CCamera::CCameraClientViewFinder& ClientViewFinderHandle() {return ClientViewFinderImpl().ClientViewFinderHandle();}
sl@0
   702
	
sl@0
   703
private:
sl@0
   704
	CHistogramImpForClientViewFinder(CCamUnitTestPlugin& aOwner, CCamClientViewFinder& aCamClientViewFinderImpl);
sl@0
   705
sl@0
   706
private:
sl@0
   707
	CCamUnitTestPlugin& iOwner;
sl@0
   708
	CCamClientViewFinder& iCamClientViewFinderImpl;
sl@0
   709
	CCamera::CCameraV2Histogram* iHistogramHandle;
sl@0
   710
	};
sl@0
   711
sl@0
   712
//	
sl@0
   713
//histogram factory for ClientViewFinder		
sl@0
   714
class CHistogramFactoryForClientViewFinder : public CBase, public MImplementationFactory
sl@0
   715
	{
sl@0
   716
public:
sl@0
   717
	static CHistogramFactoryForClientViewFinder* NewL(CCamClientViewFinder& aCamClientViewFinderImpl);
sl@0
   718
	~CHistogramFactoryForClientViewFinder();
sl@0
   719
	
sl@0
   720
	TInt GetImpl(TAny*& aIfPtr, TUid aIfaceUid) const;
sl@0
   721
	TInt GetImpl1(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1) const;
sl@0
   722
	TInt GetImpl2(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1, TECamImplFactoryParam aParam2) const;
sl@0
   723
	void Release();
sl@0
   724
	
sl@0
   725
private:
sl@0
   726
	CHistogramFactoryForClientViewFinder();
sl@0
   727
	void ConstructL(CCamClientViewFinder& aCamClientViewFinderImpl);
sl@0
   728
sl@0
   729
private:
sl@0
   730
	CHistogramImpForClientViewFinder* iHistogramImpForClientViewFinder;
sl@0
   731
	mutable TBool iIsHistogramImpPassed;
sl@0
   732
	};
sl@0
   733
sl@0
   734
//	
sl@0
   735
//histogram impl for image snapshot
sl@0
   736
class CHistogramImpForImageSnapshot : public CBase, public MCameraV2Histogram 
sl@0
   737
	{
sl@0
   738
sl@0
   739
public:
sl@0
   740
	static CHistogramImpForImageSnapshot* NewL(CCamUnitTestPlugin& aOwner, CCamSnapshotForImage& aCamSnapshotForImageImpl);
sl@0
   741
	~CHistogramImpForImageSnapshot();
sl@0
   742
	
sl@0
   743
	void Release(CCamera::CCameraV2Histogram* aHistogramHandle);
sl@0
   744
	void SetHistogramHandle(CCamera::CCameraV2Histogram* aHistogramHandle);
sl@0
   745
	void GetSupportedHistogramsL(TUint& aSupportedHistogramType) const;
sl@0
   746
	void GetDirectHistogramSupportInfoL(TBool& aIsDirectHistogramSupported) const;
sl@0
   747
	void PrepareClientHistogramL(CCamera::CCameraV2Histogram::THistogramType aType);
sl@0
   748
	void PrepareDirectHistogramL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);	
sl@0
   749
	void UpdateDirectHistogramPropertiesL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters);
sl@0
   750
	void GetDirectHistogramPropertiesL(CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters) const;
sl@0
   751
	void StartHistogram();
sl@0
   752
	void StopHistogram();
sl@0
   753
	void GetHistogramStateL(TBool& aIsHistogramActive) const;
sl@0
   754
	
sl@0
   755
	inline CCamSnapshotForImage& CamSnapshotForImageImpl() {return iCamSnapshotForImageImpl;}
sl@0
   756
	inline CCamera::CCameraV2Histogram* HistogramHandle() {return iHistogramHandle;}
sl@0
   757
	inline CCamImageCapture& CamImageCaptureImpl() {return CamSnapshotForImageImpl().CamImageCaptureImpl();}
sl@0
   758
	inline CCamera::CCameraImageCapture& CameraImageCapture() {return *(CamImageCaptureImpl().CameraImageCapture());}
sl@0
   759
	
sl@0
   760
private:
sl@0
   761
	CHistogramImpForImageSnapshot(CCamUnitTestPlugin& aOwner, CCamSnapshotForImage& aCamSnapshotForImageImpl);
sl@0
   762
sl@0
   763
private:
sl@0
   764
	CCamUnitTestPlugin& iOwner;
sl@0
   765
	CCamSnapshotForImage& iCamSnapshotForImageImpl;
sl@0
   766
	CCamera::CCameraV2Histogram* iHistogramHandle;
sl@0
   767
	};	
sl@0
   768
sl@0
   769
//	
sl@0
   770
//histogram factory for image snapshot
sl@0
   771
class CHistogramFactoryForImageSnapshot : public CBase, public MImplementationFactory
sl@0
   772
	{
sl@0
   773
public:
sl@0
   774
	static CHistogramFactoryForImageSnapshot* NewL(CCamSnapshotForImage& aCamSnapshotForImageImpl);
sl@0
   775
	~CHistogramFactoryForImageSnapshot();
sl@0
   776
	
sl@0
   777
	TInt GetImpl(TAny*& aIfPtr, TUid aIfaceUid) const;
sl@0
   778
	TInt GetImpl1(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1) const;
sl@0
   779
	TInt GetImpl2(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1, TECamImplFactoryParam aParam2) const;
sl@0
   780
	void Release();
sl@0
   781
	
sl@0
   782
private:
sl@0
   783
	CHistogramFactoryForImageSnapshot();
sl@0
   784
	void ConstructL(CCamSnapshotForImage& aCamSnapshotForImageImpl);
sl@0
   785
sl@0
   786
private:
sl@0
   787
	CHistogramImpForImageSnapshot* iHistogramImpForImageSnapshot;
sl@0
   788
	mutable TBool iIsHistogramImpPassed;
sl@0
   789
	};
sl@0
   790
sl@0
   791
//	
sl@0
   792
//img proc impl for still images.
sl@0
   793
class CCamImgProcImpForImage : public CBase, public MCameraImageProcessing
sl@0
   794
	{
sl@0
   795
public:
sl@0
   796
	static CCamImgProcImpForImage* NewL(CCamUnitTestPlugin& aOwner);
sl@0
   797
	~CCamImgProcImpForImage();
sl@0
   798
	
sl@0
   799
	void Release();
sl@0
   800
	void GetSupportedTransformationsL(RArray<TUid>& aTransformations) const;
sl@0
   801
	void GetActiveTransformationsL(RArray<TUid>& aTransformations) const;
sl@0
   802
	void GetTransformationSupportedValuesL(TUid aTransformation, RArray<TInt>& aValues, TValueInfo& aInfo) const;
sl@0
   803
	TInt TransformationValue(TUid aTransformation) const;
sl@0
   804
	TInt GetTransformationValue(TUid aTransformation, TInt& aTransformationValue) const;
sl@0
   805
	void SetTransformationValue(TUid aTransformation, TInt aValue);
sl@0
   806
	void GetActiveTransformSequenceL(RArray<TUid>& aTransformSequence) const;
sl@0
   807
	void SetActiveTransformSequenceL(RArray<TUid>& aTransformSequence);
sl@0
   808
	void SetSourceRect(const TRect& aRect);
sl@0
   809
	void GetSourceRect(TRect& aRect) const;
sl@0
   810
sl@0
   811
private:
sl@0
   812
	CCamImgProcImpForImage(CCamUnitTestPlugin& aOwner);
sl@0
   813
	
sl@0
   814
private:
sl@0
   815
	CCamUnitTestPlugin& iOwner;
sl@0
   816
	};
sl@0
   817
sl@0
   818
//	
sl@0
   819
//img proc factory for still images.
sl@0
   820
class CImgProcFactoryForImage : public CBase, public MImplementationFactory
sl@0
   821
	{
sl@0
   822
public:
sl@0
   823
	static CImgProcFactoryForImage* NewL(CCamImageCapture& aCamImageCaptureImpl, CCamImgProcImpForImage* aCamImgProcImpForImage);
sl@0
   824
	~CImgProcFactoryForImage();
sl@0
   825
	
sl@0
   826
	TInt GetImpl(TAny*& aIfPtr, TUid aIfaceUid) const;
sl@0
   827
	TInt GetImpl1(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1) const;
sl@0
   828
	TInt GetImpl2(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1, TECamImplFactoryParam aParam2) const;
sl@0
   829
	void Release();
sl@0
   830
	
sl@0
   831
private:
sl@0
   832
	CImgProcFactoryForImage();
sl@0
   833
	void ConstructL(CCamImageCapture& aCamImageCaptureImpl, CCamImgProcImpForImage* aCamImgProcImpForImage);
sl@0
   834
sl@0
   835
private:
sl@0
   836
	CCamImgProcImpForImage* iCamImgProcImpForImage;
sl@0
   837
	mutable TBool iIsImgProcImpPassed;
sl@0
   838
	};
sl@0
   839
sl@0
   840
#endif // EXTENDEDFUNCTIONALITY_H