|
1 /* |
|
2 * Copyright (c) 2010 ISB. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "Symbian Foundation License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * ISB - Initial contribution |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef ECAMWEBCAMERAADVSET_H |
|
19 #define ECAMWEBCAMERAADVSET_H |
|
20 |
|
21 #include <ecam/ecamadvsettingsintf.h> |
|
22 #include "ecamwebcameraplugin.h" |
|
23 |
|
24 |
|
25 const TInt KDefaultIsoRate = 200; |
|
26 |
|
27 // Implementations of the MCameraAdvancedSettings class |
|
28 class CWebCameraAdvSet : public CBase, |
|
29 public MCameraAdvancedSettings, |
|
30 public MCameraAdvancedSettings2, |
|
31 public MCameraAdvancedSettings3 |
|
32 { |
|
33 friend class CWebCamera; |
|
34 public: |
|
35 static CWebCameraAdvSet* NewL(CWebCamera& aOwner); |
|
36 ~CWebCameraAdvSet(); |
|
37 |
|
38 protected: |
|
39 //from MCameraAdvancedSettings |
|
40 void Release(); |
|
41 CCamera::CCameraAdvancedSettings::TCameraType CameraType() const; |
|
42 CCamera::CCameraAdvancedSettings::TCameraType CameraType(TInt aCameraIndex) const; |
|
43 TBool IsCameraPresent() const; |
|
44 TBool IsCameraPresent(TInt aCameraIndex) const; |
|
45 TInt CameraIndex() const; |
|
46 TInt SupportedStabilizationModes() const; |
|
47 CCamera::CCameraAdvancedSettings::TStabilizationMode StabilizationMode() const; |
|
48 void SetStabilizationMode(CCamera::CCameraAdvancedSettings::TStabilizationMode aStabilizationMode); |
|
49 TInt SupportedFocusModes() const; |
|
50 CCamera::CCameraAdvancedSettings::TFocusMode FocusMode() const; |
|
51 void SetFocusMode(CCamera::CCameraAdvancedSettings::TFocusMode aFocusMode); |
|
52 TInt SupportedFocusRanges() const; |
|
53 CCamera::CCameraAdvancedSettings::TFocusRange FocusRange() const; |
|
54 void SetFocusRange(CCamera::CCameraAdvancedSettings::TFocusRange aFocusRange); |
|
55 TInt SupportedAutoFocusTypes() const; |
|
56 CCamera::CCameraAdvancedSettings::TAutoFocusType AutoFocusType() const; |
|
57 void SetAutoFocusType(CCamera::CCameraAdvancedSettings::TAutoFocusType aAutoFocusType); |
|
58 TInt SupportedAutoFocusAreas() const; |
|
59 CCamera::CCameraAdvancedSettings::TAutoFocusArea AutoFocusArea() const; |
|
60 void SetAutoFocusArea(CCamera::CCameraAdvancedSettings::TAutoFocusArea aAutoFocusArea); |
|
61 TInt FocusDistance() const; |
|
62 void SetFocusDistance(TInt aDistance); |
|
63 TInt GetMinFocalLength() const; |
|
64 void GetSupportedIsoRatesL(RArray<TInt>& aSupportedIsoRates) const; |
|
65 TInt IsoRate() const; |
|
66 void SetIsoRate(TInt aRate); |
|
67 void GetAperturesL(RArray<TInt>& aFStops, TValueInfo& aInfo) const; |
|
68 TInt Aperture() const; |
|
69 void SetAperture(TInt aFStop); |
|
70 void GetShutterSpeedsL(RArray<TInt>& aShutterSpeeds, TValueInfo& aInfo) const; |
|
71 TInt ShutterSpeed() const; |
|
72 void SetShutterSpeed(TInt aShutterSpeed); |
|
73 TInt SupportedMeteringModes() const; |
|
74 CCamera::CCameraAdvancedSettings::TMeteringMode MeteringMode() const; |
|
75 void SetMeteringMode(CCamera::CCameraAdvancedSettings::TMeteringMode aMeteringMode); |
|
76 TInt SupportedDriveModes() const; |
|
77 CCamera::CCameraAdvancedSettings::TDriveMode DriveMode() const; |
|
78 void SetDriveMode(CCamera::CCameraAdvancedSettings::TDriveMode aDriveMode); |
|
79 TInt SupportedBracketModes() const; |
|
80 CCamera::CCameraAdvancedSettings::TBracketMode BracketMode() const; |
|
81 void SetBracketMode(CCamera::CCameraAdvancedSettings::TBracketMode aBracketMode); |
|
82 TInt SupportedBracketParameters() const; |
|
83 CCamera::CCameraAdvancedSettings::TBracketParameter BracketParameter() const; |
|
84 void SetBracketParameter(CCamera::CCameraAdvancedSettings::TBracketParameter aBracketParameter); |
|
85 TInt SupportedBracketSteps() const; |
|
86 CCamera::CCameraAdvancedSettings::TBracketStep BracketStep() const; |
|
87 void SetBracketStep(CCamera::CCameraAdvancedSettings::TBracketStep aBracketStep); |
|
88 void GetBracketMerge(TInt& aStartIndex, TInt& aFrames) const; |
|
89 void SetBracketMerge(TInt aStartIndex, TInt aFrames); |
|
90 TInt SupportedFlashModes() const; |
|
91 CCamera::TFlash FlashMode() const; |
|
92 void SetFlashMode(CCamera::TFlash aMode); |
|
93 TBool RedEyeReduceOn() const; |
|
94 void SetRedEyeReduceOn(TBool aState); |
|
95 void GetFlashCompensationStepsL(RArray<TInt>& aFlashCompensationSteps, TValueInfo& aInfo) const; |
|
96 TInt FlashCompensationStep() const; |
|
97 TInt GetFlashCompensationStep(TInt& aFlashCompensationStep) const; |
|
98 void SetFlashCompensationStep(TInt aFlashCompensationStep); |
|
99 void GetFlashCompensationRangeInSteps(TInt& aNegativeCompensation, TInt& aPositiveCompensation) const; |
|
100 TInt FlashCompensation() const; |
|
101 TInt GetFlashCompensation(TInt& aFlashCompensation) const; |
|
102 void SetFlashCompensation(TInt aFlashCompensationSteps); |
|
103 TBool IsExternalFlashPresent() const; |
|
104 void GetManualFlashPowerLevelsL(RArray<TInt>& aManualFlashPowerLevels, TValueInfo& aInfo) const; |
|
105 TInt ManualFlashPowerLevel() const; |
|
106 void SetManualFlashPowerLevel(TInt aManualFlashPowerLevel); |
|
107 TInt SupportedExposureModes() const; |
|
108 CCamera::TExposure ExposureMode() const; |
|
109 void SetExposureMode(CCamera::TExposure aExposureMode); |
|
110 void GetExposureCompensationStepsL(RArray<TInt>& aExposureCompensationSteps, TValueInfo& aInfo) const; |
|
111 TInt ExposureCompensationStep() const; |
|
112 TInt GetExposureCompensationStep(TInt& aExposureCompensationStep) const; |
|
113 void SetExposureCompensationStep(TInt aExposureCompensationStep); |
|
114 void GetExposureCompensationRangeInSteps(TInt& aNegativeCompensation, TInt& aPositiveCompensation) const; |
|
115 TInt ExposureCompensation() const; |
|
116 TInt GetExposureCompensation(TInt& aExposureCompensation) const; |
|
117 void SetExposureCompensation(TInt aExposureCompensationSteps); |
|
118 TInt SupportedWhiteBalanceModes() const; |
|
119 CCamera::TWhiteBalance WhiteBalanceMode() const; |
|
120 void SetWhiteBalanceMode(CCamera::TWhiteBalance aWhiteBalanceMode); |
|
121 TBool ApertureExposureLockOn() const; |
|
122 void SetApertureExposureLockOn(TBool aAELock); |
|
123 TBool ShootClickOn() const; |
|
124 void SetShootClickOn(TBool aShootClickOn); |
|
125 void GetTimerIntervalsL(RArray<TInt>& aTimerIntervals, TValueInfo& aInfo) const; |
|
126 TInt TimerInterval() const; |
|
127 void SetTimerInterval(TInt aTimerInterval); |
|
128 void GetTimeLapsePeriodRange(TTime& aTimeLapseMin, TTime& aTimeLapseMax) const; |
|
129 void GetTimeLapse(TTime& aStart, TTime& aEnd, TTime& aInterval) const; |
|
130 void SetTimeLapse(const TTime& aStart, const TTime& aEnd, const TTime& aInterval); |
|
131 CCamera::CCameraAdvancedSettings::TPictureOrientation PictureOrientation() const; |
|
132 void SetPictureOrientation(CCamera::CCameraAdvancedSettings::TPictureOrientation aOrientation); |
|
133 TInt SupportedPixelAspectRatios() const; |
|
134 CCamera::CCameraAdvancedSettings::TPixelAspectRatio PixelAspectRatio() const; |
|
135 void SetPixelAspectRatio(CCamera::CCameraAdvancedSettings::TPixelAspectRatio aPixelAspectRatio); |
|
136 TInt SupportedYuvRanges() const; |
|
137 CCamera::CCameraAdvancedSettings::TYuvRange YuvRange() const; |
|
138 void SetYuvRange(CCamera::CCameraAdvancedSettings::TYuvRange aYuvRange); |
|
139 TInt BurstImages() const; |
|
140 void SetBurstImages(TInt aImages); |
|
141 void GetOpticalZoomStepsL(RArray<TInt>& aOpticalZoomSteps, TValueInfo& aInfo) const; |
|
142 TInt OpticalZoom() const; |
|
143 void SetOpticalZoom(TInt aOpticalZoom); |
|
144 void GetDigitalZoomStepsL(RArray<TInt>& aDigitalZoomSteps, TValueInfo& aInfo) const; |
|
145 TInt DigitalZoom() const; |
|
146 void SetDigitalZoom(TInt aDigitalZoom); |
|
147 TBool ExposureLockOn() const; |
|
148 void SetExposureLockOn(TBool aState); |
|
149 TBool AutoFocusLockOn() const; |
|
150 void SetAutoFocusLockOn(TBool aState); |
|
151 void GetSupportedSettingsL(RArray<TUid>& aSettings) const; |
|
152 void GetActiveSettingsL(RArray<TUid>& aActiveSettings) const; |
|
153 void GetDisabledSettingsL(RArray<TUid>& aDisabledSettings) const; |
|
154 TBool AutomaticSizeSelectionChangeOn() const; |
|
155 void SetAutomaticSizeSelectionChangeOn(TBool aSetOn); |
|
156 void GetSupportedContinuousAutoFocusTimeoutsL(RArray<TInt>& aTimeouts, TValueInfo& aInfo) const; |
|
157 TInt ContinuousAutoFocusTimeout() const; |
|
158 void SetContinuousAutoFocusTimeout(TInt aTimeout); |
|
159 TInt SupportedStabilizationEffects() const; |
|
160 CCamera::CCameraAdvancedSettings::TStabilizationEffect StabilizationEffect() const; |
|
161 void SetStabilizationEffect(CCamera::CCameraAdvancedSettings::TStabilizationEffect aEffect); |
|
162 TInt SupportedStabilizationComplexityValues() const; |
|
163 CCamera::CCameraAdvancedSettings::TStabilizationAlgorithmComplexity StabilizationComplexity() const; |
|
164 void SetStabilizationComplexity(CCamera::CCameraAdvancedSettings::TStabilizationAlgorithmComplexity aComplexity); |
|
165 CCamera::CCameraAdvancedSettings::TWBUnits SupportedWBUnits() const; |
|
166 void GetWBRgbValue(TRgb& aValue) const; |
|
167 void SetWBRgbValue(const TRgb& aValue); |
|
168 void GetWBSupportedColorTemperaturesL(RArray<TInt>& aWBColorTemperatures, TValueInfo& aInfo) const; |
|
169 TInt WBColorTemperature() const; |
|
170 void SetWBColorTemperature(TInt aWBColorTemperature); |
|
171 |
|
172 //from MCameraAdvancedSettings2 |
|
173 TInt IsFlashReady(TBool& aReady) const; |
|
174 void GetCurrentFocusModeStepsL(RArray<TInt>& aFocusModeSteps, TValueInfo& aInfo) const; |
|
175 |
|
176 //from MCameraAdvancedSettings3 |
|
177 void GetSupportedISORateTypeL(TInt& aSupportedISORateTypes) const; |
|
178 void SetISORate(CCamera::CCameraAdvancedSettings::TISORateType aISORateType, TInt aParam); |
|
179 void GetISORateL(CCamera::CCameraAdvancedSettings::TISORateType& aISORateType, TInt& aParam, TInt& aISORate) const; |
|
180 void SetReferenceScreen(CWsScreenDevice& aScreenDevice); |
|
181 void GetDigitalZoomStepsForStillL(RArray<TInt>& aDigitalZoomSteps, TValueInfo& aInfo, TInt aSizeIndex, |
|
182 CCamera::TFormat aFormat, TBool& aIsInfluencePossible) const; |
|
183 void GetDigitalZoomStepsForVideoL(RArray<TInt>& aDigitalZoomSteps, TValueInfo& aInfo, TInt aFrameRateIndex, |
|
184 TInt aSizeIndex, CCamera::TFormat aFormat, TBool& aIsInfluencePossible, CCamera::TExposure aExposure) const; |
|
185 void GetPreCaptureWarningSupportedL(CCamera::CCameraAdvancedSettings::TCameraMode aCameraMode, TInt& aPreCaptureWarningSupported) const; |
|
186 void SubscribeToPreCaptureWarningL(TInt aPreCaptureWarning); |
|
187 void UnSubscribePreCaptureWarningL(); |
|
188 void GetPreCaptureWarningL(TInt& aPreCaptureWarning) const; |
|
189 void GetSupportedAFAssistantLightL(TInt& aSupportedAFAssistantLight) const; |
|
190 void GetAFAssistantLightL(CCamera::CCameraAdvancedSettings::TAFAssistantLight& aAFAssistantLight) const; |
|
191 void SetAFAssistantLight(CCamera::CCameraAdvancedSettings::TAFAssistantLight aAFAssistantLight); |
|
192 |
|
193 private: |
|
194 CWebCameraAdvSet(CWebCamera& aOwner); |
|
195 void Init(); |
|
196 void ConstructL(); |
|
197 |
|
198 private: |
|
199 CWebCamera& iOwner; |
|
200 RArray<TInt> iSupportedISORates; |
|
201 }; |
|
202 |
|
203 #endif // TESTADVANCEDSETTINGS_H |