CCamera::CCameraPresets Class Reference

class CCamera::CCameraPresets : public CBase

This API is used to simplify user - camera interaction by allowing simultaneous setting of various advanced camera hardware settings using a single parameter.

Preset is identified by a single UID and relates to a known predefined outcome. For example the 'Night' Preset will be used to set the camera into a night mode so that the user can take night photos.

The particular set of settings associated with the specific preset and their specific values and ranges are camera hardware specific and outside the scope of this API.

Note:

This class is not intended for sub-classing and used to standardise existing varieties of implementations.

If the class methods leave, the output type parameter value is not guaranteed to be valid.

Inherits from

Constructor & Destructor Documentation

CCameraPresets(CCamera &)

IMPORT_C CCameraPresets ( CCamera & aOwner ) [private]

CCameraPresets Constructor.

Parameters

CCamera & aOwner a reference to a CCamera object providing the settings.

~CCameraPresets()

IMPORT_C ~CCameraPresets ( )

Destructor

Member Functions Documentation

ConstructL()

IMPORT_C void ConstructL ( ) [private]

CCameraPresets second phase constructor.

Function used to initialise internal state of the object. Uses reference to the camera to retrieve Camera presets interface pointer.

leave
KErrNoMemory Out of memory.

FilterUnrecognisedUids(RArray< TUid > &, const TInt)

void FilterUnrecognisedUids ( RArray < TUid > & aUids,
const TInt aBaselineUid
) const [private]

Parameters

RArray < TUid > & aUids
const TInt aBaselineUid

GetAffectedSettingsL(RArray< TUid > &)

IMPORT_C void GetAffectedSettingsL ( RArray < TUid > & aSettings ) const

Get all settings affected by the current preset. This is to say that all settings which are related to the preset in question will be included in the list, even though the value might not have changed.

leave
KErrNoMemory Out of memory.
Note:

if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed from the implementation will be filtered at this point. To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values

Parameters

RArray < TUid > & aSettings An empty array of TUids which would be populated by the implementation with the specific settings.

GetAssociatedSettingsL(TUid, RArray< TUid > &)

IMPORT_C void GetAssociatedSettingsL ( TUid aPreset,
RArray < TUid > & aSettings
) const

Get all settings associated with a specific preset, identified by a UID. This function does not require a preset to have been set prior the call as in GetAffectedSettingsL() function. The returned array will contain the UIDs of all settings which are associated and potentially affected by that particular preset.

leave
KErrArgument If the provided preset UID is not recognised.
leave
KErrNoMemory Out of memory.
Note:

if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed from the implementation will be filtered at this point. To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values

Parameters

TUid aPreset the UID of the preset in question.
RArray < TUid > & aSettings An empty array of TUids which would be populated by the implementation with the UIDs of the settings associated with that preset.

GetFeatureRestrictedSettingsL(RArray< TUid > &)

IMPORT_C void GetFeatureRestrictedSettingsL ( RArray < TUid > & aFeatureRestrictedSettings ) const

Retrieves those settings which have been restricted (settings no longer supported) in order to let the camera work in a given preset mode. The client will be notified of feature restrictions through ECAM event KUidECamEventFeatureRestricted. After receiving this notification, the client may use this method to retrieve these settings.

leave
May leave with any error code.

Parameters

RArray < TUid > & aFeatureRestrictedSettings An array of uids which represents those settings which have been restricted. These settings are ECam component wide. Empty array indicates that there are no settings which have been been restricted for the given preset.

GetRangeRestrictedSettingsL(RArray< TUid > &)

IMPORT_C void GetRangeRestrictedSettingsL ( RArray < TUid > & aRangeRestrictedSettings ) const

Retrieves those settings for which ranges have been restricted in order to let the camera work in a given preset mode. The client will be notified of range restrictions through ECAM event KUidECamEventRangeRestricted. After receiving this notification, the client may use this method to retrieve those settings whose ranges have been restricted.

leave
May leave with any error code.

Parameters

RArray < TUid > & aRangeRestrictedSettings An array of uids which represents those settings whose ranges have been restricted. These settings are ECam component wide. For each of the settings, the client can query about the restricted ranges in the usual way. Empty array indicates that there are no range restricted settings for the given preset.

GetSupportedPresetsL(RArray< TUid > &)

IMPORT_C void GetSupportedPresetsL ( RArray < TUid > & aPresets ) const

Gets the presets supported by the camera. These are identified by UIDs and relate to a known predefined outcome. The settings associated with a particular preset and their specific values and ranges are specific to each type of camera hardware and are therefore not defined by the API.

leave
KErrNoMemory Out of memory.
Note:

if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added uid values (new presets added). So, any extra uid value(unrecognised) passed from the implementation will be filtered at this point. To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values.

Any preset uid, if added in future, has to have a uid value greater than KUidECamPresetFactoryDefaultUidValue otherwise unrecognized preset uids could not be checked.

Parameters

RArray < TUid > & aPresets An empty array of TUids which would be populated by the implementation with the specific supported values. If the array is empty on return, the camera does not support presets.

IsPresetUnlockSupportedL(TBool &)

IMPORT_C void IsPresetUnlockSupportedL ( TBool & aUnlockSupported ) const

Retrieves information about whether the preset unlock feature is supported or not. Unlocking the preset helps in making further setting changes after the camera works in a particular preset mode.

leave
May leave with any error code.

Parameters

TBool & aUnlockSupported ETrue indicates preset unlock feature is supported. EFalse indicates preset lock feature is not supported.

LockPresetL()

IMPORT_C void LockPresetL ( )

Locks the preset for any further setting changes.

Note:

Event KUidECamEventPresetLocked is used to notify clients that the preset has been locked.

NewL(CCamera &)

IMPORT_C CCameraPresets * NewL ( CCamera & aCamera ) [static]

Factory function for creating the CCameraPresets object.

leave
KErrNoMemory Out of memory Or any other system-wide error code.
Note:

Clients using MCameraObserver are not recommended to use this extension class since they cannot handle events.

Parameters

CCamera & aCamera a reference to a CCamera object providing the settings.

Preset()

IMPORT_C TUid Preset ( ) const

Gets the current preset set on the camera.

Note:

if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added uid values (new presets added). So, any extra uid(unrecognised) value received from the implementation will be mapped to KUidECamPresetFactoryDefault at this point. To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values

SetPreset(TUid)

IMPORT_C void SetPreset ( TUid aPreset )

Sets a specific preset supported by the device. All clients, implementing the MCameraObserver2 interface will receive a notification with the UID of the specific preset, signalling a new preset has been selected.

Parameters

TUid aPreset The UID of the new requested preset.

UnlockPresetL()

IMPORT_C void UnlockPresetL ( )

Unlocks the preset to apply further setting changes.

Note:

Event KUidECamEventPresetUnlocked is used to notify clients that the preset has been unlocked.

Member Data Documentation

MCameraPresets * iImpl

MCameraPresets * iImpl [private]

MCameraPresets2 * iImpl2

MCameraPresets2 * iImpl2 [private]

CCamera & iOwner

CCamera & iOwner [private]