sl@0: // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef ECAMRAMPLUGIN_H sl@0: #define ECAMRAMPLUGIN_H sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: _LIT(KECamRamPluginName, "C:\\ecamrampluginname.txt"); sl@0: sl@0: // Implementations of the ECam plugin classes sl@0: class CCameraRamPlugin : public CCameraPlugin sl@0: { sl@0: public: sl@0: static CCameraRamPlugin* NewL(); sl@0: ~CCameraRamPlugin(); sl@0: sl@0: protected: sl@0: // from CCameraPlugin sl@0: void Construct2L(MCameraObserver& aObserver,TInt aCameraIndex); sl@0: void Construct2DupL(MCameraObserver& aObserver,TInt aCameraHandle); sl@0: sl@0: void Construct2L(MCameraObserver2& aObserver,TInt aCameraIndex,TInt aPriority); sl@0: void Construct2DupL(MCameraObserver2& aObserver,TInt aCameraHandle); sl@0: sl@0: // from CCamera itself sl@0: void CameraInfo(TCameraInfo& aInfo) const; sl@0: void Reserve(); sl@0: void Release(); sl@0: void PowerOn(); sl@0: void PowerOff(); sl@0: TInt Handle(); sl@0: void SetZoomFactorL(TInt aZoomFactor = 0); sl@0: TInt ZoomFactor() const; sl@0: void SetDigitalZoomFactorL(TInt aDigitalZoomFactor = 0); sl@0: TInt DigitalZoomFactor() const; sl@0: void SetContrastL(TInt aContrast); sl@0: TInt Contrast() const; sl@0: void SetBrightnessL(TInt aBrightness); sl@0: TInt Brightness() const; sl@0: void SetFlashL(TFlash aFlash = EFlashNone); sl@0: TFlash Flash() const; sl@0: void SetExposureL(TExposure aExposure = EExposureAuto); sl@0: TExposure Exposure() const; sl@0: void SetWhiteBalanceL(TWhiteBalance aWhiteBalance = EWBAuto); sl@0: TWhiteBalance WhiteBalance() const; sl@0: void StartViewFinderDirectL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWindow,TRect& aScreenRect); sl@0: void StartViewFinderDirectL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWindow,TRect& aScreenRect,TRect& aClipRect); sl@0: void StartViewFinderBitmapsL(TSize& aSize); sl@0: void StartViewFinderBitmapsL(TSize& aSize,TRect& aClipRect); sl@0: sl@0: void StartViewFinderL(TFormat aImageFormat,TSize& aSize); sl@0: void StartViewFinderL(TFormat aImageFormat,TSize& aSize,TRect& aClipRect); sl@0: sl@0: void StopViewFinder(); sl@0: TBool ViewFinderActive() const; sl@0: void SetViewFinderMirrorL(TBool aMirror); sl@0: TBool ViewFinderMirror() const; sl@0: void PrepareImageCaptureL(TFormat aImageFormat,TInt aSizeIndex); sl@0: void PrepareImageCaptureL(TFormat aImageFormat,TInt aSizeIndex,const TRect& aClipRect); sl@0: void CaptureImage(); sl@0: void CancelCaptureImage(); sl@0: void EnumerateCaptureSizes(TSize& aSize,TInt aSizeIndex,TFormat aFormat) const; sl@0: void PrepareVideoCaptureL(TFormat aFormat,TInt aSizeIndex,TInt aRateIndex,TInt aBuffersToUse,TInt aFramesPerBuffer); sl@0: void PrepareVideoCaptureL(TFormat aFormat,TInt aSizeIndex,TInt aRateIndex,TInt aBuffersToUse,TInt aFramesPerBuffer,const TRect& aClipRect); sl@0: void StartVideoCapture(); sl@0: void StopVideoCapture(); sl@0: TBool VideoCaptureActive() const; sl@0: void EnumerateVideoFrameSizes(TSize& aSize,TInt aSizeIndex,TFormat aFormat) const; sl@0: void EnumerateVideoFrameRates(TReal32& aRate,TInt aRateIndex,TFormat aFormat,TInt aSizeIndex,TExposure aExposure = EExposureAuto) const; sl@0: void GetFrameSize(TSize& aSize) const; sl@0: TReal32 FrameRate() const; sl@0: TInt BuffersInUse() const; sl@0: TInt FramesPerBuffer() const; sl@0: void SetJpegQuality(TInt aQuality); sl@0: TInt JpegQuality() const; sl@0: TAny* CustomInterface(TUid aInterface); sl@0: sl@0: private: sl@0: CCameraRamPlugin(); sl@0: sl@0: private: sl@0: MCameraObserver* iObserver; // not owned sl@0: MCameraObserver2* iObserver2; // not owned sl@0: sl@0: TInt iCameraIndex; sl@0: TInt iCameraHandle; sl@0: TInt iPriority; sl@0: }; sl@0: sl@0: class CCameraRamPluginInfo : public CCameraInfoPlugin sl@0: { sl@0: public: sl@0: static CCameraRamPluginInfo* NewL(); sl@0: sl@0: ~CCameraRamPluginInfo(); sl@0: sl@0: // from CCameraInfoPlugin sl@0: TInt CamerasAvailable(); sl@0: private: sl@0: CCameraRamPluginInfo(); sl@0: }; sl@0: sl@0: class FileDependencyUtil sl@0: { sl@0: public: sl@0: static void CheckFileDependencyL(); sl@0: }; sl@0: sl@0: #endif // ECAMRAMPLUGIN_H