epoc32/include/ecamimageprocessing.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
     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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 
    17 
    18 /**
    19  @file	
    20  @publishedAll
    21  @released
    22 */
    23 #ifndef  ECAMIMAGEPROCESSING_H
    24 #define  ECAMIMAGEPROCESSING_H
    25 
    26 #include <e32base.h>
    27 #include <gdi.h>
    28 #include <ecam.h>
    29 #include <ecamadvsettingsuids.hrh>
    30 #include <ecam/ecamconstants.h>
    31 
    32 class MCameraImageProcessing;
    33 class MCameraImageProcessing2;
    34 class MCameraImageProcessing3;
    35 
    36 class MImplementationFactory;
    37 
    38 /** 
    39 The current Version of the TColorOperationCapabilities class.
    40 
    41 */
    42 static const TUint KECamColorOperationCapabilitiesCurrentVersion = 1;
    43 
    44 /** 
    45 The current Version of the TBitsIgnore class.
    46 
    47 */
    48 static const TUint KECamBitsIgnoreCurrentVersion = 1;
    49 
    50 /** 
    51 The current Version of the TColorOperationEntry class.
    52 
    53 */
    54 static const TUint KECamColorOperationEntryCurrentVersion = 1;
    55 
    56 
    57 /* General purpose constants */
    58 
    59 /** 
    60 	Uid used to identify the CCamera Post Processing API.
    61 	Such image operations are performed on the acquired image by the camera itself. 
    62 	@see CCamera::CCameraPresets
    63 */
    64 static const TUid  KECamImageProcessingUid 	= {KECamImageProcessingUidValue};
    65 
    66 /** Transformations */
    67 /* Adjustments */
    68 /** Brightness adjustment - recognized range [-100:100] */
    69 static const TUid  KUidECamEventImageProcessingAdjustBrightness 	= {KUidECamEventImageProcessingAdjustBrightnessUidValue};
    70 /** Contrast adjustment  - recognized range [-100:100] */
    71 static const TUid  KUidECamEventImageProcessingAdjustContrast 		= {KUidECamEventImageProcessingAdjustContrastUidValue};
    72 /** Gamma adjustment  - recognized range [0:1000] */
    73 static const TUid  KUidECamEventImageProcessingAdjustGamma 			= {KUidECamEventImageProcessingAdjustGammaUidValue};
    74 /** Sharpness adjustment - recognized range [-100:100] */
    75 static const TUid  KUidECamEventImageProcessingAdjustSharpness 		= {KUidECamEventImageProcessingAdjustSharpnessUidValue};
    76 /** Saturation adjustment  - recognized range [-100:100] */
    77 static const TUid  KUidECamEventtImageProcessingAdjustSaturation 	= {KUidECamEventtImageProcessingAdjustSaturationUidValue};
    78 static const TUid  KUidECamEventImageProcessingAdjustSaturation 	= {KUidECamEventtImageProcessingAdjustSaturationUidValue};
    79 /** Hue adjustment  - recognized range [-100:100] */
    80 static const TUid  KUidECamEventtImageProcessingAdjustHue 			= {KUidECamEventtImageProcessingAdjustHueUidValue};
    81 static const TUid  KUidECamEventImageProcessingAdjustHue 			= {KUidECamEventtImageProcessingAdjustHueUidValue};
    82 /** Contrast Enhancement
    83 
    84 This uid value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or 
    85 CCamera::NewDuplicate2L().
    86 
    87 @internalTechnology
    88 */
    89 static const TUid  KUidECamEventCIPAdjustContrastEnhancement 		= {KUidECamEventCIPAdjustContrastEnhancementUidValue};
    90 /** Software based Red Eye Reduction
    91 
    92 This uid value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or 
    93 CCamera::NewDuplicate2L()
    94 
    95 @internalTechnology
    96 */
    97 static const TUid  KUidECamEventCIPAdjustRedEyeReduction 		    = {KUidECamEventCIPAdjustRedEyeReductionUidValue};
    98 
    99 /**
   100 Image distortion correction.
   101 
   102 This uid value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or 
   103 CCamera::NewDuplicate2L()
   104 
   105 @internalTechnology
   106 */
   107 static const TUid KUidECamEventCIPImageDistortionCorrection         = {KUidECamEventCIPImageDistortionCorrectionUidValue};
   108 
   109 
   110 /** Effect value */
   111 static const TUid  KUidECamEventImageProcessingEffect 				= {KUidECamEventImageProcessingEffectUidValue};
   112 
   113 /* Transforms */
   114 /** Crop */
   115 static const TUid  KUidECamEventImageProcessingTransformCrop 		= {KUidECamEventImageProcessingTransformCropUidValue};
   116 /** Rotation */
   117 static const TUid  KUidECamEventImageProcessingTransformRotate 		= {KUidECamEventImageProcessingTransformRotateUidValue};
   118 /** Mirroring */
   119 static const TUid  KUidECamEventImageProcessingTransformMirror		= {KUidECamEventImageProcessingTransformMirrorUidValue};
   120 /** Rescale */
   121 static const TUid  KUidECamEventImageProcessingTransformScale		= {KUidECamEventImageProcessingTransformScaleUidValue};
   122 /** origin subset */
   123 static const TUid  KUidECamEventImageProcessingSourceRect 			= {KUidECamEventImageProcessingSourceRectUidValue};
   124 /** Noise reduction */
   125 static const TUid  KUidECamEventImageProcessingNoiseReduction		= {KUidECamEventImageProcessingNoiseReductionUidValue};
   126 /** Glare removal */
   127 static const TUid  KUidECamEventImageProcessingGlareRemoval			= {KUidECamEventImageProcessingGlareRemovalUidValue};
   128 /** Relative Orientation 
   129 
   130 This uid value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or 
   131 CCamera::NewDuplicate2L().
   132 
   133 @publishedPartner
   134 @prototype
   135 */
   136 static const TUid  KUidECamEventImageProcessingTransformRelativeOrientation = {KUidECamEventImageProcessingTransformRelativeOrientationUidValue};
   137 
   138 /** Default value for image processing */
   139 static const TInt  KECamImageProcessingDefaultValue  = 0;
   140 
   141 /**
   142 Uid used to indicate completion of StartColorSwap
   143 
   144 */
   145 static const TUid  KUidECamEventCIPStartColorSwap					= {KUidECamEventCIPStartColorSwapUidValue};
   146 
   147 /**
   148 Uid used to indicate completion of StartColorAccent
   149 
   150 */
   151 static const TUid  KUidECamEventCIPStartColorAccent					= {KUidECamEventCIPStartColorAccentUidValue};
   152 
   153 /**
   154 Uid used to notify that the current picture orientation is unachievable after setting the relative custom orientation.
   155 
   156 @see CCamera::CCameraImageProcessing::SetRelativeCustomOrientationL(TOrientationReference aOrientationReference, 
   157 												TRelativeCustomOrientation aRelativeCustomOrientation);
   158 
   159 @publishedPartner
   160 @prototype
   161 */
   162 static const TUid  KUidECamEventPictureOrientationUnachievable		= {KUidECamEventPictureOrientationUnachievableUidValue};
   163 
   164 /** 
   165 This class is used to perform image processing operations on the camera.
   166 These include brightness, contrast, gamma, hue, sharpness and saturation adjustments. The client is also 
   167 able to perform simple image transformations like cropping, rotation, mirroring, scaling, noise reduction and glare reduction. .  
   168 When an operation selection is complete, all clients are notified with the respective event UID.
   169 
   170 As often cameras may support only a subset of discrete values of the allowed range, 
   171 the API allows the client to retrieve those and use them explicitly.   
   172 
   173 @note This class is not intended for sub-classing and used to standardise existing
   174 	  varieties of implementations.
   175 
   176 @note it is assumed that setting a new value for a transformations(transform, adjust, effect) effectively
   177 	  activates the transformations. Whilst for effects and adjustments there is always a value, transforms 
   178 	  may have a dependency on other parameters and 
   179 	  crop 	- requires setting of source rectangle.
   180 	  scale - will use setting of source rectangle, and the magnification factor is 
   181 	  		  determined by the source rectangle and the output size. This is always magnification.
   182 	  		  if a value is set, it is assumed to be a scaling factor multiplied by KECamFineResolutionFactor
   183 	  		  and set to integer.
   184 	  mirror - values of TMirror type.
   185 	  rotation - the angle in degrees.
   186 	  noise reduction - TNoiseReduction.
   187 	  glare removal - TGlareReduction.
   188 
   189 	  	Example 
   190 		
   191 		@code
   192 		// Lets assume that an application would need to check whether gamma correction is 
   193 		// supported on a particular platform. After obtaining a valid pointer to the interface, 
   194 		// it would call GetSupportedTransformationsL() to obtain the list of the supported 
   195 		// transformations and check whether KUidECamEventImageProcessingAdjustGamma
   196 		// is in the list. If it is then call SetTranformationValue(KUidECamEventImageProcessingAdjustGamma, 200);
   197 		// to set the new value. A notification will be generated to the client to indicate success.
   198 
   199 		RArray<TUid> suppTransforms; // array of supported transformations
   200 		CleanupClosePushL(suppTransforms);
   201 
   202 		imageProcess->GetSupportedTransformationsL(suppTransfUids);
   203 		 ...
   204 		// if the gamma is supported 
   205 		TInt gammaCorrection = 200; // gamma correction of 2.0
   206 		imageProcess->SetTranformationValue(KUidECamEventImageProcessingAdjustGamma, gammaCorrection);
   207 		...
   208 		// pop stack to close the RArray
   209 		@endcode
   210 		
   211 @note   If the class methods leave, the output type parameter value is not guaranteed to be valid.
   212 
   213 @publishedAll
   214 @released	
   215 */
   216 class CCamera::CCameraImageProcessing : public CBase
   217 	{
   218 	
   219 	// so can use internal factory functions etc.
   220 	friend class CCamera;
   221 	
   222 public: 
   223 	
   224 	/** Gamma settings */		
   225    	enum TGamma
   226 	   	{
   227    		/** Sets the gamma adjustment automatically. */
   228 	   	EGammaAuto						= KMinTInt
   229 	   	};
   230 	/** Sharpness Settings */	   	
   231 	enum TSharpness
   232 	   	{
   233    		/** Sets the sharpness adjustment automatically. */
   234 	   	ESharpnessAuto					= KMinTInt
   235 	   	};   	
   236 	/** Saturation Settings */	 
   237 	enum TSaturation
   238 	   	{
   239    		/** Sets the saturation adjustment automatically. */
   240 	   	ESaturationAuto					= KMinTInt
   241 	   	};
   242 	/** Hue Settings */	 
   243 	enum THue
   244 	   	{
   245    		/** Sets the hue adjustment automatically. */
   246 	   	EHueAuto						= KMinTInt
   247 	   	};	   	
   248 	   	     	
   249 	/** Settings for the supported effects */
   250 	enum TEffect
   251 	  	{
   252 		/** Effects off is default, always supported */
   253 		EEffectNone			     	= 0x00000000,
   254 		/** Negative visual effect. */
   255 		EEffectNegative		   		= 0x00000001,
   256 		/** Black and white visual effect. */
   257 		EEffectMonochrome 			= 0x00000002,
   258 		/** Solarization visual effect. */
   259 		EEffectSolarize		 		= 0x00000004,
   260 		/** Sepia visual effect. */
   261 		EEffectSepia		     	= 0x00000008,
   262 		/** Emboss visual effect. */
   263 		EEffectEmboss 				= 0x00000010,
   264 		/** Red eye glare reduction visual effect. */
   265 		EEffectRedEyeReduction 		= 0x00000020,
   266 		/** Vivid colour visual effect. */ 
   267 		EEffectVivid 				= 0x00000040,
   268 		/** Neutral colour visual effect. */ 
   269 		EEffectNeutral 				= 0x00000080,
   270 		/** Selective sharpening visual effect. */ 
   271 		EEffectLowSharpening		= 0x00000100,
   272 		/** 
   273 		Natural visual effect. 
   274 		
   275 		This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or 
   276 		CCamera::NewDuplicate2L().
   277 		
   278 		*/
   279 		EEffectNatural 				= 0x00000200, 
   280 		/** 
   281 		Cine visual effect. 
   282 		
   283 		This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or 
   284 		CCamera::NewDuplicate2L().
   285 		
   286 		*/
   287 		EEffectCine 				= 0x00000400, 
   288 		/** 
   289 		Old film visual effect. 
   290 		
   291 		This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or 
   292 		CCamera::NewDuplicate2L().
   293 		
   294 		*/
   295 		EEffectOldFilm 				= 0x00000800,  
   296 		/** 
   297 		Color swap visual effect. 
   298 		
   299 		This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or 
   300 		CCamera::NewDuplicate2L().
   301 		
   302 		*/
   303 		EEffectColorSwap 			= 0x00001000, 
   304 		/** 
   305 		Where a list of color can be kept as they are and the rest converted to gray. 
   306 	
   307 		This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or 
   308 		CCamera::NewDuplicate2L().
   309 	
   310 		*/
   311 		EEffectColorAccent			= 0x00002000
   312  		};
   313 		
   314 	/** Mirror settings */		
   315 	enum TMirror
   316 		{
   317 		/** Default value. Mirroring is disabled. */
   318 		EMirrorNone			= 0x00000000, 
   319 		/** Mirror along horizontal axis. */
   320 		EMirrorHorizontal	= 0x00000001,
   321 		/** Mirror along vertical axis. */
   322 		EMirrorVertical		= 0x00000002,
   323 		/** Mirror along horizontal and vertical axis. */
   324 		EMirrorBoth			= 0x00000003
   325 		};
   326 	
   327 	/** Noise filter settings */		
   328 	enum TNoiseReduction
   329 		{
   330 		/** Default value. Noise reduction disabled. */
   331 		ENoiseReductionNone			= 0x0000, 
   332 		/** most basic noise reduction. */
   333 		ENoiseReductionBasic		= 0x0001
   334 		};
   335 	
   336 	/** Glare reduction settings */		
   337 	enum TGlareReduction
   338 		{
   339 		/** Default value. Glare reduction disabled. */
   340 		EGlareReductionNone			= 0x0000, 
   341 		/** most basic glare reduction. */
   342 		EGlareReductionBasic		= 0x0001
   343 		};
   344 	
   345 	/** 
   346 	Used for color swap and color accent feature in TEffect. It describes whether the given source 
   347 	or target color represents itself or a group of color.
   348 	
   349 	*/
   350 	enum TColorOperationRepresentation
   351 		{
   352 		/** Feature is not supported */
   353 		ERepresentationNone         = 0x00,
   354 		/** The given color is uniquely represented */
   355 		ERepresentationSingle	    = 0x01,
   356 		/** The given color represents a group of colors */
   357 		ERepresentationMultiple     = 0x02
   358 		};
   359 
   360 	/**
   361 	Used for color swap and color accent feature in TEffect. It describes the type of grouping for 
   362 	source and target colors when they represent a group of color.
   363 	
   364 	*/
   365 	enum TColorOperationRgbGroupingMode
   366 		{
   367 		/** Feature is not supported */
   368 		ERgbGroupingNone			= 0x00,
   369 		/** This means no neighbourhood colors are considered */
   370 		ERgbGroupingFixed			= 0x01,
   371 		/** This means neighbourhood colors are to be automatically decided by the implementation or hardware */
   372 		ERgbGroupingAutomatic		= 0x02,
   373 		/** This means neighbourhood colors for source have to be decided by ignoring few starting bits. Used for source only */
   374 		ERgbGroupingSignificantBits = 0x04,
   375 		/** This means colors in target are obtained as some uniform proportion using source. Used for target only */
   376 		ERgbGroupingUniform			= 0x08
   377 		};
   378 	
   379 	/**
   380 	Used to provide different types of references for orientation of images retrieved. These references are the various 
   381 	means by the orientation of an image can be defined. Client needs to choose a particular TOrientationReference and 
   382 	specify any relative rotation, mirroring and flipping on top of it.	
   383 	
   384 	This enumeration has nothing to do with absolute rotation. Uid KUidECamEventImageProcessingTransformRotate is used 
   385 	for absolute rotation purposes.
   386 	
   387 	The enumeration list may be extended in future.	
   388 	
   389 	@publishedPartner
   390 	@prototype
   391 	*/
   392 	enum TOrientationReference
   393 		{
   394 		/** The retrieved images will follow the camera sensor orientation. This orientation would be relative 
   395 		to the current screen mode as given by the reference screen. */
   396 		EOrientationReferenceCameraSensorOrientation,
   397 	
   398 		/** The retrieved images will get oriented as per the tilt sensor information. 
   399 		So,the orientation would be relative to the current screen mode as given by the reference screen. */
   400 		EOrientationReferenceTiltOrientation
   401 		};
   402 	
   403 	/**
   404 	Used to describe the various relative rotation. The term 'relative' means that the rotation is applied after the 
   405 	image undergoes orientation as given by TOrientationReference.
   406 	
   407 	The enumeration list may be extended in future.	
   408 	
   409 	@publishedPartner
   410 	@prototype
   411 	*/
   412 	enum TRelativeRotation
   413 		{
   414 		/** Zero degree Rotation applied on top of orientation reference and is relative to current reference screen. */
   415 		ERelativeRotation0Degrees				= 0x00,
   416 		/** 90 degree clockwise Rotation applied on top of orientation reference and is relative to current reference screen. */
   417 		ERelativeRotation90DegreesClockwise 	= 0x01,
   418 		/** 180 degree clockwise Rotation applied on top of orientation reference and is relative to current reference screen. */
   419 		ERelativeRotation180DegreesClockwise	= 0x02,
   420 		/** 270 degree clockwise Rotation applied on top of orientation reference and is relative to current reference screen. */
   421 		ERelativeRotation270DegreesClockwise 	= 0x04
   422 		};
   423 		
   424 	/**
   425 	Used to describe the various relative mirroring. The term 'relative' means that the mirroring is applied after the 
   426 	image undergoes orientation as given by TOrientationReference.
   427 		
   428 	The enumeration list may be extended in future.	
   429 	
   430 	@publishedPartner
   431 	@prototype
   432 	*/
   433 	enum TRelativeMirror
   434 		{
   435 		/** No mirroring. */
   436 		ERelativeMirrorNone				= 0x00,
   437 		/** Used to mirror an image about the horizontal axis. This is applied on top of orientation reference and is 
   438 		relative to current reference screen. */
   439 		ERelativeMirrorHorizontalAxis	= 0x10,
   440 		/** Used to mirror an image about the vertical axis. This is applied on top of orientation reference and is 
   441 		relative to current reference screen. */
   442 		ERelativeMirrorVerticalAxis 	= 0x20 
   443 		};
   444 		
   445 	/**
   446 	Used to describe the various relative flipping. The term 'relative' means that the flipping is applied after the 
   447 	image undergoes orientation as given by TOrientationReference.
   448 	
   449 	The enumeration list may be extended in future.
   450 	
   451 	@publishedPartner
   452 	@prototype
   453 	*/
   454 	enum TRelativeFlipping
   455 		{
   456 		/** No flipping. */
   457 		ERelativeFlippingNone			= 0x00,
   458 		/** Used to flip an image horizontally. This is applied on top of orientation reference and is relative to current
   459 		reference screen. */
   460 		ERelativeFlippingHorizontal		= 0x10,
   461 		/** Used to flip an image vertically. This is applied on top of orientation reference and is relative to current
   462 		reference screen. */
   463 		ERelativeFlippingVertical 		= 0x20 
   464 		};
   465 		
   466 	/**
   467 	Different types of contrast enhancement options.
   468 	The enumeration list may be extended in future.
   469 	
   470 	@publishedPartner
   471 	@prototype
   472 	*/	
   473 	enum TContrastEnhancement
   474 		{
   475 		/** Not Supported. */
   476 		EContrastEnhancementNone				=0x00,
   477 		/** Contrast Enhancement switched off. */
   478 		EContrastEnhancementSwitchOff			=0x01,
   479 		/** Contrast Enhacement switched On manually. */
   480 		EContrastEnhancementManualSwitchOn		=0x02,
   481 		/** Contrast Enhancement in auto mode. */
   482 		EContrastEnhancementSwitchAuto			=0x04
   483 		};
   484 		
   485 	/**
   486 	Different types of software-based red eye reduction options.
   487 	The enumeration list may be extended in future.
   488 	
   489 	@publishedPartner
   490 	@prototype
   491 	*/
   492 	enum TRedEyeReduction
   493 		{
   494 		/** Not Supported. */
   495 		ERedEyeReductionNone				=0x00,
   496 		/** Software based Red Eye Reduction can be switched off(disabled). */
   497 		ERedEyeReductionSwitchOff			=0x01,
   498 		/** Software based Red Eye Reduction can be switched on (enabled). */
   499 		ERedEyeReductionManualSwitchOn		=0x02,
   500 		/** Software based Red Eye Reduction can be put to auto mode. */
   501 		ERedEyeReductionSwitchAuto			=0x04
   502 		};
   503 
   504 	/** 
   505 	Color operation capabilities characterizing both color swap and color accent feature 
   506 	
   507 	*/
   508 	class TColorOperationCapabilities
   509 		{
   510 	public:
   511 		/**
   512 		Constructor.
   513 		Sets the size of this class in iSize.
   514 		*/
   515 		IMPORT_C TColorOperationCapabilities();
   516 		
   517 		IMPORT_C TInt Size() const;
   518 		IMPORT_C TUint Version() const;
   519 	
   520 	private:
   521 		//for future expansion
   522 		TUint iSize:24;
   523 		TUint iVersion:8;
   524 		
   525 		// reserved for future expansion
   526 		TInt    iReserved;
   527 		
   528 	public:
   529 		/** The source color representation that the server supports.
   530 	    The supported representations are held as a bitwise logical OR of the relevant individual modes
   531 	    defined in CCamera::CCameraImageProcessing:: TColorOperationRepresentation. */
   532 		TUint	iSupportedSourceRepresentation;
   533 		
   534 		/** The target color representation that the server supports.
   535 	    The supported representations are held as a bitwise logical OR of the relevant individual modes
   536 	    defined in CCamera::CCameraImageProcessing:: TColorOperationRepresentation.
   537 	    Not applicable for color accent */
   538 		TUint	iSupportedTargetRepresentation;
   539 
   540 		/** The source color Rgb grouping modes that the server supports.
   541 	    The modes are held as a bitwise logical OR of the relevant individual modes
   542 	    defined in CCamera::CCameraImageProcessing:: TColorOperationRgbGroupingMode. */
   543 		TUint   iSupportedSourceRgbGroupingMode;
   544 
   545 		/** The target color Rgb grouping modes that the server supports.
   546 	    The modes are held as a bitwise logical OR of the relevant individual modes
   547 	    defined in CCamera::CCameraImageProcessing:: TColorOperationRgbGroupingMode. 
   548 	    Not applicable for color accent */
   549 		TUint   iSupportedTargetRgbGroupingMode;
   550 		
   551 		/** This indicates whether the mapping mode and Rgb grouping mode uniform for every color entry */
   552 		TBool   iIsCapabilityUniform;
   553 		};
   554 
   555 	/** 
   556 	Class used to control the number of bits to ignore for Red, Green, Blue or Alpha.
   557 	This may be used when deciding for neighbourhood for source color in case of color swap and color accent feature
   558 
   559 	*/
   560 	class TBitsIgnore
   561 		{
   562 	public:
   563 		/**
   564 		Constructor.
   565 		Sets the size of this class in iSize.
   566 		*/
   567 		IMPORT_C TBitsIgnore();
   568 		
   569 		IMPORT_C TInt Size() const;
   570 		IMPORT_C TUint Version() const;
   571 	
   572 	private:
   573 		//for future expansion
   574 		TUint iSize:24;
   575 		TUint iVersion:8;
   576 		
   577 		// for future use
   578 		TUint iReservedBits:16;
   579 			
   580 	public:
   581 		/** This gives the no. of bits to ignore for Red color. Varies from 0 to 8. 
   582 		Any other value should be an error */
   583 		TUint iRedBitsIgnore:4;
   584 		
   585 		/** This gives the no. of bits to ignore for Green color. Varies from 0 to 8. 
   586 		Any other value should be an error */
   587 		TUint iGreenBitsIgnore:4;
   588 		
   589 		/** This gives the no. of bits to ignore for Blue color. Varies from 0 to 8. 
   590 		Any other value should be an error */
   591 		TUint iBlueBitsIgnore:4;
   592 
   593 		/** This gives the no. of bits to ignore for Alpha. Varies from 0 to 8. 
   594 		Any other value should be an error */
   595 		TUint iAlphaBitsIgnore:4;
   596 		};
   597 
   598 	/** 
   599 	Color operation parameters characterizing both color swap and color accent feature; and for a particular entry.
   600 	 
   601 	*/
   602 	class TColorOperationEntry
   603 		{
   604 	public:
   605 		/**
   606 		Constructor.
   607 		Sets the size of this class in iSize.
   608 		*/
   609 		IMPORT_C TColorOperationEntry();
   610 				
   611 		IMPORT_C TInt Size() const;
   612 		IMPORT_C TUint Version() const;
   613 
   614 	private:
   615 		//for future expansion
   616 		TUint iSize:24;
   617 		TUint iVersion:8;
   618 		
   619 		// reserved for future expansion
   620 		TInt iReserved;
   621 		
   622 	public:
   623 		/** The source color (rgb triplet) which is changed to target color in case of Color Swap operation 
   624 		and remains unaffected in case of Color Accent operation */
   625 		TRgb iSourceColor;
   626 
   627 		/** The target color (rgb triplet) which replaces the source color in case of Color Swap operation. 
   628 		Redundant for Color Accent operation */
   629 		TRgb iTargetColor;
   630 
   631 		/** This defines whether the given source color represents itself or a group of colors */
   632 		TColorOperationRepresentation iSourceColorRepresentation;
   633 
   634 		/** This defines whether the given target color represents itself or a group of colors in case of 
   635 		Color Swap operation. Redundant for Color Accent operation */
   636 		TColorOperationRepresentation iTargetColorRepresentation;
   637 
   638 		/** This defines the type of grouping for multiple representation of source color */
   639 		TColorOperationRgbGroupingMode iColorOperationSourceRgbGroupingMode;
   640 
   641 		/** This defines the type of grouping for multiple representation of target color in case of 
   642 		Color Swap operation. Redundant for Color Accent operation */
   643 		TColorOperationRgbGroupingMode iColorOperationTargetRgbGroupingMode;  
   644 
   645 		/** This gives the number of bits to ignore in case ERgbGroupingSignificantBits is used for 
   646 		multiple representation of source color. For any other case, no. of bits ignored for red, green, 
   647 		blue or alpha should be 0 */
   648 		TBitsIgnore iNumBitsIgnored;
   649 
   650 		/** This gives the entry status of every color operation entry. If entry is not set or removed, 
   651 		this is ENotActive. And if entry is set, then this is EDiscreteSteps */
   652 		TValueInfo iEntryStatus;
   653 		};
   654 
   655 public:
   656 	
   657     IMPORT_C static CCameraImageProcessing* NewL(CCamera& aCamera);
   658     
   659     IMPORT_C static CCameraImageProcessing* CreateL(CCamera& aCamera, MImplementationFactory& aImplFactory);
   660     
   661 	IMPORT_C void GetSupportedTransformationsL(RArray<TUid>& aTransformations) const;
   662 
   663 	IMPORT_C void GetActiveTransformationsL(RArray<TUid>& aTransformations) const;
   664 
   665 	IMPORT_C void GetTransformationSupportedValuesL(TUid aTransformation, RArray<TInt>& aValues, TValueInfo& aInfo) const;
   666 
   667 	IMPORT_C TInt TransformationValue(TUid aTransformation) const;
   668 	
   669 	IMPORT_C TInt GetTransformationValue(TUid aTransformation, TInt& aTransformationValue) const;
   670 
   671 	IMPORT_C void SetTransformationValue(TUid aTransformation, TInt aValue);
   672 
   673 	IMPORT_C void GetActiveTransformSequenceL(RArray<TUid>& aTransformSequence) const;
   674 
   675 	IMPORT_C void SetActiveTransformSequenceL(RArray<TUid>& aTransformSequence);
   676 
   677 	IMPORT_C void SetSourceRect(const TRect& aRect);
   678 
   679 	IMPORT_C void GetSourceRect(TRect& aRect) const;
   680 
   681 	IMPORT_C ~CCameraImageProcessing();
   682 	
   683 	IMPORT_C void GetConcurrentColorSwappingsSupportedL(TInt& aConcurrentColorSwappingSupported) const; 
   684 	
   685 	IMPORT_C void GetColorSwapCapabilitiesL(TInt aIndex, TColorOperationCapabilities& aColorSwapCapabilities) const;
   686 	
   687 	IMPORT_C void SetColorSwapEntryL(TInt aIndex, const TColorOperationEntry& aColorSwapParameters); 
   688 	
   689 	IMPORT_C void RemoveColorSwapEntryL(TInt aIndex);
   690 	
   691 	IMPORT_C void GetColorSwapEntryL(TInt aIndex, TColorOperationEntry& aColorSwapParameters) const; 
   692 	
   693 	IMPORT_C void StartColorSwappingL();
   694 	
   695 	IMPORT_C void CancelColorSwappingL();
   696 	
   697 	IMPORT_C void GetConcurrentColorAccentSupportedL(TInt& aConcurrentColorAccentSupported) const; 
   698 	
   699 	IMPORT_C void GetColorAccentCapabilitiesL(TInt aIndex, TColorOperationCapabilities& aColorAccentCapabilities) const;
   700 	
   701 	IMPORT_C void SetColorAccentEntryL(TInt aIndex, const TColorOperationEntry& aColorAccentParameters); 
   702 	
   703 	IMPORT_C void RemoveColorAccentEntryL(TInt aIndex);
   704 	
   705 	IMPORT_C void GetColorAccentEntryL(TInt aIndex, TColorOperationEntry& aColorAccentParameters) const; 
   706 	
   707 	IMPORT_C void StartColorAccentL();
   708 	
   709 	IMPORT_C void CancelColorAccentL();
   710 	
   711 	IMPORT_C void GetSupportedRelativeOrientationOptionsL(TOrientationReference aOrientationReference, 
   712 		TUint& aSupportedRelativeRotation, TUint& aSupportedRelativeMirroring, TUint& aSupportedRelativeFlipping) const;
   713 																
   714 	IMPORT_C void GetCurrentRelativeOrientationOptionsL(TOrientationReference& aOrientationReference, 
   715 		TRelativeRotation& aRelativeRotation, TRelativeMirror& aRelativeMirror, TRelativeFlipping& aRelativeFlipping) const;
   716 												
   717 	IMPORT_C void SetRelativeOrientationOptionsL(TOrientationReference aOrientationReference, 
   718 		TRelativeRotation aRelativeRotation, TRelativeMirror aRelativeMirror, TRelativeFlipping aRelativeFlipping);
   719 	
   720 private:
   721 	CCameraImageProcessing(CCamera& aOwner);
   722 	void ConstructL();
   723 	void ConstructL(const MImplementationFactory& aImplFactory);
   724 	
   725 private:
   726 	CCamera& iOwner;
   727 	MCameraImageProcessing* iImpl;  // not owned
   728 	MCameraImageProcessing2* iImpl2;   //not owned
   729 	MCameraImageProcessing3* iImpl3;   //not owned
   730 	};
   731 #endif//ECAMIMAGEPROCESSING_H