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