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