First public contribution.
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef ECAMSTUBPLUGIN_H
17 #define ECAMSTUBPLUGIN_H
19 #include <ecam/ecamplugin.h>
20 #include <ecam/ecaminfoplugin.h>
22 // Implementations of the ECam plugin classes
24 class CCameraStub : public CCameraPlugin
27 static CCameraStub* NewL();
32 void Construct2L(MCameraObserver& aObserver,TInt aCameraIndex);
33 void Construct2DupL(MCameraObserver& aObserver,TInt aCameraHandle);
35 void Construct2L(MCameraObserver2& aObserver,TInt aCameraIndex,TInt aPriority);
36 void Construct2DupL(MCameraObserver2& aObserver,TInt aCameraHandle);
38 // from CCamera itself
39 void CameraInfo(TCameraInfo& aInfo) const;
45 void SetZoomFactorL(TInt aZoomFactor = 0);
46 TInt ZoomFactor() const;
47 void SetDigitalZoomFactorL(TInt aDigitalZoomFactor = 0);
48 TInt DigitalZoomFactor() const;
49 void SetContrastL(TInt aContrast);
50 TInt Contrast() const;
51 void SetBrightnessL(TInt aBrightness);
52 TInt Brightness() const;
53 void SetFlashL(TFlash aFlash = EFlashNone);
55 void SetExposureL(TExposure aExposure = EExposureAuto);
56 TExposure Exposure() const;
57 void SetWhiteBalanceL(TWhiteBalance aWhiteBalance = EWBAuto);
58 TWhiteBalance WhiteBalance() const;
59 void StartViewFinderDirectL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWindow,TRect& aScreenRect);
60 void StartViewFinderDirectL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWindow,TRect& aScreenRect,TRect& aClipRect);
61 void StartViewFinderBitmapsL(TSize& aSize);
62 void StartViewFinderBitmapsL(TSize& aSize,TRect& aClipRect);
63 void StartViewFinderL(TFormat aImageFormat,TSize& aSize);
64 void StartViewFinderL(TFormat aImageFormat,TSize& aSize,TRect& aClipRect);
65 void StopViewFinder();
66 TBool ViewFinderActive() const;
67 void SetViewFinderMirrorL(TBool aMirror);
68 TBool ViewFinderMirror() const;
69 void PrepareImageCaptureL(TFormat aImageFormat,TInt aSizeIndex);
70 void PrepareImageCaptureL(TFormat aImageFormat,TInt aSizeIndex,const TRect& aClipRect);
72 void CancelCaptureImage();
73 void EnumerateCaptureSizes(TSize& aSize,TInt aSizeIndex,TFormat aFormat) const;
74 void PrepareVideoCaptureL(TFormat aFormat,TInt aSizeIndex,TInt aRateIndex,TInt aBuffersToUse,TInt aFramesPerBuffer);
75 void PrepareVideoCaptureL(TFormat aFormat,TInt aSizeIndex,TInt aRateIndex,TInt aBuffersToUse,TInt aFramesPerBuffer,const TRect& aClipRect);
76 void StartVideoCapture();
77 void StopVideoCapture();
78 TBool VideoCaptureActive() const;
79 void EnumerateVideoFrameSizes(TSize& aSize,TInt aSizeIndex,TFormat aFormat) const;
80 void EnumerateVideoFrameRates(TReal32& aRate,TInt aRateIndex,TFormat aFormat,TInt aSizeIndex,TExposure aExposure = EExposureAuto) const;
81 void GetFrameSize(TSize& aSize) const;
82 TReal32 FrameRate() const;
83 TInt BuffersInUse() const;
84 TInt FramesPerBuffer() const;
85 void SetJpegQuality(TInt aQuality);
86 TInt JpegQuality() const;
87 TAny* CustomInterface(TUid aInterface);
92 MCameraObserver* iObserver; // not owned
93 MCameraObserver2* iObserver2; // not owned
99 class CCameraStubInfo : public CCameraInfoPlugin
102 static CCameraStubInfo* NewL();
106 // from CCameraInfoPlugin
107 TInt CamerasAvailable();
112 enum TStubPanicReasons
114 EPanicUnimplemented=1
117 #endif // ECAMSTUBPLUGIN_H