epoc32/include/ecam.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@4
     4
// under the terms of "Eclipse Public License v1.0"
williamr@2
     5
// which accompanies this distribution, and is available
williamr@4
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
//
williamr@2
    15
williamr@2
    16
/**
williamr@2
    17
 @file
williamr@2
    18
 @publishedAll
williamr@2
    19
 @released
williamr@2
    20
*/
williamr@2
    21
#ifndef ECAM_H
williamr@2
    22
#define ECAM_H
williamr@2
    23
williamr@2
    24
#include <e32base.h>
williamr@2
    25
#include <ecamuids.hrh>
williamr@2
    26
#include <e32property.h>
williamr@2
    27
williamr@4
    28
#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
williamr@4
    29
#include <ecamdef.h>
williamr@4
    30
#endif
williamr@4
    31
williamr@2
    32
class MFrameBuffer;
williamr@2
    33
class RWsSession;
williamr@2
    34
class CWsScreenDevice;
williamr@2
    35
class RWindowBase;
williamr@2
    36
class CFbsBitmap;
williamr@2
    37
williamr@2
    38
typedef TInt TPostCaptureControlId;
williamr@2
    39
williamr@2
    40
/** Specifies camera device information.
williamr@2
    41
williamr@2
    42
If either zoom or digital zoom are available then the appropriate entries
williamr@2
    43
in this class will be set to indicate the range of values that they may take.
williamr@2
    44
This should be implemented such that a setting of zero corresponds to no zoom,
williamr@2
    45
and a step of one corresponds to the smallest increment available, in a linear
williamr@2
    46
fashion.
williamr@2
    47
williamr@2
    48
There are also zoom factors that correspond to the actual zoom factor when
williamr@2
    49
at minimum (non-digital only) and maximum zoom. Negative zoom values represent
williamr@2
    50
macro functionality.
williamr@2
    51
williamr@2
    52
Image capture, if supported, is simply a case of transferring the current
williamr@2
    53
image from the camera to the client via MCameraObserver::ImageReady(). The
williamr@2
    54
camera class must set the iImageFormatsSupported bitfield to indicate the
williamr@2
    55
formats available.
williamr@2
    56
williamr@2
    57
@publishedAll
williamr@2
    58
@released
williamr@2
    59
*/
williamr@2
    60
class TCameraInfo
williamr@2
    61
	{
williamr@2
    62
public:
williamr@2
    63
	/** Possible directions in which the camera may point.
williamr@2
    64
	*/
williamr@2
    65
	enum TCameraOrientation
williamr@2
    66
		{
williamr@2
    67
		/** Outward pointing camera for taking pictures.
williamr@2
    68
		Camera is directed away from the user. */
williamr@2
    69
		EOrientationOutwards,
williamr@2
    70
		/** Inward pointing camera for conferencing.
williamr@2
    71
		Camera is directed towards the user. */
williamr@2
    72
		EOrientationInwards,
williamr@2
    73
		/** Mobile camera capable of multiple orientations.
williamr@2
    74
		Camera orientation may be changed by the user. */
williamr@2
    75
		EOrientationMobile,
williamr@2
    76
		/** Camera orientation is not known. */
williamr@2
    77
		EOrientationUnknown
williamr@2
    78
		};
williamr@2
    79
williamr@2
    80
	/** Various flags describing the features available for a particular implementation
williamr@2
    81
	*/
williamr@2
    82
	enum TOptions
williamr@2
    83
		{
williamr@2
    84
		/** View finder display direct-to-screen flag */
williamr@2
    85
		EViewFinderDirectSupported		= 0x0001,
williamr@2
    86
		/** View finder bitmap generation flag */
williamr@2
    87
		EViewFinderBitmapsSupported		= 0x0002,
williamr@2
    88
		/** Still image capture flag */
williamr@2
    89
		EImageCaptureSupported			= 0x0004,
williamr@2
    90
		/** Video capture flag */
williamr@2
    91
		EVideoCaptureSupported			= 0x0008,
williamr@2
    92
		/** View finder display mirroring flag */
williamr@2
    93
		EViewFinderMirrorSupported		= 0x0010,
williamr@2
    94
		/** Contrast setting flag */
williamr@2
    95
		EContrastSupported				= 0x0020,
williamr@2
    96
		/** Brightness setting flag */
williamr@2
    97
		EBrightnessSupported			= 0x0040,
williamr@2
    98
		/** View finder clipping flag */
williamr@2
    99
		EViewFinderClippingSupported	= 0x0080,
williamr@2
   100
		/** Still image capture clipping flag */
williamr@2
   101
		EImageClippingSupported			= 0x0100,
williamr@2
   102
		/** Video capture clipping flag */
williamr@2
   103
		EVideoClippingSupported			= 0x0200
williamr@2
   104
		};
williamr@2
   105
public:
williamr@2
   106
	/** Version number and name of camera hardware. */
williamr@2
   107
	TVersion iHardwareVersion;
williamr@2
   108
	/** Version number and name of camera software (device driver). */
williamr@2
   109
	TVersion iSoftwareVersion;
williamr@2
   110
	/** Orientation of this particular camera device. */
williamr@2
   111
	TCameraOrientation iOrientation;
williamr@2
   112
williamr@2
   113
	/** Bitfield of TOptions available */
williamr@2
   114
	TUint32 iOptionsSupported;
williamr@2
   115
	/** The supported flash modes.
williamr@2
   116
	
williamr@2
   117
	This is a bitfield of CCamera::TFlash values. 
williamr@2
   118
	
williamr@2
   119
	If methods CCamera::New2L() or CCamera::NewDuplicate2L() are not used to create the CCamera object, it is assumed that the 
williamr@2
   120
	application may not be able to cope with any future additions to the enum values. So, any unrecognised enum value passed 
williamr@2
   121
    from the implementation should be filtered by ECAM Implementation.
williamr@2
   122
    To receive unrecognised/extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() 
williamr@2
   123
    to create camera object. This is an indication to ECAM implementation. In this case, application is assumed 
williamr@2
   124
    to be prepared to receive unrecognised enum values.
williamr@2
   125
    @see CCamera::CCameraAdvancedSettings::SupportedFlashModes()
williamr@2
   126
	
williamr@2
   127
	*/
williamr@2
   128
	TUint32 iFlashModesSupported;
williamr@2
   129
	/** The supported exposure modes.
williamr@2
   130
	
williamr@2
   131
	This is a bitfield of CCamera::TExposure values. */
williamr@2
   132
	TUint32 iExposureModesSupported;
williamr@2
   133
	
williamr@2
   134
	/** The supported white balance settings.
williamr@2
   135
	
williamr@2
   136
	This is a bitfield of of CCamera::TWhiteBalance values. 
williamr@2
   137
	
williamr@2
   138
	If methods CCamera::New2L() or CCamera::NewDuplicate2L() are not used to create the CCamera object, it is assumed that the 
williamr@2
   139
	application may not be able to cope with any future additions to the enum values. So, any unrecognised enum value passed 
williamr@2
   140
    from the implementation should be filtered by ECAM Implementation.
williamr@2
   141
    To receive unrecognised/extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() 
williamr@2
   142
    to create camera object. This is an indication to ECAM implementation. In this case, application is assumed 
williamr@2
   143
    to be prepared to receive unrecognised enum values.
williamr@2
   144
    Refer to CCamera::CCameraAdvancedSettings::SupportedWhiteBalanceModes() implementation
williamr@2
   145
    
williamr@2
   146
    @see CCamera::CCameraAdvancedSettings::SupportedWhiteBalanceModes()
williamr@2
   147
	*/
williamr@2
   148
	TUint32 iWhiteBalanceModesSupported;
williamr@2
   149
williamr@2
   150
	/** Minimum zoom value allowed. 
williamr@2
   151
	
williamr@2
   152
	Must be negative, or zero if not supported.
williamr@2
   153
	
williamr@2
   154
	This is the minimum value that may be passed to CCamera::SetZoomFactorL(). */
williamr@2
   155
	TInt iMinZoom;
williamr@2
   156
	/** Maximum zoom value allowed. 
williamr@2
   157
	
williamr@2
   158
	Must be positive, or zero if not supported.
williamr@2
   159
	
williamr@2
   160
	This is the maximum value that may be passed to CCamera::SetZoomFactorL(). */
williamr@2
   161
	TInt iMaxZoom;
williamr@2
   162
	/** Maximum digital zoom value allowed. 
williamr@2
   163
	
williamr@2
   164
	Must be positive, or zero if not supported.
williamr@2
   165
williamr@2
   166
	This is the maximum value that may be passed to CCamera::SetDigitalZoomFactorL(). 
williamr@2
   167
	Digital zoom factor is assumed to be a linear scale from 0 to iMaxDigitalZoom. */
williamr@2
   168
	TInt iMaxDigitalZoom;
williamr@2
   169
williamr@2
   170
	/** Image size multiplier corresponding to minimum zoom value. 
williamr@2
   171
	
williamr@2
   172
	Must be between 0 and 1 inclusive. Both 0 and 1 indicate that macro functionality 
williamr@2
   173
	is not supported. */
williamr@2
   174
	TReal32 iMinZoomFactor;
williamr@2
   175
	/** Image size multiplier corresponding to maximum zoom value. 
williamr@2
   176
	
williamr@2
   177
	May take the value 0, or values greater than or equal to 1. Both 0 and 1 indicate 
williamr@2
   178
	that zoom functionality is not supported. */
williamr@2
   179
	TReal32 iMaxZoomFactor;
williamr@2
   180
	/** Image size multiplier corresponding to maximum digital zoom value. 
williamr@2
   181
		
williamr@2
   182
	Implementation recommendation is to use 'appropriate value' for maximum digital zoom which could cover only values 
williamr@2
   183
	given by new digital zoom methods based on image format and capture mode.
williamr@2
   184
	
williamr@2
   185
	Must be greater than or equal to 1. */
williamr@2
   186
	TReal32 iMaxDigitalZoomFactor;
williamr@2
   187
williamr@2
   188
	/** Count of still image capture sizes allowed.
williamr@2
   189
	
williamr@2
   190
	Number of different image sizes that CCamera::EnumerateCaptureSizes() will 
williamr@2
   191
	support, based on the index passed in. Index must be between 0 and iNumImageSizesSupported-1. */
williamr@2
   192
	TInt iNumImageSizesSupported;
williamr@2
   193
	/** The supported still image formats.
williamr@2
   194
	
williamr@2
   195
	This is a bitfield of CCamera::TFormat values. */
williamr@2
   196
	TUint32 iImageFormatsSupported;
williamr@2
   197
williamr@2
   198
	/** Count of video frame sizes allowed. 
williamr@2
   199
	
williamr@2
   200
	This is the number of different video frame sizes that CCamera::EnumerateVideoFrameSizes() 
williamr@2
   201
	will support, based on the specified index. The index must be between 0 and 
williamr@2
   202
	iNumVideoFrameSizesSupported-1. */
williamr@2
   203
	TInt iNumVideoFrameSizesSupported;
williamr@2
   204
	/** Count of video frame rates allowed.
williamr@2
   205
	
williamr@2
   206
	This is the number of different video frame rates that CCamera::EnumerateVideoFrameRates() 
williamr@2
   207
	will support, based on the specified index. The index must be between 0 and 
williamr@2
   208
	iNumVideoFrameRatesSupported-1. */
williamr@2
   209
	TInt iNumVideoFrameRatesSupported;
williamr@2
   210
	/** The supported video frame formats.
williamr@2
   211
williamr@2
   212
	This is a bitfield of video frame CCamera::TFormat values. 
williamr@2
   213
	
williamr@2
   214
	If methods CCamera::New2L() or CCamera::NewDuplicate2L() are not used to create the CCamera object, it is assumed that the 
williamr@2
   215
	application may not be able to cope with any future additions to the enum values. So, any unrecognised enum value passed 
williamr@2
   216
    from the implementation should be filtered by the ECAM implementation.
williamr@2
   217
    To receive unrecognised/extra added enum values, the application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() 
williamr@2
   218
    to create the camera object. This is an indication to the ECAM implementation. In this case, the application is assumed 
williamr@2
   219
    to be prepared to receive unrecognised enum values.	
williamr@2
   220
	*/
williamr@2
   221
	TUint32 iVideoFrameFormatsSupported;
williamr@2
   222
	/** Maximum number of frames per buffer that may be requested. */
williamr@2
   223
	TInt iMaxFramesPerBufferSupported;
williamr@2
   224
	/** Maximum number of buffers allowed */
williamr@2
   225
	TInt iMaxBuffersSupported;
williamr@2
   226
	};
williamr@2
   227
williamr@2
   228
/** Mixin base class for camera clients.
williamr@2
   229
williamr@2
   230
An application must implement an MCameraObserver or MCameraObserver2 (recommended)
williamr@2
   231
in order to use the camera API. This derived class is called when the camera is 
williamr@2
   232
ready for use, an image has been captured or a buffer of video data is ready, including 
williamr@2
   233
when errors occur.
williamr@2
   234
williamr@2
   235
Implementations of the camera API should use MCameraObserver::FrameBufferReady()
williamr@2
   236
and MFrameBuffer::Release() to co-ordinate the mapping of any special memory
williamr@2
   237
objects.
williamr@2
   238
williamr@2
   239
@publishedAll
williamr@2
   240
@released
williamr@2
   241
*/
williamr@2
   242
class MCameraObserver
williamr@2
   243
	{
williamr@2
   244
public:
williamr@2
   245
	/** Camera reservation is complete.
williamr@2
   246
williamr@2
   247
	Called asynchronously when CCamera::Reserve() completes.
williamr@2
   248
williamr@2
   249
	@param  aError
williamr@2
   250
	        An error on failure and KErrNone on success.
williamr@2
   251
	*/
williamr@2
   252
	virtual void ReserveComplete(TInt aError)=0;
williamr@2
   253
williamr@2
   254
	/** Indicates camera power on is complete.
williamr@2
   255
williamr@2
   256
	Called on completion of CCamera:PowerOn().
williamr@2
   257
williamr@2
   258
	@param  aError
williamr@2
   259
	        KErrNone on success, KErrInUse if the camera is in
williamr@2
   260
	        use by another client or KErrNoMemory if insufficient system memory is available.
williamr@2
   261
	*/
williamr@2
   262
	virtual void PowerOnComplete(TInt aError)=0;
williamr@2
   263
williamr@2
   264
	/** Tests whether transfer of view finder data has completed.
williamr@2
   265
williamr@2
   266
	Called periodically in response to the use of CCamera::StartViewFinderBitmapsL().
williamr@2
   267
williamr@2
   268
	@param  aFrame
williamr@2
   269
	        The view finder frame.
williamr@2
   270
	*/
williamr@2
   271
	virtual void ViewFinderFrameReady(CFbsBitmap& aFrame)=0;
williamr@2
   272
williamr@2
   273
	/** Transfers the current image from the camera to the client.
williamr@2
   274
williamr@2
   275
	Called asynchronously when CCamera::CaptureImage() completes.
williamr@2
   276
williamr@2
   277
	@param  aBitmap
williamr@2
   278
	        On return, a pointer to an image held in CFbsBitmap form if
williamr@2
   279
	        this was the format specified in CCamera::PrepareImageCaptureL().
williamr@2
   280
	@param  aData
williamr@2
   281
	        On return, a pointer to an HBufC8 if this was the format specified
williamr@2
   282
	        in CCamera::PrepareImageCaptureL(). NULL if there was an error.
williamr@2
   283
	@param  aError
williamr@2
   284
	        KErrNone on success or an error code on failure.
williamr@2
   285
	*/
williamr@2
   286
	virtual void ImageReady(CFbsBitmap* aBitmap,HBufC8* aData,TInt aError)=0;
williamr@2
   287
williamr@2
   288
	/** Passes a filled frame buffer to the client.
williamr@2
   289
williamr@2
   290
	Called asynchronously, when a buffer has been filled with the required number
williamr@2
   291
	of video frames by CCamera::StartVideoCapture().
williamr@2
   292
williamr@2
   293
	@param  aFrameBuffer
williamr@2
   294
	        On return, a pointer to an MFrameBuffer if successful,
williamr@2
   295
	        or NULL if not successful.
williamr@2
   296
	@param  aError
williamr@2
   297
	        KErrNone if successful, or an error code if not successful.
williamr@2
   298
	*/
williamr@2
   299
	virtual void FrameBufferReady(MFrameBuffer* aFrameBuffer,TInt aError)=0;
williamr@2
   300
	};
williamr@2
   301
williamr@2
   302
williamr@2
   303
/**
williamr@2
   304
Class used for passing camera picture data between camera and client in the V2 observer.
williamr@2
   305
Used for viewfinder, image capture and video capture.
williamr@2
   306
williamr@2
   307
The class offers APIs for the client to access the data as a descriptor, a bitmap
williamr@2
   308
or a handle to a kernel chunk. Depending on the format previously requested by
williamr@2
   309
the client, one or more of the API choices may be inappropriate e.g. an image will
williamr@2
   310
not be avaiable as a bitmap in the FBS unless the client has specifically requested
williamr@2
   311
it.
williamr@2
   312
williamr@2
   313
The buffer may contain multiple frames.
williamr@2
   314
williamr@2
   315
@publishedAll
williamr@2
   316
@released
williamr@2
   317
*/
williamr@2
   318
class MCameraBuffer
williamr@2
   319
	{
williamr@2
   320
public:
williamr@2
   321
	/** 
williamr@2
   322
	Returns the number of frames of image data contained within the buffer. This
williamr@2
   323
	would be 1 for a image capture, and match the requested count
williamr@2
   324
	for video capture. For other methods in this class that take a aFrameIndex
williamr@2
   325
	param, 0 <= aFrameIndex < NumFrames()
williamr@2
   326
williamr@2
   327
	@return The number of frames of image data in the buffer. 
williamr@2
   328
	*/
williamr@2
   329
	virtual TInt NumFrames()=0;
williamr@2
   330
	/**
williamr@2
   331
	Returns a pointer to a descriptor containing a frame of camera data. The format
williamr@2
   332
	will have been previously specified by a CCamera class method.
williamr@2
   333
williamr@2
   334
	@param  aFrameIndex
williamr@2
   335
	        The index of the required frame. For a still image this should be 0.
williamr@2
   336
williamr@2
   337
	@leave  KErrArgument if aIndex is out of range and 
williamr@2
   338
	@leave  KErrNotSupported if the camera data is actually bitmaps in the FBS.
williamr@2
   339
williamr@2
   340
	@return A pointer to a descriptor containing a frame of image data.
williamr@2
   341
	*/
williamr@2
   342
	virtual TDesC8* DataL(TInt aFrameIndex)=0;
williamr@2
   343
williamr@2
   344
	/** 
williamr@2
   345
	Returns a reference to a FBS bitmap containing a frame of image data.
williamr@2
   346
williamr@2
   347
	@param  aFrameIndex 
williamr@2
   348
	        The index of the required frame. For a still image this should be 0.
williamr@2
   349
williamr@2
   350
	@leave  KErrArgument if aIndex is out of range and 
williamr@2
   351
	@leave  KErrNotSupported if the picture data is not a FBS bitmap.
williamr@2
   352
williamr@2
   353
	@return A reference to a FBS bitmap containing a frame of picture data. 
williamr@2
   354
	*/
williamr@2
   355
	virtual CFbsBitmap& BitmapL(TInt aFrameIndex)=0;
williamr@2
   356
williamr@2
   357
	/** 
williamr@2
   358
	Returns a handle for the chunk that contains the camera data.
williamr@2
   359
	The RChunk is exposed so that it can potentially be shared between multiple
williamr@2
   360
	processes.
williamr@2
   361
	The ptr returned by DataL(aFrameIndex) is effectively derived from this
williamr@2
   362
	RChunk (where both are supported simulataneously). The equivalent ptr would be:
williamr@2
   363
	TPtrC8* ptr;
williamr@2
   364
	ptr.Set(ChunkL().Base() + ChunkOffset(aFrameIndex), FrameSize(aFrameIndex));
williamr@2
   365
williamr@2
   366
	@leave  KErrNotSupported if the chunk is not available.
williamr@2
   367
williamr@2
   368
	@return A reference to a handle to the chunk that contains the buffer of picture data. 
williamr@2
   369
	*/
williamr@2
   370
	virtual RChunk& ChunkL()=0;
williamr@2
   371
williamr@2
   372
	/** 
williamr@2
   373
	Returns the offset into the chunk that contains the frame specified by aFrameIndex.
williamr@2
   374
	The client would add this offset to the ptr returned by ChunkL().Base() to
williamr@2
   375
	get the address of the start of the frame data. 
williamr@2
   376
	
williamr@2
   377
	@param  aIndex 
williamr@2
   378
	        The index of the required frame. For a still image this should be 0.
williamr@2
   379
williamr@2
   380
	@leave  KErrNotSupported if the chunk is not available 
williamr@2
   381
	@leave  KErrArgument if aIndex is out of range.
williamr@2
   382
williamr@2
   383
	@return The offset into the chunk for the start of the frame. 
williamr@2
   384
	*/
williamr@2
   385
	virtual TInt ChunkOffsetL(TInt aFrameIndex)=0;
williamr@2
   386
williamr@2
   387
	/** 
williamr@2
   388
	Returns the size of the data in bytes that comprises the frame specified by aIndex.
williamr@2
   389
	
williamr@2
   390
	@param  aFrameIndex 
williamr@2
   391
	        The index of the required frame. For a still image this should be 0.
williamr@2
   392
williamr@2
   393
	@leave  KErrArgument 
williamr@2
   394
			if aIndex is out of range.
williamr@2
   395
williamr@2
   396
	@return Returns the size of the data in bytes that comprises the frame. 
williamr@2
   397
	*/
williamr@2
   398
	virtual TInt FrameSize(TInt aFrameIndex)=0;
williamr@2
   399
williamr@2
   400
	/** 
williamr@2
   401
	Releases the buffer. Once the client has processed
williamr@2
   402
	the picture data it should use this method to signal to CCamera that the
williamr@2
   403
	buffer can be re-used.
williamr@2
   404
	*/
williamr@2
   405
	virtual void Release()=0;
williamr@2
   406
public:
williamr@2
   407
williamr@2
   408
	/** 
williamr@2
   409
	Sequential frame number of the first frame in the buffer, counting from when
williamr@2
   410
	CCamera::StartVideoCapture() was called and including frames dropped due to
williamr@2
   411
	lack of buffers. Always zero for still images. May also be used by client viewfinders.
williamr@2
   412
	*/
williamr@2
   413
	TInt iIndexOfFirstFrameInBuffer;
williamr@2
   414
williamr@2
   415
	/** 
williamr@2
   416
	Time elapsed from when CCamera::StartVideoCapture() was called until the first
williamr@2
   417
	frame in the buffer was captured. Always zero for still images.
williamr@2
   418
	*/
williamr@2
   419
	TTimeIntervalMicroSeconds iElapsedTime;
williamr@2
   420
	};
williamr@2
   421
williamr@2
   422
/** 
williamr@2
   423
	Uid used to identify the event that the request to Reserve() has completed
williamr@2
   424
*/
williamr@2
   425
static const TUid  KUidECamEventReserveComplete = {0x101F7D3B};
williamr@2
   426
williamr@2
   427
/** 
williamr@2
   428
	Uid used to identify the event that the request to PowerOn() has completed
williamr@2
   429
*/
williamr@2
   430
static const TUid  KUidECamEventPowerOnComplete = {0x101F7D3C};
williamr@2
   431
williamr@2
   432
/** 
williamr@2
   433
	Uid used to identify the event that the client has lost
williamr@2
   434
	control of the camera
williamr@2
   435
*/
williamr@2
   436
static const TUid  KUidECamEventCameraNoLongerReserved = {0x101F7D3D};
williamr@2
   437
williamr@2
   438
/** 
williamr@2
   439
Uid used to notify the client who made the new reserve request. 
williamr@2
   440
williamr@2
   441
Error value KErrECamHighPriorityReserveRequesterExists indicates another such reserve request is outstanding and
williamr@2
   442
has higher priority than this one.
williamr@2
   443
Error value KErrCancel indicates a new reserve requester with higher priority than the current requester has 
williamr@2
   444
been made. That's why, this one got cancelled.
williamr@2
   445
Any other error may also occur.
williamr@2
   446
@see CCamera::CCameraAdvancedSettings::ReserveL(const TTimeIntervalMicroseconds32& aMaxTimeToWait, TBool aKickOut);
williamr@2
   447
*/
williamr@2
   448
static const TUid  KUidECamEventNewReserveComplete = {KUidECamEventNewReserveCompleteUidValue};
williamr@2
   449
williamr@2
   450
/**
williamr@2
   451
@publishedAll
williamr@2
   452
@released
williamr@2
   453
williamr@2
   454
General purpose class to describe an ECam event.
williamr@2
   455
williamr@2
   456
Contains a UID to define the actual event type, and an integer to define the event code.
williamr@2
   457
williamr@2
   458
*/
williamr@2
   459
williamr@2
   460
class TECAMEvent
williamr@2
   461
	{
williamr@2
   462
public:
williamr@2
   463
	
williamr@2
   464
	/**
williamr@2
   465
	Constructor.
williamr@2
   466
	
williamr@2
   467
	@param  aEventType
williamr@2
   468
	        A UID to define the type of event.
williamr@2
   469
	@param  aErrorCode
williamr@2
   470
	        The error code associated with the event.
williamr@2
   471
williamr@2
   472
	*/
williamr@2
   473
	IMPORT_C TECAMEvent(TUid aEventType, TInt aErrorCode);
williamr@2
   474
williamr@2
   475
	/**
williamr@2
   476
	Default constructor.
williamr@2
   477
	
williamr@2
   478
	Provided so this class can be packaged in a TPckgBuf<>.
williamr@2
   479
	*/
williamr@2
   480
	IMPORT_C TECAMEvent();
williamr@2
   481
	
williamr@2
   482
	/**
williamr@2
   483
	A UID to define the event type.
williamr@2
   484
	*/
williamr@2
   485
	TUid iEventType;
williamr@2
   486
williamr@2
   487
	/**
williamr@2
   488
	The error code associated with the event.
williamr@2
   489
	*/
williamr@2
   490
	TInt iErrorCode;
williamr@2
   491
	};
williamr@2
   492
williamr@2
   493
/** 
williamr@2
   494
Uid used to identify a particular version of TECAMEvent base class being used i.e. TECAMEvent2 . 
williamr@2
   495
Useful for MCameraObserver2::HandleEvent implementation to detect the version of TECAMEvent base class.
williamr@2
   496
*/
williamr@2
   497
static const TUid  KUidECamEventClass2 = {KUidECamEventClass2UidValue};
williamr@2
   498
williamr@2
   499
/** 
williamr@2
   500
event indicating setting of color entry in the color swap operation. This is a part of class CCamera::CCameraImageProcessing. 
williamr@2
   501
This event should be packed in TECAMEvent2 class.
williamr@2
   502
williamr@2
   503
@note  TECAMEvent2::iParam represents color entry.
williamr@2
   504
*/
williamr@2
   505
static const TUid  KUidECamEventCIPSetColorSwapEntry 		   = {KUidECamEventCIPSetColorSwapEntryUidValue};
williamr@2
   506
static const TUid  KUidECamEvent2CIPSetColorSwapEntry 		   = {KUidECamEventCIPSetColorSwapEntryUidValue};
williamr@2
   507
williamr@2
   508
/** 
williamr@2
   509
event indicating removal of color entry in the color swap operation. This is a part of class CCamera::CCameraImageProcessing. 
williamr@2
   510
This event should be packed in TECAMEvent2 class.
williamr@2
   511
williamr@2
   512
@note  TECAMEvent2::iParam represents color entry.
williamr@2
   513
*/
williamr@2
   514
static const TUid  KUidECamEventCIPRemoveColorSwapEntry 	   = {KUidECamEventCIPRemoveColorSwapEntryUidValue};
williamr@2
   515
static const TUid  KUidECamEvent2CIPRemoveColorSwapEntry 	   = {KUidECamEventCIPRemoveColorSwapEntryUidValue};
williamr@2
   516
williamr@2
   517
/** 
williamr@2
   518
event indicating setting of color entry in the color accent operation. This is a part of class CCamera::CCameraImageProcessing. 
williamr@2
   519
This event should be packed in TECAMEvent2 class.
williamr@2
   520
williamr@2
   521
@note  TECAMEvent2::iParam represents color entry.
williamr@2
   522
*/
williamr@2
   523
static const TUid  KUidECamEventCIPSetColorAccentEntry 		   = {KUidECamEventCIPSetColorAccentEntryUidValue};
williamr@2
   524
static const TUid  KUidECamEvent2CIPSetColorAccentEntry 	   = {KUidECamEventCIPSetColorAccentEntryUidValue};
williamr@2
   525
williamr@2
   526
/** 
williamr@2
   527
event indicating removal of color entry in the color accent operation. This is a part of class CCamera::CCameraImageProcessing. 
williamr@2
   528
This event should be packed in TECAMEvent2 class.
williamr@2
   529
williamr@2
   530
@note  TECAMEvent2::iParam represents color entry.
williamr@2
   531
*/
williamr@2
   532
static const TUid  KUidECamEventCIPRemoveColorAccentEntry 	   = {KUidECamEventCIPRemoveColorAccentEntryUidValue};
williamr@2
   533
static const TUid  KUidECamEvent2CIPRemoveColorAccentEntry 	   = {KUidECamEventCIPRemoveColorAccentEntryUidValue};
williamr@2
   534
williamr@2
   535
/** 
williamr@2
   536
event indicating issue of pre capture warnings. This is a part of class CCamera::CCameraAdvancedSettings. 
williamr@2
   537
This event should be packed in TECAMEvent2 class.
williamr@2
   538
williamr@2
   539
This TUid is available from the following methods only to the API clients using CCamera::New2L() or CCamera::
williamr@2
   540
NewDuplicate2L():-
williamr@2
   541
void CCamera::CCameraAdvancedSettings::GetSupportedSettingsL(RArray<TUid>& aSettings) const;
williamr@2
   542
void CCamera::CCameraAdvancedSettings::GetActiveSettingsL(RArray<TUid>& aActiveSettings) const;
williamr@2
   543
void CCamera::CCameraAdvancedSettings::GetDisabledSettingsL(RArray<TUid>& aDisabledSettings) const;
williamr@2
   544
williamr@2
   545
@note  TECAMEvent2::iParam represents bit field describing all PreCaptureWarnings currently issued.
williamr@2
   546
*/
williamr@2
   547
static const TUid  KUidECamEventCameraSettingPreCaptureWarning 	= {KUidECamEventCameraSettingPreCaptureWarningUidValue};
williamr@2
   548
static const TUid  KUidECamEvent2CameraSettingPreCaptureWarning = {KUidECamEventCameraSettingPreCaptureWarningUidValue};
williamr@2
   549
	
williamr@2
   550
/**
williamr@2
   551
Special type of TECAMEvent class used to retrieve some extra information from particular events received
williamr@2
   552
williamr@2
   553
@publishedAll
williamr@2
   554
@released
williamr@2
   555
*/	
williamr@2
   556
class TECAMEvent2 : public TECAMEvent
williamr@2
   557
	{
williamr@2
   558
public:
williamr@2
   559
williamr@2
   560
	IMPORT_C static TBool IsEventEncapsulationValid(const TECAMEvent& aECAMEvent);
williamr@2
   561
williamr@2
   562
	IMPORT_C TECAMEvent2(TUid aEventType, TInt aErrorCode, TInt aParam);
williamr@2
   563
	
williamr@2
   564
	IMPORT_C const TUid& EventClassUsed() const;
williamr@2
   565
	
williamr@2
   566
private:
williamr@2
   567
	/** 
williamr@2
   568
	Uid representing this version of TECAMEvent base class. Uid used is KUidECamEventClass2 
williamr@2
   569
	*/
williamr@2
   570
	TUid iEventClassUsed;
williamr@2
   571
	
williamr@2
   572
	/**
williamr@2
   573
	Reserved for future
williamr@2
   574
	TInt iReserved1; -> Made Public TInt iParam1
williamr@2
   575
	*/
williamr@2
   576
	
williamr@2
   577
	/**
williamr@2
   578
	Reserved for future	
williamr@2
   579
	*/
williamr@2
   580
	TInt iReserved2; 
williamr@2
   581
	
williamr@2
   582
	
williamr@2
   583
public:
williamr@2
   584
	/**
williamr@2
   585
	iParam1 will be used to provide extra information if iParam is not sufficient.
williamr@2
   586
	This signifies different things for different valid events.
williamr@2
   587
				
williamr@2
   588
	Future events may also use this class member variable.
williamr@2
   589
	*/
williamr@2
   590
	TInt iParam1;
williamr@2
   591
	
williamr@2
   592
	/**
williamr@2
   593
	This signifies different things for different valid events.
williamr@2
   594
				
williamr@2
   595
	Future events may also use this class member variable.
williamr@2
   596
	*/	
williamr@2
   597
	TInt iParam;
williamr@2
   598
	};
williamr@2
   599
williamr@2
   600
/** Mixin base class V2 for camera clients.
williamr@2
   601
williamr@2
   602
An application must implement an MCameraObserver2 (or MCameraObserver) in order to use the camera
williamr@2
   603
API. This derived class is called when the camera is ready for use, an image
williamr@2
   604
has been captured or a buffer of video data is ready, including when errors
williamr@2
   605
occur.
williamr@2
   606
williamr@2
   607
@publishedAll
williamr@2
   608
@released
williamr@2
   609
*/
williamr@2
   610
williamr@2
   611
class MCameraObserver2
williamr@2
   612
	{
williamr@2
   613
public:
williamr@2
   614
	/** 
williamr@2
   615
	A camera event has completed.
williamr@2
   616
	@note Implementations of MCameraObserver2 should ignore events which are not recognised and should not leave.
williamr@2
   617
williamr@2
   618
	@param  aEvent
williamr@2
   619
	        A reference to a TECAMEvent. This can be completion of a call to Reserve() 
williamr@2
   620
			or a call to PowerOn() or a notification that the client has lost control 
williamr@2
   621
			of the camera.
williamr@2
   622
			The event contains a uid identifying the event and an accompanying
williamr@2
   623
			error code (KErrNone for the successful completion of a request).
williamr@2
   624
			The error will be KErrNotReady for a request that was made out of the
williamr@2
   625
			correct sequence.
williamr@2
   626
			The error will be KErrAccessDenied for a Reserve() request that failed
williamr@2
   627
			because a higher priority client already controls the camera.
williamr@2
   628
	
williamr@2
   629
	@note   This may internally call TECAMEvent2::IsEventEncapsulationValid(aEvent) and also for any other derived version of TECAMEvent 
williamr@2
   630
			class to know whether correct version of TECAMEvent base class has been used. 
williamr@2
   631
	*/
williamr@2
   632
	virtual void HandleEvent(const TECAMEvent& aEvent)=0;
williamr@2
   633
williamr@2
   634
	/** 
williamr@2
   635
	Notifies client of new view finder data. Called periodically in response to 
williamr@2
   636
	the use of CCamera::StartViewFinderL().
williamr@2
   637
williamr@2
   638
	@param  aCameraBuffer
williamr@2
   639
	        A reference to an MCameraBuffer if successful, or NULL if not successful.
williamr@2
   640
williamr@2
   641
	@param  aError
williamr@2
   642
	        KErrNone if successful, or an error code if not successful.
williamr@2
   643
	*/
williamr@2
   644
	virtual void ViewFinderReady(MCameraBuffer& aCameraBuffer,TInt aError)=0;
williamr@2
   645
williamr@2
   646
	/** 
williamr@2
   647
	Notifies the client of a new captured camera image. Called asynchronously 
williamr@2
   648
	when CCamera::CaptureImage() completes.
williamr@2
   649
williamr@2
   650
	@param  aCameraBuffer
williamr@2
   651
	        A reference to an MCameraBuffer if successful, or NULL if not successful.
williamr@2
   652
williamr@2
   653
	@param  aError
williamr@2
   654
	        KErrNone if successful, or an error code if not successful.
williamr@2
   655
  
williamr@2
   656
	@note   If new image capture classes used, then this callback will not be used. Refer MCaptureImageObserver
williamr@2
   657
	*/
williamr@2
   658
	virtual void ImageBufferReady(MCameraBuffer& aCameraBuffer,TInt aError)=0;
williamr@2
   659
williamr@2
   660
	/** 
williamr@2
   661
	Notifies the client of new captured video. Called asynchronously and periodically
williamr@2
   662
	after CCamera::StartVideoCapture() is called. The buffer has been filled with the 
williamr@2
   663
	required number of video frames specified PrepareVideoCaptureL().
williamr@2
   664
williamr@2
   665
	@param  aCameraBuffer
williamr@2
   666
	        A reference to an MCameraBuffer if successful, or NULL if not successful.
williamr@2
   667
williamr@2
   668
	@param  aError
williamr@2
   669
	        KErrNone if successful, or an error code if not successful.
williamr@2
   670
	*/
williamr@2
   671
	virtual void VideoBufferReady(MCameraBuffer& aCameraBuffer,TInt aError)=0;
williamr@2
   672
	};
williamr@2
   673
williamr@2
   674
williamr@2
   675
/** Base class for camera devices.
williamr@2
   676
williamr@2
   677
Provides the interface that an application uses to control, and acquire images
williamr@2
   678
from, the camera.
williamr@2
   679
williamr@2
   680
An application must supply an implementation of MCameraObserver2 (or MCameraObserver).
williamr@2
   681
williamr@2
   682
@publishedAll
williamr@2
   683
@released
williamr@2
   684
*/
williamr@2
   685
class CCamera : public CBase
williamr@2
   686
williamr@2
   687
	{
williamr@2
   688
	
williamr@2
   689
	friend class CCameraPlugin;
williamr@2
   690
williamr@2
   691
public:
williamr@2
   692
	class CCameraPresets;
williamr@2
   693
	class CCameraAdvancedSettings;
williamr@2
   694
	class CCameraImageProcessing;
williamr@2
   695
	class CCameraHistogram;
williamr@2
   696
	class CCameraV2Histogram;
williamr@2
   697
	class CCameraOverlay;
williamr@2
   698
	class CCameraSnapshot;
williamr@2
   699
	class CCameraDirectViewFinder;
williamr@2
   700
	class CCameraV2DirectViewFinder;
williamr@2
   701
	class CCameraClientViewFinder;
williamr@2
   702
	class CCameraPreImageCaptureControl;
williamr@2
   703
	class CCameraImageCapture;
williamr@2
   704
	class CCameraPostImageCaptureControl;
williamr@2
   705
	class CCameraVideoCaptureControl;
williamr@2
   706
    class CCameraDirectSnapshot;
williamr@4
   707
    class CCameraContinuousZoom;
williamr@2
   708
williamr@2
   709
public:
williamr@2
   710
	/** Possible still image and video frame formats
williamr@2
   711
williamr@2
   712
	Formats are read from left to right, starting at the top of the image. YUV
williamr@2
   713
	format is as defined by ITU-R BT.601-4. */
williamr@2
   714
	enum TFormat
williamr@2
   715
		{
williamr@2
   716
		/** 8 bit greyscale values, 0=black, 255=white. */
williamr@2
   717
		EFormatMonochrome			= 0x0001,
williamr@2
   718
		/** Packed RGB triplets, 4 bits per pixel with red in the least significant bits
williamr@2
   719
		and the 4 most significant bits unused. */
williamr@2
   720
		EFormat16bitRGB444			= 0x0002,
williamr@2
   721
		/** Packed RGB triplets, 5 bits per pixel for red and blue and 6 bits for green,
williamr@2
   722
		with red in the least significant bits. */
williamr@2
   723
		EFormat16BitRGB565			= 0x0004,
williamr@2
   724
		/** Packed RGB triplets, 8 bits per pixel with red in the least significant bits
williamr@2
   725
		and the 8 most significant bits unused. */
williamr@2
   726
		EFormat32BitRGB888			= 0x0008,
williamr@2
   727
		/** JFIF JPEG. */
williamr@2
   728
		EFormatJpeg					= 0x0010,
williamr@2
   729
		/** EXIF JPEG */
williamr@2
   730
		EFormatExif					= 0x0020,
williamr@2
   731
		/** CFbsBitmap object with display mode EColor4K. */
williamr@2
   732
		EFormatFbsBitmapColor4K		= 0x0040,
williamr@2
   733
		/** CFbsBitmap object with display mode EColor64K. */
williamr@2
   734
		EFormatFbsBitmapColor64K	= 0x0080,
williamr@2
   735
		/** CFbsBitmap object with display mode EColor16M. */
williamr@2
   736
		EFormatFbsBitmapColor16M	= 0x0100,
williamr@2
   737
		/** Implementation dependent. */
williamr@2
   738
		EFormatUserDefined			= 0x0200,
williamr@2
   739
		/** 4:2:0 format, 8 bits per sample, Y00Y01Y10Y11UV. */
williamr@2
   740
		EFormatYUV420Interleaved	= 0x0400,
williamr@2
   741
		/** 4:2:0 format, 8 bits per sample, Y00Y01Y02Y03...U0...V0... */
williamr@2
   742
		EFormatYUV420Planar			= 0x0800,
williamr@4
   743
		/** 4:2:2 format, 8 bits per sample, UY0VY1.  Maps to Graphics' EUidPixelFormatYUV_422Interleaved in pixelformats.h. */
williamr@2
   744
		EFormatYUV422				= 0x1000,
williamr@4
   745
		/** 4:2:2 format, 8 bits per sample, Y1VY0U.  Maps to Graphics' EUidPixelFormatYUV_422InterleavedReversed in pixelformats.h. */
williamr@2
   746
		EFormatYUV422Reversed		= 0x2000,
williamr@2
   747
		/** 4:4:4 format, 8 bits per sample, Y00U00V00 Y01U01V01... */
williamr@2
   748
		EFormatYUV444				= 0x4000,
williamr@2
   749
		/** 4:2:0 format, 8 bits per sample, Y00Y01Y02Y03...U0V0... */
williamr@2
   750
		EFormatYUV420SemiPlanar		= 0x8000,
williamr@2
   751
		/** CFbsBitmap object with display mode EColor16MU. */
williamr@4
   752
		EFormatFbsBitmapColor16MU 	= 0x00010000,
williamr@2
   753
		/** Motion JPEG for video 
williamr@4
   754
		@note This value is available only to the API clients using CCamera::New2L() or CCamera::NewDuplicate2L().
williamr@2
   755
		@internalTechnology
williamr@2
   756
		*/
williamr@2
   757
		EFormatMJPEG				= 0x00020000,
williamr@2
   758
		
williamr@2
   759
		/** 
williamr@2
   760
		Compressed H264 video format. 
williamr@2
   761
		@note This value is available only to the API clients using CCamera::New2L() or CCamera::NewDuplicate2L().
williamr@2
   762
		@prototype
williamr@2
   763
		*/
williamr@4
   764
		EFormatEncodedH264          = 0x00040000,
williamr@4
   765
williamr@4
   766
		/**
williamr@4
   767
		4:2:2 format, 8 bits per sample, Y0UY1V. Maps to Graphics' EUidPixelFormatYUV_422Reversed in pixelformats.h.
williamr@4
   768
		@note This value is available only to the API clients using CCamera::New2L() or CCamera::NewDuplicate2L().
williamr@4
   769
		@prototype
williamr@4
   770
		*/
williamr@4
   771
		EFormatYUV222ReversedV2		= 0x00080000
williamr@2
   772
		};
williamr@2
   773
		
williamr@2
   774
	/** Specifies whether contrast is set automatically. */
williamr@2
   775
	enum TContrast
williamr@2
   776
		{
williamr@2
   777
		/** Sets the contrast automatically. */
williamr@2
   778
		EContrastAuto		= KMinTInt
williamr@2
   779
		};
williamr@2
   780
	/** Specifies whether brightness is set automatically. */
williamr@2
   781
	enum TBrightness
williamr@2
   782
		{
williamr@2
   783
		/** Sets the brightness automatically. */
williamr@2
   784
		EBrightnessAuto		= KMinTInt
williamr@2
   785
		};
williamr@2
   786
	/** Specifies the type of flash. */
williamr@2
   787
	enum TFlash
williamr@2
   788
		{
williamr@2
   789
		/** No flash, always supported. */
williamr@2
   790
		EFlashNone			= 0x0000,
williamr@2
   791
		/** Flash will automatically fire when required. */
williamr@2
   792
		EFlashAuto			= 0x0001,
williamr@2
   793
		/** Flash will always fire. */
williamr@2
   794
		EFlashForced		= 0x0002,
williamr@2
   795
		/** Reduced flash for general lighting */
williamr@2
   796
		EFlashFillIn		= 0x0004,
williamr@2
   797
		/** Red-eye reduction mode. */	
williamr@2
   798
		EFlashRedEyeReduce	= 0x0008,
williamr@2
   799
		/** Flash at the moment when shutter opens. */
williamr@2
   800
		EFlashSlowFrontSync = 0x0010,
williamr@2
   801
		/** Flash at the moment when shutter closes. */
williamr@2
   802
		EFlashSlowRearSync  = 0x0020, 
williamr@2
   803
		/** User configurable setting */	
williamr@2
   804
		EFlashManual		= 0x0040,
williamr@2
   805
		/** Constant emission of light during video mode  
williamr@2
   806
            @note This value is available only to the API clients using CCamera::New2L() or CCamera::NewDuplicate2L()
williamr@2
   807
		*/
williamr@2
   808
		EFlashVideoLight    = 0x0080
williamr@2
   809
		};
williamr@2
   810
	/** Specifies the type of exposure. - EExposureAuto is the default value. */
williamr@2
   811
	enum TExposure
williamr@2
   812
		{
williamr@4
   813
		/** Set exposure automatically. Default, always supported.
williamr@4
   814
		This may imply auto aperture so clients may receive a KUidEcamEvent2CameraSettingAutoAperture event notification some time later. */
williamr@2
   815
		EExposureAuto		= 0x0000,
williamr@2
   816
		/** Night-time setting for long exposures. */
williamr@2
   817
		EExposureNight		= 0x0001,
williamr@2
   818
		/** Backlight setting for bright backgrounds. */
williamr@2
   819
		EExposureBacklight	= 0x0002,
williamr@2
   820
		/** Centered mode for ignoring surroundings. */
williamr@2
   821
		EExposureCenter		= 0x0004,
williamr@2
   822
		/** Sport setting for very short exposures. */
williamr@2
   823
		EExposureSport 		= 0x0008,
williamr@2
   824
		/** Generalised setting for very long exposures. */
williamr@2
   825
		EExposureVeryLong 	= 0x0010,
williamr@2
   826
		/** Snow setting for daylight exposure. */
williamr@2
   827
		EExposureSnow 		= 0x0020,
williamr@2
   828
		/** Beach setting for daylight exposure with reflective glare. */
williamr@2
   829
		EExposureBeach 		= 0x0040,
williamr@2
   830
		/** Programmed exposure setting. */
williamr@2
   831
		EExposureProgram 	= 0x0080,
williamr@2
   832
		/** Aperture setting is given priority. */
williamr@2
   833
		EExposureAperturePriority 	= 0x0100,
williamr@4
   834
		/** Shutter speed setting is given priority.
williamr@4
   835
		This may imply auto aperture so clients may receive a KUidEcamEvent2CameraSettingAutoAperture event notification some time later. */
williamr@2
   836
		EExposureShutterPriority	= 0x0200,
williamr@2
   837
		/** User selectable exposure value setting. */	
williamr@2
   838
		EExposureManual				= 0x0400,
williamr@2
   839
		/** Exposure night setting with colour removed to get rid of colour noise. */
williamr@2
   840
		EExposureSuperNight			= 0x0800,
williamr@2
   841
		/** Exposure for infra-red sensor on the camera */
williamr@2
   842
		EExposureInfra				= 0x1000
williamr@2
   843
		};
williamr@2
   844
		
williamr@2
   845
	/** Specifies how the white balance is set. */
williamr@2
   846
	enum TWhiteBalance
williamr@2
   847
		{
williamr@2
   848
		/** Set white balance automatically. Default, always supported. */
williamr@2
   849
		EWBAuto				= 0x0000,
williamr@2
   850
		/** Normal daylight. */
williamr@2
   851
		EWBDaylight			= 0x0001,
williamr@2
   852
		/** Overcast daylight. */
williamr@2
   853
		EWBCloudy			= 0x0002,
williamr@2
   854
		/** Tungsten filament lighting. */
williamr@2
   855
		EWBTungsten			= 0x0004,
williamr@2
   856
		/** Fluorescent tube lighting */
williamr@2
   857
		EWBFluorescent		= 0x0008,
williamr@2
   858
		/** Flash lighting. */
williamr@2
   859
		EWBFlash			= 0x0010,
williamr@2
   860
		/** High contrast daylight primarily snowy */
williamr@2
   861
		EWBSnow 			= 0x0020,
williamr@2
   862
		/** High contrast daylight primarily near the sea */
williamr@2
   863
		EWBBeach 			= 0x0040,
williamr@2
   864
		/** User configurable mode */
williamr@2
   865
		EWBManual 			= 0x0080,
williamr@2
   866
		/** Shade */
williamr@2
   867
 		EWBShade			= 0x0100,
williamr@4
   868
 		/** auto skin
williamr@4
   869
williamr@4
   870
 		If New2L()/NewDuplicate2L() are not used to create camera object, this
williamr@4
   871
		enum value would be considered as unrecognized and filtered out in 'supported'
williamr@2
   872
		or 'getter' methods.
williamr@2
   873
 		*/
williamr@2
   874
 		EWBAutoSkin			= 0x0200,
williamr@4
   875
 		/** horizon
williamr@4
   876
williamr@4
   877
 		If New2L()/NewDuplicate2L() are not used to create camera object, this
williamr@4
   878
		enum value would be considered as unrecognized and filtered out in 'supported'
williamr@2
   879
		or 'getter' methods.
williamr@2
   880
		*/
williamr@2
   881
 		EWBHorizon 			= 0x0400,
williamr@4
   882
 		/** Daylight Under Water
williamr@4
   883
williamr@4
   884
 		If New2L()/NewDuplicate2L() are not used to create camera object, this
williamr@4
   885
		enum value would be considered as unrecognized and filtered out in 'supported'
williamr@2
   886
		or 'getter' methods.
williamr@2
   887
		*/
williamr@2
   888
 		EWBDaylightUnderWater  = 0x0800
williamr@2
   889
		};
williamr@4
   890
williamr@2
   891
public:
williamr@4
   892
	/**
williamr@2
   893
	Determines the number of cameras on the device.
williamr@2
   894
williamr@2
   895
    @return Count of cameras present on the device.
williamr@2
   896
	*/
williamr@2
   897
	IMPORT_C static TInt CamerasAvailable();
williamr@2
   898
williamr@4
   899
    /**
williamr@2
   900
    @deprecated Use static CCamera* New2L(MCameraObserver2& aObserver,TInt aCameraIndex,TInt aPriority);
williamr@4
   901
williamr@2
   902
	Creates an object representing a camera.
williamr@4
   903
williamr@2
   904
	@param  aObserver
williamr@2
   905
	        Reference to class derived from MCameraObserver2 designed to receive
williamr@2
   906
	        notification of asynchronous event completion.
williamr@2
   907
	@param	aCameraIndex
williamr@2
   908
	        Index from 0 to CamerasAvailable()-1 inclusive specifying the
williamr@2
   909
	        camera device to use.
williamr@2
   910
	@param	aPriority
williamr@2
   911
	        Value from -100 to 100 indicating relative priority of client to
williamr@2
   912
	        use camera.
williamr@2
   913
williamr@2
   914
	@return Pointer to a fully constructed CCamera object. Ownership is passed
williamr@2
   915
	        to the caller.
williamr@2
   916
williamr@2
   917
	@leave  KErrNoMemory if out of memory.
williamr@2
   918
	@leave  KErrNotSupported if aCameraIndex is out of range.
williamr@2
   919
	@leave  KErrPermissionDenied if the application does not have
williamr@2
   920
	        the UserEnvironment capability.
williamr@4
   921
williamr@2
   922
	@capability	UserEnvironment
williamr@2
   923
			An application that creates a CCamera object must have
williamr@2
   924
			the UserEnvironment capability.
williamr@2
   925
williamr@2
   926
    @capability MultimediaDD
williamr@2
   927
	        A process requesting or using this method that has MultimediaDD capability will
williamr@4
   928
			always have precedence over a process that does not have MultimediaDD.
williamr@2
   929
williamr@4
   930
	@note   Applications using this method to create camera object may not receive enums/uids added in future(after being baselined).
williamr@4
   931
			To receive them, they should rather use New2L() or NewDuplicate2L(), in which case, they should prepare
williamr@2
   932
			themselves to receive unrecognised values.
williamr@2
   933
	*/
williamr@2
   934
	IMPORT_C static CCamera* NewL(MCameraObserver2& aObserver,TInt aCameraIndex,TInt aPriority);
williamr@4
   935
williamr@4
   936
	/**
williamr@4
   937
	Creates an object representing a camera.
williamr@4
   938
	Clients prepare themselves to receive unrecognised enum, uids etc.
williamr@4
   939
williamr@2
   940
	@param  aObserver
williamr@2
   941
	        Reference to class derived from MCameraObserver2 designed to receive
williamr@2
   942
	        notification of asynchronous event completion.
williamr@2
   943
	@param	aCameraIndex
williamr@2
   944
	        Index from 0 to CamerasAvailable()-1 inclusive specifying the
williamr@2
   945
	        camera device to use.
williamr@2
   946
	@param	aPriority
williamr@2
   947
	        Value from -100 to 100 indicating relative priority of client to
williamr@2
   948
	        use camera.
williamr@2
   949
williamr@2
   950
	@return Pointer to a fully constructed CCamera object. Ownership is passed
williamr@2
   951
	        to the caller.
williamr@2
   952
williamr@2
   953
	@leave  KErrNoMemory if out of memory.
williamr@2
   954
	@leave  KErrNotSupported if aCameraIndex is out of range.
williamr@2
   955
	@leave  KErrPermissionDenied if the application does not have
williamr@2
   956
	        the UserEnvironment capability.
williamr@4
   957
williamr@2
   958
	@capability	UserEnvironment
williamr@2
   959
			An application that creates a CCamera object must have
williamr@2
   960
			the UserEnvironment capability.
williamr@2
   961
williamr@2
   962
    @capability MultimediaDD
williamr@2
   963
	        A process requesting or using this method that has MultimediaDD capability will
williamr@2
   964
			always have precedence over a process that does not have MultimediaDD.
williamr@4
   965
williamr@4
   966
	@note   Clients using this creation method should prepare themselves to receive any unrecognised enum values, uids
williamr@2
   967
			from 'supported' or 'getter' methods
williamr@2
   968
	*/
williamr@2
   969
	IMPORT_C static CCamera* New2L(MCameraObserver2& aObserver,TInt aCameraIndex,TInt aPriority);
williamr@4
   970
williamr@4
   971
	/**
williamr@2
   972
	Creates an object representing a camera.
williamr@4
   973
williamr@2
   974
	@param  aObserver
williamr@2
   975
	        Reference to class derived from MCameraObserver designed to receive
williamr@2
   976
	        notification of asynchronous event completion.
williamr@2
   977
	@param	aCameraIndex
williamr@2
   978
	        Index from 0 to CamerasAvailable()-1 inclusive specifying the
williamr@2
   979
	        camera device to use.
williamr@2
   980
williamr@2
   981
	@leave  KErrNoMemory if out of memory.
williamr@2
   982
	@leave  KErrNotSupported if aCameraIndex is out of range.
williamr@2
   983
	@leave  KErrPermissionDenied if the application does not have
williamr@2
   984
	        the UserEnvironment capability.
williamr@4
   985
williamr@2
   986
	@return Pointer to a fully constructed CCamera object. Ownership is passed
williamr@2
   987
	        to the caller.
williamr@4
   988
williamr@2
   989
	@capability	UserEnvironment
williamr@2
   990
				An application that creates a CCamera object must have
williamr@2
   991
				the UserEnvironment capability.
williamr@4
   992
williamr@4
   993
	@note   Applications using this method to create camera object may not receive enums/uids added in future(after being baselined).
williamr@4
   994
			To receive them, they should rather use New2L() or NewDuplicate2L(), in which case, they should prepare
williamr@2
   995
			themselves to receive unrecognised values.
williamr@2
   996
	*/
williamr@2
   997
	IMPORT_C static CCamera* NewL(MCameraObserver& aObserver,TInt aCameraIndex);
williamr@4
   998
williamr@4
   999
	/**
williamr@2
  1000
	@deprecated Use static CCamera* NewDuplicate2L(MCameraObserver2& aObserver,TInt aCameraHandle);
williamr@4
  1001
williamr@2
  1002
	Duplicates the original camera object for use by, for example, multimedia systems.
williamr@2
  1003
williamr@2
  1004
	May leave with KErrNoMemory or KErrNotFound if aCameraHandle is not valid.
williamr@2
  1005
williamr@2
  1006
	@param  aObserver
williamr@2
  1007
	        Reference to an observer.
williamr@2
  1008
	@param  aCameraHandle Handle of an existing camera object.
williamr@2
  1009
williamr@2
  1010
	@leave  KErrNoMemory if out of memory.
williamr@2
  1011
	@leave  KErrNotFound if aCameraHandle is not valid.	   
williamr@2
  1012
	@leave  KErrPermissionDenied if the application does not have
williamr@2
  1013
	        the UserEnvironment capability.
williamr@2
  1014
williamr@2
  1015
	@return Duplicate of the original camera object. 
williamr@2
  1016
	
williamr@2
  1017
	@capability	UserEnvironment
williamr@2
  1018
				An application that creates a CCamera object must have
williamr@2
  1019
				the UserEnvironment capability.
williamr@2
  1020
	
williamr@2
  1021
	@note   Applications using this method to create camera object may not receive enums/uids added in future(after being baselined). 
williamr@2
  1022
			To receive them, they should rather use New2L() or NewDuplicate2L(), in which case, they should prepare 
williamr@2
  1023
			themselves to receive unrecognised values.
williamr@2
  1024
	*/
williamr@2
  1025
	IMPORT_C static CCamera* NewDuplicateL(MCameraObserver2& aObserver,TInt aCameraHandle);
williamr@2
  1026
	
williamr@2
  1027
	/** 
williamr@2
  1028
	Duplicates the original camera object for use by, for example, multimedia systems.
williamr@2
  1029
	Clients prepare themselves to receive unrecognised enum, uids etc.
williamr@2
  1030
williamr@2
  1031
	May leave with KErrNoMemory or KErrNotFound if aCameraHandle is not valid.
williamr@2
  1032
williamr@2
  1033
	@param  aObserver
williamr@2
  1034
	        Reference to an observer.
williamr@2
  1035
	@param  aCameraHandle Handle of an existing camera object.
williamr@2
  1036
williamr@2
  1037
	@leave  KErrNoMemory if out of memory.
williamr@2
  1038
	@leave  KErrNotFound if aCameraHandle is not valid.	   
williamr@2
  1039
	@leave  KErrPermissionDenied if the application does not have
williamr@2
  1040
	        the UserEnvironment capability.
williamr@2
  1041
williamr@2
  1042
	@return Duplicate of the original camera object. 
williamr@2
  1043
	
williamr@2
  1044
	@capability	UserEnvironment
williamr@2
  1045
				An application that creates a CCamera object must have
williamr@2
  1046
				the UserEnvironment capability.
williamr@2
  1047
				
williamr@2
  1048
	@note   Clients using this creation method should prepare themselves to receive any unrecognised enum values, uids 
williamr@2
  1049
			from 'supported' or 'getter' methods
williamr@2
  1050
	*/
williamr@2
  1051
	IMPORT_C static CCamera* NewDuplicate2L(MCameraObserver2& aObserver,TInt aCameraHandle);
williamr@2
  1052
	
williamr@2
  1053
	/** 
williamr@2
  1054
	Duplicates the original camera object for use by, for example, multimedia systems.
williamr@2
  1055
williamr@2
  1056
	@leave  KErrNoMemory if out of memory.
williamr@2
  1057
	@leave  KErrNotFound if aCameraHandle is not valid.	   
williamr@2
  1058
	@leave  KErrPermissionDenied if the application does not have
williamr@2
  1059
	        the UserEnvironment capability.
williamr@2
  1060
williamr@2
  1061
	@param  aObserver
williamr@2
  1062
	        Reference to an observer.
williamr@2
  1063
	@param  aCameraHandle Handle of an existing camera object.
williamr@2
  1064
williamr@2
  1065
	@return Duplicate of the original camera object. 
williamr@2
  1066
	
williamr@2
  1067
	@capability	UserEnvironment
williamr@2
  1068
				An application that creates a CCamera object must have
williamr@2
  1069
				the UserEnvironment capability.
williamr@2
  1070
				
williamr@2
  1071
	@note   Applications using this method to create camera object may not receive enums/uids added in future(after being baselined). 
williamr@2
  1072
			To receive them, they should rather use New2L() or NewDuplicate2L(), in which case, they should prepare 
williamr@2
  1073
			themselves to receive unrecognised values.
williamr@2
  1074
	*/
williamr@2
  1075
	IMPORT_C static CCamera* NewDuplicateL(MCameraObserver& aObserver,TInt aCameraHandle);	
williamr@2
  1076
williamr@2
  1077
	/** 
williamr@2
  1078
	Gets information about the camera device.
williamr@2
  1079
williamr@2
  1080
	@param  aInfo 
williamr@2
  1081
	        On return, information about the camera device. See TCameraInfo. 
williamr@2
  1082
	*/
williamr@2
  1083
	virtual void CameraInfo(TCameraInfo& aInfo) const=0;
williamr@2
  1084
williamr@2
  1085
	/** 
williamr@2
  1086
	Asynchronous function that performs any required initialisation and reserves
williamr@2
  1087
	the camera for exclusive use.
williamr@2
  1088
williamr@2
  1089
	Calls MCameraObserver:: ReserveComplete() when complete. 
williamr@2
  1090
	*/
williamr@2
  1091
	virtual void Reserve()=0;
williamr@2
  1092
williamr@2
  1093
	/** 
williamr@2
  1094
	De-initialises the camera, allowing it to be used by other clients. 
williamr@2
  1095
	*/
williamr@2
  1096
	virtual void Release()=0;
williamr@2
  1097
williamr@2
  1098
	/** 
williamr@2
  1099
	Asynchronous method to switch on camera power.
williamr@2
  1100
williamr@2
  1101
	User must have successfully called Reserve() prior to calling this function.
williamr@2
  1102
williamr@2
  1103
	Calls MCameraObserver::PowerOnComplete() when power on is complete. 
williamr@2
  1104
	*/
williamr@2
  1105
	virtual void PowerOn()=0;
williamr@2
  1106
williamr@2
  1107
	/** 
williamr@2
  1108
	Synchronous function for switching off camera power. 
williamr@2
  1109
	*/
williamr@2
  1110
	virtual void PowerOff()=0;
williamr@2
  1111
williamr@2
  1112
	/**
williamr@2
  1113
	Gets the device-unique handle of this camera object.
williamr@2
  1114
williamr@2
  1115
	@return  The device-unique handle of this camera object. 
williamr@2
  1116
	*/
williamr@2
  1117
	virtual TInt Handle()=0;
williamr@2
  1118
williamr@2
  1119
	/** 
williamr@2
  1120
	Sets the zoom factor.
williamr@2
  1121
williamr@2
  1122
	This must be in the range of TCameraInfo::iMinZoom to TCameraInfo::iMaxZoom
williamr@2
  1123
	inclusive. May leave with KErrNotSupported if the specified zoom factor is
williamr@2
  1124
	out of range.
williamr@2
  1125
williamr@2
  1126
	@param aZoomFactor 
williamr@2
  1127
	       Required zoom factor.
williamr@2
  1128
	*/
williamr@2
  1129
	virtual void SetZoomFactorL(TInt aZoomFactor = 0)=0;
williamr@2
  1130
williamr@2
  1131
	/** 
williamr@2
  1132
	Gets the currently set zoom factor.
williamr@2
  1133
williamr@2
  1134
	@return  The currently set zoom factor.
williamr@2
  1135
	*/
williamr@2
  1136
	virtual TInt ZoomFactor() const=0;
williamr@2
  1137
williamr@2
  1138
	/** 
williamr@2
  1139
	Sets the digital zoom factor.
williamr@2
  1140
williamr@2
  1141
	This must be in the range of 0 to TCameraInfo::iMaxDigitalZoom inclusive.
williamr@2
  1142
williamr@2
  1143
	May leave with KErrNotSupported if the zoom factor is out of range.
williamr@2
  1144
williamr@2
  1145
	@param  aDigitalZoomFactor
williamr@2
  1146
	        The required digital zoom factor. 
williamr@2
  1147
	*/
williamr@2
  1148
	virtual void SetDigitalZoomFactorL(TInt aDigitalZoomFactor = 0)=0;
williamr@2
  1149
williamr@2
  1150
	/** 
williamr@2
  1151
	Gets the currently set digital zoom factor.
williamr@2
  1152
williamr@2
  1153
	@return  The currently set digital zoom factor. 
williamr@2
  1154
	*/
williamr@2
  1155
	virtual TInt DigitalZoomFactor() const=0;
williamr@2
  1156
williamr@2
  1157
	/**
williamr@2
  1158
	Sets the contrast adjustment of the device.
williamr@2
  1159
williamr@2
  1160
	This must be in the range of -100 to +100 or EContrastAuto. May leave with
williamr@2
  1161
	KErrNotSupported if the specified contrast value is out of range.
williamr@2
  1162
williamr@2
  1163
	@param  aContrast 
williamr@2
  1164
	        Required contrast value. See TCameraInfo::iContrastSupported 
williamr@2
  1165
	*/
williamr@2
  1166
	virtual void SetContrastL(TInt aContrast)=0;
williamr@2
  1167
williamr@2
  1168
	/** 
williamr@2
  1169
	Gets the currently set contrast value.
williamr@2
  1170
williamr@2
  1171
	@return  The currently set contrast value.
williamr@2
  1172
	*/
williamr@2
  1173
	virtual TInt Contrast() const=0;
williamr@2
  1174
williamr@2
  1175
	/** 
williamr@2
  1176
	Sets the brightness adjustment of the device.
williamr@2
  1177
williamr@2
  1178
	No effect if this is not supported, see TCameraInfo::iBrightnessSupported.
williamr@2
  1179
williamr@2
  1180
	This must be in the range of -100 to +100 or EBrightnessAuto. May leave
williamr@2
  1181
	with KErrNotSupported if the brightness adjustment is out of range.
williamr@2
  1182
williamr@2
  1183
	@param  aBrightness
williamr@2
  1184
	        The required brightness adjustment. 
williamr@2
  1185
	*/
williamr@2
  1186
	virtual void SetBrightnessL(TInt aBrightness)=0;
williamr@2
  1187
williamr@2
  1188
	/** 
williamr@2
  1189
	Gets the currently set brightness adjustment value.
williamr@2
  1190
williamr@2
  1191
	@return  The currently set brightness adjustment value. 
williamr@2
  1192
	*/
williamr@2
  1193
	virtual TInt Brightness() const=0;
williamr@2
  1194
williamr@2
  1195
	/** 
williamr@2
  1196
	Sets the flash mode.
williamr@2
  1197
williamr@2
  1198
	No effect if this is not supported, see TCameraInfo::iFlashModesSupported.
williamr@2
  1199
williamr@2
  1200
	May leave with KErrNotSupported if the specified flash mode is invalid.
williamr@2
  1201
williamr@2
  1202
	@param  aFlash
williamr@2
  1203
	        The required flash mode. 
williamr@2
  1204
	*/
williamr@2
  1205
	virtual void SetFlashL(TFlash aFlash = EFlashNone)=0;
williamr@2
  1206
williamr@2
  1207
	/** 
williamr@2
  1208
	Gets the currently set flash mode.
williamr@2
  1209
williamr@2
  1210
	@return  The currently set flash mode. 
williamr@2
  1211
	@note	if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that 
williamr@2
  1212
    application is not prepared to receive extra added enum values (unrecognised). So, any extra enum value(unrecognised)
williamr@2
  1213
    (set in the ECAM implementation because of sharing clients) should not be returned from the ECAM implementation.
williamr@2
  1214
    To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() 
williamr@2
  1215
    to create camera object. ECAM implementation, after verifying this,(by checking version no.) may send new values, if set.
williamr@2
  1216
    In this case, application is assumed to be prepared to receive unrecognised enum values.
williamr@2
  1217
    
williamr@2
  1218
    @see CCamera::CCameraAdvancedSettings::FlashMode()	
williamr@2
  1219
	*/
williamr@2
  1220
	virtual TFlash Flash() const=0;
williamr@2
  1221
williamr@2
  1222
	/** 
williamr@2
  1223
	Sets the exposure adjustment of the device.
williamr@2
  1224
williamr@2
  1225
	No effect if this is not supported, see CameraInfo::iExposureModesSupported.
williamr@2
  1226
williamr@2
  1227
	May leave with KErrNotSupported if the specified exposure adjustment is invalid.
williamr@2
  1228
williamr@2
  1229
	@param  aExposure
williamr@2
  1230
	        The required exposure adjustment. 
williamr@2
  1231
	*/
williamr@2
  1232
	virtual void SetExposureL(TExposure aExposure = EExposureAuto)=0;
williamr@2
  1233
williamr@2
  1234
	/** 
williamr@2
  1235
	Gets the currently set exposure setting value.
williamr@2
  1236
williamr@2
  1237
	@return  The currently set exposure setting value. 
williamr@2
  1238
	*/
williamr@2
  1239
	virtual TExposure Exposure() const=0;
williamr@2
  1240
williamr@2
  1241
	/** 
williamr@2
  1242
	Sets the white balance adjustment of the device.
williamr@2
  1243
williamr@2
  1244
	No effect if this is not supported, see TCameraInfo::iWhiteBalanceModesSupported.
williamr@2
  1245
williamr@2
  1246
	@param  aWhiteBalance
williamr@2
  1247
	        The required white balance adjustment.
williamr@2
  1248
williamr@2
  1249
	@leave  KErrNotSupported if the specified white balance adjustment
williamr@2
  1250
	        is invalid.
williamr@2
  1251
	*/
williamr@2
  1252
	virtual void SetWhiteBalanceL(TWhiteBalance aWhiteBalance = EWBAuto)=0;
williamr@2
  1253
williamr@2
  1254
	/** 
williamr@2
  1255
	Gets the currently set white balance adjustment value.
williamr@2
  1256
williamr@2
  1257
	@return  The currently set white balance adjustment value.
williamr@2
  1258
	
williamr@2
  1259
	@note	if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that 
williamr@2
  1260
    application is not prepared to receive extra added enum values (unrecognised). So, any extra enum value(unrecognised)
williamr@2
  1261
    (set in the ECAM implementation because of sharing clients) should not be returned from the ECAM implementation.
williamr@2
  1262
    To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() 
williamr@2
  1263
    to create camera object. ECAM implementation, after verifying this,(by checking version no.) may send new values, if set.
williamr@2
  1264
    In this case, application is assumed to be prepared to receive unrecognised enum values.
williamr@2
  1265
    Refer  CCamera::CCameraAdvancedSettings::WhiteBalanceMode() implementation
williamr@2
  1266
    
williamr@2
  1267
    @see CCamera::CCameraAdvancedSettings::WhiteBalanceMode()
williamr@2
  1268
    */
williamr@2
  1269
	virtual TWhiteBalance WhiteBalance() const=0;
williamr@2
  1270
williamr@2
  1271
	/** 
williamr@2
  1272
	Starts transfer of view finder data to the given portion of the screen using
williamr@2
  1273
	direct screen access.
williamr@2
  1274
williamr@2
  1275
	The aScreenRect parameter is in screen co-ordinates and may be modified if,
williamr@2
  1276
	eg, the camera requires the destination to have a certain byte alignment, etc.
williamr@2
  1277
williamr@2
  1278
    @param  aWs 
williamr@2
  1279
	        Window server session.
williamr@2
  1280
	@param  aScreenDevice 
williamr@2
  1281
	        Screen device.
williamr@2
  1282
	@param  aWindow 
williamr@2
  1283
	        Displayable window.
williamr@2
  1284
	@param  aScreenRect 
williamr@2
  1285
	        Portion of the screen to which view finder data is to be
williamr@2
  1286
	        transferred. This is in screen co-ordinates and may be modified if, for example,
williamr@2
  1287
	        the camera requires the destination to have a certain byte alignment.
williamr@2
  1288
williamr@2
  1289
	@leave  KErrNotReady if PowerOn() has either not
williamr@2
  1290
	        been called, or has not yet completed.
williamr@2
  1291
	
williamr@2
  1292
	@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
williamr@2
  1293
			refer viewfinders started using CCamera methods. 
williamr@2
  1294
	
williamr@2
  1295
	@see	CCamera::CCameraV2DirectViewFinder
williamr@2
  1296
	*/
williamr@2
  1297
	virtual void StartViewFinderDirectL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWindow,TRect& aScreenRect)=0;
williamr@2
  1298
williamr@2
  1299
	/** 
williamr@2
  1300
	Starts transfer of view finder data to the given portion of the screen using
williamr@2
  1301
	direct screen access and also clips to the specified portion of the screen.
williamr@2
  1302
williamr@2
  1303
	The view finder has the same size and position as aScreenRect but is only
williamr@2
  1304
	visible in the intersection of aScreenRect and aClipRect. May leave with KErrNotSupported
williamr@2
  1305
	or KErrNotReady if Reserve() has not been called, or has not yet completed.
williamr@2
  1306
williamr@2
  1307
	@param  aWs 
williamr@2
  1308
	        Window server session.
williamr@2
  1309
	@param  aScreenDevice 
williamr@2
  1310
	        Screen device.
williamr@2
  1311
	@param  aWindow 
williamr@2
  1312
	        Displayable window.
williamr@2
  1313
	@param  aScreenRect 
williamr@2
  1314
	        Portion of the screen to which view finder data is to be
williamr@2
  1315
	        transferred. This is in screen co-ordinates and may be modified if, for example,
williamr@2
  1316
	        the camera requires the destination to have a certain byte alignment.
williamr@2
  1317
	@param  aClipRect
williamr@2
  1318
	        The rectangle to which the screen will be clipped.
williamr@2
  1319
williamr@2
  1320
    @leave  KErrNotReady if PowerOn() hasn't been called successfully. 
williamr@2
  1321
    
williamr@2
  1322
    @note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
williamr@2
  1323
    		refer viewfinders started using CCamera methods.
williamr@2
  1324
	
williamr@2
  1325
	@see	CCamera::CCameraClientViewFinder
williamr@2
  1326
	*/
williamr@2
  1327
	virtual void StartViewFinderDirectL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWindow,TRect& aScreenRect,TRect& aClipRect)=0;
williamr@2
  1328
williamr@2
  1329
	/** 
williamr@2
  1330
	Starts transfer of view finder data.
williamr@2
  1331
williamr@2
  1332
	Bitmaps are returned by MCameraObserver::ViewFinderFrameReady().
williamr@2
  1333
williamr@2
  1334
	@param  aSize 
williamr@2
  1335
	        On return, the size used.
williamr@2
  1336
	@leave  KErrNotReady if PowerOn() has not been called, or has not yet completed.
williamr@2
  1337
	
williamr@2
  1338
	@note   This method is assumed to be meant for default display only. 
williamr@2
  1339
	
williamr@2
  1340
	@see	CCamera::CCameraClientViewFinder 
williamr@2
  1341
	*/
williamr@2
  1342
	virtual void StartViewFinderBitmapsL(TSize& aSize)=0;	
williamr@2
  1343
williamr@2
  1344
	/** 
williamr@2
  1345
	Starts transfer of view finder data and clips the bitmap to the specified clip
williamr@2
  1346
	rectangle.
williamr@2
  1347
williamr@2
  1348
	The bitmap is the size of the intersection of aSize and aClipRect, not simply
williamr@2
  1349
	aSize padded with white space.
williamr@2
  1350
williamr@2
  1351
	@param  aSize
williamr@2
  1352
	        On return, the size used.
williamr@2
  1353
	@param  aClipRect 
williamr@2
  1354
	        Required clip rectangle. May be modified if, for example,
williamr@2
  1355
	        the camera only supports certain byte alignments.
williamr@2
  1356
williamr@2
  1357
	@leave  KErrInUse if Reserve() hasn't been called successfully.
williamr@2
  1358
	@leave  KErrNotReady if PowerOn() hasn't been called successfully.
williamr@2
  1359
	
williamr@2
  1360
	@note   This method is assumed to be meant for default display only. 
williamr@2
  1361
	
williamr@2
  1362
	@see	CCamera::CCameraClientViewFinder
williamr@2
  1363
	*/
williamr@2
  1364
	virtual void StartViewFinderBitmapsL(TSize& aSize,TRect& aClipRect)=0;
williamr@2
  1365
williamr@2
  1366
	/** 
williamr@2
  1367
	Starts transfer of view finder data.
williamr@2
  1368
williamr@2
  1369
	Picture data is returned by MCameraObserver2::ViewFinderReady().
williamr@2
  1370
williamr@2
  1371
	@param  aImageFormat 
williamr@2
  1372
	        The image format requested by the client.
williamr@2
  1373
	@param  aSize 
williamr@2
  1374
	        On return, the size used.
williamr@2
  1375
	@leave  KErrNotSupported 
williamr@2
  1376
	@leave  KErrNotReady if Reserve() has not been
williamr@2
  1377
	        called, or has not yet completed. 
williamr@2
  1378
	
williamr@2
  1379
	@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
williamr@2
  1380
			refer viewfinders started using CCamera methods.
williamr@2
  1381
	
williamr@2
  1382
	@see	CCamera::CCameraClientViewFinder
williamr@2
  1383
	*/
williamr@2
  1384
	virtual void StartViewFinderL(TFormat aImageFormat,TSize& aSize)=0;
williamr@2
  1385
williamr@2
  1386
	/** 
williamr@2
  1387
	Starts transfer of view finder data and clips the picture to the specified clip
williamr@2
  1388
	rectangle. Picture data is returned by MCameraObserver2::ViewFinderReady().
williamr@2
  1389
williamr@2
  1390
	The picture is the size of the intersection of aSize and aClipRect, not simply
williamr@2
  1391
	aSize padded with white space.
williamr@2
  1392
williamr@2
  1393
	@param  aImageFormat 
williamr@2
  1394
	        The image format.
williamr@2
  1395
	@param  aSize
williamr@2
  1396
	        On return, the size used.
williamr@2
  1397
	@param  aClipRect 
williamr@2
  1398
	        Required clip rectangle. May be modified if, for example,
williamr@2
  1399
	        the camera only supports certain byte alignments.
williamr@2
  1400
williamr@2
  1401
	@leave  KErrInUse if Reserve() hasn't been called successfully,
williamr@2
  1402
	@leave  KErrNotReady if PowerOn() hasn't been called successfully.
williamr@2
  1403
	
williamr@2
  1404
	@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
williamr@2
  1405
			refer viewfinders started using CCamera methods.
williamr@2
  1406
	
williamr@2
  1407
	@see	CCamera::CCameraClientViewFinder
williamr@2
  1408
	*/
williamr@2
  1409
	virtual void StartViewFinderL(TFormat aImageFormat,TSize& aSize,TRect& aClipRect)=0;
williamr@2
  1410
williamr@2
  1411
	/** 
williamr@2
  1412
	Stops transfer of view finder data to the screen. 
williamr@2
  1413
	
williamr@2
  1414
	@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
williamr@2
  1415
			refer viewfinders started using CCamera methods.
williamr@2
  1416
	
williamr@2
  1417
	@see	CCamera::CCameraV2DirectViewFinder
williamr@2
  1418
	@see	CCamera::CCameraClientViewFinder
williamr@2
  1419
	*/
williamr@2
  1420
	virtual void StopViewFinder()=0;
williamr@2
  1421
williamr@2
  1422
	/** 
williamr@2
  1423
	Queries whether the view finder is active.
williamr@2
  1424
williamr@2
  1425
	@return  ETrue if the view finder is active. EFalse if the view finder is not
williamr@2
  1426
	         active. 
williamr@2
  1427
	         
williamr@2
  1428
	@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
williamr@2
  1429
			refer viewfinders started using CCamera methods.
williamr@2
  1430
	
williamr@2
  1431
	@see	CCamera::CCameraV2DirectViewFinder
williamr@2
  1432
	@see	CCamera::CCameraClientViewFinder
williamr@2
  1433
	*/
williamr@2
  1434
	virtual TBool ViewFinderActive() const=0;
williamr@2
  1435
williamr@2
  1436
	/** 
williamr@2
  1437
	Sets whether view finder mirroring is on.
williamr@2
  1438
williamr@2
  1439
	Used to switch between what the camera sees and what you would see if the
williamr@2
  1440
	device were a mirror.
williamr@2
  1441
williamr@2
  1442
	@param  aMirror 
williamr@2
  1443
	        ETrue to set mirroring on, EFalse to set mirroring off.
williamr@2
  1444
williamr@2
  1445
	@leave  KErrNotSupported.
williamr@2
  1446
	
williamr@2
  1447
	@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
williamr@2
  1448
			refer viewfinders started using CCamera methods.
williamr@2
  1449
	
williamr@2
  1450
	@see	CCamera::CCameraV2DirectViewFinder
williamr@2
  1451
	@see	CCamera::CCameraClientViewFinder
williamr@2
  1452
	*/
williamr@2
  1453
	virtual void SetViewFinderMirrorL(TBool aMirror)=0;
williamr@2
  1454
williamr@2
  1455
	/** 
williamr@2
  1456
	Gets whether view finder mirroring is active.
williamr@2
  1457
williamr@2
  1458
	@return  ETrue if mirroring is set, EFalse if mirroring is not set. 
williamr@2
  1459
	
williamr@2
  1460
	@note   This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to 
williamr@2
  1461
			refer viewfinders started using CCamera methods.
williamr@2
  1462
	
williamr@2
  1463
	@see	CCamera::CCameraV2DirectViewFinder
williamr@2
  1464
	@see	CCamera::CCameraClientViewFinder
williamr@2
  1465
	*/
williamr@2
  1466
	virtual TBool ViewFinderMirror() const=0;
williamr@2
  1467
williamr@2
  1468
	/** 
williamr@2
  1469
	Performs setup and allocation of memory.
williamr@2
  1470
williamr@2
  1471
	Called prior to calling CaptureImage() to keep the latency of that function
williamr@2
  1472
	to a minimum.
williamr@2
  1473
williamr@2
  1474
	Needs to be called only once for multiple CaptureImage() calls. May leave
williamr@2
  1475
	with KErrNotSupported or KErrNoMemory or KErrInUse or KErrNotReady.
williamr@2
  1476
williamr@2
  1477
	The specified image format must be one of the formats supported
williamr@2
  1478
	(see TCameraInfo::iImageFormatsSupported).
williamr@2
  1479
williamr@2
  1480
	The specified size index must be in the range of 0 to TCameraInfo::iNumImageSizesSupported-1
williamr@2
  1481
	inclusive.
williamr@2
  1482
williamr@2
  1483
	@param  aImageFormat 
williamr@2
  1484
	        The image format.
williamr@2
  1485
	@param  aSizeIndex 
williamr@2
  1486
	        Size index.
williamr@2
  1487
williamr@2
  1488
	@leave  KErrNotSupported
williamr@2
  1489
	@leave  KErrNoMemory
williamr@2
  1490
	@leave  KErrNotReady if PowerOn() hasn't been called successfully.
williamr@2
  1491
	
williamr@4
  1492
	@note  Depending on the ECAM implementation and underlying hardware, preparing both image capture and video capture
williamr@4
  1493
		   at the same time may not be possible. In this case, the recommendation is to unprepare video capture before preparing
williamr@4
  1494
		   image capture if PrepareVideoCaptureL() has already been called.
williamr@4
  1495
	
williamr@2
  1496
	@see 	CCamera::CCameraPreImageCaptureControl::PrepareImageCapture(TPrepareImageParameters aPrepareImageParameters)
williamr@2
  1497
	*/
williamr@2
  1498
	virtual void PrepareImageCaptureL(TFormat aImageFormat,TInt aSizeIndex)=0;
williamr@2
  1499
williamr@2
  1500
	/** 
williamr@2
  1501
	Performs setup and allocation of memory and clips the image to the specified
williamr@2
  1502
	rectangle.
williamr@2
  1503
williamr@2
  1504
	No effect unless TCameraInfo::iImageClippingSupported is set to ETrue. The
williamr@2
  1505
	image captured is the intersection of aClipRect and the rectangle from (0,0)
williamr@2
  1506
	to aSize. Needs to be called only once for multiple CaptureImage() calls.
williamr@2
  1507
	May leave with KErrNotSupported or KErrNoMemory.
williamr@2
  1508
williamr@2
  1509
	The specified image format must be one of the formats supported (see TCameraInfo::iImageFormatsSupported).
williamr@2
  1510
williamr@2
  1511
	The specified size index must be in the range of 0 to TCameraInfo::iNumImageSizesSupported-1
williamr@2
  1512
	inclusive.
williamr@2
  1513
williamr@2
  1514
	@param  aImageFormat 
williamr@2
  1515
	        The image format.
williamr@2
  1516
	@param  aSizeIndex 
williamr@2
  1517
	        Size index.
williamr@2
  1518
	@param  aClipRect
williamr@2
  1519
	        The rectangle to which the image is to be clipped.
williamr@2
  1520
williamr@2
  1521
	@leave   KErrNotSupported
williamr@2
  1522
	@leave   KErrNoMemory
williamr@2
  1523
	@leave   KErrInUse if Reserve() hasn't been called successfully
williamr@2
  1524
	@leave   KErrNotReady if PowerOn()
williamr@2
  1525
	         hasn't been called successfully.
williamr@2
  1526
	
williamr@4
  1527
	@note  Depending on the ECAM implementation and underlying hardware, preparing both image capture and video capture
williamr@4
  1528
		   at the same time may not be possible. In this case, the recommendation is to unprepare video capture before preparing
williamr@4
  1529
		   image capture if PrepareVideoCaptureL() has already been called.
williamr@4
  1530
	
williamr@2
  1531
	@see 	CCamera::CCameraPreImageCaptureControl::PrepareImageCapture(TPrepareImageParameters aPrepareImageParameters)
williamr@2
  1532
	*/
williamr@2
  1533
	virtual void PrepareImageCaptureL(TFormat aImageFormat,TInt aSizeIndex,const TRect& aClipRect)=0;
williamr@2
  1534
williamr@2
  1535
	/** 
williamr@2
  1536
	Asynchronously performs still image capture.
williamr@2
  1537
williamr@2
  1538
	Calls MCameraObserver::ImageReady() when complete. 
williamr@2
  1539
	
williamr@2
  1540
	@see CCamera::CCameraImageCapture
williamr@2
  1541
	@see CCamera::CCameraPreImageCaptureControl
williamr@2
  1542
	*/
williamr@2
  1543
	virtual void CaptureImage()=0;
williamr@2
  1544
williamr@2
  1545
	/** 
williamr@2
  1546
	Cancels the asynchronous still image capture. 
williamr@2
  1547
	
williamr@2
  1548
	@see CCamera::CCameraImageCapture
williamr@2
  1549
	*/
williamr@2
  1550
	virtual void CancelCaptureImage()=0;
williamr@2
  1551
williamr@2
  1552
	/** 
williamr@2
  1553
	Enumerates through the available image capture sizes, based on the specified
williamr@2
  1554
	size index and format
williamr@2
  1555
williamr@2
  1556
	The size index must be in the range 0 to TCameraInfo::iNumImageSizesSupported-1
williamr@2
  1557
	inclusive.
williamr@2
  1558
williamr@2
  1559
	@param  aSize 
williamr@2
  1560
	        Image size.
williamr@2
  1561
	@param  aSizeIndex 
williamr@2
  1562
	        Size index.
williamr@2
  1563
	@param  aFormat 
williamr@2
  1564
	        The image format.
williamr@2
  1565
	*/
williamr@2
  1566
	virtual void EnumerateCaptureSizes(TSize& aSize,TInt aSizeIndex,TFormat aFormat) const=0;
williamr@2
  1567
williamr@2
  1568
	/** 
williamr@2
  1569
	Prepares for video capture.
williamr@2
  1570
williamr@2
  1571
	Performs setup and allocation of memory prior to calling StartVideoCapture()
williamr@2
  1572
	to keep the latency of that function to a minimum.
williamr@2
  1573
williamr@2
  1574
	May leave with KErrNotSupported or KErrNoMemory.
williamr@2
  1575
williamr@2
  1576
	@param  aFormat 
williamr@2
  1577
	        Format must be one of the video frame formats supported (see
williamr@2
  1578
	        TCameraInfo::iVideoFrameFormatsSupported).
williamr@2
  1579
	@param  aSizeIndex 
williamr@2
  1580
	        Size index  must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1
williamr@2
  1581
	        inclusive.
williamr@2
  1582
	@param  aRateIndex 
williamr@2
  1583
	        The rate must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1
williamr@2
  1584
	        inclusive.
williamr@2
  1585
	@param  aBuffersToUse 
williamr@2
  1586
	        The number of discrete buffers to use.
williamr@2
  1587
	@param  aFramesPerBuffer 
williamr@2
  1588
	        How large the buffers are to be. Must be less than
williamr@2
  1589
	        or equal to TCameraInfo::iMaxFramesPerBufferSupported. One buffer is returned
williamr@2
  1590
	        to MCameraObserver::FrameBufferReady() at a time.
williamr@2
  1591
williamr@2
  1592
	@leave  May leave with KErrNotSupported, KErrNoMemory, or KErrNotReady if PowerOn() 
williamr@2
  1593
			hasn't been called successfully.
williamr@2
  1594
	
williamr@4
  1595
	@note  Depending on the ECAM implementation and underlying hardware, preparing both image capture and video capture
williamr@4
  1596
		   at the same time may not be possible. In this case, the recommendation is to unprepare image capture before preparing
williamr@4
  1597
		   video capture if PrepareImageCaptureL() has already been called.
williamr@4
  1598
	
williamr@2
  1599
	@see 	CCamera::CCameraVideoCaptureControl::PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters)
williamr@2
  1600
	*/
williamr@2
  1601
	virtual void PrepareVideoCaptureL(TFormat aFormat,TInt aSizeIndex,TInt aRateIndex,TInt aBuffersToUse,TInt aFramesPerBuffer)=0;
williamr@2
  1602
williamr@2
  1603
	/** 
williamr@2
  1604
	Prepares for video capture and clips the frames to the given rectangle.
williamr@2
  1605
williamr@2
  1606
	Performs setup and allocation of memory prior to calling StartVideoCapture()
williamr@2
  1607
	to keep the latency of that function to a minimum.
williamr@2
  1608
williamr@2
  1609
	May leave with KErrNotSupported or KErrNoMemory.
williamr@2
  1610
williamr@2
  1611
	@param  aFormat 
williamr@2
  1612
	        Format must be one of the video frame formats supported (see
williamr@2
  1613
	        TCameraInfo::iVideoFrameFormatsSupported).
williamr@2
  1614
	@param  aSizeIndex 
williamr@2
  1615
	        Size index must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1
williamr@2
  1616
	        inclusive.
williamr@2
  1617
	@param  aRateIndex 
williamr@2
  1618
	        The rate must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1
williamr@2
  1619
	        inclusive.
williamr@2
  1620
	@param  aBuffersToUse 
williamr@2
  1621
	        The number of discrete buffers to use.
williamr@2
  1622
	@param  aFramesPerBuffer 
williamr@2
  1623
	        How large the buffers are to be. Must be less than
williamr@2
  1624
	        or equal to TCameraInfo::iMaxFramesPerBufferSupported. One buffer is returned
williamr@2
  1625
	        to MCameraObserver::FrameBufferReady() at a time.
williamr@2
  1626
	@param  aClipRect 
williamr@2
  1627
	        The rectangle to which the image is to be clipped.
williamr@2
  1628
	@leave  KErrNotSupported
williamr@2
  1629
	@leave  KErrNoMemory, 
williamr@2
  1630
	@leave  KErrInUse if Reserve() hasn't been called successfully
williamr@2
  1631
	@leave  KErrNotReady if PowerOn() hasn't been called successfully.
williamr@4
  1632
	
williamr@4
  1633
	@note  Depending on the ECAM implementation and underlying hardware, preparing both image capture and video capture
williamr@4
  1634
		   at the same time may not be possible. In this case, the recommendation is to unprepare image capture before preparing
williamr@4
  1635
		   video capture if PrepareImageCaptureL() has already been called.
williamr@2
  1636
williamr@2
  1637
	@see 	CCamera::CCameraVideoCaptureControl::PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters)
williamr@2
  1638
	*/
williamr@2
  1639
	virtual void PrepareVideoCaptureL(TFormat aFormat,TInt aSizeIndex,TInt aRateIndex,TInt aBuffersToUse,TInt aFramesPerBuffer,const TRect& aClipRect)=0;
williamr@2
  1640
williamr@2
  1641
	/** 
williamr@2
  1642
	Starts capturing video.
williamr@2
  1643
williamr@2
  1644
	Calls MCameraObserver::FrameBufferReady() when each buffer has been filled
williamr@2
  1645
	with the required number of frames, as set by PrepareVideoCaptureL(). 
williamr@2
  1646
	*/
williamr@2
  1647
	virtual void StartVideoCapture()=0;
williamr@2
  1648
williamr@2
  1649
	/** 
williamr@2
  1650
	Stops video capture. 
williamr@2
  1651
	*/
williamr@2
  1652
	virtual void StopVideoCapture()=0;
williamr@2
  1653
williamr@2
  1654
	/** 
williamr@2
  1655
	Tests whether video capture is active.
williamr@2
  1656
williamr@2
  1657
	@return  ETrue if video capture is active. EFalse if video capture is not active 
williamr@2
  1658
	*/
williamr@2
  1659
	virtual TBool VideoCaptureActive() const=0;
williamr@2
  1660
williamr@2
  1661
	/** 
williamr@2
  1662
	Enumerates through the available video frame sizes, based on the specified
williamr@2
  1663
	size index and format.
williamr@2
  1664
williamr@2
  1665
	@param  aSize 
williamr@2
  1666
	        On return the available video frame sizes. Sizes should be returned
williamr@2
  1667
	        in order, largest first, so clients do not have to iterate through every one.
williamr@2
  1668
	@param  aSizeIndex 
williamr@2
  1669
	        Size index. Must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1
williamr@2
  1670
	        inclusive
williamr@2
  1671
	@param  aFormat 
williamr@2
  1672
	        Image format. 
williamr@2
  1673
	*/
williamr@2
  1674
	virtual void EnumerateVideoFrameSizes(TSize& aSize,TInt aSizeIndex,TFormat aFormat) const=0;
williamr@2
  1675
williamr@2
  1676
	/** 
williamr@2
  1677
	Enumerates through the available video frame rates, based on the specified
williamr@2
  1678
	rate index, video frame format, size index and exposure mode.
williamr@2
  1679
williamr@2
  1680
	@param  aRate 
williamr@2
  1681
	        On return, the available video frame rates. Some rates may not
williamr@2
  1682
	        be available due to, for example, current flash mode setting. In those cases
williamr@2
  1683
	        a rate of 0 will be returned. Rates should be returned in order, highest first,
williamr@2
  1684
	        so clients do not have to iterate through every one.
williamr@2
  1685
	@param  aRateIndex 
williamr@2
  1686
	        The rate index. Must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1
williamr@2
  1687
	        inclusive.
williamr@2
  1688
	@param  aFormat 
williamr@2
  1689
	        The format.
williamr@2
  1690
	@param  aSizeIndex 
williamr@2
  1691
	        The size index.
williamr@2
  1692
	@param  aExposure 
williamr@2
  1693
	        The exposure mode. 
williamr@2
  1694
	*/
williamr@2
  1695
	virtual void EnumerateVideoFrameRates(TReal32& aRate,TInt aRateIndex,TFormat aFormat,TInt aSizeIndex,TExposure aExposure = EExposureAuto) const=0;
williamr@2
  1696
williamr@2
  1697
	/** 
williamr@2
  1698
	Gets the frame size currently in use.
williamr@2
  1699
williamr@2
  1700
	@param  aSize 
williamr@2
  1701
	        The frame size currently in use. 
williamr@2
  1702
	*/
williamr@2
  1703
	virtual void GetFrameSize(TSize& aSize) const=0;
williamr@2
  1704
williamr@2
  1705
	/** 
williamr@2
  1706
	Gets the frame rate currently in use.
williamr@2
  1707
williamr@2
  1708
	@return  The frame rate currently in use. 
williamr@2
  1709
	*/
williamr@2
  1710
	virtual TReal32 FrameRate() const=0;
williamr@2
  1711
williamr@2
  1712
	/** 
williamr@2
  1713
	Gets the number of buffers currently in use.
williamr@2
  1714
williamr@2
  1715
	@return  The number of buffers currently in use. 
williamr@2
  1716
	*/
williamr@2
  1717
	virtual TInt BuffersInUse() const=0;
williamr@2
  1718
williamr@2
  1719
	/** 
williamr@2
  1720
	Gets the number of frames per buffer currently in use.
williamr@2
  1721
williamr@2
  1722
	@return  The number of frames per buffer currently in use. 
williamr@2
  1723
	*/
williamr@2
  1724
	virtual TInt FramesPerBuffer() const=0;
williamr@2
  1725
williamr@2
  1726
	/** 
williamr@2
  1727
	Sets the quality value to use if jpeg is a supported image for video format.
williamr@2
  1728
williamr@2
  1729
	Ignored if jpeg is not a supported image for video format.
williamr@2
  1730
williamr@2
  1731
	@param  aQuality
williamr@2
  1732
	        The quality value to use, clamped to the range 1 to 100.
williamr@2
  1733
	        
williamr@2
  1734
	@see	CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters::iImageMaxMemorySize
williamr@2
  1735
	*/
williamr@2
  1736
	virtual void SetJpegQuality(TInt aQuality)=0;
williamr@2
  1737
williamr@2
  1738
	/**
williamr@2
  1739
	Gets the currently set jpeg quality value.
williamr@2
  1740
williamr@2
  1741
	Returns 0 if not supported.
williamr@2
  1742
williamr@2
  1743
	@return The currently set jpeg quality value.
williamr@2
  1744
	
williamr@2
  1745
	@see    CCamera::CCameraPreImageCaptureControl::GetImageMaxMemorySizeL(TUint& aMemorySize)
williamr@2
  1746
	*/
williamr@2
  1747
	virtual TInt JpegQuality() const=0;
williamr@2
  1748
williamr@2
  1749
    /**
williamr@2
  1750
	Gets a custom interface. The client has to cast the returned pointer
williamr@2
  1751
	to the appropriate type.
williamr@2
  1752
williamr@2
  1753
	@param aInterface
williamr@2
  1754
		   The Uid of the particular interface function required.
williamr@2
  1755
williamr@2
  1756
	@return Custom interface pointer. NULL if the requested interface is not supported.
williamr@2
  1757
	*/
williamr@2
  1758
	virtual TAny* CustomInterface(TUid aInterface)=0;
williamr@2
  1759
	
williamr@2
  1760
	/**
williamr@2
  1761
	@internalComponent
williamr@2
  1762
	Returns the camera API version no.
williamr@2
  1763
	*/
williamr@2
  1764
	IMPORT_C TInt CameraVersion();
williamr@2
  1765
	
williamr@2
  1766
private:
williamr@2
  1767
williamr@2
  1768
	/**
williamr@2
  1769
	Default Constructor
williamr@2
  1770
	
williamr@2
  1771
	Prevents implementers from deriving from CCamera.
williamr@2
  1772
	Implementation requires derivation from CCameraPlugin instead.
williamr@2
  1773
	*/
williamr@2
  1774
	IMPORT_C CCamera();
williamr@2
  1775
	};
williamr@2
  1776
williamr@2
  1777
/**
williamr@2
  1778
Buffer class for passing video frames between camera and client.
williamr@2
  1779
williamr@2
  1780
May contain multiple frames.
williamr@2
  1781
williamr@2
  1782
@publishedAll
williamr@2
  1783
@released
williamr@2
  1784
*/
williamr@2
  1785
class MFrameBuffer
williamr@2
  1786
	{
williamr@2
  1787
public:
williamr@2
  1788
	/**
williamr@2
  1789
	Gets a non-bitmap frame in the buffer.
williamr@2
  1790
williamr@2
  1791
	@param  aIndex
williamr@2
  1792
	        The index of the required, non-bitmap, frame.
williamr@2
  1793
williamr@2
  1794
	@leave  KErrArgument if aIndex is out of range 
williamr@2
  1795
	@leave  KErrNotSupported if the frame format is bitmap.
williamr@2
  1796
	@return A pointer to the specified non-bitmap format frame of video data.
williamr@2
  1797
	*/
williamr@2
  1798
	virtual TDesC8* DataL(TInt aIndex)=0;
williamr@2
  1799
williamr@2
  1800
	/** 
williamr@2
  1801
	Gets a bitmap frame in the buffer.
williamr@2
  1802
williamr@2
  1803
	@param  aIndex 
williamr@2
  1804
	        The index of the required, bitmap format, frame.
williamr@2
  1805
williamr@2
  1806
	@leave  KErrArgument if aIndex is out of range and 
williamr@2
  1807
	@leave  KErrNotSupported if
williamr@2
  1808
	        the frame format is not a bitmap.
williamr@2
  1809
	@return A pointer to the specified bitmap format frame of video data. 
williamr@2
  1810
	*/
williamr@2
  1811
	virtual CFbsBitmap* FrameL(TInt aIndex)=0;
williamr@2
  1812
williamr@2
  1813
	/** 
williamr@2
  1814
	Releases the buffer for re-use by the camera once the client has processed
williamr@2
  1815
	the frame data.
williamr@2
  1816
williamr@2
  1817
	Signals to CCamera that the buffer data has been used and that the buffer
williamr@2
  1818
	is free for re-use. 
williamr@2
  1819
	*/
williamr@2
  1820
	virtual void Release()=0;
williamr@2
  1821
	
williamr@2
  1822
public:
williamr@2
  1823
williamr@2
  1824
	/** 
williamr@2
  1825
	Sequential frame number of the first frame in the buffer, counting from when
williamr@2
  1826
	CCamera::StartVideoCapture() was called and including frames dropped due to
williamr@2
  1827
	lack of buffers. 
williamr@2
  1828
	*/
williamr@2
  1829
	TInt iIndexOfFirstFrameInBuffer;
williamr@2
  1830
williamr@2
  1831
	/** 
williamr@2
  1832
	Time elapsed from when CCamera::StartVideoCapture() was called until the first
williamr@2
  1833
	frame in the buffer was captured. 
williamr@2
  1834
	*/
williamr@2
  1835
	TTimeIntervalMicroSeconds iElapsedTime;
williamr@2
  1836
	};
williamr@2
  1837
williamr@4
  1838
#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
williamr@4
  1839
#include <ecamconst.h>
williamr@4
  1840
#endif
williamr@2
  1841
williamr@4
  1842
class MReserveObserver;
williamr@2
  1843
williamr@2
  1844
williamr@2
  1845
/**
williamr@2
  1846
An active object class implemented by Symbian and used to subscribe for the updates in the Properties, retrieve the 
williamr@2
  1847
Properties and forward the notification to the client.
williamr@2
  1848
williamr@2
  1849
@note Serialized part of the ECam implementation is assumed to define the Properties and publish them whenever there is 
williamr@2
  1850
	  change in the reserve status.
williamr@2
  1851
*/
williamr@2
  1852
class CCameraStatusWatch : public CActive
williamr@2
  1853
	{
williamr@2
  1854
public:
williamr@2
  1855
	IMPORT_C ~CCameraStatusWatch();
williamr@4
  1856
	static CCameraStatusWatch* NewL(MReserveObserver& aReserveObserver, TInt aCameraIndex, TInt aSecureId);
williamr@2
  1857
private:
williamr@2
  1858
	
williamr@2
  1859
	CCameraStatusWatch(MReserveObserver& aReserveObserver, TInt aCameraIndex, TInt aSecureId);
williamr@2
  1860
	void ConstructL();
williamr@2
  1861
	void RunL();
williamr@2
  1862
	void DoCancel();
williamr@2
  1863
	
williamr@2
  1864
private:
williamr@2
  1865
	RProperty iProperty;
williamr@2
  1866
	MReserveObserver& iReserveObserver;
williamr@2
  1867
	TInt iCameraIndex;
williamr@2
  1868
	TInt iSecureId;
williamr@2
  1869
	};
williamr@4
  1870
williamr@2
  1871
	
williamr@2
  1872
#endif // ECAM_H