sl@0: // Copyright (c) 2008-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: /** sl@0: @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #ifndef MMCAMERASERVERCONTROLLER_H sl@0: #define MMCAMERASERVERCONTROLLER_H sl@0: sl@0: #include "mmcameraserver.h" sl@0: #include sl@0: #include "w32std.h" sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: sl@0: class CMMCameraServerController : public CBase sl@0: { sl@0: public: sl@0: static CMMCameraServerController* NewL(TInt aCameraIndex); sl@0: sl@0: ~CMMCameraServerController(); sl@0: sl@0: TInt CameraIndex() const; sl@0: TInt CameraHandle() const; sl@0: sl@0: void Reset(); sl@0: sl@0: void PrepareDirectViewFinderL(TDirectViewFinderInfo& aViewFinderInfo); sl@0: TInt StartDirectViewFinder(); sl@0: void StopDirectViewFinder(); sl@0: void ResumeDirectViewFinder(); sl@0: void PauseDirectViewFinder(); sl@0: CCamera::CCameraV2DirectViewFinder::TViewFinderState GetDirectViewFinderState() const; sl@0: TInt SetDirectViewFinderMirror(const TBool aMirror); sl@0: TInt GetDirectViewFinderMirror(TBool& aMirror); sl@0: TInt DirectViewFinderProperties(TInt& aScreenNum, TRect& aScreenRect, TRect& aClipRect); sl@0: sl@0: TInt SetZoom(const TInt aZoom); sl@0: TInt SetDigitalZoom(const TInt aDigitalZoom); sl@0: TInt SetContrast(const TInt aContrast); sl@0: TInt SetBrightness(const TInt aBrightness); sl@0: TInt SetFlash(const CCamera::TFlash aFlash); sl@0: TInt SetExposure(const CCamera::TExposure aExposure); sl@0: TInt SetWhiteBalance(const CCamera::TWhiteBalance aWhiteBalance); sl@0: TInt GetZoom(TInt& aZoom); sl@0: TInt GetDigitalZoom(TInt& aDigitalZoom); sl@0: TInt GetContrast(TInt& aContrast); sl@0: TInt GetBrightness(TInt& aBrightness); sl@0: TInt GetFlash(CCamera::TFlash& aFlash); sl@0: TInt GetExposure(CCamera::TExposure& aExposure); sl@0: TInt GetWhiteBalance(CCamera::TWhiteBalance& aWhiteBalance); sl@0: sl@0: private: sl@0: CMMCameraServerController(TInt aCameraIndex); sl@0: void ConstructL(); sl@0: sl@0: sl@0: public: sl@0: TDblQueLink iCamCntrlLink; // Link Object for Server sl@0: sl@0: private: sl@0: MMClient::RMMServer iMMServer; sl@0: MMClient::RMMStreamContainer iMMStreamContainer; sl@0: MMClient::RMMStream iMMStream; sl@0: sl@0: MMCameraComponents::RMMCameraViewFinder iCameraViewFinder; sl@0: MMCameraComponents::RMMCameraSensor iCameraSensor; sl@0: MMCameraComponents::RMMCameraCapture iCameraCapture; sl@0: MMVideoComponents::RMMVideoGraphicsSink iGraphicsSink; sl@0: sl@0: TInt iCameraIndex; sl@0: TInt iCameraHandle; sl@0: TInt iPriority; sl@0: TBool iMMCapability; sl@0: sl@0: CCamera::CCameraV2DirectViewFinder::TViewFinderState iViewFinderState; sl@0: sl@0: TRect iClipRect; // To store the screen clipping area specified by the client during StartViewFinderDirectL() sl@0: // Unless this is passed to RMM classes in which case this can be retrieved through Get() Methods? sl@0: TInt iZoom; sl@0: TInt iDigitalZoom; sl@0: TInt iContrast; sl@0: TInt iBrightness; sl@0: CCamera::TFlash iFlash; sl@0: CCamera::TExposure iExposure; sl@0: CCamera::TWhiteBalance iWhiteBalance; sl@0: }; sl@0: sl@0: sl@0: sl@0: class CMMCameraServerControllerQuery : public CBase sl@0: { sl@0: public: sl@0: static CMMCameraServerControllerQuery* NewL(); sl@0: ~CMMCameraServerControllerQuery(); sl@0: sl@0: TInt GetCamerasAvailable(); sl@0: sl@0: private: sl@0: void ConstructL(); sl@0: CMMCameraServerControllerQuery(); sl@0: sl@0: private: sl@0: MMClient::RMMServer iServer; sl@0: }; sl@0: sl@0: #endif // MMCAMERASERVERCONTROLLER_H