os/mm/mmplugins/cameraplugins/source/mmcameraclientplugin/mmcameraserver/src/mmcameraservercontroller.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2008-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 /**
    17  @file
    18  @internalTechnology
    19 */
    20 
    21 #ifndef MMCAMERASERVERCONTROLLER_H
    22 #define MMCAMERASERVERCONTROLLER_H
    23 
    24 #include "mmcameraserver.h"
    25 #include <graphics/surfaceconfiguration.h>
    26 #include "w32std.h"
    27  
    28 #include <mmclient.h>
    29 #include <mmcamerasensorcomponent.h>
    30 #include <mmcameraviewfindercomponent.h>
    31 #include <mmcameracapturecomponent.h>
    32 #include <mmgraphicssinkcomponent.h>
    33 
    34 
    35 class CMMCameraServerController : public CBase
    36 	{
    37 public:
    38 	static CMMCameraServerController* NewL(TInt aCameraIndex);
    39 
    40 	~CMMCameraServerController();
    41 
    42 	TInt CameraIndex() const;
    43 	TInt CameraHandle() const;
    44 
    45 	void Reset();
    46 
    47 	void PrepareDirectViewFinderL(TDirectViewFinderInfo& aViewFinderInfo);
    48 	TInt StartDirectViewFinder();
    49 	void StopDirectViewFinder();
    50 	void ResumeDirectViewFinder();
    51 	void PauseDirectViewFinder();
    52 	CCamera::CCameraV2DirectViewFinder::TViewFinderState GetDirectViewFinderState() const;
    53 	TInt SetDirectViewFinderMirror(const TBool aMirror);
    54 	TInt GetDirectViewFinderMirror(TBool& aMirror);
    55 	TInt DirectViewFinderProperties(TInt& aScreenNum, TRect& aScreenRect, TRect& aClipRect);
    56 
    57 	TInt SetZoom(const TInt aZoom);
    58 	TInt SetDigitalZoom(const TInt aDigitalZoom);
    59 	TInt SetContrast(const TInt aContrast);
    60 	TInt SetBrightness(const TInt aBrightness);
    61 	TInt SetFlash(const CCamera::TFlash aFlash);
    62 	TInt SetExposure(const CCamera::TExposure aExposure);
    63 	TInt SetWhiteBalance(const CCamera::TWhiteBalance aWhiteBalance);
    64 	TInt GetZoom(TInt& aZoom);
    65 	TInt GetDigitalZoom(TInt& aDigitalZoom);
    66 	TInt GetContrast(TInt& aContrast);
    67 	TInt GetBrightness(TInt& aBrightness);
    68 	TInt GetFlash(CCamera::TFlash& aFlash);
    69 	TInt GetExposure(CCamera::TExposure& aExposure);
    70 	TInt GetWhiteBalance(CCamera::TWhiteBalance& aWhiteBalance);
    71 
    72 private:
    73 	CMMCameraServerController(TInt aCameraIndex); 
    74 	void ConstructL();
    75 
    76 
    77 public:
    78 	TDblQueLink iCamCntrlLink;    // Link Object for Server
    79 
    80 private:
    81 	MMClient::RMMServer 						iMMServer;
    82 	MMClient::RMMStreamContainer 				iMMStreamContainer;
    83 	MMClient::RMMStream							iMMStream;
    84 
    85 	MMCameraComponents::RMMCameraViewFinder		iCameraViewFinder;
    86 	MMCameraComponents::RMMCameraSensor			iCameraSensor;
    87 	MMCameraComponents::RMMCameraCapture			iCameraCapture;
    88 	MMVideoComponents::RMMVideoGraphicsSink		iGraphicsSink;
    89 
    90 	TInt iCameraIndex;
    91 	TInt iCameraHandle;
    92 	TInt iPriority;
    93 	TBool iMMCapability;
    94 	
    95 	CCamera::CCameraV2DirectViewFinder::TViewFinderState iViewFinderState;
    96 	
    97 	TRect iClipRect; // To store the screen clipping area specified by the client during StartViewFinderDirectL()
    98 					 // Unless this is passed to RMM classes in which case this can be retrieved through Get() Methods?
    99     TInt iZoom;
   100     TInt iDigitalZoom;
   101     TInt iContrast;
   102     TInt iBrightness;
   103     CCamera::TFlash iFlash;
   104     CCamera::TExposure iExposure;
   105     CCamera::TWhiteBalance iWhiteBalance;	
   106 	};
   107 
   108 
   109 
   110 class CMMCameraServerControllerQuery : public CBase
   111 	{
   112 public:
   113 	static CMMCameraServerControllerQuery* NewL();
   114 	~CMMCameraServerControllerQuery();
   115 
   116 	TInt GetCamerasAvailable();
   117 
   118 private:
   119 	void ConstructL();
   120 	CMMCameraServerControllerQuery();
   121 
   122 private:
   123 	MMClient::RMMServer		iServer;
   124 	};
   125 
   126 #endif // MMCAMERASERVERCONTROLLER_H