MCameraPresets Class Reference

class MCameraPresets

Mixin class for implementation by providers of the Presets Camera Extension API.

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

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

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.

Member Functions Documentation

GetAffectedSettingsL(RArray< TUid > &)

void GetAffectedSettingsL ( RArray < TUid > & aSettings ) const [pure virtual]

Gets all settings affected by the current preset. All settings that are related to the preset in question will be included in the list, including any whose values have not changed as a result of applying the preset.

leave
KErrNoMemory Out of memory. May also leave as a result of other system errors.

Parameters

RArray < TUid > & aSettings An empty array of TUids which the API implementation must populate with the specific settings.

GetAssociatedSettingsL(TUid, RArray< TUid > &)

void GetAssociatedSettingsL ( TUid aPreset,
RArray < TUid > & aSettings
) const [pure virtual]

Gets all settings associated with a specific preset. 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 preset UID is not recognised
leave
KErrNoMemory Out of memory. May also leave as a result of other system errors.

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.

GetSupportedPresetsL(RArray< TUid > &)

void GetSupportedPresetsL ( RArray < TUid > & aPresets ) const [pure virtual]

Gets the presets supported by the device. These are identified by UIDs and relate to a known expected 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. May also leave as a result of other system errors.

Parameters

RArray < TUid > & aPresets An empty array of TUids which the API implementation must populate with the specific supported preset values. If the array is empty on return, the camera does not support presets.

Preset()

TUid Preset ( ) const [pure virtual]

Gets the preset that was established by the last call to MCameraPresets SetPreset()

Note:

A particular preset is only active if it was established (through a call to MCameraPresets SetPreset()) as the most recent operation affecting camera settings. If some other camera setting is changed after calling MCameraPresets SetPreset() then the preset is no longer active.

Release()

void Release ( ) [pure virtual]

Releases the interface.

SetPreset(TUid)

void SetPreset ( TUid aPreset ) [pure virtual]

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

Note:

A particular preset is only active if it was established (through a call to MCameraPresets SetPreset()) as the most recent operation affecting camera settings. If some other camera setting is changed after calling MCameraPresets SetPreset() then the preset is no longer active.

Parameters

TUid aPreset The UID of the new requested preset.