1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/imagingandcamerafws/camerafw/source/CameraHistogram.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,586 @@
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 +/**
1.20 + @file
1.21 + @publishedPartner
1.22 + @prototype
1.23 +*/
1.24 +
1.25 +#include <ecam/mcamerahistogram.h>
1.26 +#include "ecamversion.h"
1.27 +#include <ecam/implementationfactoryintf.h>
1.28 +
1.29 +/**
1.30 +@deprecated use static CCamera::CCameraV2Histogram* CreateL(CCamera& aCamera, MImplementationFactory& aImplFactory)
1.31 +
1.32 +Factory function that creates a new camera histogram object on the heap.
1.33 +
1.34 +@param aCamera
1.35 + A reference to the camera object for which a camera histogram object is to be created.
1.36 +
1.37 +@leave KErrNoMemory if out of memory; also any system wide error.
1.38 +
1.39 +@return A pointer to the newly created camera histogram object.
1.40 +
1.41 +@note Clients using MCameraObserver are not recommended to use this extension class since they cannot handle events.
1.42 +*/
1.43 +EXPORT_C CCamera::CCameraHistogram* CCamera::CCameraHistogram::NewL(CCamera& aCamera)
1.44 + {
1.45 + CCamera::CCameraHistogram* self = new (ELeave) CCamera::CCameraHistogram(aCamera);
1.46 + CleanupStack::PushL(self);
1.47 + self->ConstructL();
1.48 + CleanupStack::Pop(self);
1.49 + return self;
1.50 + }
1.51 +
1.52 +/**
1.53 +@deprecated use void CCamera::CCameraV2Histogram::ConstructL(const MImplementationFactory& aImplFactory)
1.54 +
1.55 +CCameraHistogram second phase constructor.
1.56 +
1.57 +This function used to initialise internal state of the object.
1.58 +It uses reference to the camera to retrieve histogram interface pointer.
1.59 +
1.60 +@leave KErrNotSupported if this functionality is not supported; also any system wide error.
1.61 +*/
1.62 +void CCamera::CCameraHistogram::ConstructL()
1.63 + {
1.64 + iImpl = static_cast<MCameraHistogram*>(iOwner.CustomInterface(KECamMCameraHistogramUid));
1.65 +
1.66 + if (iImpl == NULL)
1.67 + {
1.68 + User::Leave(KErrNotSupported);
1.69 + }
1.70 + }
1.71 +
1.72 +/**
1.73 +@deprecated use CCamera::CCameraV2Histogram::CCameraV2Histogram(CCamera& aOwner)
1.74 +
1.75 +Constructor for the CCamera::CCameraHistogram class.
1.76 +
1.77 +@param aOwner
1.78 + A reference to the camera object for which a camera histogram object is to be created.
1.79 +*/
1.80 +CCamera::CCameraHistogram::CCameraHistogram(CCamera& aOwner):iOwner(aOwner), iImpl(NULL)
1.81 + {
1.82 + }
1.83 +
1.84 +/**
1.85 +@deprecated use CCamera::CCameraV2Histogram::~CCameraV2Histogram()
1.86 +
1.87 +Destructor for the CCamera::CCameraHistogram class.
1.88 +*/
1.89 +EXPORT_C CCamera::CCameraHistogram::~CCameraHistogram()
1.90 + {
1.91 + if (iImpl != NULL)
1.92 + {
1.93 + iImpl->Release();
1.94 + }
1.95 + }
1.96 +
1.97 +/**
1.98 +@deprecated use void CCamera::CCameraV2Histogram::GetSupportedHistogramsL(TUint& aSupportedHistogramType)
1.99 +
1.100 +Gets a list of the types of histograms the ECam implementation supports.
1.101 +
1.102 +@return A bit field representing all supported types of histograms.
1.103 +
1.104 +@see CCamera::CCameraHistogram::THistogramType
1.105 +*/
1.106 +EXPORT_C TUint32 CCamera::CCameraHistogram::SupportedHistograms()
1.107 + {
1.108 + return iImpl->SupportedHistograms();
1.109 + }
1.110 +
1.111 +/**
1.112 +@deprecated use void CCamera::CCameraV2Histogram::PrepareClientHistogramL
1.113 +
1.114 +Request to prepare a non direct histogram.
1.115 +
1.116 +@note A direct histogram is directly embedded into the viewfinder.
1.117 + If a non direct histogram is requested the histogram data will be passed to the camera client.
1.118 +
1.119 +@param aType
1.120 + The type of histogram to be prepared. This must be one of the supported histogram types returned by
1.121 + SupportedHistograms().
1.122 +
1.123 +@leave KErrNotSupported if the histogram type supplied in aType is not supported.
1.124 +
1.125 +@return An integer value which is the handle of the histogram on the ECam implementation.
1.126 + This value must be passed to other API functions when requesting operations
1.127 + involving this particular histogram.
1.128 +
1.129 +@see PrepareDSAHistogramL
1.130 +*/
1.131 +EXPORT_C TUint CCamera::CCameraHistogram::PrepareHistogramL(THistogramType aType)
1.132 + {
1.133 + return iImpl->PrepareHistogramL(aType);
1.134 + }
1.135 +
1.136 +/**
1.137 +@deprecated use void CCamera::CCameraV2Histogram::PrepareDirectHistogramL
1.138 +
1.139 +Request to prepare a direct histogram.
1.140 +
1.141 +@note A Direct histogram is directly embedded into the viewfinder.
1.142 +
1.143 +@param aType
1.144 + The type of histogram to be prepared. This must be one of the supported histogram types returned by
1.145 + SupportedHistograms().
1.146 +@param aPosition
1.147 + The position on the screen (in pixels) where the histogram is to be displayed.
1.148 +@param aSize
1.149 + The size of histogram in pixels.
1.150 +@param aColor
1.151 + The colour and alpha blending with which the histogram will be displayed.
1.152 +
1.153 +@leave KErrNotSupported if the histogram type supplied in aType is not supported.
1.154 +
1.155 +@return An integer value which is the handle of the histogram on the ECam implementation.
1.156 + This value must be passed to other API functions when requesting operations
1.157 + involving this particular histogram.
1.158 +
1.159 +@see PrepareHistogramL
1.160 +*/
1.161 +EXPORT_C TUint CCamera::CCameraHistogram::PrepareDSAHistogramL(THistogramType aType, const TPoint& aPosition, const TSize& aSize, const TRgb& aColor)
1.162 + {
1.163 + return iImpl->PrepareDSAHistogramL(aType, aPosition, aSize, aColor);
1.164 + }
1.165 +
1.166 +/**
1.167 +@deprecated use void CCamera::CCameraV2Histogram::StartHistogram()
1.168 +
1.169 +Request to start getting histogram notifications.
1.170 +
1.171 +@param aHistHandle
1.172 + The handle identifying the histogram on the ECam implementation.
1.173 +
1.174 +@leave KErrArgument if aHistHandle is out of range; also any system wide error.
1.175 +
1.176 +@see KUidECamEventCameraHistogram
1.177 +*/
1.178 +EXPORT_C void CCamera::CCameraHistogram::StartHistogramL(TUint aHistHandle)
1.179 + {
1.180 + iImpl->StartHistogramL(aHistHandle);
1.181 + }
1.182 +
1.183 +/**
1.184 +@deprecated use void CCamera::CCameraV2Histogram::StopHistogram()
1.185 +
1.186 +Request to stop getting histogram notifications.
1.187 +
1.188 +@param aHistHandle
1.189 + The handle identifying the histogram on the ECam implementation.
1.190 +
1.191 +@leave KErrArgument if aHistHandle is out of range; also any system wide error.
1.192 +*/
1.193 +EXPORT_C void CCamera::CCameraHistogram::StopHistogramL(TUint aHistHandle)
1.194 + {
1.195 + iImpl->StopHistogramL(aHistHandle);
1.196 + }
1.197 +
1.198 +/**
1.199 +@deprecated only one histogram is available per buffer with the usage of MHistogramV2Buffer and CCameraV2Histogram.
1.200 +
1.201 +Destroys a histogram on the ECam implementation and releases its handle.
1.202 +
1.203 +@param aHistHandle
1.204 + The handle identifying the histogram on the ECam implementation.
1.205 +
1.206 +@leave KErrArgument if aHistHandle is out of range; also any system wide error.
1.207 +*/
1.208 +EXPORT_C void CCamera::CCameraHistogram::DestroyHistogramL(TUint aHistHandle)
1.209 + {
1.210 + iImpl->DestroyHistogramL(aHistHandle);
1.211 + }
1.212 +
1.213 +/**
1.214 +@deprecated use void CCamera::CCameraV2Histogram::GetHistogramStateL(TBool& aIsHistogramActive)
1.215 +
1.216 +Gets a list of all histograms that are active on the ECam implementation.
1.217 +A histogram is in an active state if StartHistogramL() has been called on it.
1.218 +
1.219 +@param aActiveHistograms
1.220 + Returned list of histogram handles for which StartHistogramL() has been called.
1.221 +
1.222 +@leave KErrNoMemory if the ECam implementation cannot add more histogram handles due to low memory; also any system wide error.
1.223 +*/
1.224 +EXPORT_C void CCamera::CCameraHistogram::GetActiveHistogramsL(RArray<TUint>& aActiveHistograms)
1.225 + {
1.226 + iImpl->GetActiveHistogramsL(aActiveHistograms);
1.227 + }
1.228 +
1.229 +/**
1.230 +@deprecated use void CCamera::CCameraV2Histogram::UpdateDirectHistogramPropertiesL
1.231 +
1.232 +Updates the properties of a direct histogram.
1.233 +
1.234 +@param aHistHandle
1.235 + The handle identifying the histogram on the ECam implementation.
1.236 +@param aPosition
1.237 + The new position on the screen (in pixels) where the histogram is to be displayed.
1.238 +@param aSize
1.239 + The new size of histogram in pixels.
1.240 +@param aColor
1.241 + The new colour and alpha blending with which the histogram will be displayed.
1.242 +
1.243 +@leave KErrArgument if aHistHandle is out of range; also any system wide error.
1.244 +*/
1.245 +EXPORT_C void CCamera::CCameraHistogram::UpdateDSAHistogramPropertiesL(TUint aHistHandle, const TPoint& aPosition, const TSize& aSize, const TRgb& aColor)
1.246 + {
1.247 + iImpl->UpdateDSAHistogramPropertiesL(aHistHandle, aPosition, aSize, aColor);
1.248 + }
1.249 +
1.250 +/**
1.251 +@deprecated use void CCamera::CCameraV2Histogram::GetDirectHistogramPropertiesL
1.252 +
1.253 +Gets the properties of a direct histogram.
1.254 +
1.255 +@param aHistHandle
1.256 + The handle on the ECam implementation of the direct histogram whose properties are to be retrieved.
1.257 +@param aPosition
1.258 + A reference to a TPoint object that will receive the position (in pixels) of the histogram on the screen.
1.259 +@param aSize
1.260 + A reference to a TSize object that will receive the size of the histogram in pixels.
1.261 +@param aColor
1.262 + A reference to a TRgb object that will receive the colour and alpha blending of the histogram.
1.263 +
1.264 +@leave KErrArgument if aHistHandle is out of range; also any system wide error.
1.265 +
1.266 +@note If the method leaves, the reference arguments are not guaranteed to be valid.
1.267 +*/
1.268 +EXPORT_C void CCamera::CCameraHistogram::GetDSAHistogramPropertiesL(TUint aHistHandle, TPoint& aPosition, TSize& aSize, TRgb& aColor)
1.269 + {
1.270 + iImpl->GetDSAHistogramPropertiesL(aHistHandle, aPosition, aSize, aColor);
1.271 + }
1.272 +
1.273 +
1.274 +/**
1.275 +@deprecated use MCaptureImageObserver, MCaptureVideoObserver, MDirectViewFinderObserver, and MClientViewFinderObserver
1.276 +which have callback functions which notify the client about availability of histogram data. These are sent when
1.277 +CCameraV2Histogram::StartHistogram() is called after CCameraV2Histogram::PrepareClientHistogramL(). If
1.278 +CCameraV2Histogram::PrepareClientHistogramL() is not called first then the callback returns KErrBadHandle.
1.279 +
1.280 +Returns to the client the histogram data for all the histograms generated by the ECam implementation.
1.281 +
1.282 +@note The client application using this API should provide MCameraObserver2 interface to be
1.283 +signalled when histogram data is available to be retrieved from the ECAM implementation.
1.284 +
1.285 +@see KUidECamEventCameraHistogram
1.286 +
1.287 +@leave KErrNoMemory if the ECam implementation has not been able to create the histogram buffer;
1.288 + also any system wide error.
1.289 +
1.290 +@return A reference to a histogram buffer which will contain the returned histogram data.
1.291 +*/
1.292 +EXPORT_C MHistogramBuffer& CCamera::CCameraHistogram::HistogramDataL()
1.293 + {
1.294 + return iImpl->HistogramDataL();
1.295 + }
1.296 +
1.297 +/**
1.298 +@deprecated use MCaptureImageObserver, MCaptureVideoObserver, MDirectViewFinderObserver, and MClientViewFinderObserver
1.299 +which have callback functions which notify the client about availability of histogram data. These are sent when
1.300 +CCameraV2Histogram::StartHistogram() is called after CCameraV2Histogram::PrepareClientHistogramL(). If
1.301 +CCameraV2Histogram::PrepareClientHistogramL() is not called first then the callback returns KErrBadHandle.
1.302 +
1.303 +Returns the data for a single histogram from the ECam implementation to the client.
1.304 +
1.305 +@note The client application using this API should provide MCameraObserver2 interface to be
1.306 +signalled when histogram data is available to be retrieved from the ECAM implementation.
1.307 +
1.308 +@see KUidECamEventCameraHistogram
1.309 +
1.310 +@param aHistHandle
1.311 + The handle on the ECam implementation of the histogram whose data is to be retrieved.
1.312 +
1.313 +@leave KErrNoMemory if the ECam implementation has not been able to create the histogram buffer;
1.314 + also any system wide error.
1.315 +
1.316 +@return A reference to a histogram buffer which will contain the returned histogram data.
1.317 +*/
1.318 +EXPORT_C MHistogramBuffer& CCamera::CCameraHistogram::HistogramDataL(TUint aHistHandle)
1.319 + {
1.320 + return iImpl->HistogramDataL(aHistHandle);
1.321 + }
1.322 +
1.323 +
1.324 +//
1.325 +// CCameraV2Histogram //
1.326 +//
1.327 +/**
1.328 +@internalComponent
1.329 +
1.330 +Factory function that creates a new camera histogram object specifically for a camera mode, for example, still image,
1.331 +video, snapshot and specific viewfinder.
1.332 +
1.333 +@param aCamera
1.334 + A reference to the camera object for which a camera histogram object is to be created.
1.335 +
1.336 +@param aImplFactory
1.337 + A reference to the MImplementationFactory derived object.
1.338 +
1.339 +@leave KErrNoMemory if out of memory; also any system wide error.
1.340 +
1.341 +@leave KErrExtensionNotSupported When NewL/NewDuplicateL used instead of New2L/NewDuplicate2L.
1.342 +
1.343 +@return A pointer to a fully constructed camera histogram object.
1.344 +
1.345 +@note This method is supposed to be used by internal ECAM components only.
1.346 +*/
1.347 +EXPORT_C CCamera::CCameraV2Histogram* CCamera::CCameraV2Histogram::CreateL(CCamera& aCamera, MImplementationFactory& aImplFactory)
1.348 + {
1.349 + if(aCamera.CameraVersion() == KCameraDefaultVersion)
1.350 + {
1.351 + User::Leave(KErrExtensionNotSupported);
1.352 + }
1.353 +
1.354 + CCamera::CCameraV2Histogram* self = new (ELeave) CCamera::CCameraV2Histogram(aCamera);
1.355 + CleanupStack::PushL(self);
1.356 + self->ConstructL(aImplFactory);
1.357 + CleanupStack::Pop(self);
1.358 + return self;
1.359 + }
1.360 +
1.361 +/**
1.362 +@internalComponent
1.363 +
1.364 +CCameraV2Histogram second phase constructor
1.365 +
1.366 +Function used to initialise internal state of the object specifically for a camera mode, for example, still image,
1.367 +video, snapshot and specific viewfinder.
1.368 +
1.369 +This may be used in other possible cases as well.
1.370 +
1.371 +@param aImplFactory
1.372 + A constant reference to the MImplementationFactory derived object.
1.373 +
1.374 +@leave KErrNoMemory Out of memory; or any other error code as well.
1.375 +
1.376 +@note This method is supposed to be used by this class only.
1.377 +*/
1.378 +void CCamera::CCameraV2Histogram::ConstructL(const MImplementationFactory& aImplFactory)
1.379 + {
1.380 + TInt err = KErrNone;
1.381 + TAny* implPtr = NULL;
1.382 +
1.383 + err = aImplFactory.GetImpl(implPtr, KECamMCameraV2HistogramUid);
1.384 + if (err != KErrNone)
1.385 + {
1.386 + User::Leave(err);
1.387 + }
1.388 + iImpl = static_cast<MCameraV2Histogram*>(implPtr);
1.389 +
1.390 + iImpl->SetHistogramHandle(this);
1.391 + }
1.392 +
1.393 +/**
1.394 +Constructor for the CCamera::CCameraV2Histogram class.
1.395 +
1.396 +@param aOwner
1.397 + A reference to the camera object for which a camera histogram object is to be created.
1.398 +*/
1.399 +CCamera::CCameraV2Histogram::CCameraV2Histogram(CCamera& aOwner):iOwner(aOwner), iImpl(NULL)
1.400 + {
1.401 + }
1.402 +
1.403 +/**
1.404 +Destructor for the CCamera::CCameraV2Histogram class.
1.405 +*/
1.406 +EXPORT_C CCamera::CCameraV2Histogram::~CCameraV2Histogram()
1.407 + {
1.408 + if (iImpl != NULL)
1.409 + {
1.410 + iImpl->Release(this);
1.411 + }
1.412 + }
1.413 +
1.414 +/**
1.415 +Retrieves a list of the supported types of histograms.
1.416 +
1.417 +@param aSupportedHistogramType
1.418 + A reference to bit field representing the supported types of histograms as given by CCamera::
1.419 + CCameraV2Histogram::THistogramType
1.420 +
1.421 +@leave May leave with any error code.
1.422 +
1.423 +@see CCamera::CCameraV2Histogram::THistogramType
1.424 +*/
1.425 +EXPORT_C void CCamera::CCameraV2Histogram::GetSupportedHistogramsL(TUint& aSupportedHistogramType) const
1.426 + {
1.427 + return iImpl->GetSupportedHistogramsL(aSupportedHistogramType);
1.428 + }
1.429 +
1.430 +/**
1.431 +Informs whether or not the direct histogram is supported.
1.432 +
1.433 +@param aIsDirectHistogramSupported
1.434 + ETrue implies that direct histogram is supported.
1.435 + EFalse implies that direct histogram is not supported.
1.436 +
1.437 +@leave May leave with any error code.
1.438 +*/
1.439 +EXPORT_C void CCamera::CCameraV2Histogram::GetDirectHistogramSupportInfoL(TBool& aIsDirectHistogramSupported) const
1.440 + {
1.441 + return iImpl->GetDirectHistogramSupportInfoL(aIsDirectHistogramSupported);
1.442 + }
1.443 +
1.444 +/**
1.445 +Request to prepare a client based histogram.
1.446 +
1.447 +@note A direct histogram is directly embedded into the viewfinder.
1.448 + If a non direct histogram is requested the histogram data will be passed to the camera client.
1.449 +
1.450 +@param aType
1.451 + The type of histogram to be prepared. This must be one of the supported histogram types given by
1.452 + GetSupportedHistogramsL.
1.453 +
1.454 +@leave May leave with any error code.
1.455 +
1.456 +@note Each histogram object will either prepare direct histogram or client histogram. Preparing multiple histograms
1.457 + per object is an invalid case.
1.458 +
1.459 +@see PrepareDSAHistogramL
1.460 +*/
1.461 +EXPORT_C void CCamera::CCameraV2Histogram::PrepareClientHistogramL(CCamera::CCameraV2Histogram::THistogramType aType)
1.462 + {
1.463 + iImpl->PrepareClientHistogramL(aType);
1.464 + }
1.465 +
1.466 +/**
1.467 +Prepares the direct histogram.
1.468 +
1.469 +@param aDirectHistogramParameters
1.470 + The parameters required to prepare the direct histogram.
1.471 +
1.472 +@leave May leave with any error code.
1.473 +
1.474 +@note Each histogram object will either prepare direct histogram or client histogram. Preparing multiple histograms
1.475 + per object is an invalid case.
1.476 +
1.477 +@see PrepareClientHistogramL
1.478 +*/
1.479 +EXPORT_C void CCamera::CCameraV2Histogram::PrepareDirectHistogramL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters)
1.480 + {
1.481 + iImpl->PrepareDirectHistogramL(aDirectHistogramParameters);
1.482 + }
1.483 +
1.484 +/**
1.485 +Update the parameters for the direct histogram.
1.486 +
1.487 +@param aDirectHistogramParameters
1.488 + The desired parameters which have to be used to update the direct histogram.
1.489 +
1.490 +@leave May leave with any error code.
1.491 +*/
1.492 +EXPORT_C void CCamera::CCameraV2Histogram::UpdateDirectHistogramPropertiesL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters)
1.493 + {
1.494 + iImpl->UpdateDirectHistogramPropertiesL(aDirectHistogramParameters);
1.495 + }
1.496 +
1.497 +/**
1.498 +Retrieves the currently used parameters for the direct histogram.
1.499 +
1.500 +@param aDirectHistogramParameters
1.501 + Retrieves the parameters currently being used for the direct histogram.
1.502 +
1.503 +@leave May leave with any error code.
1.504 +*/
1.505 +EXPORT_C void CCamera::CCameraV2Histogram::GetDirectHistogramPropertiesL(CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters) const
1.506 + {
1.507 + iImpl->GetDirectHistogramPropertiesL(aDirectHistogramParameters);
1.508 + }
1.509 +
1.510 +/**
1.511 +Request to start getting histogram notifications.
1.512 +
1.513 +@note Histogram should have been prepared before calling this method.
1.514 +
1.515 +@note Histogram notifications are sent to the client by using relevant callbacks for image capture, video capture and
1.516 + viewfinders.
1.517 +
1.518 +@see MCaptureImageObserver
1.519 +@see MCaptureVideoObserver
1.520 +@see MDirectViewFinderObserver
1.521 +@see MClientViewFinderObserver
1.522 +*/
1.523 +EXPORT_C void CCamera::CCameraV2Histogram::StartHistogram()
1.524 + {
1.525 + iImpl->StartHistogram();
1.526 + }
1.527 +
1.528 +/**
1.529 +Request to stop generating histogram.
1.530 +*/
1.531 +EXPORT_C void CCamera::CCameraV2Histogram::StopHistogram()
1.532 + {
1.533 + iImpl->StopHistogram();
1.534 + }
1.535 +
1.536 +/**
1.537 +Informs whether the histogram is currently active or not.
1.538 +A histogram is in an active state if StartHistogram() has been called on it and has not been yet stopped.
1.539 +
1.540 +@param aIsHistogramActive
1.541 + ETrue indicates that the histogram is active.
1.542 + EFalse indicates that the histogram is inactive.
1.543 +
1.544 +@leave May leave with any error code.
1.545 +*/
1.546 +EXPORT_C void CCamera::CCameraV2Histogram::GetHistogramStateL(TBool& aIsHistogramActive) const
1.547 + {
1.548 + iImpl->GetHistogramStateL(aIsHistogramActive);
1.549 + }
1.550 +
1.551 +/**
1.552 +Constructor for the TDirectHistogramParameters class.
1.553 +Sets the size and version of this class.
1.554 +*/
1.555 +EXPORT_C CCamera::CCameraV2Histogram::TDirectHistogramParameters::TDirectHistogramParameters()
1.556 + {
1.557 + iSize = sizeof(CCamera::CCameraV2Histogram::TDirectHistogramParameters);
1.558 + iVersion = KECamDirectHistogramParametersCurrentVersion;
1.559 + }
1.560 +
1.561 +/**
1.562 +Returns the size of the class. Used for extensibility by deriving from this base class and adding new member variables.
1.563 +Intended to be used for implementation of methods where this class reference is passed as function arguments.
1.564 +Implementation of such methods can find out the whether the actual class passed is base or the derived one. So, if a new application
1.565 +is made to run on an old implementation, an error may occur once the old implementation detects this by getting
1.566 +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.567 +handled correctly if the derived class variables handling is done in a proper 'if-else' statement.
1.568 +
1.569 +@return The size of the class.
1.570 +
1.571 +@note The size will be modified when the T-class gets updated.
1.572 +*/
1.573 +EXPORT_C TUint CCamera::CCameraV2Histogram::TDirectHistogramParameters::Size() const
1.574 + {
1.575 + return iSize;
1.576 + }
1.577 +
1.578 +/**
1.579 +Returns the version of the class. Used for extensibility specially when the class members are not added but the Reserved
1.580 +members get used at a later stage.
1.581 +
1.582 +@return The version of the class.
1.583 +
1.584 +@note The version will be modified when the T-class gets updated.
1.585 +*/
1.586 +EXPORT_C TUint CCamera::CCameraV2Histogram::TDirectHistogramParameters::Version() const
1.587 + {
1.588 + return iVersion;
1.589 + }