mmplugins/cameraplugins/source/stub/ECamStubPlugin.h
changeset 0 40261b775718
child 64 92a82bc706f7
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef ECAMSTUBPLUGIN_H
       
    17 #define ECAMSTUBPLUGIN_H
       
    18 
       
    19 #include <ecam/ecamplugin.h>
       
    20 #include <ecam/ecaminfoplugin.h>
       
    21 
       
    22 // Implementations of the ECam plugin classes
       
    23 
       
    24 class CCameraStub : public CCameraPlugin
       
    25 	{
       
    26 public:
       
    27 	static CCameraStub* NewL();
       
    28 	~CCameraStub();
       
    29 	
       
    30 protected:
       
    31 	// from CCameraPlugin
       
    32 	void Construct2L(MCameraObserver& aObserver,TInt aCameraIndex);
       
    33 	void Construct2DupL(MCameraObserver& aObserver,TInt aCameraHandle);
       
    34 	
       
    35 	void Construct2L(MCameraObserver2& aObserver,TInt aCameraIndex,TInt aPriority);
       
    36 	void Construct2DupL(MCameraObserver2& aObserver,TInt aCameraHandle);
       
    37 
       
    38 	// from CCamera itself
       
    39 	void CameraInfo(TCameraInfo& aInfo) const;
       
    40 	void Reserve();
       
    41 	void Release();
       
    42 	void PowerOn();
       
    43 	void PowerOff();
       
    44 	TInt Handle();
       
    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);
       
    54 	TFlash Flash() const;
       
    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);
       
    71 	void CaptureImage();
       
    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);
       
    88 
       
    89 private:
       
    90 	CCameraStub();
       
    91 private:
       
    92 	MCameraObserver* iObserver; // not owned
       
    93 	MCameraObserver2* iObserver2; // not owned
       
    94 	TInt iCameraIndex;
       
    95 	TInt iCameraHandle;
       
    96 	TInt iPriority;
       
    97 	};
       
    98 	
       
    99 class CCameraStubInfo : public CCameraInfoPlugin
       
   100 	{
       
   101 public:
       
   102 	static CCameraStubInfo* NewL();
       
   103 	
       
   104 	~CCameraStubInfo();
       
   105 	
       
   106 	// from CCameraInfoPlugin
       
   107 	TInt CamerasAvailable();
       
   108 private:
       
   109 	CCameraStubInfo();	
       
   110 	};
       
   111 	
       
   112 enum TStubPanicReasons
       
   113 	{
       
   114 	EPanicUnimplemented=1
       
   115 	};
       
   116 	
       
   117 #endif // ECAMSTUBPLUGIN_H