1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmplugins/cameraplugins/source/stub/ECamStubPlugin.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,117 @@
1.4 +// Copyright (c) 2004-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 +//
1.18 +
1.19 +#ifndef ECAMSTUBPLUGIN_H
1.20 +#define ECAMSTUBPLUGIN_H
1.21 +
1.22 +#include <ecam/ecamplugin.h>
1.23 +#include <ecam/ecaminfoplugin.h>
1.24 +
1.25 +// Implementations of the ECam plugin classes
1.26 +
1.27 +class CCameraStub : public CCameraPlugin
1.28 + {
1.29 +public:
1.30 + static CCameraStub* NewL();
1.31 + ~CCameraStub();
1.32 +
1.33 +protected:
1.34 + // from CCameraPlugin
1.35 + void Construct2L(MCameraObserver& aObserver,TInt aCameraIndex);
1.36 + void Construct2DupL(MCameraObserver& aObserver,TInt aCameraHandle);
1.37 +
1.38 + void Construct2L(MCameraObserver2& aObserver,TInt aCameraIndex,TInt aPriority);
1.39 + void Construct2DupL(MCameraObserver2& aObserver,TInt aCameraHandle);
1.40 +
1.41 + // from CCamera itself
1.42 + void CameraInfo(TCameraInfo& aInfo) const;
1.43 + void Reserve();
1.44 + void Release();
1.45 + void PowerOn();
1.46 + void PowerOff();
1.47 + TInt Handle();
1.48 + void SetZoomFactorL(TInt aZoomFactor = 0);
1.49 + TInt ZoomFactor() const;
1.50 + void SetDigitalZoomFactorL(TInt aDigitalZoomFactor = 0);
1.51 + TInt DigitalZoomFactor() const;
1.52 + void SetContrastL(TInt aContrast);
1.53 + TInt Contrast() const;
1.54 + void SetBrightnessL(TInt aBrightness);
1.55 + TInt Brightness() const;
1.56 + void SetFlashL(TFlash aFlash = EFlashNone);
1.57 + TFlash Flash() const;
1.58 + void SetExposureL(TExposure aExposure = EExposureAuto);
1.59 + TExposure Exposure() const;
1.60 + void SetWhiteBalanceL(TWhiteBalance aWhiteBalance = EWBAuto);
1.61 + TWhiteBalance WhiteBalance() const;
1.62 + void StartViewFinderDirectL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWindow,TRect& aScreenRect);
1.63 + void StartViewFinderDirectL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWindow,TRect& aScreenRect,TRect& aClipRect);
1.64 + void StartViewFinderBitmapsL(TSize& aSize);
1.65 + void StartViewFinderBitmapsL(TSize& aSize,TRect& aClipRect);
1.66 + void StartViewFinderL(TFormat aImageFormat,TSize& aSize);
1.67 + void StartViewFinderL(TFormat aImageFormat,TSize& aSize,TRect& aClipRect);
1.68 + void StopViewFinder();
1.69 + TBool ViewFinderActive() const;
1.70 + void SetViewFinderMirrorL(TBool aMirror);
1.71 + TBool ViewFinderMirror() const;
1.72 + void PrepareImageCaptureL(TFormat aImageFormat,TInt aSizeIndex);
1.73 + void PrepareImageCaptureL(TFormat aImageFormat,TInt aSizeIndex,const TRect& aClipRect);
1.74 + void CaptureImage();
1.75 + void CancelCaptureImage();
1.76 + void EnumerateCaptureSizes(TSize& aSize,TInt aSizeIndex,TFormat aFormat) const;
1.77 + void PrepareVideoCaptureL(TFormat aFormat,TInt aSizeIndex,TInt aRateIndex,TInt aBuffersToUse,TInt aFramesPerBuffer);
1.78 + void PrepareVideoCaptureL(TFormat aFormat,TInt aSizeIndex,TInt aRateIndex,TInt aBuffersToUse,TInt aFramesPerBuffer,const TRect& aClipRect);
1.79 + void StartVideoCapture();
1.80 + void StopVideoCapture();
1.81 + TBool VideoCaptureActive() const;
1.82 + void EnumerateVideoFrameSizes(TSize& aSize,TInt aSizeIndex,TFormat aFormat) const;
1.83 + void EnumerateVideoFrameRates(TReal32& aRate,TInt aRateIndex,TFormat aFormat,TInt aSizeIndex,TExposure aExposure = EExposureAuto) const;
1.84 + void GetFrameSize(TSize& aSize) const;
1.85 + TReal32 FrameRate() const;
1.86 + TInt BuffersInUse() const;
1.87 + TInt FramesPerBuffer() const;
1.88 + void SetJpegQuality(TInt aQuality);
1.89 + TInt JpegQuality() const;
1.90 + TAny* CustomInterface(TUid aInterface);
1.91 +
1.92 +private:
1.93 + CCameraStub();
1.94 +private:
1.95 + MCameraObserver* iObserver; // not owned
1.96 + MCameraObserver2* iObserver2; // not owned
1.97 + TInt iCameraIndex;
1.98 + TInt iCameraHandle;
1.99 + TInt iPriority;
1.100 + };
1.101 +
1.102 +class CCameraStubInfo : public CCameraInfoPlugin
1.103 + {
1.104 +public:
1.105 + static CCameraStubInfo* NewL();
1.106 +
1.107 + ~CCameraStubInfo();
1.108 +
1.109 + // from CCameraInfoPlugin
1.110 + TInt CamerasAvailable();
1.111 +private:
1.112 + CCameraStubInfo();
1.113 + };
1.114 +
1.115 +enum TStubPanicReasons
1.116 + {
1.117 + EPanicUnimplemented=1
1.118 + };
1.119 +
1.120 +#endif // ECAMSTUBPLUGIN_H