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.
sl@0
     1
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
/**
sl@0
    17
 @file
sl@0
    18
 @internalTechnology
sl@0
    19
*/
sl@0
    20
sl@0
    21
#ifndef MMCAMERASERVERCONTROLLER_H
sl@0
    22
#define MMCAMERASERVERCONTROLLER_H
sl@0
    23
sl@0
    24
#include "mmcameraserver.h"
sl@0
    25
#include <graphics/surfaceconfiguration.h>
sl@0
    26
#include "w32std.h"
sl@0
    27
 
sl@0
    28
#include <mmclient.h>
sl@0
    29
#include <mmcamerasensorcomponent.h>
sl@0
    30
#include <mmcameraviewfindercomponent.h>
sl@0
    31
#include <mmcameracapturecomponent.h>
sl@0
    32
#include <mmgraphicssinkcomponent.h>
sl@0
    33
sl@0
    34
sl@0
    35
class CMMCameraServerController : public CBase
sl@0
    36
	{
sl@0
    37
public:
sl@0
    38
	static CMMCameraServerController* NewL(TInt aCameraIndex);
sl@0
    39
sl@0
    40
	~CMMCameraServerController();
sl@0
    41
sl@0
    42
	TInt CameraIndex() const;
sl@0
    43
	TInt CameraHandle() const;
sl@0
    44
sl@0
    45
	void Reset();
sl@0
    46
sl@0
    47
	void PrepareDirectViewFinderL(TDirectViewFinderInfo& aViewFinderInfo);
sl@0
    48
	TInt StartDirectViewFinder();
sl@0
    49
	void StopDirectViewFinder();
sl@0
    50
	void ResumeDirectViewFinder();
sl@0
    51
	void PauseDirectViewFinder();
sl@0
    52
	CCamera::CCameraV2DirectViewFinder::TViewFinderState GetDirectViewFinderState() const;
sl@0
    53
	TInt SetDirectViewFinderMirror(const TBool aMirror);
sl@0
    54
	TInt GetDirectViewFinderMirror(TBool& aMirror);
sl@0
    55
	TInt DirectViewFinderProperties(TInt& aScreenNum, TRect& aScreenRect, TRect& aClipRect);
sl@0
    56
sl@0
    57
	TInt SetZoom(const TInt aZoom);
sl@0
    58
	TInt SetDigitalZoom(const TInt aDigitalZoom);
sl@0
    59
	TInt SetContrast(const TInt aContrast);
sl@0
    60
	TInt SetBrightness(const TInt aBrightness);
sl@0
    61
	TInt SetFlash(const CCamera::TFlash aFlash);
sl@0
    62
	TInt SetExposure(const CCamera::TExposure aExposure);
sl@0
    63
	TInt SetWhiteBalance(const CCamera::TWhiteBalance aWhiteBalance);
sl@0
    64
	TInt GetZoom(TInt& aZoom);
sl@0
    65
	TInt GetDigitalZoom(TInt& aDigitalZoom);
sl@0
    66
	TInt GetContrast(TInt& aContrast);
sl@0
    67
	TInt GetBrightness(TInt& aBrightness);
sl@0
    68
	TInt GetFlash(CCamera::TFlash& aFlash);
sl@0
    69
	TInt GetExposure(CCamera::TExposure& aExposure);
sl@0
    70
	TInt GetWhiteBalance(CCamera::TWhiteBalance& aWhiteBalance);
sl@0
    71
sl@0
    72
private:
sl@0
    73
	CMMCameraServerController(TInt aCameraIndex); 
sl@0
    74
	void ConstructL();
sl@0
    75
sl@0
    76
sl@0
    77
public:
sl@0
    78
	TDblQueLink iCamCntrlLink;    // Link Object for Server
sl@0
    79
sl@0
    80
private:
sl@0
    81
	MMClient::RMMServer 						iMMServer;
sl@0
    82
	MMClient::RMMStreamContainer 				iMMStreamContainer;
sl@0
    83
	MMClient::RMMStream							iMMStream;
sl@0
    84
sl@0
    85
	MMCameraComponents::RMMCameraViewFinder		iCameraViewFinder;
sl@0
    86
	MMCameraComponents::RMMCameraSensor			iCameraSensor;
sl@0
    87
	MMCameraComponents::RMMCameraCapture			iCameraCapture;
sl@0
    88
	MMVideoComponents::RMMVideoGraphicsSink		iGraphicsSink;
sl@0
    89
sl@0
    90
	TInt iCameraIndex;
sl@0
    91
	TInt iCameraHandle;
sl@0
    92
	TInt iPriority;
sl@0
    93
	TBool iMMCapability;
sl@0
    94
	
sl@0
    95
	CCamera::CCameraV2DirectViewFinder::TViewFinderState iViewFinderState;
sl@0
    96
	
sl@0
    97
	TRect iClipRect; // To store the screen clipping area specified by the client during StartViewFinderDirectL()
sl@0
    98
					 // Unless this is passed to RMM classes in which case this can be retrieved through Get() Methods?
sl@0
    99
    TInt iZoom;
sl@0
   100
    TInt iDigitalZoom;
sl@0
   101
    TInt iContrast;
sl@0
   102
    TInt iBrightness;
sl@0
   103
    CCamera::TFlash iFlash;
sl@0
   104
    CCamera::TExposure iExposure;
sl@0
   105
    CCamera::TWhiteBalance iWhiteBalance;	
sl@0
   106
	};
sl@0
   107
sl@0
   108
sl@0
   109
sl@0
   110
class CMMCameraServerControllerQuery : public CBase
sl@0
   111
	{
sl@0
   112
public:
sl@0
   113
	static CMMCameraServerControllerQuery* NewL();
sl@0
   114
	~CMMCameraServerControllerQuery();
sl@0
   115
sl@0
   116
	TInt GetCamerasAvailable();
sl@0
   117
sl@0
   118
private:
sl@0
   119
	void ConstructL();
sl@0
   120
	CMMCameraServerControllerQuery();
sl@0
   121
sl@0
   122
private:
sl@0
   123
	MMClient::RMMServer		iServer;
sl@0
   124
	};
sl@0
   125
sl@0
   126
#endif // MMCAMERASERVERCONTROLLER_H