sl@0
|
1 |
// Copyright (c) 2004-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 |
#ifndef ECAMSTUBPLUGIN_H
|
sl@0
|
17 |
#define ECAMSTUBPLUGIN_H
|
sl@0
|
18 |
|
sl@0
|
19 |
#include <ecam/ecamplugin.h>
|
sl@0
|
20 |
#include <ecam/ecaminfoplugin.h>
|
sl@0
|
21 |
|
sl@0
|
22 |
// Implementations of the ECam plugin classes
|
sl@0
|
23 |
|
sl@0
|
24 |
class CCameraStub : public CCameraPlugin
|
sl@0
|
25 |
{
|
sl@0
|
26 |
public:
|
sl@0
|
27 |
static CCameraStub* NewL();
|
sl@0
|
28 |
~CCameraStub();
|
sl@0
|
29 |
|
sl@0
|
30 |
protected:
|
sl@0
|
31 |
// from CCameraPlugin
|
sl@0
|
32 |
void Construct2L(MCameraObserver& aObserver,TInt aCameraIndex);
|
sl@0
|
33 |
void Construct2DupL(MCameraObserver& aObserver,TInt aCameraHandle);
|
sl@0
|
34 |
|
sl@0
|
35 |
void Construct2L(MCameraObserver2& aObserver,TInt aCameraIndex,TInt aPriority);
|
sl@0
|
36 |
void Construct2DupL(MCameraObserver2& aObserver,TInt aCameraHandle);
|
sl@0
|
37 |
|
sl@0
|
38 |
// from CCamera itself
|
sl@0
|
39 |
void CameraInfo(TCameraInfo& aInfo) const;
|
sl@0
|
40 |
void Reserve();
|
sl@0
|
41 |
void Release();
|
sl@0
|
42 |
void PowerOn();
|
sl@0
|
43 |
void PowerOff();
|
sl@0
|
44 |
TInt Handle();
|
sl@0
|
45 |
void SetZoomFactorL(TInt aZoomFactor = 0);
|
sl@0
|
46 |
TInt ZoomFactor() const;
|
sl@0
|
47 |
void SetDigitalZoomFactorL(TInt aDigitalZoomFactor = 0);
|
sl@0
|
48 |
TInt DigitalZoomFactor() const;
|
sl@0
|
49 |
void SetContrastL(TInt aContrast);
|
sl@0
|
50 |
TInt Contrast() const;
|
sl@0
|
51 |
void SetBrightnessL(TInt aBrightness);
|
sl@0
|
52 |
TInt Brightness() const;
|
sl@0
|
53 |
void SetFlashL(TFlash aFlash = EFlashNone);
|
sl@0
|
54 |
TFlash Flash() const;
|
sl@0
|
55 |
void SetExposureL(TExposure aExposure = EExposureAuto);
|
sl@0
|
56 |
TExposure Exposure() const;
|
sl@0
|
57 |
void SetWhiteBalanceL(TWhiteBalance aWhiteBalance = EWBAuto);
|
sl@0
|
58 |
TWhiteBalance WhiteBalance() const;
|
sl@0
|
59 |
void StartViewFinderDirectL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWindow,TRect& aScreenRect);
|
sl@0
|
60 |
void StartViewFinderDirectL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWindow,TRect& aScreenRect,TRect& aClipRect);
|
sl@0
|
61 |
void StartViewFinderBitmapsL(TSize& aSize);
|
sl@0
|
62 |
void StartViewFinderBitmapsL(TSize& aSize,TRect& aClipRect);
|
sl@0
|
63 |
void StartViewFinderL(TFormat aImageFormat,TSize& aSize);
|
sl@0
|
64 |
void StartViewFinderL(TFormat aImageFormat,TSize& aSize,TRect& aClipRect);
|
sl@0
|
65 |
void StopViewFinder();
|
sl@0
|
66 |
TBool ViewFinderActive() const;
|
sl@0
|
67 |
void SetViewFinderMirrorL(TBool aMirror);
|
sl@0
|
68 |
TBool ViewFinderMirror() const;
|
sl@0
|
69 |
void PrepareImageCaptureL(TFormat aImageFormat,TInt aSizeIndex);
|
sl@0
|
70 |
void PrepareImageCaptureL(TFormat aImageFormat,TInt aSizeIndex,const TRect& aClipRect);
|
sl@0
|
71 |
void CaptureImage();
|
sl@0
|
72 |
void CancelCaptureImage();
|
sl@0
|
73 |
void EnumerateCaptureSizes(TSize& aSize,TInt aSizeIndex,TFormat aFormat) const;
|
sl@0
|
74 |
void PrepareVideoCaptureL(TFormat aFormat,TInt aSizeIndex,TInt aRateIndex,TInt aBuffersToUse,TInt aFramesPerBuffer);
|
sl@0
|
75 |
void PrepareVideoCaptureL(TFormat aFormat,TInt aSizeIndex,TInt aRateIndex,TInt aBuffersToUse,TInt aFramesPerBuffer,const TRect& aClipRect);
|
sl@0
|
76 |
void StartVideoCapture();
|
sl@0
|
77 |
void StopVideoCapture();
|
sl@0
|
78 |
TBool VideoCaptureActive() const;
|
sl@0
|
79 |
void EnumerateVideoFrameSizes(TSize& aSize,TInt aSizeIndex,TFormat aFormat) const;
|
sl@0
|
80 |
void EnumerateVideoFrameRates(TReal32& aRate,TInt aRateIndex,TFormat aFormat,TInt aSizeIndex,TExposure aExposure = EExposureAuto) const;
|
sl@0
|
81 |
void GetFrameSize(TSize& aSize) const;
|
sl@0
|
82 |
TReal32 FrameRate() const;
|
sl@0
|
83 |
TInt BuffersInUse() const;
|
sl@0
|
84 |
TInt FramesPerBuffer() const;
|
sl@0
|
85 |
void SetJpegQuality(TInt aQuality);
|
sl@0
|
86 |
TInt JpegQuality() const;
|
sl@0
|
87 |
TAny* CustomInterface(TUid aInterface);
|
sl@0
|
88 |
|
sl@0
|
89 |
private:
|
sl@0
|
90 |
CCameraStub();
|
sl@0
|
91 |
private:
|
sl@0
|
92 |
MCameraObserver* iObserver; // not owned
|
sl@0
|
93 |
MCameraObserver2* iObserver2; // not owned
|
sl@0
|
94 |
TInt iCameraIndex;
|
sl@0
|
95 |
TInt iCameraHandle;
|
sl@0
|
96 |
TInt iPriority;
|
sl@0
|
97 |
};
|
sl@0
|
98 |
|
sl@0
|
99 |
class CCameraStubInfo : public CCameraInfoPlugin
|
sl@0
|
100 |
{
|
sl@0
|
101 |
public:
|
sl@0
|
102 |
static CCameraStubInfo* NewL();
|
sl@0
|
103 |
|
sl@0
|
104 |
~CCameraStubInfo();
|
sl@0
|
105 |
|
sl@0
|
106 |
// from CCameraInfoPlugin
|
sl@0
|
107 |
TInt CamerasAvailable();
|
sl@0
|
108 |
private:
|
sl@0
|
109 |
CCameraStubInfo();
|
sl@0
|
110 |
};
|
sl@0
|
111 |
|
sl@0
|
112 |
enum TStubPanicReasons
|
sl@0
|
113 |
{
|
sl@0
|
114 |
EPanicUnimplemented=1
|
sl@0
|
115 |
};
|
sl@0
|
116 |
|
sl@0
|
117 |
#endif // ECAMSTUBPLUGIN_H
|