1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/imagingandcamerafws/camerafw/source/ecamadvsettings.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,3958 @@
1.4 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#include <ecam/ecamadvsettingsintf.h>
1.20 +#include "ecamversion.h"
1.21 +#include <ecam/ecamconstants.h>
1.22 +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
1.23 +#include <ecamadvsettingsconst.h>
1.24 +#include <ecamadvsettingsdef.h>
1.25 +#endif
1.26 +#include <ecam/implementationfactoryintf.h>
1.27 +const TInt KBaselinedFocusRanges = 0x1F;
1.28 +const TInt KBaselinedWhiteBalanceModes = 0x01FF;
1.29 +const TUint KBaselinedPixelAspectsMask = (CCamera::CCameraAdvancedSettings::EEPixelAspect59To54 << 1) - 1;
1.30 +const TUint KBaselinedFlashModeMask = (CCamera::EFlashManual << 1) - 1;
1.31 +const TUint KBaselinedPreCaptureWarning = (CCamera::CCameraAdvancedSettings::EPCWGeneralWarning << 1) - 1;
1.32 +const TUint KBaselinedDriveMode = (CCamera::CCameraAdvancedSettings::EDriveModeBurst << 1) - 1;
1.33 +
1.34 +/**
1.35 +Factory function for creating the CCameraPresets object.
1.36 +
1.37 +@param aCamera
1.38 + a reference to a CCamera object providing the settings.
1.39 +
1.40 +@return a pointer to a fully constructed CCameraPresets object.
1.41 +
1.42 +@leave KErrNoMemory Out of memory Or any other system-wide error code.
1.43 +
1.44 +@note Clients using MCameraObserver are not recommended to use this extension class since they cannot handle events.
1.45 +*/
1.46 +EXPORT_C CCamera::CCameraPresets* CCamera::CCameraPresets::NewL(CCamera& aCamera)
1.47 + {
1.48 + CCamera::CCameraPresets* self = new (ELeave)CCamera::CCameraPresets(aCamera);
1.49 + CleanupStack::PushL(self);
1.50 + self->ConstructL();
1.51 + CleanupStack::Pop(self);
1.52 +
1.53 + return self;
1.54 + }
1.55 +
1.56 +/**
1.57 +CCameraPresets Constructor.
1.58 +
1.59 +@param aOwner
1.60 + a reference to a CCamera object providing the settings.
1.61 +*/
1.62 +EXPORT_C CCamera::CCameraPresets::CCameraPresets(CCamera& aOwner):iOwner(aOwner), iImpl(NULL), iImpl2(NULL)
1.63 + {
1.64 + }
1.65 +
1.66 +/**
1.67 +CCameraPresets second phase constructor.
1.68 +
1.69 +Function used to initialise internal state of the object. Uses reference to the camera to retrieve
1.70 +Camera presets interface pointer.
1.71 +
1.72 +@leave KErrNoMemory Out of memory.
1.73 +*/
1.74 +EXPORT_C void CCamera::CCameraPresets::ConstructL()
1.75 + {
1.76 + iImpl = static_cast<MCameraPresets*>(iOwner.CustomInterface(KECamMCameraPresetsUid));
1.77 +
1.78 + if (iImpl == NULL)
1.79 + {
1.80 + User::Leave(KErrNotSupported);
1.81 + }
1.82 +
1.83 + iImpl2 = static_cast<MCameraPresets2*>(iOwner.CustomInterface(KECamMCameraPresets2Uid));
1.84 + }
1.85 +
1.86 +/**
1.87 +Destructor
1.88 +*/
1.89 +EXPORT_C CCamera::CCameraPresets::~CCameraPresets()
1.90 + {
1.91 + if (iImpl != NULL)
1.92 + {
1.93 + iImpl->Release();
1.94 + }
1.95 + if (iImpl2 != NULL)
1.96 + {
1.97 + iImpl2->Release();
1.98 + }
1.99 + }
1.100 +
1.101 +/**
1.102 +Gets the presets supported by the camera. These are identified by UIDs
1.103 +and relate to a known predefined outcome.
1.104 +The settings associated with a particular preset and their specific values
1.105 +and ranges are specific to each type of camera hardware and are therefore not defined by the API.
1.106 +
1.107 +@param aPresets
1.108 + An empty array of TUids which would be populated by the implementation with
1.109 + the specific supported values. If the array is empty on return,
1.110 + the camera does not support presets.
1.111 +
1.112 +@leave KErrNoMemory Out of memory.
1.113 +
1.114 +@note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.115 + application is not prepared to receive extra added uid values (new presets added). So, any extra uid value(unrecognised)
1.116 + passed from the implementation will be filtered at this point.
1.117 + To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.118 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values.
1.119 +
1.120 +@note Any preset uid, if added in future, has to have a uid value greater than KUidECamPresetFactoryDefaultUidValue
1.121 + otherwise unrecognized preset uids could not be checked.
1.122 +*/
1.123 +EXPORT_C void CCamera::CCameraPresets::GetSupportedPresetsL(RArray<TUid>& aPresets) const
1.124 + {
1.125 + iImpl->GetSupportedPresetsL(aPresets);
1.126 +
1.127 + /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.128 + application is not prepared to receive extra added uid values (new presets added). So, any extra uid value(unrecognised)
1.129 + passed from the implementation will be filtered at this point.
1.130 + To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.131 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values */
1.132 + FilterUnrecognisedUids(aPresets, KUidECamPresetFactoryDefaultUidValue);
1.133 + }
1.134 +
1.135 +/**
1.136 +Sets a specific preset supported by the device.
1.137 +All clients, implementing the MCameraObserver2 interface will receive a notification
1.138 +with the UID of the specific preset, signalling a new preset has been selected.
1.139 +
1.140 +@param aPreset
1.141 + The UID of the new requested preset.
1.142 +*/
1.143 +EXPORT_C void CCamera::CCameraPresets::SetPreset(TUid aPreset)
1.144 + {
1.145 + iImpl->SetPreset(aPreset);
1.146 + }
1.147 +
1.148 +/**
1.149 +Gets the current preset set on the camera.
1.150 +
1.151 +@return The UID of the current preset. If there is no active preset then the
1.152 + returned value is KNullUid.
1.153 +
1.154 +@note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not
1.155 + prepared to receive extra added uid values (new presets added). So, any extra uid(unrecognised) value received from the
1.156 + implementation will be mapped to KUidECamPresetFactoryDefault at this point.
1.157 + To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.158 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values
1.159 +*/
1.160 +EXPORT_C TUid CCamera::CCameraPresets::Preset() const
1.161 + {
1.162 + TUid preset = iImpl->Preset();
1.163 +
1.164 + /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not
1.165 + prepared to receive extra added uid values (new presets added). So, any extra uid(unrecognised) value received from the
1.166 + implementation will be mapped to KUidECamPresetFactoryDefault at this point.
1.167 + To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.168 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values */
1.169 + if(iOwner.CameraVersion() == KCameraDefaultVersion)
1.170 + {
1.171 + if(preset.iUid > KUidECamPresetFactoryDefaultUidValue)
1.172 + {
1.173 + preset = KUidECamPresetFactoryDefault;
1.174 + }
1.175 + }
1.176 +
1.177 + return preset;
1.178 + }
1.179 +
1.180 +/**
1.181 +Get all settings affected by the current preset. This is to say that all settings which
1.182 +are related to the preset in question will be included in the list, even though the value might
1.183 +not have changed.
1.184 +
1.185 +@param aSettings
1.186 + An empty array of TUids which would be populated by the implementation with
1.187 + the specific settings.
1.188 +
1.189 +@leave KErrNoMemory Out of memory.
1.190 +
1.191 +@note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.192 + application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed
1.193 + from the implementation will be filtered at this point.
1.194 + To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.195 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values
1.196 +*/
1.197 +EXPORT_C void CCamera::CCameraPresets::GetAffectedSettingsL(RArray<TUid>& aSettings) const
1.198 + {
1.199 + iImpl->GetAffectedSettingsL(aSettings);
1.200 +
1.201 + /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.202 + application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed
1.203 + from the implementation will be filtered at this point.
1.204 + To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.205 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values */
1.206 + FilterUnrecognisedUids(aSettings, KUidECamEventCameraSettingAutoFocusType2UidValue);
1.207 + }
1.208 +
1.209 +/**
1.210 +Get all settings associated with a specific preset, identified by a UID.
1.211 +This function does not require a preset to have been set prior the call as in
1.212 +GetAffectedSettingsL() function.
1.213 +The returned array will contain the UIDs of all settings which are associated and
1.214 +potentially affected by that particular preset.
1.215 +
1.216 +@param aPreset
1.217 + the UID of the preset in question.
1.218 +
1.219 +@param aSettings
1.220 + An empty array of TUids which would be populated by the implementation with
1.221 + the UIDs of the settings associated with that preset.
1.222 +
1.223 +@leave KErrArgument If the provided preset UID is not recognised.
1.224 +@leave KErrNoMemory Out of memory.
1.225 +
1.226 +@note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.227 + application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed
1.228 + from the implementation will be filtered at this point.
1.229 + To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.230 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values
1.231 +*/
1.232 +EXPORT_C void CCamera::CCameraPresets::GetAssociatedSettingsL(TUid aPreset, RArray<TUid>& aSettings) const
1.233 + {
1.234 + iImpl->GetAssociatedSettingsL(aPreset, aSettings);
1.235 +
1.236 + /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.237 + application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed
1.238 + from the implementation will be filtered at this point.
1.239 + To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.240 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values */
1.241 + FilterUnrecognisedUids(aSettings, KUidECamEventCameraSettingAutoFocusType2UidValue);
1.242 + }
1.243 +
1.244 +void CCamera::CCameraPresets::FilterUnrecognisedUids(RArray<TUid>& aUids, const TInt aBaselineUid) const
1.245 + {
1.246 + if(iOwner.CameraVersion() == KCameraDefaultVersion)
1.247 + {
1.248 + for(TInt index =0; index < aUids.Count(); index++)
1.249 + {
1.250 + /** aBaselineUid is the baseline. Any uid with greater uid value means that it has
1.251 + been added in later versions */
1.252 + if(aUids[index].iUid > aBaselineUid)
1.253 + {
1.254 + aUids.Remove(index);
1.255 + index--;
1.256 + }
1.257 + }
1.258 + }
1.259 + }
1.260 +
1.261 +/**
1.262 +Retrieves those settings for which ranges have been restricted in order to let the camera work in a given preset mode.
1.263 +The client will be notified of range restrictions through ECAM event KUidECamEventRangeRestricted. After receiving this
1.264 +notification, the client may use this method to retrieve those settings whose ranges have been restricted.
1.265 +
1.266 +@param aRangeRestrictedSettings
1.267 + An array of uids which represents those settings whose ranges have been restricted. These settings are ECam
1.268 + component wide. For each of the settings, the client can query about the restricted ranges in the usual way.
1.269 + Empty array indicates that there are no range restricted settings for the given preset.
1.270 +
1.271 +@leave May leave with any error code.
1.272 +
1.273 +@publishedPartner
1.274 +@prototype
1.275 +*/
1.276 +EXPORT_C void CCamera::CCameraPresets::GetRangeRestrictedSettingsL(RArray<TUid>& aRangeRestrictedSettings) const
1.277 + {
1.278 + if(iImpl2 != NULL)
1.279 + {
1.280 + iImpl2->GetRangeRestrictedSettingsL(aRangeRestrictedSettings);
1.281 + }
1.282 + else
1.283 + {
1.284 + User::Leave(KErrNotSupported);
1.285 + }
1.286 + }
1.287 +
1.288 +/**
1.289 +Retrieves those settings which have been restricted (settings no longer supported) in order to let the camera work in
1.290 +a given preset mode.
1.291 +The client will be notified of feature restrictions through ECAM event KUidECamEventFeatureRestricted. After receiving
1.292 +this notification, the client may use this method to retrieve these settings.
1.293 +
1.294 +@param aFeatureRestrictedSettings
1.295 + An array of uids which represents those settings which have been restricted. These settings are ECam
1.296 + component wide. Empty array indicates that there are no settings which have been been restricted for
1.297 + the given preset.
1.298 +
1.299 +@leave May leave with any error code.
1.300 +
1.301 +@publishedPartner
1.302 +@prototype
1.303 +*/
1.304 +EXPORT_C void CCamera::CCameraPresets::GetFeatureRestrictedSettingsL(RArray<TUid>& aFeatureRestrictedSettings) const
1.305 + {
1.306 + if(iImpl2 != NULL)
1.307 + {
1.308 + iImpl2->GetFeatureRestrictedSettingsL(aFeatureRestrictedSettings);
1.309 + }
1.310 + else
1.311 + {
1.312 + User::Leave(KErrNotSupported);
1.313 + }
1.314 + }
1.315 +
1.316 +/**
1.317 +Retrieves information about whether the preset unlock feature is supported or not. Unlocking the preset helps in making
1.318 +further setting changes after the camera works in a particular preset mode.
1.319 +
1.320 +@param aUnlockSupported
1.321 + ETrue indicates preset unlock feature is supported.
1.322 + EFalse indicates preset lock feature is not supported.
1.323 +
1.324 +@leave May leave with any error code.
1.325 +
1.326 +@publishedPartner
1.327 +@prototype
1.328 +*/
1.329 +EXPORT_C void CCamera::CCameraPresets::IsPresetUnlockSupportedL(TBool& aUnlockSupported) const
1.330 + {
1.331 + if(iImpl2 != NULL)
1.332 + {
1.333 + iImpl2->IsPresetUnlockSupportedL(aUnlockSupported);
1.334 + }
1.335 + else
1.336 + {
1.337 + User::Leave(KErrNotSupported);
1.338 + }
1.339 + }
1.340 +
1.341 +/**
1.342 +Locks the preset for any further setting changes.
1.343 +
1.344 +@note Event KUidECamEventPresetLocked is used to notify clients that the preset has been locked.
1.345 +
1.346 +@publishedPartner
1.347 +@prototype
1.348 +*/
1.349 +EXPORT_C void CCamera::CCameraPresets::LockPresetL()
1.350 + {
1.351 + if(iImpl2 != NULL)
1.352 + {
1.353 + iImpl2->LockPreset();
1.354 + }
1.355 + else
1.356 + {
1.357 + User::Leave(KErrNotSupported);
1.358 + }
1.359 + }
1.360 +
1.361 +/**
1.362 +Unlocks the preset to apply further setting changes.
1.363 +
1.364 +@note Event KUidECamEventPresetUnlocked is used to notify clients that the preset has been unlocked.
1.365 +
1.366 +@publishedPartner
1.367 +@prototype
1.368 +*/
1.369 +EXPORT_C void CCamera::CCameraPresets::UnlockPresetL()
1.370 + {
1.371 + if(iImpl2 != NULL)
1.372 + {
1.373 + iImpl2->UnlockPreset();
1.374 + }
1.375 + else
1.376 + {
1.377 + User::Leave(KErrNotSupported);
1.378 + }
1.379 + }
1.380 +
1.381 +/**
1.382 +Factory function for creating the CCameraAdvancedSettings object.
1.383 +
1.384 +@param aCamera
1.385 + a reference to a CCamera object providing the settings.
1.386 +
1.387 +@return a pointer to a fully constructed CCameraAdvancedSettings object.
1.388 +
1.389 +@leave KErrNoMemory Out of memory or any other system-wide error code.
1.390 +
1.391 +@note Clients using MCameraObserver are not recommended to use this extension class since they cannot handle events.
1.392 +*/
1.393 +EXPORT_C CCamera::CCameraAdvancedSettings* CCamera::CCameraAdvancedSettings::NewL(CCamera& aCamera)
1.394 + {
1.395 + CCamera::CCameraAdvancedSettings* self = new (ELeave)CCamera::CCameraAdvancedSettings(aCamera);
1.396 + CleanupStack::PushL(self);
1.397 + self->ConstructL();
1.398 + CleanupStack::Pop(self);
1.399 +
1.400 + return self;
1.401 + }
1.402 +
1.403 +/**
1.404 +CCameraAdvancedSettings Constructor.
1.405 +
1.406 +@param aOwner
1.407 + a reference to a CCamera object providing the settings.
1.408 +*/
1.409 +EXPORT_C CCamera::CCameraAdvancedSettings::CCameraAdvancedSettings(CCamera& aOwner) : iOwner(aOwner), iImpl(NULL), iImpl2(NULL), iImpl3(NULL), iImpl4(NULL)
1.410 + {
1.411 + }
1.412 +
1.413 +/**
1.414 +CCameraAdvancedSettings second phase constructor.
1.415 +
1.416 +Function used to initialise internal state of the object. Uses reference to the camera to retrieve
1.417 +Camera advanced settings interface pointer.
1.418 +
1.419 +@leave KErrNoMemory Out of memory.
1.420 +*/
1.421 +EXPORT_C void CCamera::CCameraAdvancedSettings::ConstructL()
1.422 + {
1.423 + iImpl = static_cast<MCameraAdvancedSettings*>(iOwner.CustomInterface(KECamMCameraAdvancedSettingsUid));
1.424 + if (iImpl == NULL)
1.425 + {
1.426 + User::Leave(KErrNotSupported);
1.427 + }
1.428 + iImpl2 = static_cast<MCameraAdvancedSettings2*>(iOwner.CustomInterface(KECamMCameraAdvancedSettings2Uid));
1.429 + iImpl3 = static_cast<MCameraAdvancedSettings3*>(iOwner.CustomInterface(KECamMCameraAdvancedSettings3Uid));
1.430 + iImpl4 = static_cast<MCameraAdvancedSettings4*>(iOwner.CustomInterface(KECamMCameraAdvancedSettings4Uid));
1.431 + }
1.432 +
1.433 +/**
1.434 +Destructor
1.435 +*/
1.436 +EXPORT_C CCamera::CCameraAdvancedSettings::~CCameraAdvancedSettings()
1.437 + {
1.438 + if (iImpl != NULL)
1.439 + {
1.440 + iImpl->Release();
1.441 + }
1.442 + if (iImpl2 != NULL)
1.443 + {
1.444 + iImpl2->Release();
1.445 + }
1.446 + if (iImpl3 != NULL)
1.447 + {
1.448 + iImpl3->Release();
1.449 + }
1.450 + if (iImpl4 != NULL)
1.451 + {
1.452 + iImpl4->Release();
1.453 + }
1.454 + }
1.455 +
1.456 +/**
1.457 +Gets the type of this camera.
1.458 +@see TCameraType
1.459 +
1.460 +@return the type of this camera
1.461 +*/
1.462 +EXPORT_C CCamera::CCameraAdvancedSettings::TCameraType CCamera::CCameraAdvancedSettings::CameraType() const
1.463 + {
1.464 + return iImpl->CameraType();
1.465 + }
1.466 +
1.467 +/**
1.468 +Get the type of a specific camera denoted by its index. A pluggable camera
1.469 +may not necessarily be physically present. The type denotes whether the slot allocated
1.470 +to that index is for pluggable or onboard camera.
1.471 +@see TCameraType
1.472 +
1.473 +@param aCameraIndex
1.474 + An integer in the range of [0: CCamera::CamerasAvailable()-1].
1.475 +
1.476 +@return the TCameraType value for the specific camera.
1.477 + If the index is out of range, the return value is ECameraUnknown.
1.478 +*/
1.479 +EXPORT_C CCamera::CCameraAdvancedSettings::TCameraType CCamera::CCameraAdvancedSettings::CameraType(TInt aCameraIndex)
1.480 + {
1.481 + return iImpl->CameraType(aCameraIndex);
1.482 + }
1.483 +
1.484 +/**
1.485 +Checks whether the current camera is present.
1.486 +
1.487 +@return Whether the camera is currently present.
1.488 + ETrue if camera is present, EFalse otherwise.
1.489 + For example ECameraOnBoard (built-in) cameras are always present.
1.490 +*/
1.491 +EXPORT_C TBool CCamera::CCameraAdvancedSettings::IsCameraPresent() const
1.492 + {
1.493 + return iImpl->IsCameraPresent();
1.494 + }
1.495 +
1.496 +/**
1.497 +Checks whether the camera, denoted by its index, is currently present.
1.498 +The index uniquely identifies the camera on the device.
1.499 +
1.500 +@param aCameraIndex
1.501 + An integer in the range of [0:CCamera::CamerasAvailable()-1] specifying the
1.502 + camera device to use
1.503 +
1.504 +@return Whether the camera is currently present.
1.505 + ETrue if camera is present, EFalse otherwise.
1.506 + For example built-in (ECameraOnBoard) cameras
1.507 + are always present.
1.508 +*/
1.509 +EXPORT_C TBool CCamera::CCameraAdvancedSettings::IsCameraPresent(TInt aCameraIndex)
1.510 + {
1.511 + return iImpl->IsCameraPresent(aCameraIndex);
1.512 + }
1.513 +
1.514 +/**
1.515 +Gets current camera index. The index uniquely identifies the camera on the device.
1.516 +
1.517 +@return camera index in the inclusive range of [0:CCamera::CamerasAvailable() - 1].
1.518 +*/
1.519 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::CameraIndex() const
1.520 + {
1.521 + return iImpl->CameraIndex();
1.522 + }
1.523 +
1.524 +/**
1.525 +Gets all of the supported stabilization modes on the camera. The result is a bitfield
1.526 +of the valid TStabilizationMode flags.
1.527 +@see TStabilizationMode
1.528 +
1.529 +@return a bitfield of all supported stabilization modes.
1.530 +*/
1.531 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedStabilizationModes() const
1.532 + {
1.533 + return iImpl->SupportedStabilizationModes();
1.534 + }
1.535 +
1.536 +/**
1.537 +Gets current stabilization mode on the camera.
1.538 +The result is a valid TStabilizationMode value.
1.539 +
1.540 +@return current stabilization mode of type TStabilizationMode.
1.541 +*/
1.542 +EXPORT_C CCamera::CCameraAdvancedSettings::TStabilizationMode CCamera::CCameraAdvancedSettings::StabilizationMode() const
1.543 + {
1.544 + return iImpl->StabilizationMode();
1.545 + }
1.546 +
1.547 +/**
1.548 +Sets a specific stabilization mode on the camera.
1.549 +
1.550 +Stabilization mode change fires a KUidECamEventCameraSettingStabilizationMode
1.551 +event to all MCameraObserver2 clients of this specific camera.
1.552 +
1.553 +@param aStabilizationMode
1.554 + new stabilization mode of TStabilizationMode type.
1.555 +*/
1.556 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetStabilizationMode(CCamera::CCameraAdvancedSettings::TStabilizationMode aStabilizationMode)
1.557 + {
1.558 + iImpl->SetStabilizationMode(aStabilizationMode);
1.559 + }
1.560 +
1.561 +/**
1.562 +Gets all of the supported focus modes on the camera. The result is a bitfield
1.563 +of the valid TFocusMode flags.
1.564 +@see TFocusMode
1.565 +
1.566 +@return a bitfield of all supported focus modes.
1.567 +*/
1.568 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedFocusModes() const
1.569 + {
1.570 + return iImpl->SupportedFocusModes();
1.571 + }
1.572 +
1.573 +/**
1.574 +Gets current focus mode on the camera.
1.575 +The result is a valid TFocusMode value.
1.576 +
1.577 +@return current focus mode.
1.578 +*/
1.579 +EXPORT_C CCamera::CCameraAdvancedSettings::TFocusMode CCamera::CCameraAdvancedSettings::FocusMode() const
1.580 + {
1.581 + return iImpl->FocusMode();
1.582 + }
1.583 +
1.584 +/**
1.585 +Sets a specific focus mode on the camera.
1.586 +Focus mode change fires a KUidECamEventCameraSettingFocusMode event
1.587 +to all MCameraObserver2 clients of the camera.
1.588 +
1.589 +@param aFocusMode
1.590 + new focus mode of TFocusMode type.
1.591 +*/
1.592 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetFocusMode(CCamera::CCameraAdvancedSettings::TFocusMode aFocusMode)
1.593 + {
1.594 + iImpl->SetFocusMode(aFocusMode);
1.595 + }
1.596 +
1.597 +/**
1.598 +Gets all supported focus ranges on the camera.
1.599 +
1.600 +@return an integer - a bitfield of all supported TFocusRange values.
1.601 +
1.602 +@note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.603 + application is not prepared to receive extra added enum values. So, any extra enum value passed
1.604 + from the implementation will be filtered at this point.
1.605 + To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.606 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values
1.607 +*/
1.608 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedFocusRanges() const
1.609 + {
1.610 + TInt supportedFocusRanges = iImpl->SupportedFocusRanges();
1.611 +
1.612 + /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.613 + application is not prepared to receive extra added enum values. So, any extra enum value passed
1.614 + from the implementation will be filtered at this point.
1.615 + To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.616 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values */
1.617 + if(iOwner.CameraVersion() == KCameraDefaultVersion)
1.618 + {
1.619 + supportedFocusRanges &= KBaselinedFocusRanges;
1.620 + }
1.621 +
1.622 + return supportedFocusRanges;
1.623 + }
1.624 +
1.625 +/**
1.626 +Gets current focus range on the camera.
1.627 +
1.628 +@return the current TFocusRange value.
1.629 +
1.630 +@note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.631 + application is not prepared to receive extra added enum values. So, any extra enum value received
1.632 + from the implementation will be dropped and EFocusRangeAuto would be passed instead.
1.633 + To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.634 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values
1.635 +*/
1.636 +EXPORT_C CCamera::CCameraAdvancedSettings::TFocusRange CCamera::CCameraAdvancedSettings::FocusRange() const
1.637 + {
1.638 + CCamera::CCameraAdvancedSettings::TFocusRange focusRange = iImpl->FocusRange();
1.639 +
1.640 + /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.641 + application is not prepared to receive extra added enum values. So, any extra enum value received
1.642 + from the implementation will be dropped and EFocusRangeAuto would be passed instead.
1.643 + To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.644 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values */
1.645 + if(iOwner.CameraVersion() == KCameraDefaultVersion)
1.646 + {
1.647 + if(static_cast<TInt>(focusRange) > KBaselinedFocusRanges)
1.648 + {
1.649 + focusRange = CCamera::CCameraAdvancedSettings::EFocusRangeAuto;
1.650 + }
1.651 + }
1.652 +
1.653 + return focusRange;
1.654 + }
1.655 +
1.656 +/**
1.657 +Sets a specific focus range on the camera.
1.658 +The focus range change fires both, KUidECamEventCameraSettingFocusRange and
1.659 +KUidECamEventCameraSettingFocusRange2 event to all MCameraObserver2 clients of the camera.
1.660 +@see KUidECamEventCameraSettingFocusRange
1.661 +
1.662 +@param aFocusRange
1.663 + newly selected focus range.
1.664 +*/
1.665 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetFocusRange(CCamera::CCameraAdvancedSettings::TFocusRange aFocusRange)
1.666 + {
1.667 + iImpl->SetFocusRange(aFocusRange);
1.668 + }
1.669 +
1.670 +/**
1.671 +Gets all supported auto focus types on the camera.
1.672 +
1.673 +@return an integer - a bitfield of all supported TAutoFocusType values.
1.674 +*/
1.675 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedAutoFocusTypes() const
1.676 + {
1.677 + return iImpl->SupportedAutoFocusTypes();
1.678 + }
1.679 +
1.680 +/**
1.681 +Gets current auto focus type on the camera.
1.682 +@see TAutoFocusType
1.683 +
1.684 +@return a CCamera::TAutoFocusType value.
1.685 +*/
1.686 +EXPORT_C CCamera::CCameraAdvancedSettings::TAutoFocusType CCamera::CCameraAdvancedSettings::AutoFocusType() const
1.687 + {
1.688 + return iImpl->AutoFocusType();
1.689 + }
1.690 +
1.691 +/**
1.692 +Sets a specific auto focus type on the camera.
1.693 +The focus type change fires both, KUidECamEventCameraSettingAutoFocusType and
1.694 +KUidECamEventCameraSettingAutoFocusType2 event to all MCameraObserver2 clients of the camera.
1.695 +@see KUidECamEventCameraSettingAutoFocusType
1.696 +
1.697 +@param aAutoFocusType
1.698 + Autofocus selection.
1.699 +*/
1.700 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetAutoFocusType(CCamera::CCameraAdvancedSettings::TAutoFocusType aAutoFocusType)
1.701 + {
1.702 + iImpl->SetAutoFocusType(aAutoFocusType);
1.703 + }
1.704 +
1.705 +/**
1.706 +Gets all supported auto focus areas on the camera.
1.707 +
1.708 +@return an integer - a bitfield of al supported TAutoFocusArea values.
1.709 +*/
1.710 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedAutoFocusAreas() const
1.711 + {
1.712 + return iImpl->SupportedAutoFocusAreas();
1.713 + }
1.714 +
1.715 +/**
1.716 +Gets current chosen auto focus area on the camera.
1.717 +
1.718 +@return a CCamera::TAutoFocusArea value.
1.719 +*/
1.720 +EXPORT_C CCamera::CCameraAdvancedSettings::TAutoFocusArea CCamera::CCameraAdvancedSettings::AutoFocusArea() const
1.721 + {
1.722 + return iImpl->AutoFocusArea();
1.723 + }
1.724 +
1.725 +/**
1.726 +Sets a specific auto focus area on the camera.
1.727 +Focus area change fires a KUidECamEventCameraSettingAutoFocusArea event
1.728 +to all MCameraObserver2 clients of the camera.
1.729 +
1.730 +@param aAutoFocusArea
1.731 + Autofocus area selection.
1.732 +*/
1.733 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetAutoFocusArea(CCamera::CCameraAdvancedSettings::TAutoFocusArea aAutoFocusArea)
1.734 + {
1.735 + iImpl->SetAutoFocusArea(aAutoFocusArea);
1.736 + }
1.737 +
1.738 +/**
1.739 +Get focus distance in millimetres.
1.740 +
1.741 +@return the current focus distance in millimetres, directly from user setting of lenses.
1.742 +*/
1.743 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::FocusDistance() const
1.744 + {
1.745 + return iImpl->FocusDistance();
1.746 + }
1.747 +
1.748 +/**
1.749 +Set focus distance in millimetres. Focus distance change fires a KUidECamEventCameraSettingFocusDistance event
1.750 +to all MCameraObserver2 clients of the camera.
1.751 +
1.752 +@param aDistance
1.753 + the new distance value in millimetres.
1.754 +
1.755 +@note KUidECamEvent2CameraSettingFocusDistance may be used to provide the focussing feedback as well. This means that
1.756 + the feedback will state whether the proper focussing has been achieved after setting the given focus distance.
1.757 +*/
1.758 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetFocusDistance(TInt aDistance)
1.759 + {
1.760 + iImpl->SetFocusDistance(aDistance);
1.761 + }
1.762 +
1.763 +/**
1.764 +Get minimum focus distance in millimetres
1.765 +
1.766 +@return the minimum (35 camera equivalent) focal length of a camera.
1.767 +@note Current Focal length is calculated as focalLength = opticalZoom * minFocalLength;
1.768 +*/
1.769 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::GetMinFocalLength() const
1.770 + {
1.771 + return iImpl->GetMinFocalLength();
1.772 + }
1.773 +
1.774 +/**
1.775 +Gets the set of camera supported ISO rates.
1.776 +
1.777 +@param aSupportedIsoRates
1.778 + an array of integers which gets filled with the supported ISO rates.
1.779 +
1.780 +@note When camera device is incapable of revealing the ISO rates supported, it has to be assumed that
1.781 + camera will work only on the permanently set value. If this value is not known, empty array may be
1.782 + returned; corresponding getter/setters for this feature should not be used in such a case.
1.783 +*/
1.784 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetSupportedIsoRatesL(RArray<TInt>& aSupportedIsoRates) const
1.785 + {
1.786 + iImpl->GetSupportedIsoRatesL(aSupportedIsoRates);
1.787 + }
1.788 +
1.789 +/**
1.790 +Gets current ISO rate.
1.791 +
1.792 +@return current ISO rate as a TInt value.
1.793 + Negative value returned means error case (system wide error code) and positive value means current ISO rate.
1.794 +
1.795 +@note The returned value may be checked with the list of supported ISO rates. If value returned does not belong to
1.796 + this list, then it may be treated as an error case.
1.797 +*/
1.798 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::IsoRate() const
1.799 + {
1.800 + return iImpl->IsoRate();
1.801 + }
1.802 +
1.803 +/**
1.804 +Set current ISO rate for the camera.
1.805 +Triggers KUidECamEventCameraSettingIsoRate to all MCameraObserver2 clients of the camera.
1.806 +
1.807 +@param aRate
1.808 + required new ISO rate.
1.809 +*/
1.810 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetIsoRate(TInt aRate)
1.811 + {
1.812 + iImpl->SetIsoRate(aRate);
1.813 + }
1.814 +
1.815 +/**
1.816 +Gets the current discrete aperture steps (F-stops) supported by the camera.
1.817 +
1.818 +@param aFStops
1.819 + A reference to an empty array of TInt which would be populated by the implementation with
1.820 + the specific supported values. If the array is empty on return,
1.821 + the camera supports all integer values in the aperture range. Each value is multiplied by
1.822 + a factor of KECamFineResolutionFactor.
1.823 +
1.824 +@param aInfo
1.825 + a reference to TValueInfo, which establishes the type of the returned data.
1.826 +
1.827 +@leave KErrNoMemory Out of memory.
1.828 +
1.829 +@note When camera device is incapable of revealing the aperture openings supported, it has to be assumed that
1.830 + camera will work only on the parmanently set value. If this value is not known, empty array may be
1.831 + returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.
1.832 +*/
1.833 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetAperturesL(RArray<TInt>& aFStops, TValueInfo& aInfo) const
1.834 + {
1.835 + iImpl->GetAperturesL(aFStops, aInfo);
1.836 + }
1.837 +
1.838 +/**
1.839 +Get current aperture value.
1.840 +The default aperture value is ECAM implementation specific and could be either auto aperture or any other supported value.
1.841 +
1.842 +@return Current aperture value as an integer, multiplied by KECamFineResolutionFactor.
1.843 + For example the function will return 280 for the actual aperture of F2.8.
1.844 + Negative value returned means error case (system wide error code) and positive value means current aperture.
1.845 +*/
1.846 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::Aperture() const
1.847 + {
1.848 + return iImpl->Aperture();
1.849 + }
1.850 +
1.851 +/**
1.852 +Set a new aperture value.
1.853 +All MCameraObserver2 clients of the camera receive a KUidECamEventCameraSettingAperture
1.854 +event notification when aperture value is changed.
1.855 +
1.856 +@param aFStop
1.857 + a new aperture value in the supported by the camera range.
1.858 +
1.859 +@note The aperture parameter value is an integer, multiplied by KECamFineResolutionFactor.
1.860 + For example to set an aperture of F2.8, call SetAperture(280).
1.861 +
1.862 +*/
1.863 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetAperture(TInt aFStop)
1.864 + {
1.865 + iImpl->SetAperture(aFStop);
1.866 + }
1.867 +
1.868 +/**
1.869 +Gets the set of supported shutter speeds.
1.870 +
1.871 +@param aShutterSpeeds
1.872 + a reference to an RArray of TInt representing the discrete shutter speeds supported
1.873 + currently by the camera.
1.874 +
1.875 +@param aInfo
1.876 + a reference to TValueInfo, which establishes the type of the returned data.
1.877 +
1.878 +@return the populated array with all shutter speeds in microseconds.
1.879 +
1.880 +@leave KErrNoMemory Out of memory.
1.881 +
1.882 +@note When camera device is incapable of revealing the shutter speeds supported, it has to be assumed that
1.883 + camera will work only on the parmanently set value. If this value is not known, empty array may be
1.884 + returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.
1.885 +*/
1.886 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetShutterSpeedsL(RArray<TInt>& aShutterSpeeds, TValueInfo& aInfo) const
1.887 + {
1.888 + iImpl->GetShutterSpeedsL(aShutterSpeeds, aInfo);
1.889 + }
1.890 +
1.891 +/**
1.892 +Gets the current shutter speed
1.893 +
1.894 +@return the current shutter speed in microseconds.
1.895 + Negative value returned means error case (system wide error code) and positive value means current shutter speed.
1.896 +*/
1.897 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::ShutterSpeed() const
1.898 + {
1.899 + return iImpl->ShutterSpeed();
1.900 + }
1.901 +
1.902 +/**
1.903 +Sets the current shutter speed. When set, all MCameraObserver2 clients of the camera
1.904 +receive a KUidECamEventCameraSettingShutterSpeed event
1.905 +
1.906 +@param aShutterSpeed
1.907 + the required shutter speed in microseconds.
1.908 +*/
1.909 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetShutterSpeed(TInt aShutterSpeed)
1.910 + {
1.911 + iImpl->SetShutterSpeed(aShutterSpeed);
1.912 + }
1.913 +
1.914 +/**
1.915 +Get all supported metering modes on this camera represented as bitfield of type TMeteringMode.
1.916 +
1.917 +@return the set of supported metering modes.
1.918 +*/
1.919 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedMeteringModes() const
1.920 + {
1.921 + return iImpl->SupportedMeteringModes();
1.922 + }
1.923 +
1.924 +/**
1.925 +Get current metering mode.
1.926 +
1.927 +@return a value of type TMeteringMode.
1.928 +*/
1.929 +EXPORT_C CCamera::CCameraAdvancedSettings::TMeteringMode CCamera::CCameraAdvancedSettings::MeteringMode() const
1.930 + {
1.931 + return iImpl->MeteringMode();
1.932 + }
1.933 +
1.934 +/**
1.935 +Set the current metering mode. When set, all MCameraObserver2 clients are notified
1.936 +with a KUidECamEventCameraSettingMeteringMode event.
1.937 +
1.938 +@param aMeteringMode
1.939 + new selection for metering mode of type TMeteringMode.
1.940 +*/
1.941 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetMeteringMode(CCamera::CCameraAdvancedSettings::TMeteringMode aMeteringMode)
1.942 + {
1.943 + iImpl->SetMeteringMode(aMeteringMode);
1.944 + }
1.945 +
1.946 +/**
1.947 +Get all supported drive modes as bitfields of TDriveMode type.
1.948 +
1.949 +@return the set of supported drive modes.
1.950 +*/
1.951 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedDriveModes() const
1.952 + {
1.953 + TInt supportedDriveModes = iImpl->SupportedDriveModes();
1.954 +
1.955 + /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.956 + application is not prepared to receive extra added enum values. So, any extra enum value passed
1.957 + from the implementation will be filtered at this point.
1.958 + To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.959 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values */
1.960 + if(iOwner.CameraVersion() == KCameraDefaultVersion)
1.961 + {
1.962 + supportedDriveModes &= KBaselinedDriveMode;
1.963 + }
1.964 +
1.965 + return supportedDriveModes;
1.966 + }
1.967 +
1.968 +/**
1.969 +Gets currently active drive mode.
1.970 +
1.971 +@return current drive mode.
1.972 +*/
1.973 +EXPORT_C CCamera::CCameraAdvancedSettings::TDriveMode CCamera::CCameraAdvancedSettings::DriveMode() const
1.974 + {
1.975 + CCamera::CCameraAdvancedSettings::TDriveMode driveMode = iImpl->DriveMode();
1.976 +
1.977 + /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.978 + application is not prepared to receive extra added enum values. So, any extra enum value received
1.979 + from the implementation will be dropped and EDriveModeAuto would be passed instead.
1.980 + To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.981 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values */
1.982 + if(iOwner.CameraVersion() == KCameraDefaultVersion)
1.983 + {
1.984 + if(static_cast<TUint>(driveMode) > KBaselinedDriveMode)
1.985 + {
1.986 + driveMode = CCamera::CCameraAdvancedSettings::EDriveModeAuto;
1.987 + }
1.988 + }
1.989 +
1.990 + return driveMode;
1.991 + }
1.992 +
1.993 +/**
1.994 +Set the current metering mode. When set all MCameraObserver2 clients are notified with
1.995 +KUidECamEventCameraSettingDriveMode.
1.996 +
1.997 +@param aDriveMode
1.998 + new selection for drive mode value of type TDriveMode.
1.999 +
1.1000 +@note Unless reduced Latency scheme is not used (ie CaptureImageL(TInt aSequenceNumber) or StartPerformantVideoCaptureL())
1.1001 + if an image/video capture is still outstanding, this method may report error KErrInUse.
1.1002 +*/
1.1003 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetDriveMode(CCamera::CCameraAdvancedSettings::TDriveMode aDriveMode)
1.1004 + {
1.1005 + iImpl->SetDriveMode(aDriveMode);
1.1006 + }
1.1007 +
1.1008 +/**
1.1009 +Get all supported bracket modes as bitfields.
1.1010 +
1.1011 +@return the set of all supported bracket modes as an integer.
1.1012 +*/
1.1013 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedBracketModes() const
1.1014 + {
1.1015 + return iImpl->SupportedBracketModes();
1.1016 + }
1.1017 +
1.1018 +/**
1.1019 +Get current bracket mode.
1.1020 +
1.1021 +@return the current bracket mode TBracketMode.
1.1022 +*/
1.1023 +EXPORT_C CCamera::CCameraAdvancedSettings::TBracketMode CCamera::CCameraAdvancedSettings::BracketMode() const
1.1024 + {
1.1025 + return iImpl->BracketMode();
1.1026 + }
1.1027 +
1.1028 +/**
1.1029 +Set new bracket mode. All MCameraObserver2 clients are notified with
1.1030 +KUidECamEventCameraSettingBracketMode.
1.1031 +
1.1032 +@param aBracketMode
1.1033 + new selection for bracket mode of type TBracketMode.
1.1034 +*/
1.1035 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetBracketMode(CCamera::CCameraAdvancedSettings::TBracketMode aBracketMode)
1.1036 + {
1.1037 + iImpl->SetBracketMode(aBracketMode);
1.1038 + }
1.1039 +
1.1040 +/**
1.1041 +Get all supported bracket parameters as bitfields.
1.1042 +
1.1043 +@return the set of all currently supported bracket modes.
1.1044 +*/
1.1045 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedBracketParameters() const
1.1046 + {
1.1047 + return iImpl->SupportedBracketParameters();
1.1048 + }
1.1049 +
1.1050 +/**
1.1051 +Get current bracket parameter.
1.1052 +
1.1053 +@return the current bracket mode TBracketParameter.
1.1054 +*/
1.1055 +EXPORT_C CCamera::CCameraAdvancedSettings::TBracketParameter CCamera::CCameraAdvancedSettings::BracketParameter() const
1.1056 + {
1.1057 + return iImpl->BracketParameter();
1.1058 + }
1.1059 +
1.1060 +/**
1.1061 +Set new bracket parameter
1.1062 +When set all clients are notified with
1.1063 +KUidECamEventCameraSettingBracketParameter.
1.1064 +
1.1065 +@param aBracketParameter
1.1066 + new selection for parameter type of type TBracketParameter.
1.1067 +*/
1.1068 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetBracketParameter(CCamera::CCameraAdvancedSettings::TBracketParameter aBracketParameter)
1.1069 + {
1.1070 + iImpl->SetBracketParameter(aBracketParameter);
1.1071 + }
1.1072 +
1.1073 +/**
1.1074 +Get all supported bracket steps as bitfields.
1.1075 +
1.1076 +@return the set of all supported bracket modes.
1.1077 +*/
1.1078 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedBracketSteps() const
1.1079 + {
1.1080 + return iImpl->SupportedBracketSteps();
1.1081 + }
1.1082 +
1.1083 +/**
1.1084 +Get current bracket step.
1.1085 +
1.1086 +@return the current bracket mode TBracketStep.
1.1087 +*/
1.1088 +EXPORT_C CCamera::CCameraAdvancedSettings::TBracketStep CCamera::CCameraAdvancedSettings::BracketStep() const
1.1089 + {
1.1090 + return iImpl->BracketStep();
1.1091 + }
1.1092 +
1.1093 +/**
1.1094 +Set new bracket step. All MCameraObserver2 clients are notified with
1.1095 +KUidECamEventCameraSettingBracketStep.
1.1096 +
1.1097 +@param aBracketStep
1.1098 + new selection for step of type TBracketStep.
1.1099 +*/
1.1100 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetBracketStep(CCamera::CCameraAdvancedSettings::TBracketStep aBracketStep)
1.1101 + {
1.1102 + iImpl->SetBracketStep(aBracketStep);
1.1103 + }
1.1104 +
1.1105 +/**
1.1106 +Gets the settings for which frames to merge. Valid only in EDriveModeBracketMerge mode.
1.1107 +@note there must be at least two images to merge. All are assumed to form a sequence and
1.1108 + are identified using the first frame index and number of frames e.g. to merge two frames - one
1.1109 + on and one +1, when in EBracketMode3Image, one sets the start index to 1 and frames to two.
1.1110 +@note It is very much TBracketMode setting dependent operation.
1.1111 +
1.1112 +@param aStartIndex
1.1113 + the index of the start frame, starts from 0.
1.1114 +
1.1115 +@param aFrames
1.1116 + the number of frames to be merged.
1.1117 +*/
1.1118 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetBracketMerge(TInt& aStartIndex, TInt& aFrames) const
1.1119 + {
1.1120 + iImpl->GetBracketMerge(aStartIndex, aFrames);
1.1121 + }
1.1122 +
1.1123 +/**
1.1124 +Sets the settings for which frames to merge. Valid only in EDriveModeBracketMerge mode.
1.1125 +@note there must be at least two images to merge. All are assumed to form a sequence and
1.1126 + are identified using the first frame index and number of frames e.g. to merge two frames - one
1.1127 + on and one +1, when in EBracketMode3Image, one sets the start index to 1 and frames to 2.
1.1128 + MCameraObserver2 clients are notified with a KUidECamEventBracketMerge event.
1.1129 +
1.1130 +@note It is very TBracketMode setting dependent.
1.1131 +
1.1132 +@param aStartIndex
1.1133 + the index of the start frame, starts from 0.
1.1134 +
1.1135 +@param aFrames
1.1136 + the number of frames to be merged.
1.1137 +*/
1.1138 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetBracketMerge(TInt aStartIndex, TInt aFrames)
1.1139 + {
1.1140 + iImpl->SetBracketMerge(aStartIndex, aFrames);
1.1141 + }
1.1142 +
1.1143 +/**
1.1144 +Get camera all supported flash modes CCamera::TFlash
1.1145 +
1.1146 +@return the set of all supported flash modes as bitfields in an integer.
1.1147 +@note Some of the flash modes are available only for clients using either CCamera::New2L() or CCamera::NewDuplicate2L()
1.1148 +@see CCamera::TFlash
1.1149 +*/
1.1150 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedFlashModes() const
1.1151 + {
1.1152 + TInt modes = iImpl->SupportedFlashModes();
1.1153 + if (iOwner.CameraVersion() == KCameraDefaultVersion)
1.1154 + {
1.1155 + modes &= KBaselinedFlashModeMask;
1.1156 + }
1.1157 + return modes;
1.1158 + }
1.1159 +
1.1160 +/**
1.1161 +Gets the currently set flash mode.
1.1162 +
1.1163 +@return The currently set flash mode.
1.1164 +@note Clients not using the CCamera::New2L() or CCamera::NewDuplicate2L() would be given CCamera::EFlashAuto
1.1165 + if current flash mode exceeds CCamera::EFlashManual
1.1166 +@see CCamera::TFlash
1.1167 +*/
1.1168 +EXPORT_C CCamera::TFlash CCamera::CCameraAdvancedSettings::FlashMode() const
1.1169 + {
1.1170 + TInt mode = iImpl->FlashMode();
1.1171 + if (iOwner.CameraVersion() == KCameraDefaultVersion && mode > KBaselinedFlashModeMask)
1.1172 + {
1.1173 + mode = EFlashAuto;
1.1174 + }
1.1175 + return static_cast<CCamera::TFlash>(mode);
1.1176 + }
1.1177 +
1.1178 +/**
1.1179 +Sets the flash mode.
1.1180 +
1.1181 +Triggers a KUidECamEventCameraSettingFlashMode event to all camera
1.1182 +MCameraObserver2 clients.
1.1183 +
1.1184 +@param aMode
1.1185 + The required flash mode.
1.1186 +*/
1.1187 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetFlashMode(CCamera::TFlash aMode)
1.1188 + {
1.1189 + iImpl->SetFlashMode(aMode);
1.1190 + }
1.1191 +
1.1192 +/**
1.1193 +Gets whether the flash red eye reduction is switched on.
1.1194 +
1.1195 +@return The present state - ETrue for switched on and EFalse for switched off.
1.1196 +*/
1.1197 +EXPORT_C TBool CCamera::CCameraAdvancedSettings::RedEyeReduceOn() const
1.1198 + {
1.1199 + return iImpl->RedEyeReduceOn();
1.1200 + }
1.1201 +
1.1202 +/**
1.1203 +Sets the flash red eye reduction on or off.
1.1204 +
1.1205 +Triggers a KUidECamEventCameraSettingFlashRedEyeReduce event to all camera
1.1206 +MCameraObserver2 clients.
1.1207 +
1.1208 +@param aState
1.1209 + The required state ETrue for switching it on and EFalse for switching it off.
1.1210 +*/
1.1211 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetRedEyeReduceOn(TBool aState)
1.1212 + {
1.1213 + iImpl->SetRedEyeReduceOn(aState);
1.1214 + }
1.1215 +
1.1216 +/**
1.1217 +Get flash compensation steps as integers multiplied by KECamFineResolutionFactor.
1.1218 +For example 0.5 EV is 50.
1.1219 +
1.1220 +@param aFlashCompensationSteps
1.1221 + an RArray of integers which is populated on return to reflect the supported
1.1222 + flash compensation steps,
1.1223 +
1.1224 +@param aInfo
1.1225 + an TValueInfo reference, which establishes the organization of
1.1226 + the returned data.
1.1227 +
1.1228 +@see TValueInfo
1.1229 +
1.1230 +@leave KErrNoMemory Out of memory.
1.1231 +
1.1232 +@note When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive;
1.1233 + corresponding getter/setters for this feature should not be used in such a case.
1.1234 +
1.1235 +@note When camera device is incapable of revealing the flash compensation steps supported,
1.1236 + it has to be assumed that camera will work only on the parmanently set value. If this value is not known, empty
1.1237 + array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.
1.1238 +*/
1.1239 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetFlashCompensationStepsL(RArray<TInt>& aFlashCompensationSteps, TValueInfo& aInfo) const
1.1240 + {
1.1241 + iImpl->GetFlashCompensationStepsL(aFlashCompensationSteps, aInfo);
1.1242 + }
1.1243 +
1.1244 +/**
1.1245 +@deprecated Use TInt GetFlashCompensationStep(TInt& aFlashCompensationStep);
1.1246 +
1.1247 +Get current flash power compensation step.
1.1248 +
1.1249 +@return current flash compensation step.
1.1250 +*/
1.1251 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::FlashCompensationStep() const
1.1252 + {
1.1253 + return iImpl->FlashCompensationStep();
1.1254 + }
1.1255 +
1.1256 +/**
1.1257 +Get current flash power compensation step.
1.1258 +
1.1259 +@param aFlashCompensationStep
1.1260 + Reference to the current flash compensation step.
1.1261 +
1.1262 +@return system wide error code.
1.1263 +
1.1264 +@note Use this method in place of deprecated TInt FlashCompensationStep()
1.1265 +
1.1266 +*/
1.1267 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::GetFlashCompensationStep(TInt& aFlashCompensationStep) const
1.1268 + {
1.1269 + return iImpl->GetFlashCompensationStep(aFlashCompensationStep);
1.1270 + }
1.1271 +
1.1272 +/**
1.1273 +Set current flash compensation step as an integer multiplied by KECamFineResolutionFactor.
1.1274 +For example to set a compensation of -0.3 EV, one should use a parameter with value -30.
1.1275 +All clients receive a KUidECamEventCameraSettingFlashCompensationStep event, when the value has changed.
1.1276 +
1.1277 +@param aFlashCompensationStep
1.1278 + a new value for the flash compensation step.
1.1279 +*/
1.1280 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetFlashCompensationStep(TInt aFlashCompensationStep)
1.1281 + {
1.1282 + iImpl->SetFlashCompensationStep(aFlashCompensationStep);
1.1283 + }
1.1284 +
1.1285 +/**
1.1286 +Get current flash power compensation range measured in a already selected compensation step magnitude.
1.1287 +@note This range may change if a different compensation step is selected.
1.1288 +For example if flash compensation range is in the range -1EV 1.5EV and the selected flash compensation
1.1289 +step is selected to be 0.3 EV, the result of this call will be aNegativeCompensation = -3 and aPositiveCompensation = 5.
1.1290 +as there can be only three full steps for negative compensation (1/0.3) and five for flash power boost (1.5/0.3).
1.1291 +In this way developers, having pre-selected a step value from the supported set, would need to provide
1.1292 +just the multiplier (in steps) and the direction (the sign). Steps are always assumed integers.
1.1293 +
1.1294 +@param aNegativeCompensation
1.1295 + a reference to an integer returning the maximum number of steps available for negative compensation.
1.1296 +
1.1297 +@param aPositiveCompensation
1.1298 + a reference to an integer returning the maximum number of steps available for positive compensation.
1.1299 +*/
1.1300 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetFlashCompensationRangeInSteps(TInt& aNegativeCompensation, TInt& aPositiveCompensation) const
1.1301 + {
1.1302 + iImpl->GetFlashCompensationRangeInSteps(aNegativeCompensation, aPositiveCompensation);
1.1303 + }
1.1304 +
1.1305 +/**
1.1306 +@deprecated Use TInt GetFlashCompensation(TInt& aFlashCompensation);
1.1307 +
1.1308 +Get the current flash compensation value as integer steps. Positive values boost flash power,
1.1309 +negative reduce flash power. The change is not cumulative i.e. the change is stateless.
1.1310 +Each call assumes no previous compensation has been performed i.e. that there is a zero compensation.
1.1311 +
1.1312 +@note if returned value is 2 (compensation steps) and the current flash compensation step is 0.3 EV,
1.1313 +then the actual compensation effect will be 0.6 EV.
1.1314 +
1.1315 +@return the current number of compensation steps as an integer.
1.1316 +*/
1.1317 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::FlashCompensation() const
1.1318 + {
1.1319 + return iImpl->FlashCompensation();
1.1320 + }
1.1321 +
1.1322 +/**
1.1323 +Get the current flash compensation value as integer steps. Positive values boost flash power,
1.1324 +negative reduce flash power. The change is not cumulative i.e. the change is stateless.
1.1325 +Each call assumes no previous compensation has been performed i.e. that there is a zero compensation.
1.1326 +
1.1327 +@note if retrieved value is 2 (compensation steps) and the current flash compensation step is 0.3 EV,
1.1328 +then the actual compensation effect will be 0.6 EV.
1.1329 +
1.1330 +@param aFlashCompensation
1.1331 + Reference to the current number of compensation steps as an integer.
1.1332 +
1.1333 +@return system wide error code.
1.1334 +
1.1335 +@note Use this method in place of deprecated TInt FlashCompensation()
1.1336 +
1.1337 +*/
1.1338 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::GetFlashCompensation(TInt& aFlashCompensation) const
1.1339 + {
1.1340 + return iImpl->GetFlashCompensation(aFlashCompensation);
1.1341 + }
1.1342 +
1.1343 +/**
1.1344 +Set the current flash compensation value as integer steps.
1.1345 +Positive values increase power, negative reduce power. The change is not acumulative e.g. the change is stateless.
1.1346 +Each call assumes no previous compensation has been performed i.e. that there is a zero compensation.
1.1347 +Triggers a KUidECamEventCameraSettingFlashCompensation event.
1.1348 +
1.1349 +@param aFlashCompensationSteps
1.1350 + a required compensation steps - negative value reduce the flash power
1.1351 + positive boosts up the flash power.
1.1352 +*/
1.1353 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetFlashCompensation(TInt aFlashCompensationSteps)
1.1354 + {
1.1355 + iImpl->SetFlashCompensation(aFlashCompensationSteps);
1.1356 + }
1.1357 +
1.1358 +/**
1.1359 +Check whether there is an external flash source.
1.1360 +
1.1361 +@return ETrue if an external flash source is present, EFalse otherwise
1.1362 +*/
1.1363 +EXPORT_C TBool CCamera::CCameraAdvancedSettings::IsExternalFlashPresent() const
1.1364 + {
1.1365 + return iImpl->IsExternalFlashPresent();
1.1366 + }
1.1367 +
1.1368 +/**
1.1369 +Gets the current discrete manual flash power levels supported by the camera in range 0-100
1.1370 +as a percentage of maximum power level.
1.1371 +
1.1372 +@param aManualFlashPowerLevels
1.1373 + An empty array of TInt which would be populated by the implementation with
1.1374 + the specific supported values. If the array is empty on return,
1.1375 + the camera does not support this functionality.
1.1376 +
1.1377 +@param aInfo
1.1378 + a reference to TValueInfo, which establishes the type of the returned data.
1.1379 +
1.1380 +@leave KErrNoMemory Out of memory.
1.1381 +
1.1382 +@note When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive;
1.1383 + corresponding getter/setters for this feature should not be used in such a case.
1.1384 + When camera device is incapable of revealing the manual flash power levels supported,
1.1385 + it has to be assumed that camera will work only on the permanently set value. If this value is not known, empty
1.1386 + array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.
1.1387 +*/
1.1388 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetManualFlashPowerLevelsL(RArray<TInt>& aManualFlashPowerLevels, TValueInfo& aInfo) const
1.1389 + {
1.1390 + return iImpl->GetManualFlashPowerLevelsL(aManualFlashPowerLevels, aInfo);
1.1391 + }
1.1392 +
1.1393 +/**
1.1394 +Gets the current manual flash power level on the camera.
1.1395 +
1.1396 +@return the current manual flash power level as a value in the range [0:100].
1.1397 + Negative value returned means error case (system wide error code) and positive value means current manual flash power level.
1.1398 +*/
1.1399 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::ManualFlashPowerLevel() const
1.1400 + {
1.1401 + return iImpl->ManualFlashPowerLevel();
1.1402 + }
1.1403 +
1.1404 +/**
1.1405 +Sets the current manual flash power level on the camera.
1.1406 +Triggers a KUidECamEventCameraSettingFlashManualPower event to all MCameraObserver2 clients.
1.1407 +
1.1408 +@param aManualFlashPowerLevel
1.1409 + one of the values returned in GetManualFlashPowerLevelsL().
1.1410 +*/
1.1411 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetManualFlashPowerLevel(TInt aManualFlashPowerLevel)
1.1412 + {
1.1413 + iImpl->SetManualFlashPowerLevel(aManualFlashPowerLevel);
1.1414 + }
1.1415 +
1.1416 +/**
1.1417 +Get Supported exposure modes - bitfields of CCamera::TExposure
1.1418 +
1.1419 +@return the set of supported exposure modes.
1.1420 +*/
1.1421 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedExposureModes() const
1.1422 + {
1.1423 + return iImpl->SupportedExposureModes();
1.1424 + }
1.1425 +
1.1426 +/**
1.1427 +Gets the currently set exposure setting value.
1.1428 +
1.1429 +@return The currently set exposure setting value.
1.1430 +*/
1.1431 +EXPORT_C CCamera::TExposure CCamera::CCameraAdvancedSettings::ExposureMode() const
1.1432 + {
1.1433 + return iImpl->ExposureMode();
1.1434 + }
1.1435 +
1.1436 +/**
1.1437 +Sets the exposure mode of the camera.
1.1438 +Triggers a KUidECamEventCameraSettingExposureMode event to all MCameraObserver2 clients.
1.1439 +
1.1440 +@param aExposureMode
1.1441 + The required exposure adjustment.
1.1442 +*/
1.1443 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetExposureMode(CCamera::TExposure aExposureMode)
1.1444 + {
1.1445 + iImpl->SetExposureMode(aExposureMode);
1.1446 + }
1.1447 +
1.1448 +/**
1.1449 +Get exposure compensation steps as integers multiplied by KECamFineResolutionFactor.
1.1450 +For example 0.3 EV is 30.
1.1451 +
1.1452 +@param aExposureCompensationSteps
1.1453 + an RArray of integers which is populated to reflect the supported
1.1454 + exposure compensation steps, all values have been multiplied by KECamFineResolutionFactor before
1.1455 + truncated to integers.
1.1456 +
1.1457 +@param aInfo
1.1458 + a reference to TValueInfo, which establishes the type of the returned data.
1.1459 +
1.1460 +@leave KErrNoMemory Out of memory.
1.1461 +
1.1462 +@note When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive;
1.1463 + corresponding getter/setters for this feature should not be used in such a case.
1.1464 + When camera device is incapable of revealing the exposure compensation steps supported,
1.1465 + it has to be assumed that camera will work only on the permanently set value. If this value is not known, empty
1.1466 + array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.
1.1467 +*/
1.1468 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetExposureCompensationStepsL(RArray<TInt>& aExposureCompensationSteps, TValueInfo& aInfo) const
1.1469 + {
1.1470 + iImpl->GetExposureCompensationStepsL(aExposureCompensationSteps, aInfo);
1.1471 + }
1.1472 +
1.1473 +/**
1.1474 +@deprecated Use TInt GetExposureCompensationStep(TInt& aExposureCompensationStep);
1.1475 +
1.1476 +Get current exposure compensation step.
1.1477 +
1.1478 +@return the current exposure compensation step.
1.1479 +*/
1.1480 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::ExposureCompensationStep() const
1.1481 + {
1.1482 + return iImpl->ExposureCompensationStep();
1.1483 + }
1.1484 +
1.1485 +/**
1.1486 +Get current exposure compensation step.
1.1487 +
1.1488 +@param aExposureCompensationStep
1.1489 + Reference to the current exposure compensation step.
1.1490 +
1.1491 +@return system wide error code.
1.1492 +
1.1493 +@note Use this method in place of deprecated TInt ExposureCompensationStep()
1.1494 +
1.1495 +*/
1.1496 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::GetExposureCompensationStep(TInt& aExposureCompensationStep) const
1.1497 + {
1.1498 + return iImpl->GetExposureCompensationStep(aExposureCompensationStep);
1.1499 + }
1.1500 +
1.1501 +/**
1.1502 +Set current exposure compensation step as an integer multiplied by KECamFineResolutionFactor.
1.1503 +All MCameraObserver2 clients receive a KUidECamEventCameraSettingExposureCompensationStep event,
1.1504 +when the value has changed.
1.1505 +
1.1506 +@param aExposureCompensationStep
1.1507 + a new value for the exposure compensation step.
1.1508 +*/
1.1509 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetExposureCompensationStep(TInt aExposureCompensationStep)
1.1510 + {
1.1511 + iImpl->SetExposureCompensationStep(aExposureCompensationStep);
1.1512 + }
1.1513 +
1.1514 +/**
1.1515 +Get current exposure compensation range in steps. It depends on the previously
1.1516 +selected exposure compensation step.
1.1517 +
1.1518 +@see GetFlashCompensationRangeInSteps()
1.1519 +
1.1520 +@param aNegativeCompensation
1.1521 + reference to an integer returning the maximum number of steps
1.1522 + available for negative compensation,
1.1523 +
1.1524 +@param aPositiveCompensation
1.1525 + reference to an integer returning the maximum number of steps
1.1526 + available for positive compensation,
1.1527 +*/
1.1528 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetExposureCompensationRangeInSteps(TInt& aNegativeCompensation, TInt& aPositiveCompensation) const
1.1529 + {
1.1530 + iImpl->GetExposureCompensationRangeInSteps(aNegativeCompensation, aPositiveCompensation);
1.1531 + }
1.1532 +
1.1533 +/**
1.1534 +@deprecated Use TInt GetExposureCompensation(TInt& aExposureCompensation);
1.1535 +
1.1536 +Get the current exposure compensation steps. Positive values increase exposure times,
1.1537 +negative reduce exposure times. The change is not cumulative i.e. the change is stateless.
1.1538 +Each call assumes no previous compensation has been performed i.e. that there is a zero compensation.
1.1539 +
1.1540 +@note if returned value is 2 (compensation steps) and the current exposure compensation step is 0.3 EV,
1.1541 +then the actual compensation effect will be 0.6 EV.
1.1542 +
1.1543 +@return current number of compensation steps as an integer.
1.1544 +*/
1.1545 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::ExposureCompensation() const
1.1546 + {
1.1547 + return iImpl->ExposureCompensation();
1.1548 + }
1.1549 +
1.1550 +/**
1.1551 +Get the current exposure compensation steps. Positive values increase exposure times,
1.1552 +negative reduce exposure times. The change is not cumulative i.e. the change is stateless.
1.1553 +Each call assumes no previous compensation has been performed i.e. that there is a zero compensation.
1.1554 +
1.1555 +@note if retrieved value is 2 (compensation steps) and the current exposure compensation step is 0.3 EV,
1.1556 +then the actual compensation effect will be 0.6 EV.
1.1557 +
1.1558 +@param aExposureCompensation
1.1559 + Reference to the current number of compensation steps as an integer.
1.1560 +
1.1561 +@return system wide error code.
1.1562 +
1.1563 +@note Use this method in place of deprecated TInt ExposureCompensation()
1.1564 +
1.1565 +*/
1.1566 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::GetExposureCompensation(TInt& aExposureCompensation) const
1.1567 + {
1.1568 + return iImpl->GetExposureCompensation(aExposureCompensation);
1.1569 + }
1.1570 +
1.1571 +/**
1.1572 +Set the current exposure compensation value as integer steps.
1.1573 +Triggers a KUidECamEventCameraSettingExposureCompensation event to all MCameraObserver2 clients.
1.1574 +
1.1575 +@param aExposureCompensationSteps
1.1576 + a required number of compensation steps - negative value reduce the exposure time
1.1577 + positive increases the exposure time.
1.1578 +*/
1.1579 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetExposureCompensation(TInt aExposureCompensationSteps)
1.1580 + {
1.1581 + iImpl->SetExposureCompensation(aExposureCompensationSteps);
1.1582 + }
1.1583 +
1.1584 +/**
1.1585 +Gets camera supported set of white balance adjustments.
1.1586 +
1.1587 +@return bitfield of all supported CCamera::TWhiteBalance values.
1.1588 +
1.1589 +@note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.1590 + application is not prepared to receive extra added enum values. So, any extra enum value(unrecognised) passed
1.1591 + from the implementation will be filtered at this point.
1.1592 + To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.1593 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values
1.1594 +*/
1.1595 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedWhiteBalanceModes() const
1.1596 + {
1.1597 + TInt supportedWhiteBalanceModes = iImpl->SupportedWhiteBalanceModes();
1.1598 +
1.1599 + /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.1600 + application is not prepared to receive extra added enum values. So, any extra enum value(unrecognised) passed
1.1601 + from the implementation will be filtered at this point.
1.1602 + To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.1603 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values */
1.1604 + if(iOwner.CameraVersion() == KCameraDefaultVersion)
1.1605 + {
1.1606 + supportedWhiteBalanceModes &= KBaselinedWhiteBalanceModes;
1.1607 + }
1.1608 +
1.1609 + return supportedWhiteBalanceModes;
1.1610 + }
1.1611 +
1.1612 +/**
1.1613 +Gets the current white balance value.
1.1614 +
1.1615 +@return The current white balance value.
1.1616 +
1.1617 +@note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.1618 + application is not prepared to receive extra added enum values. So, any extra enum value(unrecognised) received
1.1619 + from the implementation will be dropped and EWBAuto would be passed instead.
1.1620 + To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.1621 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values
1.1622 +*/
1.1623 +EXPORT_C CCamera::TWhiteBalance CCamera::CCameraAdvancedSettings::WhiteBalanceMode() const
1.1624 + {
1.1625 + CCamera::TWhiteBalance whiteBalance = iImpl->WhiteBalanceMode();
1.1626 +
1.1627 + /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.1628 + application is not prepared to receive extra added enum values. So, any extra enum value(unrecognised) received
1.1629 + from the implementation will be dropped and EWBAuto would be passed instead.
1.1630 + To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.1631 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values */
1.1632 + if(iOwner.CameraVersion() == KCameraDefaultVersion)
1.1633 + {
1.1634 + if(static_cast<TInt>(whiteBalance) > KBaselinedWhiteBalanceModes)
1.1635 + {
1.1636 + whiteBalance = CCamera::EWBAuto;
1.1637 + }
1.1638 + }
1.1639 +
1.1640 + return whiteBalance;
1.1641 + }
1.1642 +
1.1643 +/**
1.1644 +Sets the white balance adjustment of the camera.
1.1645 +
1.1646 +No effect if this is not supported, see TCameraInfo::iWhiteBalanceModesSupported.
1.1647 +Triggers KUidECamEventCameraSettingWhiteBalanceMode event to all MCameraObserver2 clients.
1.1648 +
1.1649 +@param aWhiteBalanceMode
1.1650 + The required white balance mode.
1.1651 +*/
1.1652 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetWhiteBalanceMode(CCamera::TWhiteBalance aWhiteBalanceMode)
1.1653 + {
1.1654 + iImpl->SetWhiteBalanceMode(aWhiteBalanceMode);
1.1655 + }
1.1656 +
1.1657 +/**
1.1658 +Gets the current state for aperture and exposure lock.
1.1659 +
1.1660 +@return ETrue if aperture and exposure values are locked together,
1.1661 + EFalse if these are not locked.
1.1662 +*/
1.1663 +EXPORT_C TBool CCamera::CCameraAdvancedSettings::ApertureExposureLockOn() const
1.1664 + {
1.1665 + return iImpl->ApertureExposureLockOn();
1.1666 + }
1.1667 +
1.1668 +/**
1.1669 +Sets the current state for aperture and exposure lock.
1.1670 +Triggers a KUidECamEventAELock event to all MCameraObserver2 clients.
1.1671 +
1.1672 +@param aAELock
1.1673 + a value whether to lock exposure and aperture together.
1.1674 +*/
1.1675 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetApertureExposureLockOn(TBool aAELock)
1.1676 + {
1.1677 + iImpl->SetApertureExposureLockOn(aAELock);
1.1678 + }
1.1679 +
1.1680 +/**
1.1681 +Gets the current state for button clicking sound effect.
1.1682 +
1.1683 +@return ETrue to switch clicking sound on, EFalse sound off
1.1684 +*/
1.1685 +EXPORT_C TBool CCamera::CCameraAdvancedSettings::ShootClickOn() const
1.1686 + {
1.1687 + return iImpl->ShootClickOn();
1.1688 + }
1.1689 +
1.1690 +/**
1.1691 +Sets the button clicking sound on /off. Triggers a KUidECamEventSoundClick event
1.1692 +to all MCameraObserver2 clients.
1.1693 +
1.1694 +@param aShootClickOn
1.1695 + ETrue to switch clicking sound on, EFalse sound is switched off.
1.1696 +*/
1.1697 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetShootClickOn(TBool aShootClickOn)
1.1698 + {
1.1699 + iImpl->SetShootClickOn(aShootClickOn);
1.1700 + }
1.1701 +
1.1702 +/**
1.1703 +Get camera supported timer values. Active only when drive mode EDriveModeTimed.
1.1704 +Time is in microseconds. As time interval is expected to be relatively short,
1.1705 +integer value is considered sufficient.
1.1706 +
1.1707 +@param aTimerIntervals
1.1708 + an RArray of integers which is populated to reflect the supported
1.1709 + timer interval steps.
1.1710 +
1.1711 +@param aInfo
1.1712 + an TValueInfo reference, which establishes the organization of
1.1713 + the returned data.
1.1714 +
1.1715 +@see TValueInfo
1.1716 +
1.1717 +@note When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive;
1.1718 + corresponding getter/setters for this feature should not be used in such a case.
1.1719 +*/
1.1720 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetTimerIntervalsL(RArray<TInt>& aTimerIntervals, TValueInfo& aInfo) const
1.1721 + {
1.1722 + iImpl->GetTimerIntervalsL(aTimerIntervals, aInfo);
1.1723 + }
1.1724 +
1.1725 +/**
1.1726 +Get current timer value. Active only when drive mode is EDriveModeTimed.
1.1727 +Timer resolution is in microseconds.
1.1728 +
1.1729 +@return current time interval value.
1.1730 + Negative value returned means error case (system wide error code) and positive value means current timer interval.
1.1731 +*/
1.1732 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::TimerInterval() const
1.1733 + {
1.1734 + return iImpl->TimerInterval();
1.1735 + }
1.1736 +
1.1737 +/**
1.1738 +Set current timer value. Active only when drive mode EDriveModeTimed.
1.1739 +This is the time interval (delay) in microseconds between user pressing the button and image is taken.
1.1740 +The setting of the value triggers a KUidECamEventCameraSettingTimerInterval event
1.1741 +to all MCameraObserver2 clients.
1.1742 +
1.1743 +@param aTimerInterval
1.1744 + The selected timer interval in microseconds.
1.1745 +*/
1.1746 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetTimerInterval(TInt aTimerInterval)
1.1747 + {
1.1748 + iImpl->SetTimerInterval(aTimerInterval);
1.1749 + }
1.1750 +
1.1751 +/**
1.1752 +Get camera supported time lapse period range. Active only when drive mode EDriveModeTimeLapse.
1.1753 +The time lapse is denoted as the uniform time period between consecutive frames.
1.1754 +
1.1755 +@param aTimeLapseMin
1.1756 + The minimum time value.
1.1757 +
1.1758 +@param aTimeLapseMax
1.1759 + The maximum time value.
1.1760 +*/
1.1761 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetTimeLapsePeriodRange(TTime& aTimeLapseMin, TTime& aTimeLapseMax) const
1.1762 + {
1.1763 + iImpl->GetTimeLapsePeriodRange(aTimeLapseMin, aTimeLapseMax);
1.1764 + }
1.1765 +
1.1766 +/**
1.1767 +Get current time lapse value. Active only when drive mode EDriveModeTimeLapse.
1.1768 +The time lapse is denoted as the uniform time period
1.1769 +between consecutive frames and operation is configurable by its start, end and a fixed interval.
1.1770 +
1.1771 +@param aStart
1.1772 + the start of the timelapse period.
1.1773 +
1.1774 +@param aEnd
1.1775 + the end of the timelapse period; start < end.
1.1776 +
1.1777 +@param aInterval
1.1778 + the set parameter between two successive snapshots.
1.1779 +*/
1.1780 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetTimeLapse(TTime& aStart, TTime& aEnd, TTime& aInterval) const
1.1781 + {
1.1782 + iImpl->GetTimeLapse(aStart, aEnd, aInterval);
1.1783 + }
1.1784 +
1.1785 +/**
1.1786 +Set current time lapse value. Active only when drive mode EDriveModeTimeLapse.
1.1787 +The time lapse is denoted as the uniform time period between consecutive frames.
1.1788 +Setting triggers a KUidECamEventCameraSettingTimeLapse event to all MCameraObserver2 camera clients.
1.1789 +
1.1790 +@param aStart
1.1791 + the start of the timelapse period.
1.1792 +
1.1793 +@param aEnd
1.1794 + the end of the timelapse period; start < end.
1.1795 +
1.1796 +@param aInterval
1.1797 + the set parameter between two successive snapshots.
1.1798 +*/
1.1799 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetTimeLapse(const TTime& aStart, const TTime& aEnd, const TTime& aInterval)
1.1800 + {
1.1801 + iImpl->SetTimeLapse(aStart, aEnd, aInterval);
1.1802 + }
1.1803 +
1.1804 +/**
1.1805 +Get current picture orientation
1.1806 +
1.1807 +@return a TPictureOrientation value.
1.1808 +*/
1.1809 +EXPORT_C CCamera::CCameraAdvancedSettings::TPictureOrientation CCamera::CCameraAdvancedSettings::PictureOrientation() const
1.1810 + {
1.1811 + return iImpl->PictureOrientation();
1.1812 + }
1.1813 +
1.1814 +/**
1.1815 +Set a new picture orientation
1.1816 +This triggers a KUidECamEventCameraSettingPictureOrientation event to all MCameraObserver2 clients.
1.1817 +
1.1818 +@param aOrientation
1.1819 + a value of TPictureOrientation denoting the new orientation.
1.1820 +*/
1.1821 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetPictureOrientation(CCamera::CCameraAdvancedSettings::TPictureOrientation aOrientation)
1.1822 + {
1.1823 + iImpl->SetPictureOrientation(aOrientation);
1.1824 + }
1.1825 +
1.1826 +/**
1.1827 +Get supported pixel aspect ratio.
1.1828 +
1.1829 +@return a bitfield of all supported TPixelAspectRatio values.
1.1830 +@note Some of the pixel aspect ratios are available only for clients using either CCamera::New2L() or CCamera::NewDuplicate2L()
1.1831 +*/
1.1832 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedPixelAspectRatios() const
1.1833 + {
1.1834 + TInt supportedRatios = iImpl->SupportedPixelAspectRatios();
1.1835 + /**
1.1836 + Mask out new features for old clients
1.1837 + */
1.1838 + if (iOwner.CameraVersion() == KCameraDefaultVersion)
1.1839 + {
1.1840 + supportedRatios &= KBaselinedPixelAspectsMask;
1.1841 + }
1.1842 + return supportedRatios;
1.1843 + }
1.1844 +
1.1845 +/**
1.1846 +Get current pixel aspect ratio.
1.1847 +
1.1848 +@return a TPixelAspectRatio value.
1.1849 +@note Some of the pixel aspect ratios are available only for clients using either CCamera::New2L() or CCamera::NewDuplicate2L()
1.1850 +*/
1.1851 +EXPORT_C CCamera::CCameraAdvancedSettings::TPixelAspectRatio CCamera::CCameraAdvancedSettings::PixelAspectRatio() const
1.1852 + {
1.1853 + TInt ratio = iImpl->PixelAspectRatio();
1.1854 + /**
1.1855 + Mask out new features for old clients
1.1856 + */
1.1857 + if (iOwner.CameraVersion() == KCameraDefaultVersion)
1.1858 + {
1.1859 + ratio &= KBaselinedPixelAspectsMask;
1.1860 + }
1.1861 + return static_cast<CCamera::CCameraAdvancedSettings::TPixelAspectRatio>( ratio );
1.1862 + }
1.1863 +
1.1864 +/**
1.1865 +Set a new pixel aspect ratio.
1.1866 +This triggers a KUidECamEventPixelAspectRatio event to all MCameraObserver2 clients.
1.1867 +
1.1868 +@param aPixelAspectRatio
1.1869 + a value of TPixelAspectRatio denoting the new pixel aspect ratio.
1.1870 +*/
1.1871 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetPixelAspectRatio(CCamera::CCameraAdvancedSettings::TPixelAspectRatio aPixelAspectRatio)
1.1872 + {
1.1873 + iImpl->SetPixelAspectRatio(aPixelAspectRatio);
1.1874 + }
1.1875 +
1.1876 +/**
1.1877 +Get supported YUV ranges.
1.1878 +
1.1879 +@return a bitfileld of all supported TYuvRange values.
1.1880 +*/
1.1881 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedYuvRanges() const
1.1882 + {
1.1883 + return iImpl->SupportedYuvRanges();
1.1884 + }
1.1885 +
1.1886 +/**
1.1887 +Get current YUV range.
1.1888 +
1.1889 +@return a TYuvRange value.
1.1890 +*/
1.1891 +EXPORT_C CCamera::CCameraAdvancedSettings::TYuvRange CCamera::CCameraAdvancedSettings::YuvRange() const
1.1892 + {
1.1893 + return iImpl->YuvRange();
1.1894 + }
1.1895 +
1.1896 +/**
1.1897 +Set a new YUV range.
1.1898 +This triggers a KUidECamEventYuvRange event to all MCameraObserver2 clients.
1.1899 +
1.1900 +@param aYuvRange
1.1901 + a value of TYuvRange denoting the new YUV range.
1.1902 +*/
1.1903 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetYuvRange(CCamera::CCameraAdvancedSettings::TYuvRange aYuvRange)
1.1904 + {
1.1905 + iImpl->SetYuvRange(aYuvRange);
1.1906 + }
1.1907 +
1.1908 +/**
1.1909 +Get the number of images captured normally under EDriveModeBurst condition.
1.1910 +@note: due to memory or image size limitations the actual number may be less.
1.1911 +
1.1912 +@return the number of images set to capture in burst mode.
1.1913 +*/
1.1914 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::BurstImages() const
1.1915 + {
1.1916 + return iImpl->BurstImages();
1.1917 + }
1.1918 +
1.1919 +/**
1.1920 +Set the number of images captured normally under EDriveModeBurst condition.
1.1921 +Triggers a KUidECamEventBurstImages event to all MCameraObserver2 clients.
1.1922 +@note: due to memory or image size limitations the actual number may be less.
1.1923 +
1.1924 +@param aImages
1.1925 + the number of images set to capture in burst mode
1.1926 +
1.1927 +@note Unless reduced Latency scheme is not used (ie CaptureImageL(TInt aSequenceNumber) or StartPerformantVideoCaptureL())
1.1928 + if an image/video capture is still outstanding, this method may report error KErrInUse.
1.1929 +*/
1.1930 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetBurstImages(TInt aImages)
1.1931 + {
1.1932 + iImpl->SetBurstImages(aImages);
1.1933 + }
1.1934 +
1.1935 +/**
1.1936 +Gets the optical zoom levels.
1.1937 +
1.1938 +@param aOpticalZoomSteps
1.1939 + Array to hold optical zoom values multiplied by KECamFineResolutionFactor to retain precision.
1.1940 + So that if zoom is not supported the array will return a single element of value
1.1941 + KECamFineResolutionFactor.
1.1942 +
1.1943 +@param aInfo
1.1944 + a reference to TValueInfo, which establishes the type of the returned data.
1.1945 +
1.1946 +@note Such approach allows for support for both linear and non-linear zoom steps.
1.1947 + When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive;
1.1948 + corresponding getter/setters for this feature should not be used in such a case.
1.1949 +
1.1950 +@leave KErrNoMemory Out of memory.
1.1951 +*/
1.1952 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetOpticalZoomStepsL(RArray<TInt>& aOpticalZoomSteps, TValueInfo& aInfo) const
1.1953 + {
1.1954 + iImpl->GetOpticalZoomStepsL(aOpticalZoomSteps, aInfo);
1.1955 + }
1.1956 +
1.1957 +/**
1.1958 +Gets the currently set zoom value.
1.1959 +
1.1960 +@return The currently set optical zoom value. The value is multiplied by
1.1961 + KECamFineResolutionFactor to retain precision.
1.1962 + Negative value returned means error case (system wide error code) and positive value means current optical zoom.
1.1963 +*/
1.1964 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::OpticalZoom() const
1.1965 + {
1.1966 + return iImpl->OpticalZoom();
1.1967 + }
1.1968 +
1.1969 +/**
1.1970 +Sets the zoom using a specific value. Triggers a KUidECamEventCameraSettingOpticalZoom
1.1971 +event to all MCameraObserver2 clients.
1.1972 +
1.1973 +@param aOpticalZoom
1.1974 + Required zoom value.
1.1975 +*/
1.1976 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetOpticalZoom(TInt aOpticalZoom)
1.1977 + {
1.1978 + iImpl->SetOpticalZoom(aOpticalZoom);
1.1979 + }
1.1980 +
1.1981 +/**
1.1982 +Gets the digital zoom levels.
1.1983 +
1.1984 +@param aDigitalZoomSteps
1.1985 + Array to hold digital zoom values multiplied by KECamFineResolutionFactor to retain precision.
1.1986 + So that if zoom is not supported the array will return a single element of value
1.1987 + KECamFineResolutionFactor.
1.1988 +
1.1989 +@param aInfo
1.1990 + a reference to TValueInfo, which establishes the type of the returned data.
1.1991 +
1.1992 +@note Such approach allows for support for both linear and non-linear zoom steps.
1.1993 + When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive;
1.1994 + corresponding getter/setters for this feature should not be used in such a case.
1.1995 +
1.1996 +@leave KErrNoMemory Out of memory.
1.1997 +*/
1.1998 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetDigitalZoomStepsL(RArray<TInt>& aDigitalZoomSteps, TValueInfo& aInfo) const
1.1999 + {
1.2000 + iImpl->GetDigitalZoomStepsL(aDigitalZoomSteps, aInfo);
1.2001 + }
1.2002 +
1.2003 +/**
1.2004 +Gets the currently set digital zoom value.
1.2005 +
1.2006 +@return The currently set digital zoom value. The value is multiplied by
1.2007 + KECamFineResolutionFactor to retain precision.
1.2008 + Negative value returned means error case (system wide error code) and positive value means current digital zoom.
1.2009 +*/
1.2010 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::DigitalZoom() const
1.2011 + {
1.2012 + return iImpl->DigitalZoom();
1.2013 + }
1.2014 +
1.2015 +/**
1.2016 +Sets the digital zoom value. Triggers a KUidECamEventCameraSettingDigitalZoom event
1.2017 +to all MCameraObserver2 clients.
1.2018 +
1.2019 +@param aDigitalZoom
1.2020 + Required zoom value.
1.2021 +*/
1.2022 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetDigitalZoom(TInt aDigitalZoom)
1.2023 + {
1.2024 + iImpl->SetDigitalZoom(aDigitalZoom);
1.2025 + }
1.2026 +
1.2027 +/**
1.2028 +Checks whether exposure value is locked or not.
1.2029 +
1.2030 +@return whether exposure value is locked or not.
1.2031 + ETrue if locked, EFalse otherwise.
1.2032 +*/
1.2033 +EXPORT_C TBool CCamera::CCameraAdvancedSettings::ExposureLockOn() const
1.2034 + {
1.2035 + return iImpl->ExposureLockOn();
1.2036 + }
1.2037 +
1.2038 +/**
1.2039 +Sets exposure lock state. Triggers a KUidECamEventCameraSettingExposureLock event
1.2040 + to all MCameraObserver2 clients.
1.2041 +
1.2042 +@param aState
1.2043 + Required new state.
1.2044 +*/
1.2045 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetExposureLockOn(TBool aState)
1.2046 + {
1.2047 + iImpl->SetExposureLockOn(aState);
1.2048 + }
1.2049 +
1.2050 +/**
1.2051 +Checks whether AutoFocus value is locked or not.
1.2052 +
1.2053 +@return whether AutoFocus value is locked or not.
1.2054 + ETrue if locked, EFalse otherwise.
1.2055 +*/
1.2056 +EXPORT_C TBool CCamera::CCameraAdvancedSettings::AutoFocusLockOn() const
1.2057 + {
1.2058 + return iImpl->AutoFocusLockOn();
1.2059 + }
1.2060 +
1.2061 +/**
1.2062 +Sets autofocus lock state. Triggers a KUidECamEventCameraSettingAutoFocusLock event
1.2063 +to all MCameraObserver2 clients.
1.2064 +
1.2065 +@param aState
1.2066 + Required new state.
1.2067 +*/
1.2068 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetAutoFocusLockOn(TBool aState)
1.2069 + {
1.2070 + iImpl->SetAutoFocusLockOn(aState);
1.2071 + }
1.2072 +
1.2073 +/**
1.2074 +Gets an array of all the advanced settings parameters supported by the camera.
1.2075 +These are identified by UIDs and relate to the set or subset of it of all defined settings UIDs.
1.2076 +
1.2077 +@param aSettings
1.2078 + An empty array of TUids which would be populated by the implementation with
1.2079 + the UIDs of the supported parameters. If the array is empty on return,
1.2080 + the camera does not support any settings.
1.2081 +
1.2082 +@leave KErrNoMemory Out of memory.
1.2083 +
1.2084 +@note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.2085 + application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed
1.2086 + from the implementation will be filtered at this point.
1.2087 + To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.2088 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values
1.2089 +*/
1.2090 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetSupportedSettingsL(RArray<TUid>& aSettings) const
1.2091 + {
1.2092 + iImpl->GetSupportedSettingsL(aSettings);
1.2093 +
1.2094 + /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.2095 + application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed
1.2096 + from the implementation will be filtered at this point.
1.2097 + To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.2098 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values */
1.2099 + if(iOwner.CameraVersion() == KCameraDefaultVersion)
1.2100 + {
1.2101 + for(TInt index =0; index < aSettings.Count(); index++)
1.2102 + {
1.2103 + /** KUidECamEventCameraSettingAutoFocusType2UidValue is the baseline. Any settings with greater uid value means that it has
1.2104 + been added in later versions */
1.2105 + if(aSettings[index].iUid > KUidECamEventCameraSettingAutoFocusType2UidValue)
1.2106 + {
1.2107 + aSettings.Remove(index);
1.2108 + index--;
1.2109 + }
1.2110 + }
1.2111 + }
1.2112 + }
1.2113 +
1.2114 +/**
1.2115 +Gets an array of all the advanced settings parameters currently active on the camera.
1.2116 +These are identified by UIDs and relate to the set or subset of it of all supported
1.2117 +settings UIDs.
1.2118 +
1.2119 +@param aActiveSettings
1.2120 + An empty array of TUids which would be populated by the implementation with
1.2121 + the active setting UIDs. If the array is empty on return,
1.2122 + the camera does not support any settings.
1.2123 +
1.2124 +@leave KErrNoMemory Out of memory.
1.2125 +
1.2126 +@note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.2127 + application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed
1.2128 + from the implementation will be filtered at this point.
1.2129 + To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.2130 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values
1.2131 +*/
1.2132 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetActiveSettingsL(RArray<TUid>& aActiveSettings) const
1.2133 + {
1.2134 + iImpl->GetActiveSettingsL(aActiveSettings);
1.2135 +
1.2136 + /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.2137 + application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed
1.2138 + from the implementation will be filtered at this point.
1.2139 + To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.2140 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values */
1.2141 + if(iOwner.CameraVersion() == KCameraDefaultVersion)
1.2142 + {
1.2143 + for(TInt index =0; index < aActiveSettings.Count(); index++)
1.2144 + {
1.2145 + /** KUidECamEventCameraSettingAutoFocusType2UidValue is the baseline. Any settings with greater uid value means that it has
1.2146 + been added in later versions */
1.2147 + if(aActiveSettings[index].iUid > KUidECamEventCameraSettingAutoFocusType2UidValue)
1.2148 + {
1.2149 + aActiveSettings.Remove(index);
1.2150 + index--;
1.2151 + }
1.2152 + }
1.2153 + }
1.2154 + }
1.2155 +
1.2156 +/**
1.2157 +Gets an array of all the advanced settings parameters currently disabled on the camera.
1.2158 +These are identified by UIDs and relate to the set or subset of it of all supported
1.2159 +settings UIDs.
1.2160 +
1.2161 +@param aDisabledSettings
1.2162 + An empty array of TUids which would be populated by the implementation with
1.2163 + the disabled setting UIDs. If the array is empty on return,
1.2164 + the camera does not support any settings.
1.2165 +
1.2166 +@leave KErrNoMemory Out of memory.
1.2167 +
1.2168 +@note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.2169 + application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed
1.2170 + from the implementation will be filtered at this point.
1.2171 + To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.2172 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values
1.2173 +*/
1.2174 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetDisabledSettingsL(RArray<TUid>& aDisabledSettings) const
1.2175 + {
1.2176 + iImpl->GetDisabledSettingsL(aDisabledSettings);
1.2177 +
1.2178 + /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.2179 + application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed
1.2180 + from the implementation will be filtered at this point.
1.2181 + To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.2182 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values */
1.2183 + if(iOwner.CameraVersion() == KCameraDefaultVersion)
1.2184 + {
1.2185 + for(TInt index =0; index < aDisabledSettings.Count(); index++)
1.2186 + {
1.2187 + /** KUidECamEventCameraSettingAutoFocusType2UidValue is the baseline. Any settings with greater uid value means that it has
1.2188 + been added in later versions */
1.2189 + if(aDisabledSettings[index].iUid > KUidECamEventCameraSettingAutoFocusType2UidValue)
1.2190 + {
1.2191 + aDisabledSettings.Remove(index);
1.2192 + index--;
1.2193 + }
1.2194 + }
1.2195 + }
1.2196 + }
1.2197 +
1.2198 +/**
1.2199 +Retrieves the state for automatic size selection option. Default value is EFalse.
1.2200 +
1.2201 +@return ETrue if the automatic selection is switched on. Default value is EFalse.
1.2202 +*/
1.2203 +EXPORT_C TBool CCamera::CCameraAdvancedSettings::AutomaticSizeSelectionChangeOn() const
1.2204 + {
1.2205 + return iImpl->AutomaticSizeSelectionChangeOn();
1.2206 + }
1.2207 +
1.2208 +/**
1.2209 +Allow camera to proactively change image size due external factors.
1.2210 +Default value is EFalse. Triggers a KUidECamEventCameraSettingAutomaticSizeSelection event notification.
1.2211 +
1.2212 +@param aSetOn
1.2213 + whether the option should be switched on
1.2214 + */
1.2215 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetAutomaticSizeSelectionChangeOn(TBool aSetOn)
1.2216 + {
1.2217 + iImpl->SetAutomaticSizeSelectionChangeOn(aSetOn);
1.2218 + }
1.2219 +
1.2220 +/**
1.2221 +Retrieves the timeout values camera supported by the camera when in continuous auto focus mode.
1.2222 +Timeouts are in microseconds.
1.2223 +
1.2224 +@param aTimeouts
1.2225 + An empty array to hold timeout values.
1.2226 +
1.2227 +@param aInfo
1.2228 + a reference to TValueInfo, which establishes the type of the returned data.
1.2229 +
1.2230 +@leave KErrNoMemory Out of memory.
1.2231 +
1.2232 +@note When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive;
1.2233 + corresponding getter/setters for this feature should not be used in such a case.
1.2234 +*/
1.2235 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetSupportedContinuousAutoFocusTimeoutsL(RArray<TInt>& aTimeouts, TValueInfo& aInfo) const
1.2236 + {
1.2237 + iImpl->GetSupportedContinuousAutoFocusTimeoutsL(aTimeouts, aInfo);
1.2238 + }
1.2239 +
1.2240 +/**
1.2241 +Gets the current value for continuous autofocus timeout. Timeouts are in microseconds.
1.2242 +
1.2243 +@return the timeout value in microseconds.
1.2244 + Negative value returned means error case (system wide error code) and positive value means current value for
1.2245 + continuous autofocus timeout.
1.2246 +*/
1.2247 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::ContinuousAutoFocusTimeout() const
1.2248 + {
1.2249 + return iImpl->ContinuousAutoFocusTimeout();
1.2250 + }
1.2251 +
1.2252 +/**
1.2253 +Sets the current value for continuous autofocus timeout. Timeouts are in microseconds.
1.2254 +All MCameraObserver2 clients of the camera receive a KUidECamEventCameraSettingsContinuousAutoFocusTimeout
1.2255 +event notification when timeout value is changed.
1.2256 +
1.2257 +@param aTimeout
1.2258 + the timeout value in microseconds.
1.2259 +*/
1.2260 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetContinuousAutoFocusTimeout(TInt aTimeout)
1.2261 + {
1.2262 + iImpl->SetContinuousAutoFocusTimeout(aTimeout);
1.2263 + }
1.2264 +
1.2265 +/**
1.2266 +Gets all supported stabilization effects on the camera.
1.2267 +
1.2268 +@return an integer - a bitfield of all supported TStabilizationEffect values.
1.2269 +*/
1.2270 +EXPORT_C CCamera::CCameraAdvancedSettings::TStabilizationEffect CCamera::CCameraAdvancedSettings::StabilizationEffect() const
1.2271 + {
1.2272 + return iImpl->StabilizationEffect();
1.2273 + }
1.2274 +
1.2275 +/**
1.2276 +Gets the current stabilization effect on the camera.
1.2277 +
1.2278 +@return a TStabilizationEffect value.
1.2279 +*/
1.2280 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedStabilizationEffects() const
1.2281 + {
1.2282 + return iImpl->SupportedStabilizationEffects();
1.2283 + }
1.2284 +
1.2285 +/**
1.2286 +Sets a specific stabilization effect on the camera.
1.2287 +When a value is set, MCameraObserver2 clients for that camera will receive a
1.2288 +KUidECamEventCameraSettingsStabilizationEffect event notification.
1.2289 +
1.2290 +@param aEffect
1.2291 + stabilization effect selection of type TStabilizationEffect.
1.2292 +*/
1.2293 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetStabilizationEffect(CCamera::CCameraAdvancedSettings::TStabilizationEffect aEffect)
1.2294 + {
1.2295 + iImpl->SetStabilizationEffect(aEffect);
1.2296 + }
1.2297 +
1.2298 +/**
1.2299 +Gets all supported stabilization algorithm values on the camera.
1.2300 +
1.2301 +@return an integer - a bitfield of all supported TStabilizationAlgorithmComplexity values.
1.2302 +*/
1.2303 +
1.2304 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedStabilizationComplexityValues() const
1.2305 + {
1.2306 + return iImpl->SupportedStabilizationComplexityValues();
1.2307 + }
1.2308 +
1.2309 +/**
1.2310 +Gets current active stabilization algorithm selection on the camera.
1.2311 +
1.2312 +@return a TStabilizationAlgorithmComplexity value.
1.2313 +*/
1.2314 +EXPORT_C CCamera::CCameraAdvancedSettings::TStabilizationAlgorithmComplexity CCamera::CCameraAdvancedSettings::StabilizationComplexity() const
1.2315 + {
1.2316 + return iImpl->StabilizationComplexity();
1.2317 + }
1.2318 +
1.2319 +/**
1.2320 +Sets a specific stabilization algorithm on the camera.
1.2321 +When a value is set, MCameraObserver2 clients for that camera will receive a
1.2322 +KUidECamEventSettingsStabilizationAlgorithmComplexity event notification.
1.2323 +
1.2324 +@param aComplexity
1.2325 + stabilization effect selection of type TStabilizationAlgorithmComplexity.
1.2326 +*/
1.2327 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetStabilizationComplexity(CCamera::CCameraAdvancedSettings::TStabilizationAlgorithmComplexity aComplexity)
1.2328 + {
1.2329 + iImpl->SetStabilizationComplexity(aComplexity);
1.2330 + }
1.2331 +
1.2332 +/**
1.2333 +Gets the units in which the white balance is measured on the camera.
1.2334 +@note The methods used to get or set these differ depending on the supported unit type.
1.2335 +It is expected that a camera will support only a single type or none.
1.2336 +
1.2337 +@return a value of TWBUnits type.
1.2338 +*/
1.2339 +EXPORT_C CCamera::CCameraAdvancedSettings::TWBUnits CCamera::CCameraAdvancedSettings::SupportedWBUnits() const
1.2340 + {
1.2341 + return iImpl->SupportedWBUnits();
1.2342 + }
1.2343 +
1.2344 +/**
1.2345 +Get white balance value represented as a RGB triplet.
1.2346 +
1.2347 +@see TRgb
1.2348 +
1.2349 +@param aValue
1.2350 + a reference to TRgb object which will contain the current white balance.
1.2351 +*/
1.2352 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetWBRgbValue(TRgb& aValue) const
1.2353 + {
1.2354 + iImpl->GetWBRgbValue(aValue);
1.2355 + }
1.2356 +
1.2357 +/**
1.2358 +Set white balance value using a RGB triplet.
1.2359 +Change in value causes an event notification KUidECamEventCameraSettingsWBValue
1.2360 +to be sent to all MCameraObserver2 clients of this camera.
1.2361 +
1.2362 +@param aValue
1.2363 + a const reference to TRgb object, which contains the new white balance.
1.2364 +
1.2365 +@see TRgb
1.2366 +*/
1.2367 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetWBRgbValue(const TRgb& aValue)
1.2368 + {
1.2369 + iImpl->SetWBRgbValue(aValue);
1.2370 + }
1.2371 +
1.2372 +/**
1.2373 +Get the white balance values, as temperature measured in Kelvin, supported on the camera.
1.2374 +
1.2375 +@param aWBColorTemperatures
1.2376 + A reference to an empty array of TInt which would be populated by the implementation with
1.2377 + the specific supported values.
1.2378 +
1.2379 +@param aInfo
1.2380 + a reference to TValueInfo, which establishes the type of the returned data.
1.2381 +
1.2382 +@note When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive;
1.2383 + corresponding getter/setters for this feature should not be used in such a case.
1.2384 +*/
1.2385 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetWBSupportedColorTemperaturesL(RArray<TInt>& aWBColorTemperatures, TValueInfo& aInfo) const
1.2386 + {
1.2387 + iImpl->GetWBSupportedColorTemperaturesL(aWBColorTemperatures, aInfo);
1.2388 + }
1.2389 +
1.2390 +/**
1.2391 +Get the white balance as a temperature in Kelvin
1.2392 +
1.2393 +@return current white balance value as a temperature in Kelvins.
1.2394 + Negative value returned means error case (system wide error code) and positive value means current value for
1.2395 + white balance as a temperature in Kelvin.
1.2396 +*/
1.2397 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::WBColorTemperature() const
1.2398 + {
1.2399 + return iImpl->WBColorTemperature();
1.2400 + }
1.2401 +
1.2402 +/**
1.2403 +Set the white balance as a temperature in Kelvin
1.2404 +
1.2405 +@param aColorTemperature
1.2406 + white balance value as a temperature in Kelvins.
1.2407 +*/
1.2408 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetWBColorTemperature(TInt aColorTemperature)
1.2409 + {
1.2410 + iImpl->SetWBColorTemperature(aColorTemperature);
1.2411 + }
1.2412 +
1.2413 +/**
1.2414 +Checks whether the flash is ready.
1.2415 +
1.2416 +@param aReady
1.2417 + A reference to a boolean set by the implementation to ETrue if the flash is ready,
1.2418 + EFalse otherwise.
1.2419 +
1.2420 +@return KErrNotSupported if the implementation of this method is not supported.
1.2421 +*/
1.2422 +EXPORT_C TInt CCamera::CCameraAdvancedSettings::IsFlashReady(TBool& aReady) const
1.2423 + {
1.2424 + aReady = EFalse;
1.2425 + if(iImpl2 != NULL)
1.2426 + {
1.2427 + return iImpl2->IsFlashReady(aReady);
1.2428 + }
1.2429 + return KErrNotSupported;
1.2430 + }
1.2431 +
1.2432 +/**
1.2433 +Get the number of focus steps for current focus mode.
1.2434 +
1.2435 +@param aFocusModeSteps
1.2436 + A reference to an empty array of TInt which would be populated by the implementation with
1.2437 + the specific supported values.
1.2438 +
1.2439 +@param aInfo
1.2440 + a reference to TValueInfo, which establishes the type of the returned data.
1.2441 +
1.2442 +@leave KErrNotSupported if the implementation of this method is not supported. May also leave as a result of other system errors.
1.2443 +
1.2444 +@note When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive;
1.2445 + corresponding getter/setters for this feature should not be used in such a case.
1.2446 +*/
1.2447 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetCurrentFocusModeStepsL(RArray<TInt>& aFocusModeSteps, TValueInfo& aInfo) const
1.2448 + {
1.2449 + if(iImpl2 != NULL)
1.2450 + {
1.2451 + iImpl2->GetCurrentFocusModeStepsL(aFocusModeSteps, aInfo);
1.2452 + }
1.2453 + else
1.2454 + {
1.2455 + User::Leave(KErrNotSupported);
1.2456 + }
1.2457 + }
1.2458 +
1.2459 +/**
1.2460 +Gets all supported ISO types on the device.
1.2461 +
1.2462 +@param aSupportedISORateTypes
1.2463 + A reference to an integer which is a bitfield of all supported TISORateType values. EISONone means feature is not supported.
1.2464 +
1.2465 +@leave KErrNotSupported if the implementation of this method is not present. May leave as a result of some other error.
1.2466 +
1.2467 +@note When concrete implementation is provided, but camera device does not support this feature, then aSupportedISORateTypes retrieves EISONone.
1.2468 +
1.2469 +*/
1.2470 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetSupportedISORateTypeL(TInt& aSupportedISORateTypes) const
1.2471 + {
1.2472 + if(iImpl3 != NULL)
1.2473 + {
1.2474 + iImpl3->GetSupportedISORateTypeL(aSupportedISORateTypes);
1.2475 + }
1.2476 + else
1.2477 + {
1.2478 + User::Leave(KErrNotSupported);
1.2479 + }
1.2480 + }
1.2481 +
1.2482 +/**
1.2483 +Set the type of ISO rate and the exposure parameter or value specified.
1.2484 +
1.2485 +@param aISORateType
1.2486 + The type of ISO rate to be set.
1.2487 +
1.2488 +@param aParam
1.2489 + Depending on the value of aISORateType, possible values of aParam are one of the following:-
1.2490 + The value of ISO rate to be used in case of manual type of ISO rate (EISOManual).
1.2491 + OR
1.2492 + Redundant parameter in case of unprioritised type of auto ISO (EISOAutoUnPrioritised). It is left to the camera hardware/firmware
1.2493 + to decide how the ISO rate is selected. No priority regarding exposure is specified.
1.2494 + OR
1.2495 + Highest ISO rate to be picked by the camera while deciding for the best exposure in case of ISO prioritised
1.2496 + type of auto ISO (EISOAutoISOPrioritised). ISO rate closest to this (and lower) may be used so that best possible exposure is achieved.
1.2497 + OR
1.2498 + Slowest shutter speed to be picked by the camera while deciding for the best exposure in case of shutter speed
1.2499 + prioritised type of auto ISO (EISOAutoShutterSpeedPrioritised). After using this shutter speed, ISO rate is chosen by the camera to achieve
1.2500 + proper exposure. Shutter speed closest to this (and faster) may be used so that best possible exposure is achieved.
1.2501 + OR
1.2502 + Minimum aperture opening (deepest depth of field) to be picked by the camera while deciding
1.2503 + for the best exposure in case of aperture prioritised type of auto ISO (EISOAutoAperturePrioritised). After using this aperture opening, ISO
1.2504 + rate is chosen by the camera to achieve proper exposure. Aperture opening closest to this (and wider) may be
1.2505 + used to achieve best possible exposure.
1.2506 +
1.2507 +@leave KErrNotSupported if the implementation of this method is not present.
1.2508 +
1.2509 +@note Triggers KUidECamEventCameraSettingIsoRateType to all MCameraObserver2 clients of the camera.
1.2510 + HandleEvent is used to report the result or any possible error. New setter functions leave only when
1.2511 + implementation is not there.
1.2512 +
1.2513 +*/
1.2514 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetISORateL(CCamera::CCameraAdvancedSettings::TISORateType aISORateType, TInt aParam)
1.2515 + {
1.2516 + if(iImpl3 != NULL)
1.2517 + {
1.2518 + iImpl3->SetISORate(aISORateType, aParam);
1.2519 + }
1.2520 + else
1.2521 + {
1.2522 + User::Leave(KErrNotSupported);
1.2523 + }
1.2524 + }
1.2525 +
1.2526 +/**
1.2527 +Get the type of ISO rate, exposure parameter and value set.
1.2528 +
1.2529 +@param aISORateType
1.2530 + A reference to the type of ISO rate set. EISONone means feature is not supported.
1.2531 +
1.2532 +@param aParam
1.2533 + Depending on the value of aISORateType, possible values of aParam are one of the following:-
1.2534 + A reference to the redundant parameter in case of manual type of ISO rate(EISOManual)
1.2535 + OR
1.2536 + A reference to the redundant parameter in case of unprioritised type of auto ISO(EISOAutoUnPrioritised)
1.2537 + OR
1.2538 + A reference to the highest ISO rate that may be picked up in case of ISO prioritised type of auto ISO(EISOAutoISOPrioritised)
1.2539 + OR
1.2540 + A reference to the slowest shutter speed that may be picked up in case of shutter speed prioritised type of auto ISO(EISOAutoShutterSpeedPrioritised)
1.2541 + OR
1.2542 + A reference to the minimum aperture opening that may be picked up in case of aperture prioritised type of auto ISO(EISOAutoAperturePrioritised)
1.2543 +
1.2544 +@param aISORate
1.2545 + A reference to the value of ISO rate currently being used, if camera device is capable of doing that.
1.2546 + Otherwise KErrNotFound is retrieved indicating the incapability of camera.
1.2547 +
1.2548 +@leave KErrNotSupported if the implementation of this method is not present.
1.2549 + May leave as a result of some other error.
1.2550 +
1.2551 +@note When concrete implementation is provided, but camera device does not support this feature, then aISORateType retrieves EISONone.
1.2552 +
1.2553 +@note Since camera hardware may be incapable of providing the actual ISO value when one of the auto ISO type has
1.2554 + been set, then, in these cases, the 3rd argument is retrieved as KErrNotFound.
1.2555 +
1.2556 +*/
1.2557 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetISORateL(CCamera::CCameraAdvancedSettings::TISORateType& aISORateType, TInt& aParam, TInt& aISORate) const
1.2558 + {
1.2559 + if(iImpl3 != NULL)
1.2560 + {
1.2561 + iImpl3->GetISORateL(aISORateType, aParam, aISORate);
1.2562 + }
1.2563 + else
1.2564 + {
1.2565 + User::Leave(KErrNotSupported);
1.2566 + }
1.2567 + }
1.2568 +
1.2569 +/**
1.2570 +Provide reference screen for orientation information.
1.2571 +
1.2572 +@param aScreenDevice
1.2573 + A reference to the screen device.
1.2574 +
1.2575 +@leave KErrNotSupported if the implementation of this method is not present.
1.2576 +
1.2577 +@note Triggers KUidECamEventCameraSettingReferenceScreen to all MCameraObserver2 clients of the camera.
1.2578 + HandleEvent is used to report the result or any possible error. New setter functions leave only when
1.2579 + implementation is not there.
1.2580 +
1.2581 +*/
1.2582 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetReferenceScreenL(CWsScreenDevice& aScreenDevice)
1.2583 + {
1.2584 + if(iImpl3 != NULL)
1.2585 + {
1.2586 + iImpl3->SetReferenceScreen(aScreenDevice);
1.2587 + }
1.2588 + else
1.2589 + {
1.2590 + User::Leave(KErrNotSupported);
1.2591 + }
1.2592 + }
1.2593 +
1.2594 +/**
1.2595 +Get the digital zoom steps for the still image when a particular image format and size are specified.
1.2596 +
1.2597 +@param aDigitalZoomSteps
1.2598 + A reference to an empty array of TInt to hold digital zoom step values for still image and multiplied by
1.2599 + KECamFineResolutionFactor to retain precision. If list returned is empty, this means feature is not supported.
1.2600 +
1.2601 +@param aInfo
1.2602 + A reference to TValueInfo, which establishes the type of the returned data.
1.2603 +
1.2604 +@param aSizeIndex
1.2605 + A value providing the size index which must be in the range 0 to TCameraInfo::iNumImageSizesSupported-1
1.2606 + inclusive.
1.2607 +
1.2608 +@param aFormat
1.2609 + A value providing the image format which must be one of the formats supported. (see
1.2610 + TCameraInfo::iImageFormatsSupported)
1.2611 +
1.2612 +@param aIsInfluencePossible
1.2613 + If True, signals that digital zoom step values may be influenced by some hardware factor like stabilization etc.
1.2614 + If False, no influence possible.
1.2615 +
1.2616 +@leave KErrNotSupported if the implementation of this method is not present.
1.2617 + KErrNoMemory if out of memory. May leave as a result of some other error.
1.2618 +
1.2619 +@note This method retrieves the supported digital zoom steps irrespective of any stabilization influence.
1.2620 + In case of stabilization etc. influence, the setting function should set the best possible digital zoom value
1.2621 + and return error KErrECamDigitalZoomLimited along with dedicated event.
1.2622 +
1.2623 +@note When concrete implementation is provided, but camera device does not support this feature, empty array may be returned and
1.2624 + TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.
1.2625 +
1.2626 +*/
1.2627 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetDigitalZoomStepsForStillL(RArray<TInt>& aDigitalZoomSteps, TValueInfo& aInfo,
1.2628 + TInt aSizeIndex, CCamera::TFormat aFormat, TBool& aIsInfluencePossible) const
1.2629 + {
1.2630 + if(iImpl3 != NULL)
1.2631 + {
1.2632 + iImpl3->GetDigitalZoomStepsForStillL(aDigitalZoomSteps, aInfo, aSizeIndex, aFormat, aIsInfluencePossible);
1.2633 + }
1.2634 + else
1.2635 + {
1.2636 + User::Leave(KErrNotSupported);
1.2637 + }
1.2638 + }
1.2639 +
1.2640 +/**
1.2641 +Get the digital zoom steps for the video when a particular video frame format, size and rate are specified.
1.2642 +
1.2643 +@param aDigitalZoomSteps
1.2644 + A reference to an empty array of TInt to hold digital zoom step values for video and multiplied by
1.2645 + KECamFineResolutionFactor to retain precision. If list returned is empty, this means feature is not supported.
1.2646 +
1.2647 +@param aInfo
1.2648 + A reference to TValueInfo, which establishes the type of the returned data.
1.2649 +
1.2650 +@param aFrameRateIndex
1.2651 + A value providing the rate index must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1
1.2652 + inclusive.
1.2653 +
1.2654 +@param aSizeIndex
1.2655 + A value providing the size index which must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1
1.2656 + inclusive.
1.2657 +
1.2658 +@param aFormat
1.2659 + A value providing the format which must be one of the video frame formats supported. (see
1.2660 + TCameraInfo::iVideoFrameFormatsSupported)
1.2661 +
1.2662 +@param aIsInfluencePossible
1.2663 + If True, signals that digital zoom step values may be influenced by some hardware factor like stabilization etc.
1.2664 + If False, no influence possible.
1.2665 +
1.2666 +@param aExposure
1.2667 + The exposure mode.
1.2668 +
1.2669 +@leave KErrNotSupported if the implementation of this method is not present.
1.2670 + KErrNoMemory if out of memory. May leave as a result of some other error.
1.2671 +
1.2672 +@note This method retrieves the supported digital zoom steps irrespective of any stabilization influence.
1.2673 + In case of stabilization etc. influence, the setting function should set the best possible digital zoom value
1.2674 + and return error KErrECamDigitalZoomLimited along with dedicated event.
1.2675 +
1.2676 +@note When concrete implementation is provided, but camera device does not support this feature, empty array may be returned and
1.2677 + TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.
1.2678 +
1.2679 +*/
1.2680 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetDigitalZoomStepsForVideoL(RArray<TInt>& aDigitalZoomSteps, TValueInfo& aInfo,
1.2681 + TInt aFrameRateIndex, TInt aSizeIndex, CCamera::TFormat aFormat, TBool& aIsInfluencePossible,
1.2682 + CCamera::TExposure aExposure) const
1.2683 + {
1.2684 + if(iImpl3 != NULL)
1.2685 + {
1.2686 + iImpl3->GetDigitalZoomStepsForVideoL(aDigitalZoomSteps, aInfo, aFrameRateIndex, aSizeIndex, aFormat, aIsInfluencePossible, aExposure);
1.2687 + }
1.2688 + else
1.2689 + {
1.2690 + User::Leave(KErrNotSupported);
1.2691 + }
1.2692 + }
1.2693 +
1.2694 +/**
1.2695 +Retrieves the pre capture warnings supported for a given camera mode
1.2696 +
1.2697 +@param aCameraMode
1.2698 + Desired camera mode for which the supported pre capture warnings may be retrieved.
1.2699 +
1.2700 +@param aPreCaptureWarningSupported
1.2701 + A bitfield of all supported TPreCaptureWarning to be issued in the given camera mode.
1.2702 + If no pre capture warning supported for the given camera mode, EPCWNone is retrieved.
1.2703 +
1.2704 +@leave May leave with any error.
1.2705 +
1.2706 +*/
1.2707 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetPreCaptureWarningSupportedL(CCamera::CCameraAdvancedSettings::TCameraMode aCameraMode, TInt& aPreCaptureWarningSupported) const
1.2708 + {
1.2709 + if(iImpl3 != NULL)
1.2710 + {
1.2711 + iImpl3->GetPreCaptureWarningSupportedL(aCameraMode, aPreCaptureWarningSupported);
1.2712 +
1.2713 + /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.2714 + application is not prepared to receive extra added enum values. So, any extra enum value passed
1.2715 + from the implementation will be filtered at this point.
1.2716 + To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.2717 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values */
1.2718 + if(iOwner.CameraVersion() == KCameraDefaultVersion)
1.2719 + {
1.2720 + aPreCaptureWarningSupported &= KBaselinedPreCaptureWarning;
1.2721 + }
1.2722 + }
1.2723 + else
1.2724 + {
1.2725 + User::Leave(KErrNotSupported);
1.2726 + }
1.2727 + }
1.2728 +
1.2729 +/**
1.2730 +Subscribe in order to receive event which indicates warnings on occurrence of some specific unfavourable
1.2731 +conditions before image/video capture.
1.2732 +
1.2733 +@param aPreCaptureWarning
1.2734 + A bitfield specifying all the TPreCaptureWarning types to be subscribed for.
1.2735 +
1.2736 +@leave KErrNotSupported if the implementation of this method or the feature is not supported.
1.2737 + May also leave as a result of other errors.
1.2738 +
1.2739 +@note When any of the subscribed warnings (represented by aPreCaptureWarning) get generated by the camera device,
1.2740 + event KUidECamEventCameraSettingPreCaptureWarning is issued. TECAMEvent2 class should be used in order to
1.2741 + provide the status of every PreCaptureWarning.
1.2742 +
1.2743 +*/
1.2744 +EXPORT_C void CCamera::CCameraAdvancedSettings::SubscribeToPreCaptureWarningL(TInt aPreCaptureWarning)
1.2745 + {
1.2746 + if(iImpl3 != NULL)
1.2747 + {
1.2748 + iImpl3->SubscribeToPreCaptureWarningL(aPreCaptureWarning);
1.2749 + }
1.2750 + else
1.2751 + {
1.2752 + User::Leave(KErrNotSupported);
1.2753 + }
1.2754 + }
1.2755 +
1.2756 +/**
1.2757 +Unsubscribe so that further events are not received when warnings get issued.
1.2758 +
1.2759 +@leave KErrNotSupported if the implementation of this method or the feature is not supported.
1.2760 + May also leave as a result of other errors.
1.2761 +
1.2762 +*/
1.2763 +EXPORT_C void CCamera::CCameraAdvancedSettings::UnSubscribePreCaptureWarningL()
1.2764 + {
1.2765 + if(iImpl3 != NULL)
1.2766 + {
1.2767 + iImpl3->UnSubscribePreCaptureWarningL();
1.2768 + }
1.2769 + else
1.2770 + {
1.2771 + User::Leave(KErrNotSupported);
1.2772 + }
1.2773 + }
1.2774 +
1.2775 +/**
1.2776 +Get the status of every warnings defined.
1.2777 +
1.2778 +@param aPreCaptureWarning
1.2779 + A reference to the integer - bitfield representing all the TPreCaptureWarning types issued.
1.2780 +
1.2781 +@leave KErrNotSupported if the implementation of this method or the feature is not supported.
1.2782 + May also leave as a result of other errors.
1.2783 +
1.2784 +@note This method may be called after receiving the event KUidECamEventCameraSettingPreCaptureWarning OR
1.2785 + user may also opt for polling on this.
1.2786 +
1.2787 +*/
1.2788 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetPreCaptureWarningL(TInt& aPreCaptureWarning) const
1.2789 + {
1.2790 + if(iImpl3 != NULL)
1.2791 + {
1.2792 + iImpl3->GetPreCaptureWarningL(aPreCaptureWarning);
1.2793 +
1.2794 + /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that
1.2795 + application is not prepared to receive extra added enum values. So, any extra enum value passed
1.2796 + from the implementation will be filtered at this point.
1.2797 + To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L()
1.2798 + to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values */
1.2799 + if(iOwner.CameraVersion() == KCameraDefaultVersion)
1.2800 + {
1.2801 + aPreCaptureWarning &= KBaselinedPreCaptureWarning;
1.2802 + }
1.2803 + }
1.2804 + else
1.2805 + {
1.2806 + User::Leave(KErrNotSupported);
1.2807 + }
1.2808 + }
1.2809 +
1.2810 +/**
1.2811 +Retrieve the different supported AF assistant light.
1.2812 +
1.2813 +@param aSupportedAFAssistantLight
1.2814 + A reference to integer - bitfield indicating the supported AF assistant light.
1.2815 + If EAFAssistantLightOff, this means AF assistant light is not supported.
1.2816 + If EAFAssistantLightManualOn, then manual AF assistant light is supported.
1.2817 + If EAFAssistantLightAuto, auto assistant light is supported.
1.2818 + If combination of EAFAssistantLightManualOn||EAFAssistantLightAuto , then both manual and Auto assistant light are supported.
1.2819 +
1.2820 +@leave KErrNotSupported if the implementation of this method is not supported.
1.2821 + May also leave as a result of other errors.
1.2822 +
1.2823 +@note When concrete implementation is provided, but camera device does not support this feature,
1.2824 + then aSupportedAFAssistantLight retrieves EAFAssistantLightOff. Corresponding getter/setters for this feature should not be called then.
1.2825 +
1.2826 +*/
1.2827 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetSupportedAFAssistantLightL(TInt& aSupportedAFAssistantLight) const
1.2828 + {
1.2829 + if(iImpl3 != NULL)
1.2830 + {
1.2831 + iImpl3->GetSupportedAFAssistantLightL(aSupportedAFAssistantLight);
1.2832 + }
1.2833 + else
1.2834 + {
1.2835 + User::Leave(KErrNotSupported);
1.2836 + }
1.2837 + }
1.2838 +
1.2839 +/**
1.2840 +Get the type ( and state) of AF assistant light currently set.
1.2841 +
1.2842 +@param aAFAssistantLight
1.2843 + A reference to AF assistant light.
1.2844 + If EAFAssistantLightOff, then manual and auto assistant light are switched off.
1.2845 + If EAFAssistantLightManualOn, manual assistant light is switched on.
1.2846 + If EAFAssistantLightAuto, AF assistant light is set to auto.
1.2847 +
1.2848 +@leave KErrNotSupported if the implementation of this method or the feature is not supported.
1.2849 + May also leave as a result of other errors.
1.2850 +
1.2851 +*/
1.2852 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetAFAssistantLightL(CCamera::CCameraAdvancedSettings::TAFAssistantLight& aAFAssistantLight) const
1.2853 + {
1.2854 + if(iImpl3 != NULL)
1.2855 + {
1.2856 + iImpl3->GetAFAssistantLightL(aAFAssistantLight);
1.2857 + }
1.2858 + else
1.2859 + {
1.2860 + User::Leave(KErrNotSupported);
1.2861 + }
1.2862 + }
1.2863 +
1.2864 +/**
1.2865 +Set a particular type ( and state) of AF assistant light.
1.2866 +
1.2867 +@param aAFAssistantLight
1.2868 + Type of AF assistant light to be set.
1.2869 + If EAFAssistantLightOff, switch off the manual or auto assistant light.
1.2870 + If EAFAssistantLightManualOn, manually switch on the assistant light.
1.2871 + If EAFAssistantLightAuto, camera will automatically switch it on/off as per the conditions.
1.2872 +
1.2873 +@leave KErrNotSupported if the implementation of this method is not present.
1.2874 +
1.2875 +@note Triggers KUidECamEventCameraSettingAFAssistantLight to all MCameraObserver2 clients of the camera.
1.2876 + HandleEvent is used to report the result or any possible error. New setter functions leave only when
1.2877 + implementation is not there.
1.2878 +
1.2879 +*/
1.2880 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetAFAssistantLightL(CCamera::CCameraAdvancedSettings::TAFAssistantLight aAFAssistantLight)
1.2881 + {
1.2882 + if(iImpl3 != NULL)
1.2883 + {
1.2884 + iImpl3->SetAFAssistantLight(aAFAssistantLight);
1.2885 + }
1.2886 + else
1.2887 + {
1.2888 + User::Leave(KErrNotSupported);
1.2889 + }
1.2890 + }
1.2891 +
1.2892 +/**
1.2893 +Retrieves the supported continuous zoom types.
1.2894 +
1.2895 +@param aSupportedContinuousZoomType
1.2896 + Retrieves a bitfield of TUint which indicates the supported continuous zoom type as given by
1.2897 + CCamera::CCameraAdvancedSettings::TContinuousZoomType
1.2898 +
1.2899 +@leave May leave with any error code.
1.2900 +
1.2901 +@publishedPartner
1.2902 +@prototype
1.2903 +*/
1.2904 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetSupportedContinuousZoomTypeL(TUint& aSupportedContinuousZoomType) const
1.2905 + {
1.2906 + if(iImpl4 != NULL)
1.2907 + {
1.2908 + iImpl4->GetSupportedContinuousZoomTypeL(aSupportedContinuousZoomType);
1.2909 + }
1.2910 + else
1.2911 + {
1.2912 + User::Leave(KErrNotSupported);
1.2913 + }
1.2914 + }
1.2915 +
1.2916 +/**
1.2917 +Retrieves the minimum, current and maximum focal length in millimeters. This information is useful to find out
1.2918 +which zoom directions can be used on the fly.
1.2919 +
1.2920 +@param aMinFocalLength
1.2921 + Minimum focal length if positive.
1.2922 + Error value if negative (for example, KErrNotFound if information not available).
1.2923 +
1.2924 +@param aCurrentFocalLength
1.2925 + Current focal length if positive.
1.2926 + Error value if negative (for example, KErrNotFound if information not available).
1.2927 +
1.2928 +@param aMaxFocalLength
1.2929 + Maximum focal length if positive.
1.2930 + Error value if negative (for example, KErrNotFound if information not available).
1.2931 +
1.2932 +@leave May leave with any error code.
1.2933 +
1.2934 +@publishedPartner
1.2935 +@prototype
1.2936 +*/
1.2937 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetFocalLengthInfoL(TInt& aMinFocalLength, TInt& aCurrentFocalLength, TInt& aMaxFocalLength) const
1.2938 + {
1.2939 + if(iImpl4 != NULL)
1.2940 + {
1.2941 + iImpl4->GetFocalLengthInfoL(aMinFocalLength, aCurrentFocalLength, aMaxFocalLength);
1.2942 + }
1.2943 + else
1.2944 + {
1.2945 + User::Leave(KErrNotSupported);
1.2946 + }
1.2947 + }
1.2948 +
1.2949 +/**
1.2950 +Retrieves the total number of operation preferences supported by the implementation. Operation preferences are
1.2951 +specified in terms of performance vectors, that is, speed, quality, low memory consumption and low power consumption.
1.2952 +
1.2953 +@param aNumOperationPreferenceSupported
1.2954 + Retrieves the number of operation preferences supported.
1.2955 +
1.2956 +@leave May leave with any error code.
1.2957 +
1.2958 +@publishedPartner
1.2959 +@prototype
1.2960 +*/
1.2961 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetNumOperationPreferenceL(TUint& aNumOperationPreferenceSupported) const
1.2962 + {
1.2963 + if(iImpl4 != NULL)
1.2964 + {
1.2965 + iImpl4->GetNumOperationPreferenceL(aNumOperationPreferenceSupported);
1.2966 + }
1.2967 + else
1.2968 + {
1.2969 + User::Leave(KErrNotSupported);
1.2970 + }
1.2971 + }
1.2972 +
1.2973 +/**
1.2974 +Enumerate the available operation preferences.
1.2975 +
1.2976 +@param aOperationPreferenceIndex
1.2977 + A particular index which represents an operation preference. The level of different performance vectors may be known
1.2978 + through other arguments. This varies from 0 to n-1, where n is given by GetNumOperationPreferenceL(n).
1.2979 +
1.2980 +@param aSpeedLevel
1.2981 + A TPerformanceLevel which specifies the speed level related to the index aOperationPreferenceIndex.
1.2982 +
1.2983 +@param aQualityLevel
1.2984 + A TPerformanceLevel which specifies the quality level related to the index aOperationPreferenceIndex.
1.2985 +
1.2986 +@param aLowMemoryConsumptionLevel
1.2987 + A TPerformanceLevel which specifies the low memory consumption level related to the index aOperationPreferenceIndex.
1.2988 + The lower the memory consumption, the higher the level.
1.2989 +
1.2990 +@param aLowPowerConsumptionLevel
1.2991 + A TPerformanceLevel which specifies the low power consumption level related to the index aOperationPreferenceIndex.
1.2992 + The lower the power consumption, the higher the level.
1.2993 +
1.2994 +@note It is up to the implementation how the performance levels are achieved. For example, shutter opening, JPEQ quality
1.2995 + and parallel buffering in case of streamed image output can be controlled in order to provide the desired
1.2996 + performance.
1.2997 +
1.2998 +@leave May leave with any error code.
1.2999 +
1.3000 +@publishedPartner
1.3001 +@prototype
1.3002 +*/
1.3003 +EXPORT_C void CCamera::CCameraAdvancedSettings::EnumerateOperationPreferenceL(TUint aOperationPreferenceIndex, CCamera::
1.3004 + CCameraAdvancedSettings::TPerformanceLevel& aSpeedLevel, CCamera::CCameraAdvancedSettings::
1.3005 + TPerformanceLevel& aQualityLevel, CCamera::CCameraAdvancedSettings::TPerformanceLevel&
1.3006 + aLowMemoryConsumptionLevel, CCamera::CCameraAdvancedSettings::TPerformanceLevel& aLowPowerConsumptionLevel) const
1.3007 +
1.3008 + {
1.3009 + if(iImpl4 != NULL)
1.3010 + {
1.3011 + iImpl4->EnumerateOperationPreferenceL(aOperationPreferenceIndex, aSpeedLevel, aQualityLevel,
1.3012 + aLowMemoryConsumptionLevel, aLowPowerConsumptionLevel);
1.3013 + }
1.3014 + else
1.3015 + {
1.3016 + User::Leave(KErrNotSupported);
1.3017 + }
1.3018 + }
1.3019 +
1.3020 +/**
1.3021 +Set a particular operation preference.
1.3022 +
1.3023 +@param aOperationPreferenceIndex
1.3024 + An index which reveals a set of levels to be used for performance vectors, that is, speed, quality, low memory
1.3025 + consumption and low power consumption.
1.3026 +
1.3027 +@leave KErrNotSupported If the implementation of this method is not present.
1.3028 +
1.3029 +@note Event KUidECamEventCameraSettingOperationPreference is used to notify clients about setting an operation preference.
1.3030 +
1.3031 +@publishedPartner
1.3032 +@prototype
1.3033 +*/
1.3034 +EXPORT_C void CCamera::CCameraAdvancedSettings::SetOperationPreferenceL(TUint aOperationPreferenceIndex)
1.3035 + {
1.3036 + if(iImpl4 != NULL)
1.3037 + {
1.3038 + iImpl4->SetOperationPreference(aOperationPreferenceIndex);
1.3039 + }
1.3040 + else
1.3041 + {
1.3042 + User::Leave(KErrNotSupported);
1.3043 + }
1.3044 + }
1.3045 +
1.3046 +/**
1.3047 +Get the current operation preference being used.
1.3048 +
1.3049 +@param aOperationPreferenceIndex
1.3050 + Currently used operation preference index.
1.3051 +
1.3052 +@leave May leave with any error code.
1.3053 +
1.3054 +@publishedPartner
1.3055 +@prototype
1.3056 +*/
1.3057 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetOperationPreferenceL(TInt& aOperationPreferenceIndex) const
1.3058 + {
1.3059 + if(iImpl4 != NULL)
1.3060 + {
1.3061 + iImpl4->GetOperationPreferenceL(aOperationPreferenceIndex);
1.3062 + }
1.3063 + else
1.3064 + {
1.3065 + User::Leave(KErrNotSupported);
1.3066 + }
1.3067 + }
1.3068 +
1.3069 +/**
1.3070 +Retrieves the event uids which the underlying implementation supports. Client may use these event notifications as
1.3071 +milestones in their application.
1.3072 +
1.3073 +@param aSupportedEvents
1.3074 + Retrieves as array of TUid. Every member of the array represents a supported event uid. These events are ECAM
1.3075 + component wide.
1.3076 +
1.3077 +@leave May leave with any error code.
1.3078 +
1.3079 +@note This method may retrieve unrecognized events which may be introduced later on.
1.3080 +
1.3081 +@publishedPartner
1.3082 +@prototype
1.3083 +*/
1.3084 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetSupportedEventsL(RArray<TUid>& aSupportedEvents) const
1.3085 + {
1.3086 + if(iImpl4 != NULL)
1.3087 + {
1.3088 + iImpl4->GetSupportedEventsL(aSupportedEvents);
1.3089 + }
1.3090 + else
1.3091 + {
1.3092 + User::Leave(KErrNotSupported);
1.3093 + }
1.3094 + }
1.3095 +
1.3096 +/**
1.3097 +Retrieves the indirect feature changes which occur because of a particular requested feature change.
1.3098 +Since the camera setting operation is asynchronous in nature, changing a particular camera feature, in certain cases,
1.3099 +involves indirectly changing another feature. In order to notify the ECam client about this indirect feature change,
1.3100 +event KUidECamEvent2IndirectFeatureChange is issued. After this notification, the client may use this method to retrieve
1.3101 +the full list of indirect feature changes.
1.3102 +
1.3103 +@param aRequestedSetting
1.3104 + The actual requested feature change. This uid is supposed to be ECAM component wide and not restricted to
1.3105 + advanced camera settings.
1.3106 +
1.3107 +@param aIndirectFeatureChanges
1.3108 + An array of uids which retrieves the indirect feature changes. These uids are supposed to be ECAM component wide
1.3109 + and not restricted to advanced camera settings.
1.3110 +
1.3111 +@leave May leave with any error code.
1.3112 +
1.3113 +@publishedPartner
1.3114 +@prototype
1.3115 +*/
1.3116 +EXPORT_C void CCamera::CCameraAdvancedSettings::GetIndirectFeatureChangesL(TUid aRequestedSetting, RArray<TUid>& aIndirectFeatureChanges) const
1.3117 + {
1.3118 + if(iImpl4 != NULL)
1.3119 + {
1.3120 + iImpl4->GetIndirectFeatureChangesL(aRequestedSetting, aIndirectFeatureChanges);
1.3121 + }
1.3122 + else
1.3123 + {
1.3124 + User::Leave(KErrNotSupported);
1.3125 + }
1.3126 + }
1.3127 +
1.3128 +/**
1.3129 +Creates an instance of a CCameraContinuousZoom object and returns it to the client. Ownership of the object is passed to the client.
1.3130 +
1.3131 +@param aObserver
1.3132 + Reference to a continuous zoom observer which will be used to issue callbacks to the client.
1.3133 +
1.3134 +@param aContinuousZoomType
1.3135 + The continuous zoom type with which the continuous zoom object will be initialised.
1.3136 +
1.3137 +@param aContinuousZoom
1.3138 + Retrieves pointer to the continuous zoom object. Client assumes ownership of the object.
1.3139 +
1.3140 +@note Client must not delete the continuous zoom object if CCameraContinuousZoom::StartContinuousZoomL() has been called as MContinuousZoomObserver callbacks
1.3141 + are still expected by the implementation. Clients should therefore only delete the object once the MContinuousZoomObserver::ContinuousZoomCompleted()
1.3142 + callback has been received or has explicitly stopped the continuous zoom via StopContinuousZoom().
1.3143 +
1.3144 +@internalTechnology
1.3145 +@prototype
1.3146 +*/
1.3147 +EXPORT_C void CCamera::CCameraAdvancedSettings::CreateContinuousZoomL(MContinuousZoomObserver& aObserver, TContinuousZoomType aContinuousZoomType, CCameraContinuousZoom*& aContinuousZoom)
1.3148 + {
1.3149 + if(iImpl4 != NULL)
1.3150 + {
1.3151 + MImplementationFactory* implFactory = NULL;
1.3152 +
1.3153 + iImpl4->CreateContinuousZoomImplFactoryL(implFactory);
1.3154 +
1.3155 + CleanupReleasePushL(*implFactory);
1.3156 + CCameraContinuousZoom* zoom = CCameraContinuousZoom::CreateL(aObserver, aContinuousZoomType, *implFactory);
1.3157 + CleanupStack::Pop(implFactory);
1.3158 +
1.3159 + implFactory->Release();
1.3160 + aContinuousZoom = zoom;
1.3161 + }
1.3162 + else
1.3163 + {
1.3164 + User::Leave(KErrNotSupported);
1.3165 + }
1.3166 + }
1.3167 +
1.3168 +/**
1.3169 +Register the ECAM component wide events in order to decide which events the client needs to be notified about.
1.3170 +Previously registered events will be overridden and not augmented.
1.3171 +
1.3172 +@param aEventFilter
1.3173 + This is of type TECAMEventFilterScheme.
1.3174 + If EECAMEventFilterSchemeBlackList, the client will not be notified only for the events packed in the array 'aEvents'.
1.3175 + If EECAMEventFilterSchemeWhiteList, the client will be notified only for the events packed in the array 'aEvents'.
1.3176 +
1.3177 +@param aEvents
1.3178 + An array of events provided by the client. Helps in filtering the events for notification purposes. An empty array
1.3179 + indicates that there are no events to register for a particular filtering scheme as given by aEventFilter.
1.3180 +
1.3181 +@leave May leave with any error code.
1.3182 +
1.3183 +@note Method RegisterEvents if called with EECAMEventFilterSchemeBlackList will wipe away any white listed events set
1.3184 + previously and make them inactive.
1.3185 +
1.3186 +@publishedPartner
1.3187 +@prototype
1.3188 +*/
1.3189 +void CCamera::CCameraAdvancedSettings::RegisterEventsL(TECAMEventFilterScheme /*aEventFilter*/, const RArray<TUid>& /*aEvents*/)
1.3190 + {
1.3191 + User::Leave(KErrNotSupported);
1.3192 + }
1.3193 +
1.3194 +/**
1.3195 +Retrieve the list of ECAM component wide events for a particular event filtering scheme.
1.3196 +
1.3197 +@param aEventFilter
1.3198 + This is of type TECAMEventFilterScheme.
1.3199 + If EECAMEventFilterSchemeBlackList, retrieve the events which are not supposed to be used for notification.
1.3200 + If EECAMEventFilterSchemeWhiteList, retrieve the events which are supposed to be used for notification.
1.3201 +
1.3202 +@param aEvents
1.3203 + An array of events given to the clients. Helps in filtering the events for notification purposes. An empty array
1.3204 + indicates that no events have been registered so far.
1.3205 +
1.3206 +@param aInfo
1.3207 + Retrieved TValueInfo.
1.3208 + This will be ENotActive if no event has been yet registered under the 'aEventFilter' filter scheme.
1.3209 + This will be EDiscreteSteps if some events have been registered under the 'aEventFilter' filter scheme.
1.3210 +
1.3211 +@leave May leave with any error code.
1.3212 +
1.3213 +@note There should be consistency in the information retrieved when GetRegisteredEvents is consecutively called,
1.3214 + first for blacklisted events and secondly, for white listed events. Only one of them should be used at a time and
1.3215 + hence, for the other one, aInfo will be ENotActive.
1.3216 +
1.3217 +@publishedPartner
1.3218 +@prototype
1.3219 +*/
1.3220 +void CCamera::CCameraAdvancedSettings::GetRegisterEventsL(TECAMEventFilterScheme /*aEventFilter*/, RArray<TUid>& /*aEvents*/, TValueInfo& /*aInfo*/) const
1.3221 + {
1.3222 + User::Leave(KErrNotSupported);
1.3223 + }
1.3224 +
1.3225 +/**
1.3226 +Retrieves the supported flicker removal values.
1.3227 +
1.3228 +@param aSupportedFlickerRemovalValue
1.3229 + A bitfield of all supported TFlickerRemoval to be provided to the client.
1.3230 +
1.3231 +@leave May leave with any error code.
1.3232 +
1.3233 +@publishedPartner
1.3234 +@prototype
1.3235 +*/
1.3236 +void CCamera::CCameraAdvancedSettings::GetSupportedFlickerRemovalValueL(TUint& /*aSupportedFlickerRemovalValue*/) const
1.3237 + {
1.3238 + User::Leave(KErrNotSupported);
1.3239 + }
1.3240 +
1.3241 +/**
1.3242 +Get the current flicker removal value being used.
1.3243 +
1.3244 +@param aFlickerRemovalValue
1.3245 + Currently used TFlickerRemoval value.
1.3246 +
1.3247 +@leave May leave with any error code.
1.3248 +
1.3249 +@publishedPartner
1.3250 +@prototype
1.3251 +*/
1.3252 +void CCamera::CCameraAdvancedSettings::GetFlickerRemovalValueL(CCamera::CCameraAdvancedSettings::TFlickerRemoval& /*aFlickerRemovalValue*/) const
1.3253 + {
1.3254 + User::Leave(KErrNotSupported);
1.3255 + }
1.3256 +
1.3257 +/**
1.3258 +Set the flicker removal value.
1.3259 +
1.3260 +@param aFlickerRemovalValue
1.3261 + The TFlickerRemoval value to be set.
1.3262 +
1.3263 +@leave KErrNotSupported If the implementation of this method is not present.
1.3264 +
1.3265 +@note Event KUidECamEventCameraSettingFlickerRemovalValue is used to notify clients about the flicker removal value
1.3266 + setting operation.
1.3267 +
1.3268 +@publishedPartner
1.3269 +@prototype
1.3270 +*/
1.3271 +void CCamera::CCameraAdvancedSettings::SetFlickerRemovalValueL(CCamera::CCameraAdvancedSettings::TFlickerRemoval /*aFlickerRemovalValue*/)
1.3272 + {
1.3273 + User::Leave(KErrNotSupported);
1.3274 + }
1.3275 +
1.3276 +/**
1.3277 +Retrieves the supported neutral density filter.
1.3278 +
1.3279 +@param aSupportedNDFilter
1.3280 + A bitfield of all supported TNDFilter to be provided to the client.
1.3281 +
1.3282 +@leave May leave with any error code.
1.3283 +
1.3284 +@publishedPartner
1.3285 +@prototype
1.3286 +*/
1.3287 +void CCamera::CCameraAdvancedSettings::GetSupportedNDFilterL(TUint& /*aSupportedNDFilter*/) const
1.3288 + {
1.3289 + User::Leave(KErrNotSupported);
1.3290 + }
1.3291 +
1.3292 +/**
1.3293 +Get the current neutral density filter being used.
1.3294 +
1.3295 +@param aNDFilter
1.3296 + Currently used TNDFilter.
1.3297 +
1.3298 +@leave May leave with any error code.
1.3299 +
1.3300 +@publishedPartner
1.3301 +@prototype
1.3302 +*/
1.3303 +void CCamera::CCameraAdvancedSettings::GetNDFilterL(CCamera::CCameraAdvancedSettings::TNDFilter& /*aNDFilter*/) const
1.3304 + {
1.3305 + User::Leave(KErrNotSupported);
1.3306 + }
1.3307 +
1.3308 +/**
1.3309 +Set the neutral density filter.
1.3310 +
1.3311 +@param aNDFilter
1.3312 + The TNDFilter value to be set.
1.3313 +
1.3314 +@leave KErrNotSupported If the implementation of this method is not present.
1.3315 +
1.3316 +@note Event KUidECamEventCameraSettingNDFilter is used to notify clients about the neutral density setting operation.
1.3317 +
1.3318 +@publishedPartner
1.3319 +@prototype
1.3320 +*/
1.3321 +void CCamera::CCameraAdvancedSettings::SetNDFilterL(CCamera::CCameraAdvancedSettings::TNDFilter /*aNDFilter*/)
1.3322 + {
1.3323 + User::Leave(KErrNotSupported);
1.3324 + }
1.3325 +
1.3326 +/**
1.3327 +Get the type of LED effect being used for a particular LED event.
1.3328 +
1.3329 +@param aLEDEvent
1.3330 + The TLEDEvent for which the current LED effect has to be retrieved.
1.3331 +
1.3332 +@param aLEDEffect
1.3333 + The TLEDEffect which is being used for the given LED event.
1.3334 + If this is TLEDEffectCustom, then a custom LED effect would have been separately specified by the client.
1.3335 +
1.3336 +@leave May leave with any error code.
1.3337 +
1.3338 +@publishedPartner
1.3339 +@prototype
1.3340 +*/
1.3341 +void CCamera::CCameraAdvancedSettings::GetLEDEffectL(CCamera::CCameraAdvancedSettings::TLEDEvent /*aLEDEvent*/,
1.3342 + CCamera::CCameraAdvancedSettings::TLEDEffect& /*aLEDEffect*/) const
1.3343 + {
1.3344 + User::Leave(KErrNotSupported);
1.3345 + }
1.3346 +
1.3347 +/**
1.3348 +Set the LED effect for a particular LED event.
1.3349 +
1.3350 +@param aLEDEvent
1.3351 + The TLEDEvent for which the LED effect has to be set.
1.3352 +
1.3353 +@param aLEDEffect
1.3354 + The TLEDEffect which has to be set for the given LED event. It should not be TLEDEffectCustom.
1.3355 + Use the method SetLEDCustomEffectL() to provide the custom LED effect.
1.3356 +
1.3357 +@leave KErrNotSupported If the implementation of this method is not present.
1.3358 +
1.3359 +@note Event KUidECamEventCameraSettingLEDEffect is used to notify clients about the LED effect setting operation.
1.3360 +
1.3361 +@note The event will provide error code KErrArgument if TLEDEffectCustom is used as the TLEDEffect. Use the method
1.3362 + SetLEDCustomEffectL() to provide the custom LED effect.
1.3363 +
1.3364 +@publishedPartner
1.3365 +@prototype
1.3366 +*/
1.3367 +void CCamera::CCameraAdvancedSettings::SetLEDEffectL(CCamera::CCameraAdvancedSettings::TLEDEvent /*aLEDEvent*/,
1.3368 + CCamera::CCameraAdvancedSettings::TLEDEffect /*aLEDEffect*/)
1.3369 + {
1.3370 + User::Leave(KErrNotSupported);
1.3371 + }
1.3372 +
1.3373 +/**
1.3374 +Set the custom LED effect for a particular LED event.
1.3375 +
1.3376 +@param aLEDEvent
1.3377 + The TLEDEvent for which the custom LED effect has to be set.
1.3378 +
1.3379 +@param aLEDSpecialEffectSteps
1.3380 + An array of custom LED special effect steps. Every member of this array is of type TECamLEDSpecialEffectStep.
1.3381 + The array as a whole constitues a custom LED effect.
1.3382 +
1.3383 +@leave KErrNotSupported If the implementation of this method is not present.
1.3384 +
1.3385 +@note Event KUidECamEventCameraSettingLEDCustomEffect is used to notify clients about the LED effect setting operation.
1.3386 +
1.3387 +@note Successful setting of a custom LED effect means that the GetLEDEffectL will retrieve TLEDEffectCustom for the
1.3388 + LEDEvent aLEDEvent.
1.3389 +
1.3390 +@publishedPartner
1.3391 +@prototype
1.3392 +*/
1.3393 +void CCamera::CCameraAdvancedSettings::SetLEDCustomEffectL(CCamera::CCameraAdvancedSettings::TLEDEvent /*aLEDEvent*/,
1.3394 + const RArray<CCamera::CCameraAdvancedSettings::TECamLEDSpecialEffectStep>& /*aLEDSpecialEffectSteps*/)
1.3395 + {
1.3396 + User::Leave(KErrNotSupported);
1.3397 + }
1.3398 +
1.3399 +/**
1.3400 +Reserve method which are less strict than existing Reserve methods and hence, expects implementation to be considerate towards camera access/control.
1.3401 +
1.3402 +@param aMaxTimeToWait
1.3403 + Maximum specified time for the client to hold the camera control before releasing (KUidECamEvent2CameraRequestTimedTakeOver)
1.3404 + or being forcefully overtaken (KUidECamEvent2CameraRequestForcedTimedTakeOver).
1.3405 +
1.3406 +@param aKickOut
1.3407 + ETrue indicates that if the requester's priority is greater than the current reserver's, then
1.3408 + KUidECamEvent2CameraRequestForcedTimedTakeOver will be issued to the current reserver. Otherwise,
1.3409 + KUidECamEvent2CameraRequestTimedTakeOver will be issued.
1.3410 +
1.3411 + EFalse indicates that KUidECamEvent2CameraRequestTimedTakeOver will be issued to the current reserver.
1.3412 +
1.3413 +@leave KErrNotSupported If the implementation of this method is not present.
1.3414 +
1.3415 +@note Event KUidECamEventNewReserveComplete notifies the client who made the new Reserve request.
1.3416 + Error value KErrECamHighPriorityReserveRequesterExists indicates another such reserve request is outstanding
1.3417 + and has higher priority than this one.
1.3418 + Error value KErrCancel indicates a new reserve requester with a higher priority than the current requester has
1.3419 + been made and that the current requester has been cancelled.
1.3420 +
1.3421 +@note Event KUidECamEvent2CameraRequestForcedTimedTakeOver notifies the current reserver client about its camera control
1.3422 + being forcefully overtaken after a specified time period.
1.3423 +
1.3424 +@note Event KUidECamEvent2CameraRequestTimedTakeOver notifies the current reserver client about a request to release its
1.3425 + camera control within a specified time period.
1.3426 +
1.3427 +@publishedPartner
1.3428 +@prototype
1.3429 +*/
1.3430 +void CCamera::CCameraAdvancedSettings::ReserveL(const TTimeIntervalMicroSeconds32& /*aMaxTimeToWait*/, TBool /*aKickOut*/)
1.3431 + {
1.3432 + User::Leave(KErrNotSupported);
1.3433 + }
1.3434 +
1.3435 +/**
1.3436 +Sets the priority of the client. The client issues this call when it receives the notification
1.3437 +KUidECamEvent2CameraSettingChangeClientPriority. The target priority is also supplied with this notification as iParam.
1.3438 +
1.3439 +@param aPriority
1.3440 + The target priority.
1.3441 +
1.3442 +@note For example, a higher priority client is currently holding the camera and a lower priority legacy
1.3443 + application is continuously requesting to get hold of it. After receiving a number of repeated requests by the
1.3444 + same legacy client, the supportive ECam implementation issues the notification
1.3445 + KUidECamEvent2CameraSettingChangeClientPriority. After receiving this notification, the client issues this method
1.3446 + SetClientPriorityL(TInt aPriority).
1.3447 +
1.3448 +@leave May leave with any error code.
1.3449 +
1.3450 +@publishedPartner
1.3451 +@prototype
1.3452 +*/
1.3453 +void CCamera::CCameraAdvancedSettings::SetClientPriorityL(TInt /*aPriority*/)
1.3454 + {
1.3455 + User::Leave(KErrNotSupported);
1.3456 + }
1.3457 +
1.3458 +/**
1.3459 +Restores the priority of the client. The client issues this call when it receives the notification
1.3460 +KUidECamEventCameraSettingRestoreClientPriority. ECam's responsibility is to save the original priority of the client.
1.3461 +
1.3462 +@note Once the legacy client has released the camera (after changing its priority), implementation will notify the
1.3463 + client to restore its priority by event KUidECamEventCameraSettingRestoreClientPriority. After receiving this
1.3464 + notification, the client issues this method RestoreClientPriorityL().
1.3465 +
1.3466 +@leave May leave with any error code.
1.3467 +
1.3468 +@publishedPartner
1.3469 +@prototype
1.3470 +*/
1.3471 +void CCamera::CCameraAdvancedSettings::RestoreClientPriorityL()
1.3472 + {
1.3473 + User::Leave(KErrNotSupported);
1.3474 + }
1.3475 +
1.3476 +/**
1.3477 +Retrieves the supported manual gain for a particular color channel.
1.3478 +
1.3479 +@param aSupportedManualGain
1.3480 + An array of manual gain. The TInt represent the unit in 'db' and multiplied by KECamFineResolutionFactor. Empty
1.3481 + array indicates that feature is not supported.
1.3482 +
1.3483 +@param aColorChannel
1.3484 + The TColorChannel for which the supported manual gain values have to be retrieved.
1.3485 +
1.3486 +@leave May leave with any error code.
1.3487 +
1.3488 +@publishedPartner
1.3489 +@prototype
1.3490 +*/
1.3491 +void CCamera::CCameraAdvancedSettings::GetSupportedManualGainL(RArray<TInt>& /*aSupportedManualGain*/,
1.3492 + CCamera::CCameraAdvancedSettings::TColorChannel /*aColorChannel*/) const
1.3493 + {
1.3494 + User::Leave(KErrNotSupported);
1.3495 + }
1.3496 +
1.3497 +/**
1.3498 +Get the current manual gain value to be used for a particular color channel.
1.3499 +
1.3500 +@param aManualGain
1.3501 + Currently used manual gain value. The TInt represents the unit in 'db' and multiplied by KECamFineResolutionFactor.
1.3502 +
1.3503 +@param aColorChannel
1.3504 + The color channel for which the manual gain value has to be used.
1.3505 +
1.3506 +@leave May leave with any error code.
1.3507 +
1.3508 +@publishedPartner
1.3509 +@prototype
1.3510 +*/
1.3511 +void CCamera::CCameraAdvancedSettings::GetManualGainL(TInt& /*aManualGain*/,
1.3512 + CCamera::CCameraAdvancedSettings::TColorChannel /*aColorChannel*/) const
1.3513 + {
1.3514 + User::Leave(KErrNotSupported);
1.3515 + }
1.3516 +
1.3517 +/**
1.3518 +Set the manual gain value for a particular color channel.
1.3519 +
1.3520 +@param aManualGain
1.3521 + The manual gain value to be set. The TInt represents the unit in 'db' and multiplied by KECamFineResolutionFactor.
1.3522 +
1.3523 +@param aColorChannel
1.3524 + Represents the color channel for which the manual gain value has to be set.
1.3525 +
1.3526 +@leave KErrNotSupported if the implementation of this method is not present.
1.3527 +
1.3528 +@note Event KUidECamEvent2CameraSettingManualGain is used to notify clients about the manual gain setting operation.
1.3529 +
1.3530 +@note The client will be expected to use either RBG color channel or YUV color channel in order to apply manual gain.
1.3531 + If the client sets manual gain values for both the color space, it is up to the implementation to decide which
1.3532 + values to use.
1.3533 +
1.3534 +@publishedPartner
1.3535 +@prototype
1.3536 +*/
1.3537 +void CCamera::CCameraAdvancedSettings::SetManualGainL(TInt /*aManualGain*/,
1.3538 + CCamera::CCameraAdvancedSettings::TColorChannel /*aColorChannel*/)
1.3539 + {
1.3540 + User::Leave(KErrNotSupported);
1.3541 + }
1.3542 +
1.3543 +/**
1.3544 +Control the white balance lock. It can be either locked or unlocked.
1.3545 +The white balance can be locked after aiming at a white or grey card. This helps in using the same white balance
1.3546 +setting for the next image shots.
1.3547 +
1.3548 +@param aEnableLock
1.3549 + ETrue instructs to lock the white balance.
1.3550 + EFalse instructs to unlock the white balance.
1.3551 +
1.3552 +@leave KErrNotSupported If the implementation of this method is not present.
1.3553 +
1.3554 +@note Event KUidECamEventCameraSettingLockWhiteBalance is used to notify clients about setting the state
1.3555 + of white balance lock.
1.3556 +
1.3557 +@publishedPartner
1.3558 +@prototype
1.3559 +*/
1.3560 +void CCamera::CCameraAdvancedSettings::SetWhiteBalanceLockL(TBool /*aEnableLock*/)
1.3561 + {
1.3562 + User::Leave(KErrNotSupported);
1.3563 + }
1.3564 +
1.3565 +/**
1.3566 +Get the current state for the white balance lock.
1.3567 +
1.3568 +@param aIsLocked
1.3569 + A TBool specifies whether the white balance has been locked or unlocked.
1.3570 + ETrue indicates that the white balance has been locked.
1.3571 + EFalse indicates that the white balance has been unlocked.
1.3572 +
1.3573 +@leave May leave with any error code.
1.3574 +
1.3575 +@publishedPartner
1.3576 +@prototype
1.3577 +*/
1.3578 +void CCamera::CCameraAdvancedSettings::GetWhiteBalanceLockStateL(TBool& /*aIsLocked*/) const
1.3579 + {
1.3580 + User::Leave(KErrNotSupported);
1.3581 + }
1.3582 +
1.3583 +/**
1.3584 +Instructs the implementation to continuously save the current state before releasing the camera or being overtaken.
1.3585 +
1.3586 +@param aLatestCameraState
1.3587 + A RWriteStream reference which will be used by the implementation to continuously save the latest camera state.
1.3588 +
1.3589 +@note The RWriteStream gives the implementation the facility to seek and overwrite any incorrectly updated state (in
1.3590 + the event of power failure, for example). Given stream sink shall support repositioning.
1.3591 +
1.3592 +@note The ECam client should be careful not to use the saved state for a particular camera in order to restore a
1.3593 + different camera later on. Though the implementation will be expected to take care of such things since the
1.3594 + content of the files are only meaningful for the implementation.
1.3595 +
1.3596 +@note The RWriteStream reference is not valid across the process.
1.3597 +
1.3598 +@leave May leave with any error code.
1.3599 +
1.3600 +@publishedPartner
1.3601 +@prototype
1.3602 +*/
1.3603 +void CCamera::CCameraAdvancedSettings::EnableStateSavingL(RWriteStream& /*aLatestCameraState*/)
1.3604 + {
1.3605 + User::Leave(KErrNotSupported);
1.3606 + }
1.3607 +
1.3608 +/**
1.3609 +Instructs the implementation to stop saving the current state in the RWriteStream& as given by
1.3610 +EnableStateSavingL(RWriteStream& aLatestCameraState).
1.3611 +
1.3612 +@leave May leave with any error code.
1.3613 +
1.3614 +@publishedPartner
1.3615 +@prototype
1.3616 +*/
1.3617 +void CCamera::CCameraAdvancedSettings::DisableStateSavingL()
1.3618 + {
1.3619 + User::Leave(KErrNotSupported);
1.3620 + }
1.3621 +
1.3622 +/**
1.3623 +Instructs the implementation to resume from the last saved state. This may be used after reserving the camera.
1.3624 +
1.3625 +@param aLatestCameraState
1.3626 + A RReadStream reference which will be used by the implementation to restore the latest saved camera state information.
1.3627 +
1.3628 +@note The RReadStream gives the implementation the facility to seek and overwrite any incorrectly updated state (in
1.3629 + the event of power failure, for example).
1.3630 +
1.3631 +@note The ECam client should be careful not to use the saved state for a particular camera in order to restore a
1.3632 + different camera later on. Though the implementation will be expected to take care of such things since the
1.3633 + content of the files are only meaningful for the implementation.
1.3634 +
1.3635 +@note The RReadStream reference is not valid across the process.
1.3636 +
1.3637 +@leave May leave with any error code.
1.3638 +
1.3639 +@publishedPartner
1.3640 +@prototype
1.3641 +*/
1.3642 +void CCamera::CCameraAdvancedSettings::RestoreLatestStateL(RReadStream& /*aLatestCameraState*/)
1.3643 + {
1.3644 + User::Leave(KErrNotSupported);
1.3645 + }
1.3646 +
1.3647 +/**
1.3648 +Instructs the implementation to save the current state which will be used by the client as a custom user state.
1.3649 +The state saving will be done only once when this call is issued. Many such custom state could be created by the
1.3650 +clients.
1.3651 +
1.3652 +@param aCustomCameraState
1.3653 + A RWriteStream reference which will be used by the implementation to save the current camera state as a milestone.
1.3654 +
1.3655 +@note The ECam client should be careful not to use the saved state for a particular camera in order to restore a
1.3656 + different camera later on. Though the implementation will be expected to take care of such things since the
1.3657 + content of the files are only meaningful for the implementation.
1.3658 +
1.3659 +@note The RWriteStream reference is not valid across the process.
1.3660 +
1.3661 +@leave May leave with any error code.
1.3662 +
1.3663 +@publishedPartner
1.3664 +@prototype
1.3665 +*/
1.3666 +void CCamera::CCameraAdvancedSettings::SaveCameraStateL(RWriteStream& /*aCustomCameraState*/)
1.3667 + {
1.3668 + User::Leave(KErrNotSupported);
1.3669 + }
1.3670 +
1.3671 +/**
1.3672 +Instructs the implementation to stop saving the custom state in the RWriteStream& as given by
1.3673 +SaveCameraStateL(RWriteStream& aCustomCameraState).
1.3674 +
1.3675 +@leave May leave with any error code.
1.3676 +
1.3677 +@publishedPartner
1.3678 +@prototype
1.3679 +*/
1.3680 +void CCamera::CCameraAdvancedSettings::DisableCameraStateSavingL(RWriteStream& /*aCustomCameraState*/)
1.3681 + {
1.3682 + User::Leave(KErrNotSupported);
1.3683 + }
1.3684 +
1.3685 +/**
1.3686 +Instructs the implementation to restore a custom saved state.
1.3687 +The camera can be restored in any of the custom camera states saved earlier.
1.3688 +
1.3689 +@param aCustomCameraState
1.3690 + A RReadStream reference which will be used by the implementation to restore a custom camera state
1.3691 + which was saved earlier.
1.3692 +
1.3693 +@note The ECam client should be careful not to use the saved state for a particular camera in order to restore a
1.3694 + different camera later on. Though the implementation will be expected to take care of such things since the
1.3695 + content of the files are only meaningful for the implementation.
1.3696 +
1.3697 +@note The RReadStream reference is not valid across the process.
1.3698 +
1.3699 +@leave May leave with any error code.
1.3700 +
1.3701 +@publishedPartner
1.3702 +@prototype
1.3703 +*/
1.3704 +void CCamera::CCameraAdvancedSettings::RestoreCameraStateL(RReadStream& /*aCustomCameraState*/)
1.3705 + {
1.3706 + User::Leave(KErrNotSupported);
1.3707 + }
1.3708 +
1.3709 +/**
1.3710 +Constructor for the TECamLEDSpecialEffectStep class.
1.3711 +Sets the size and version of this class.
1.3712 +*/
1.3713 +CCamera::CCameraAdvancedSettings::TECamLEDSpecialEffectStep::TECamLEDSpecialEffectStep()
1.3714 + {
1.3715 + iSize = sizeof(CCamera::CCameraAdvancedSettings::TECamLEDSpecialEffectStep);
1.3716 + iVersion = KECamLEDSpecialEffectStepCurrentVersion;
1.3717 + iBlinkingFrequency = 0;
1.3718 + iIntensity = 0;
1.3719 + iFrequencyStep = 0;
1.3720 + iDuration = 0;
1.3721 + }
1.3722 +
1.3723 +/**
1.3724 +Returns the size of the class. Used for extensibility by deriving from this base class and adding new member variables.
1.3725 +Intended to be used for implementation of methods where this class reference is passed as function arguments.
1.3726 +Implementation of such methods can find out whether the actual class passed is the base or the derived one. For example, if a new application
1.3727 +is made to run on an old implementation, an error may occur once the old implementation detects this by getting
1.3728 +the size information of the T class passed. Also, if an old application is made to run on a new implementation, this can be
1.3729 +correctly handled if the derived class variables handling is done in a proper 'if-else' statement.
1.3730 +
1.3731 +@return The size of the class.
1.3732 +
1.3733 +@note The size will be modified when the T-class gets updated.
1.3734 +*/
1.3735 +TUint CCamera::CCameraAdvancedSettings::TECamLEDSpecialEffectStep::Size() const
1.3736 + {
1.3737 + return iSize;
1.3738 + }
1.3739 +
1.3740 +/**
1.3741 +Returns the version of the class. Used for extensibility specially when the class members are not added but the Reserved
1.3742 +members get used at a later stage.
1.3743 +
1.3744 +@return The version of the class.
1.3745 +
1.3746 +@note The version will be modified when the T-class gets updated.
1.3747 +*/
1.3748 +TUint CCamera::CCameraAdvancedSettings::TECamLEDSpecialEffectStep::Version() const
1.3749 + {
1.3750 + return iVersion;
1.3751 + }
1.3752 +
1.3753 +/**
1.3754 +Constructor for the TContinuousZoomSupportInfo class.
1.3755 +Sets the size and version of this class.
1.3756 +*/
1.3757 +EXPORT_C CCamera::CCameraAdvancedSettings::TContinuousZoomSupportInfo::TContinuousZoomSupportInfo()
1.3758 + {
1.3759 + iSize = sizeof(CCamera::CCameraAdvancedSettings::TContinuousZoomSupportInfo);
1.3760 + iVersion = KContinuousZoomSupportInfoCurrentVersion;
1.3761 + }
1.3762 +
1.3763 +/**
1.3764 +Returns the size of the class. Used for extensibility by deriving from this base class and adding new member variables.
1.3765 +Intended to be used for implementation of methods where this class reference is passed as function arguments.
1.3766 +Implementation of such methods can find out whether the actual class passed is the base or the derived one. For example, if a new application
1.3767 +is made to run on an old implementation, an error may occur once the old implementation detects this by getting
1.3768 +the size information of the T class passed. Also, if an old application is made to run on a new implementation, this can be
1.3769 +correctly handled if the derived class variables handling is done in a proper 'if-else' statement.
1.3770 +
1.3771 +@return The size of the class.
1.3772 +
1.3773 +@note The size will be modified when the T-class gets updated.
1.3774 +*/
1.3775 +EXPORT_C TUint CCamera::CCameraAdvancedSettings::TContinuousZoomSupportInfo::Size() const
1.3776 + {
1.3777 + return iSize;
1.3778 + }
1.3779 +
1.3780 +/**
1.3781 +Returns the version of the class. Used for extensibility specially when the class members are not added but the Reserved
1.3782 +members get used at a later stage.
1.3783 +
1.3784 +@return The version of the class.
1.3785 +
1.3786 +@note The version will be modified when the T-class gets updated.
1.3787 +*/
1.3788 +EXPORT_C TUint CCamera::CCameraAdvancedSettings::TContinuousZoomSupportInfo::Version() const
1.3789 + {
1.3790 + return iVersion;
1.3791 + }
1.3792 +
1.3793 +/**
1.3794 +Constructor for the TContinuousZoomParameters class.
1.3795 +Sets the size and version of this class.
1.3796 +*/
1.3797 +EXPORT_C CCamera::CCameraAdvancedSettings::TContinuousZoomParameters::TContinuousZoomParameters()
1.3798 + {
1.3799 + iSize = sizeof(CCamera::CCameraAdvancedSettings::TContinuousZoomParameters);
1.3800 + iVersion = KContinuousZoomParametersCurrentVersion;
1.3801 + }
1.3802 +
1.3803 +/**
1.3804 +Returns the size of the class. Used for extensibility by deriving from this base class and adding new member variables.
1.3805 +Intended to be used for implementation of methods where this class reference is passed as function arguments.
1.3806 +Implementation of such methods can find out whether the actual class passed is the base or the derived one. For example, if a new application
1.3807 +is made to run on an old implementation, an error may occur once the old implementation detects this by getting
1.3808 +the size information of the T class passed. Also, if an old application is made to run on a new implementation, this can be
1.3809 +correctly handled if the derived class variables handling is done in a proper 'if-else' statement.
1.3810 +
1.3811 +@return The size of the class.
1.3812 +
1.3813 +@note The size will be modified when the T-class gets updated.
1.3814 +*/
1.3815 +EXPORT_C TUint CCamera::CCameraAdvancedSettings::TContinuousZoomParameters::Size() const
1.3816 + {
1.3817 + return iSize;
1.3818 + }
1.3819 +
1.3820 +/**
1.3821 +Returns the version of the class. Used for extensibility specially when the class members are not added but the Reserved
1.3822 +members get used at a later stage.
1.3823 +
1.3824 +@return The version of the class.
1.3825 +
1.3826 +@note The version will be modified when the T-class gets updated.
1.3827 +*/
1.3828 +EXPORT_C TUint CCamera::CCameraAdvancedSettings::TContinuousZoomParameters::Version() const
1.3829 + {
1.3830 + return iVersion;
1.3831 + }
1.3832 +
1.3833 +
1.3834 +/**
1.3835 +Factory function that creates a new continuous zoom object.
1.3836 +
1.3837 +@param aObserver
1.3838 + Continuous zoom observer which is passed to the implementation so it can provide callbacks to the client.
1.3839 +
1.3840 +@param aContinuousZoomType
1.3841 + The continuous zoom type that the implementation will be initialised with.
1.3842 +
1.3843 +@param aImplFactory
1.3844 + A constant reference to the MImplementationFactory derived object.
1.3845 +
1.3846 +@leave KErrNoMemory if out of memory; also any system wide error.
1.3847 +
1.3848 +@return A pointer to a fully constructed continuous zoom object.
1.3849 +*/
1.3850 +CCamera::CCameraContinuousZoom* CCamera::CCameraContinuousZoom::CreateL(MContinuousZoomObserver& aObserver, CCamera::CCameraAdvancedSettings::TContinuousZoomType aContinuousZoomType, const MImplementationFactory& aImplFactory)
1.3851 + {
1.3852 + CCameraContinuousZoom* self = new (ELeave) CCameraContinuousZoom();
1.3853 + CleanupStack::PushL(self);
1.3854 + self->ConstructL(aObserver, aContinuousZoomType, aImplFactory);
1.3855 + CleanupStack::Pop(self);
1.3856 + return self;
1.3857 + }
1.3858 +
1.3859 +/**
1.3860 +CCameraContinuousZoom Constructor.
1.3861 +*/
1.3862 +CCamera::CCameraContinuousZoom::CCameraContinuousZoom()
1.3863 + : iImpl(NULL)
1.3864 + {
1.3865 + }
1.3866 +
1.3867 +/**
1.3868 +CCameraContinuousZoom second phase constructor.
1.3869 +
1.3870 +Function used to initialise internal state of the object.
1.3871 +
1.3872 +@param aObserver
1.3873 + Continuous zoom observer which is passed to the implementation so it can provide callbacks to the client.
1.3874 +
1.3875 +@param aContinuousZoomType
1.3876 + The continuous zoom type that the implementation will be initialised with.
1.3877 +
1.3878 +@param aImplFactory
1.3879 + A constant reference to the MImplementationFactory derived object.
1.3880 +
1.3881 +@leave KErrNoMemory Out of memory.
1.3882 +*/
1.3883 +void CCamera::CCameraContinuousZoom::ConstructL(MContinuousZoomObserver& aObserver, CCamera::CCameraAdvancedSettings::TContinuousZoomType aContinuousZoomType, const MImplementationFactory& aImplFactory)
1.3884 + {
1.3885 + TAny* implPtr = NULL;
1.3886 + TInt zoomTypeValue = static_cast<TInt>(aContinuousZoomType);
1.3887 + TECamImplFactoryParam param(zoomTypeValue);
1.3888 +
1.3889 + User::LeaveIfError(aImplFactory.GetImpl1(implPtr, KECamMCameraContinuousZoomUid, param));
1.3890 +
1.3891 + iImpl = static_cast<MCameraContinuousZoom*>(implPtr);
1.3892 +
1.3893 + iImpl->SetContinuousZoomObserverAndHandle(aObserver, this);
1.3894 + }
1.3895 +
1.3896 +/**
1.3897 +Destructor
1.3898 +*/
1.3899 +EXPORT_C CCamera::CCameraContinuousZoom::~CCameraContinuousZoom()
1.3900 + {
1.3901 + if(iImpl != NULL)
1.3902 + {
1.3903 + iImpl->Release();
1.3904 + }
1.3905 + }
1.3906 +
1.3907 +/**
1.3908 +Starts the continuous zoom operation. Clients wil receive MContinuousZoomObserver::ContinuousZoomProgress() callback for intermediate
1.3909 +zoom factors achieved. Depending on the implementation, the client may or may not receive this callback for every intermediate zoom factor.
1.3910 +Upon completion, the client will receive MContinuousZoomObserver::ContinuousZoomComplete() callback.
1.3911 +
1.3912 +@param aContinuousZoomParameters
1.3913 + The desired parameters to be used for the continuous zoom operation.
1.3914 +
1.3915 +@note If the implementation does not support re-configuring of zoom parameters whilst an existing continuous zoom operation is active then
1.3916 + StartContinuousZoomL() will leave with KErrInUse.
1.3917 +
1.3918 +@note If client has selected EDirectionTele zoom direction and the current zoom factor is greater than the target zoom factor, StartContinuousZoomL()
1.3919 + will leave with KErrArgument. Similarly, StartContinuousZoomL() will also leave with KErrArgument if client has selected EDirectionWide zoom
1.3920 + direction and current zoom factor is less than target zoom factor.
1.3921 +
1.3922 +@leave May leave with any error code.
1.3923 +*/
1.3924 +EXPORT_C void CCamera::CCameraContinuousZoom::StartContinuousZoomL(CCamera::CCameraAdvancedSettings::TContinuousZoomParameters aContinuousZoomParameters)
1.3925 + {
1.3926 + iImpl->StartContinuousZoomL(aContinuousZoomParameters);
1.3927 + }
1.3928 +
1.3929 +/**
1.3930 +Stop any exisiting continuous zoom operation.
1.3931 +Since this method is synchronous, no callback shall be issued for the concerned continuous zoom operation.
1.3932 +*/
1.3933 +EXPORT_C void CCamera::CCameraContinuousZoom::StopContinuousZoom()
1.3934 + {
1.3935 + iImpl->StopContinuousZoom();
1.3936 + }
1.3937 +
1.3938 +/**
1.3939 +Retrieves information about the supported settings related to continuous zoom support.
1.3940 +
1.3941 +@param aContinuousZoomInfo
1.3942 + The information of supported continuous zoom functionality.
1.3943 +
1.3944 +@leave May leave with any error code.
1.3945 +*/
1.3946 +EXPORT_C void CCamera::CCameraContinuousZoom::GetContinuousZoomSupportInfoL(CCamera::CCameraAdvancedSettings::TContinuousZoomSupportInfo& aContinuousZoomInfo) const
1.3947 + {
1.3948 + iImpl->GetContinuousZoomSupportInfoL(aContinuousZoomInfo);
1.3949 + }
1.3950 +
1.3951 +/**
1.3952 +Retrieves the unique id of the continuous zoom object.
1.3953 +This is used to identify the continuous zoom handle returned to clients via the MContinuousZoomObserver callback.
1.3954 +
1.3955 +@param aZoomId
1.3956 + The unique id of this Continuous Zoom object.
1.3957 +*/
1.3958 +EXPORT_C void CCamera::CCameraContinuousZoom::GetContinuousZoomId(TInt& aZoomId) const
1.3959 + {
1.3960 + iImpl->GetContinuousZoomId(aZoomId);
1.3961 + }