imagingandcamerafws/camerafw/source/CameraHistogram.cpp
changeset 0 40261b775718
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @publishedPartner
       
    19  @prototype
       
    20 */
       
    21 
       
    22 #include <ecam/mcamerahistogram.h>
       
    23 #include "ecamversion.h"
       
    24 #include <ecam/implementationfactoryintf.h>
       
    25 
       
    26 /**
       
    27 @deprecated use static CCamera::CCameraV2Histogram* CreateL(CCamera& aCamera, MImplementationFactory& aImplFactory)
       
    28 
       
    29 Factory function that creates a new camera histogram object on the heap.
       
    30 
       
    31 @param	aCamera
       
    32 		A reference to the camera object for which a camera histogram object is to be created.
       
    33 
       
    34 @leave  KErrNoMemory if out of memory; also any system wide error.
       
    35 
       
    36 @return A pointer to the newly created camera histogram object.
       
    37 
       
    38 @note  Clients using MCameraObserver are not recommended to use this extension class since they cannot handle events.
       
    39 */
       
    40 EXPORT_C CCamera::CCameraHistogram* CCamera::CCameraHistogram::NewL(CCamera& aCamera)
       
    41 	{
       
    42 	CCamera::CCameraHistogram* self = new (ELeave) CCamera::CCameraHistogram(aCamera);
       
    43 	CleanupStack::PushL(self);
       
    44 	self->ConstructL();
       
    45 	CleanupStack::Pop(self);
       
    46 	return self; 
       
    47 	}
       
    48 	
       
    49 /**
       
    50 @deprecated use void CCamera::CCameraV2Histogram::ConstructL(const MImplementationFactory& aImplFactory)
       
    51 
       
    52 CCameraHistogram second phase constructor. 
       
    53 
       
    54 This function used to initialise internal state of the object. 
       
    55 It uses reference to the camera to retrieve histogram interface pointer.
       
    56 
       
    57 @leave KErrNotSupported if this functionality is not supported; also any system wide error.
       
    58 */ 
       
    59 void CCamera::CCameraHistogram::ConstructL()
       
    60 	{
       
    61 	iImpl = static_cast<MCameraHistogram*>(iOwner.CustomInterface(KECamMCameraHistogramUid));
       
    62 
       
    63 	if (iImpl == NULL)
       
    64 		{
       
    65 		User::Leave(KErrNotSupported);
       
    66 		}
       
    67 	}
       
    68 	
       
    69 /**
       
    70 @deprecated use CCamera::CCameraV2Histogram::CCameraV2Histogram(CCamera& aOwner)
       
    71 
       
    72 Constructor for the CCamera::CCameraHistogram class.
       
    73 
       
    74 @param aOwner
       
    75 		A reference to the camera object for which a camera histogram object is to be created.
       
    76 */
       
    77 CCamera::CCameraHistogram::CCameraHistogram(CCamera& aOwner):iOwner(aOwner), iImpl(NULL)
       
    78 	{
       
    79 	}
       
    80 
       
    81 /**
       
    82 @deprecated use CCamera::CCameraV2Histogram::~CCameraV2Histogram() 
       
    83 
       
    84 Destructor for the CCamera::CCameraHistogram class.
       
    85 */
       
    86 EXPORT_C CCamera::CCameraHistogram::~CCameraHistogram()
       
    87 	{
       
    88 	if (iImpl != NULL)
       
    89 		{
       
    90 		iImpl->Release();	
       
    91 		}
       
    92 	}
       
    93 
       
    94 /**
       
    95 @deprecated use void CCamera::CCameraV2Histogram::GetSupportedHistogramsL(TUint& aSupportedHistogramType)
       
    96 
       
    97 Gets a list of the types of histograms the ECam implementation supports.
       
    98 
       
    99 @return	A bit field representing all supported types of histograms. 
       
   100 
       
   101 @see CCamera::CCameraHistogram::THistogramType
       
   102 */
       
   103 EXPORT_C TUint32 CCamera::CCameraHistogram::SupportedHistograms()
       
   104 	{
       
   105 	return iImpl->SupportedHistograms();
       
   106 	}
       
   107 
       
   108 /**
       
   109 @deprecated use void CCamera::CCameraV2Histogram::PrepareClientHistogramL
       
   110 
       
   111 Request to prepare a non direct histogram.
       
   112 
       
   113 @note 	A direct histogram is directly embedded into the viewfinder.
       
   114 		If a non direct histogram is requested the histogram data will be passed to the camera client.
       
   115 
       
   116 @param	aType		
       
   117 		The type of histogram to be prepared. This must be one of the supported histogram types returned by
       
   118 		SupportedHistograms().
       
   119 
       
   120 @leave	KErrNotSupported if the histogram type supplied in aType is not supported.
       
   121 
       
   122 @return An integer value which is the handle of the histogram on the ECam implementation.
       
   123  		This value must be passed to other API functions when requesting operations 
       
   124  		involving this particular histogram.
       
   125 
       
   126 @see PrepareDSAHistogramL
       
   127 */
       
   128 EXPORT_C TUint CCamera::CCameraHistogram::PrepareHistogramL(THistogramType aType)
       
   129 	{
       
   130 	return iImpl->PrepareHistogramL(aType);
       
   131 	}
       
   132 
       
   133 /**
       
   134 @deprecated use void CCamera::CCameraV2Histogram::PrepareDirectHistogramL
       
   135 
       
   136 Request to prepare a direct histogram.
       
   137 
       
   138 @note A Direct histogram is directly embedded into the viewfinder.
       
   139 
       
   140 @param	aType		
       
   141 		The type of histogram to be prepared. This must be one of the supported histogram types returned by
       
   142 		SupportedHistograms().
       
   143 @param	aPosition
       
   144 		The position on the screen (in pixels) where the histogram is to be displayed.
       
   145 @param	aSize
       
   146 		The size of histogram in pixels.
       
   147 @param	aColor
       
   148 		The colour and alpha blending with which the histogram will be displayed. 
       
   149 
       
   150 @leave	KErrNotSupported if the histogram type supplied in aType is not supported.
       
   151 		
       
   152 @return An integer value which is the handle of the histogram on the ECam implementation.
       
   153  		This value must be passed to other API functions when requesting operations 
       
   154  		involving this particular histogram.
       
   155 
       
   156 @see PrepareHistogramL
       
   157 */
       
   158 EXPORT_C TUint CCamera::CCameraHistogram::PrepareDSAHistogramL(THistogramType aType, const TPoint& aPosition, const TSize& aSize, const TRgb& aColor)
       
   159 	{
       
   160 	return iImpl->PrepareDSAHistogramL(aType, aPosition, aSize, aColor);
       
   161 	}
       
   162 
       
   163 /**
       
   164 @deprecated use void CCamera::CCameraV2Histogram::StartHistogram()
       
   165 
       
   166 Request to start getting histogram notifications.
       
   167 
       
   168 @param	aHistHandle	
       
   169 		The handle identifying the histogram on the ECam implementation.
       
   170 
       
   171 @leave	KErrArgument if aHistHandle is out of range; also any system wide error.
       
   172 
       
   173 @see KUidECamEventCameraHistogram
       
   174 */
       
   175 EXPORT_C void CCamera::CCameraHistogram::StartHistogramL(TUint aHistHandle)
       
   176 	{
       
   177 	iImpl->StartHistogramL(aHistHandle);
       
   178 	}
       
   179 
       
   180 /**
       
   181 @deprecated use void CCamera::CCameraV2Histogram::StopHistogram()
       
   182 
       
   183 Request to stop getting histogram notifications.
       
   184 
       
   185 @param	aHistHandle	
       
   186 		The handle identifying the histogram on the ECam implementation.
       
   187 		
       
   188 @leave	KErrArgument if aHistHandle is out of range; also any system wide error.
       
   189 */
       
   190 EXPORT_C void CCamera::CCameraHistogram::StopHistogramL(TUint aHistHandle)
       
   191 	{
       
   192 	iImpl->StopHistogramL(aHistHandle);
       
   193 	}
       
   194 
       
   195 /**
       
   196 @deprecated only one histogram is available per buffer with the usage of MHistogramV2Buffer and CCameraV2Histogram.
       
   197 
       
   198 Destroys a histogram on the ECam implementation and releases its handle.
       
   199 
       
   200 @param	aHistHandle	
       
   201 		The handle identifying the histogram on the ECam implementation.
       
   202 
       
   203 @leave	KErrArgument if aHistHandle is out of range; also any system wide error.
       
   204 */
       
   205 EXPORT_C void CCamera::CCameraHistogram::DestroyHistogramL(TUint aHistHandle)
       
   206 	{
       
   207 	iImpl->DestroyHistogramL(aHistHandle);
       
   208 	}
       
   209 
       
   210 /**
       
   211 @deprecated use void CCamera::CCameraV2Histogram::GetHistogramStateL(TBool& aIsHistogramActive)
       
   212 
       
   213 Gets a list of all histograms that are active on the ECam implementation. 
       
   214 A histogram is in an active state if StartHistogramL() has been called on it.
       
   215 
       
   216 @param	aActiveHistograms
       
   217 		Returned list of histogram handles for which StartHistogramL() has been called. 
       
   218 
       
   219 @leave	KErrNoMemory if the ECam implementation cannot add more histogram handles due to low memory; also any system wide error.  
       
   220 */
       
   221 EXPORT_C void CCamera::CCameraHistogram::GetActiveHistogramsL(RArray<TUint>& aActiveHistograms)
       
   222 	{
       
   223 	iImpl->GetActiveHistogramsL(aActiveHistograms);
       
   224 	}
       
   225 
       
   226 /**
       
   227 @deprecated use void CCamera::CCameraV2Histogram::UpdateDirectHistogramPropertiesL
       
   228 
       
   229 Updates the properties of a direct histogram.
       
   230 
       
   231 @param	aHistHandle	
       
   232 		The handle identifying the histogram on the ECam implementation.
       
   233 @param	aPosition	
       
   234 		The new position on the screen (in pixels) where the histogram is to be displayed.
       
   235 @param	aSize	
       
   236 		The new size of histogram in pixels.
       
   237 @param	aColor		
       
   238 		The new colour and alpha blending with which the histogram will be displayed. 
       
   239 
       
   240 @leave	KErrArgument if aHistHandle is out of range; also any system wide error.
       
   241 */
       
   242 EXPORT_C void CCamera::CCameraHistogram::UpdateDSAHistogramPropertiesL(TUint aHistHandle, const TPoint& aPosition, const TSize& aSize, const TRgb& aColor)
       
   243 	{
       
   244 	iImpl->UpdateDSAHistogramPropertiesL(aHistHandle, aPosition, aSize, aColor);
       
   245 	}
       
   246 	
       
   247 /**
       
   248 @deprecated use void CCamera::CCameraV2Histogram::GetDirectHistogramPropertiesL
       
   249 
       
   250 Gets the properties of a direct histogram.
       
   251 
       
   252 @param 	aHistHandle		
       
   253 		The handle on the ECam implementation of the direct histogram whose properties are to be retrieved.
       
   254 @param 	aPosition
       
   255 		A reference to a TPoint object that will receive the position (in pixels) of the histogram on the screen.
       
   256 @param 	aSize	
       
   257 		A reference to a TSize object that will receive the size of the histogram in pixels.
       
   258 @param 	aColor
       
   259 		A reference to a TRgb object that will receive the colour and alpha blending of the histogram.
       
   260 
       
   261 @leave	KErrArgument if aHistHandle is out of range; also any system wide error.
       
   262 
       
   263 @note   If the method leaves, the reference arguments are not guaranteed to be valid.
       
   264 */
       
   265 EXPORT_C void CCamera::CCameraHistogram::GetDSAHistogramPropertiesL(TUint aHistHandle, TPoint& aPosition, TSize& aSize, TRgb& aColor)
       
   266 	{
       
   267 	iImpl->GetDSAHistogramPropertiesL(aHistHandle, aPosition, aSize, aColor);
       
   268 	}
       
   269 
       
   270 
       
   271 /**
       
   272 @deprecated use MCaptureImageObserver, MCaptureVideoObserver, MDirectViewFinderObserver, and MClientViewFinderObserver
       
   273 which have callback functions which notify the client about availability of histogram data. These are sent when 
       
   274 CCameraV2Histogram::StartHistogram() is called after CCameraV2Histogram::PrepareClientHistogramL(). If
       
   275 CCameraV2Histogram::PrepareClientHistogramL() is not called first then the callback returns KErrBadHandle.
       
   276 	
       
   277 Returns to the client the histogram data for all the histograms generated by the ECam implementation.
       
   278 
       
   279 @note The client application using this API should provide MCameraObserver2 interface to be 
       
   280 signalled when histogram data is available to be retrieved from the ECAM implementation.
       
   281 
       
   282 @see 	KUidECamEventCameraHistogram
       
   283 	
       
   284 @leave	KErrNoMemory if the ECam implementation has not been able to create the histogram buffer;
       
   285 		also any system wide error.
       
   286 
       
   287 @return A reference to a histogram buffer which will contain the returned histogram data.
       
   288 */	
       
   289 EXPORT_C MHistogramBuffer& CCamera::CCameraHistogram::HistogramDataL()
       
   290 	{
       
   291 	return iImpl->HistogramDataL();
       
   292 	}
       
   293 
       
   294 /**
       
   295 @deprecated use MCaptureImageObserver, MCaptureVideoObserver, MDirectViewFinderObserver, and MClientViewFinderObserver
       
   296 which have callback functions which notify the client about availability of histogram data. These are sent when 
       
   297 CCameraV2Histogram::StartHistogram() is called after CCameraV2Histogram::PrepareClientHistogramL(). If
       
   298 CCameraV2Histogram::PrepareClientHistogramL() is not called first then the callback returns KErrBadHandle.
       
   299 	
       
   300 Returns the data for a single histogram from the ECam implementation to the client.
       
   301 
       
   302 @note The client application using this API should provide MCameraObserver2 interface to be 
       
   303 signalled when histogram data is available to be retrieved from the ECAM implementation.
       
   304 
       
   305 @see 	KUidECamEventCameraHistogram
       
   306 
       
   307 @param 	aHistHandle		
       
   308 		The handle on the ECam implementation of the histogram whose data is to be retrieved.
       
   309 			
       
   310 @leave	KErrNoMemory if the ECam implementation has not been able to create the histogram buffer;
       
   311 		also any system wide error.
       
   312 
       
   313 @return A reference to a histogram buffer which will contain the returned histogram data.
       
   314 */
       
   315 EXPORT_C MHistogramBuffer& CCamera::CCameraHistogram::HistogramDataL(TUint aHistHandle)
       
   316 	{
       
   317 	return iImpl->HistogramDataL(aHistHandle);
       
   318 	}
       
   319  
       
   320 	
       
   321 //
       
   322 //			    	CCameraV2Histogram                                              //
       
   323 //	
       
   324 /**
       
   325 @internalComponent
       
   326 
       
   327 Factory function that creates a new camera histogram object specifically for a camera mode, for example, still image,
       
   328 video, snapshot and specific viewfinder.
       
   329 
       
   330 @param	aCamera
       
   331 		A reference to the camera object for which a camera histogram object is to be created.
       
   332 		
       
   333 @param aImplFactory 
       
   334 	   A reference to the MImplementationFactory derived object.
       
   335 
       
   336 @leave KErrNoMemory if out of memory; also any system wide error.
       
   337 
       
   338 @leave KErrExtensionNotSupported When NewL/NewDuplicateL used instead of New2L/NewDuplicate2L.
       
   339 
       
   340 @return A pointer to a fully constructed camera histogram object.
       
   341 
       
   342 @note  This method is supposed to be used by internal ECAM components only.
       
   343 */	
       
   344 EXPORT_C CCamera::CCameraV2Histogram* CCamera::CCameraV2Histogram::CreateL(CCamera& aCamera, MImplementationFactory& aImplFactory)
       
   345 	{
       
   346 	if(aCamera.CameraVersion() == KCameraDefaultVersion)
       
   347  		{
       
   348  		User::Leave(KErrExtensionNotSupported);
       
   349  		}
       
   350  		
       
   351 	CCamera::CCameraV2Histogram* self = new (ELeave) CCamera::CCameraV2Histogram(aCamera);
       
   352 	CleanupStack::PushL(self);
       
   353 	self->ConstructL(aImplFactory);
       
   354 	CleanupStack::Pop(self);
       
   355 	return self; 
       
   356 	}
       
   357 	
       
   358 /**
       
   359 @internalComponent
       
   360 
       
   361 CCameraV2Histogram second phase constructor 
       
   362 
       
   363 Function used to initialise internal state of the object specifically for a camera mode, for example, still image,
       
   364 video, snapshot and specific viewfinder.
       
   365 
       
   366 This may be used in other possible cases as well.
       
   367 
       
   368 @param aImplFactory 
       
   369 	   A constant reference to the MImplementationFactory derived object.
       
   370 
       
   371 @leave KErrNoMemory Out of memory; or any other error code as well.
       
   372 
       
   373 @note This method is supposed to be used by this class only.
       
   374 */ 
       
   375 void CCamera::CCameraV2Histogram::ConstructL(const MImplementationFactory& aImplFactory) 
       
   376 	{
       
   377 	TInt err = KErrNone;
       
   378 	TAny* implPtr = NULL;
       
   379 	
       
   380 	err = aImplFactory.GetImpl(implPtr, KECamMCameraV2HistogramUid);
       
   381 	if (err != KErrNone)
       
   382 		{
       
   383 		User::Leave(err);
       
   384 		}
       
   385 	iImpl = static_cast<MCameraV2Histogram*>(implPtr);
       
   386 	
       
   387 	iImpl->SetHistogramHandle(this);
       
   388 	}
       
   389 	
       
   390 /**
       
   391 Constructor for the CCamera::CCameraV2Histogram class.
       
   392 
       
   393 @param aOwner
       
   394 	   A reference to the camera object for which a camera histogram object is to be created.
       
   395 */
       
   396 CCamera::CCameraV2Histogram::CCameraV2Histogram(CCamera& aOwner):iOwner(aOwner), iImpl(NULL)
       
   397 	{
       
   398 	}
       
   399 
       
   400 /**
       
   401 Destructor for the CCamera::CCameraV2Histogram class.
       
   402 */
       
   403 EXPORT_C CCamera::CCameraV2Histogram::~CCameraV2Histogram()
       
   404 	{
       
   405 	if (iImpl != NULL)
       
   406 		{
       
   407 		iImpl->Release(this);	
       
   408 		}
       
   409 	}
       
   410 	
       
   411 /**
       
   412 Retrieves a list of the supported types of histograms.
       
   413 
       
   414 @param 	aSupportedHistogramType
       
   415 		A reference to bit field representing the supported types of histograms as given by CCamera::
       
   416 		CCameraV2Histogram::THistogramType
       
   417 
       
   418 @leave  May leave with any error code. 
       
   419 
       
   420 @see CCamera::CCameraV2Histogram::THistogramType
       
   421 */
       
   422 EXPORT_C void CCamera::CCameraV2Histogram::GetSupportedHistogramsL(TUint& aSupportedHistogramType) const
       
   423 	{
       
   424 	return iImpl->GetSupportedHistogramsL(aSupportedHistogramType);
       
   425 	} 
       
   426 
       
   427 /**
       
   428 Informs whether or not the direct histogram is supported.
       
   429 
       
   430 @param  aIsDirectHistogramSupported
       
   431 		ETrue implies that direct histogram is supported.
       
   432 		EFalse implies that direct histogram is not supported.
       
   433 
       
   434 @leave  May leave with any error code.
       
   435 */
       
   436 EXPORT_C void CCamera::CCameraV2Histogram::GetDirectHistogramSupportInfoL(TBool& aIsDirectHistogramSupported) const
       
   437 	{
       
   438 	return iImpl->GetDirectHistogramSupportInfoL(aIsDirectHistogramSupported);	
       
   439 	}
       
   440 	
       
   441 /**
       
   442 Request to prepare a client based histogram.
       
   443 
       
   444 @note 	A direct histogram is directly embedded into the viewfinder.
       
   445 		If a non direct histogram is requested the histogram data will be passed to the camera client.
       
   446 
       
   447 @param	aType		
       
   448 		The type of histogram to be prepared. This must be one of the supported histogram types given by
       
   449 		GetSupportedHistogramsL.
       
   450 
       
   451 @leave  May leave with any error code.
       
   452 
       
   453 @note   Each histogram object will either prepare direct histogram or client histogram. Preparing multiple histograms
       
   454 		per object is an invalid case.
       
   455 		
       
   456 @see PrepareDSAHistogramL
       
   457 */
       
   458 EXPORT_C void CCamera::CCameraV2Histogram::PrepareClientHistogramL(CCamera::CCameraV2Histogram::THistogramType aType) 
       
   459 	{
       
   460 	iImpl->PrepareClientHistogramL(aType);
       
   461 	}
       
   462 	
       
   463 /**
       
   464 Prepares the direct histogram.
       
   465 
       
   466 @param  aDirectHistogramParameters
       
   467 		The parameters required to prepare the direct histogram.
       
   468 
       
   469 @leave  May leave with any error code.
       
   470 
       
   471 @note   Each histogram object will either prepare direct histogram or client histogram. Preparing multiple histograms
       
   472 		per object is an invalid case.
       
   473 
       
   474 @see PrepareClientHistogramL
       
   475 */
       
   476 EXPORT_C void CCamera::CCameraV2Histogram::PrepareDirectHistogramL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters)
       
   477 	{
       
   478 	iImpl->PrepareDirectHistogramL(aDirectHistogramParameters);
       
   479 	}
       
   480 
       
   481 /**
       
   482 Update the parameters for the direct histogram.
       
   483 
       
   484 @param  aDirectHistogramParameters
       
   485 		The desired parameters which have to be used to update the direct histogram.
       
   486 
       
   487 @leave  May leave with any error code.
       
   488 */
       
   489 EXPORT_C void CCamera::CCameraV2Histogram::UpdateDirectHistogramPropertiesL(const CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters)
       
   490 	{
       
   491 	iImpl->UpdateDirectHistogramPropertiesL(aDirectHistogramParameters);
       
   492 	}
       
   493 	
       
   494 /**
       
   495 Retrieves the currently used parameters for the direct histogram.
       
   496 
       
   497 @param  aDirectHistogramParameters
       
   498 		Retrieves the parameters currently being used for the direct histogram.
       
   499 
       
   500 @leave  May leave with any error code.
       
   501 */
       
   502 EXPORT_C void CCamera::CCameraV2Histogram::GetDirectHistogramPropertiesL(CCamera::CCameraV2Histogram::TDirectHistogramParameters& aDirectHistogramParameters) const
       
   503 	{
       
   504 	iImpl->GetDirectHistogramPropertiesL(aDirectHistogramParameters);
       
   505 	}
       
   506 	
       
   507 /**
       
   508 Request to start getting histogram notifications.
       
   509 
       
   510 @note   Histogram should have been prepared before calling this method.
       
   511 
       
   512 @note   Histogram notifications are sent to the client by using relevant callbacks for image capture, video capture and 
       
   513 		viewfinders.
       
   514 
       
   515 @see    MCaptureImageObserver
       
   516 @see    MCaptureVideoObserver
       
   517 @see    MDirectViewFinderObserver
       
   518 @see    MClientViewFinderObserver
       
   519 */
       
   520 EXPORT_C void CCamera::CCameraV2Histogram::StartHistogram()
       
   521     {
       
   522     iImpl->StartHistogram();	
       
   523     }
       
   524 
       
   525 /**
       
   526 Request to stop generating histogram.
       
   527 */
       
   528 EXPORT_C void CCamera::CCameraV2Histogram::StopHistogram()
       
   529 	{
       
   530 	iImpl->StopHistogram();
       
   531 	}
       
   532     
       
   533 /**
       
   534 Informs whether the histogram is currently active or not.  
       
   535 A histogram is in an active state if StartHistogram() has been called on it and has not been yet stopped.
       
   536 
       
   537 @param	aIsHistogramActive
       
   538 		ETrue indicates that the histogram is active.
       
   539 		EFalse indicates that the histogram is inactive. 
       
   540 
       
   541 @leave  May leave with any error code.
       
   542 */
       
   543 EXPORT_C void CCamera::CCameraV2Histogram::GetHistogramStateL(TBool& aIsHistogramActive) const 
       
   544 	{
       
   545 	iImpl->GetHistogramStateL(aIsHistogramActive);
       
   546 	}
       
   547     
       
   548 /**
       
   549 Constructor for the TDirectHistogramParameters class.
       
   550 Sets the size and version of this class.
       
   551 */
       
   552 EXPORT_C CCamera::CCameraV2Histogram::TDirectHistogramParameters::TDirectHistogramParameters()
       
   553 	{
       
   554 	iSize = sizeof(CCamera::CCameraV2Histogram::TDirectHistogramParameters);
       
   555 	iVersion = KECamDirectHistogramParametersCurrentVersion;
       
   556 	}
       
   557 
       
   558 /** 
       
   559 Returns the size of the class. Used for extensibility by deriving from this base class and adding new member variables.
       
   560 Intended to be used for implementation of methods where this class reference is passed as function arguments. 
       
   561 Implementation of such methods can find out the whether the actual class passed is base or the derived one. So, if a new application 
       
   562 is made to run on an old implementation, an error may occur once the old implementation detects this by getting 
       
   563 the size information of the T class passed. Also, if an old application is made to run on a new implementation, this can be 
       
   564 handled correctly if the derived class variables handling is done in a proper 'if-else' statement. 
       
   565 
       
   566 @return The size of the class.
       
   567 
       
   568 @note The size will be modified when the T-class gets updated.
       
   569 */
       
   570 EXPORT_C TUint CCamera::CCameraV2Histogram::TDirectHistogramParameters::Size() const
       
   571 	{
       
   572 	return iSize;
       
   573 	}
       
   574 	
       
   575 /**	
       
   576 Returns the version of the class. Used for extensibility specially when the class members are not added but the Reserved 
       
   577 members get used at a later stage.
       
   578 
       
   579 @return The version of the class.
       
   580 
       
   581 @note The version will be modified when the T-class gets updated.
       
   582 */
       
   583 EXPORT_C TUint CCamera::CCameraV2Histogram::TDirectHistogramParameters::Version() const
       
   584 	{
       
   585 	return iVersion;
       
   586 	}