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.
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.
Public Member Functions | |
---|---|
~CCameraPresets () | |
IMPORT_C void | GetAffectedSettingsL ( RArray < TUid > &) |
IMPORT_C void | GetAssociatedSettingsL ( TUid , RArray < TUid > &) |
IMPORT_C void | GetFeatureRestrictedSettingsL ( RArray < TUid > &) |
IMPORT_C void | GetRangeRestrictedSettingsL ( RArray < TUid > &) |
IMPORT_C void | GetSupportedPresetsL ( RArray < TUid > &) |
IMPORT_C void | IsPresetUnlockSupportedL ( TBool &) |
IMPORT_C void | LockPresetL () |
IMPORT_C CCameraPresets * | NewL ( CCamera &) |
IMPORT_C TUid | Preset () |
IMPORT_C void | SetPreset ( TUid ) |
IMPORT_C void | UnlockPresetL () |
Private Member Functions | |
---|---|
CCameraPresets ( CCamera &) | |
IMPORT_C void | ConstructL () |
void | FilterUnrecognisedUids ( RArray < TUid > &, const TInt ) |
Private Attributes | |
---|---|
MCameraPresets * | iImpl |
MCameraPresets2 * | iImpl2 |
CCamera & | iOwner |
IMPORT_C | CCameraPresets | ( | CCamera & | aOwner | ) | [private] |
CCameraPresets Constructor.
CCamera & aOwner | a reference to a CCamera object providing the settings. |
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.
void | FilterUnrecognisedUids | ( | RArray < TUid > & | aUids, |
const TInt | aBaselineUid | |||
) | const [private] |
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.
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
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.
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
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.
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.
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. |
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.
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.
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.
TBool & aUnlockSupported | ETrue indicates preset unlock feature is supported. EFalse indicates preset lock feature is not supported. |
IMPORT_C void | LockPresetL | ( | ) |
Locks the preset for any further setting changes.
Event KUidECamEventPresetLocked is used to notify clients that the preset has been locked.
IMPORT_C CCameraPresets * | NewL | ( | CCamera & | aCamera | ) | [static] |
Factory function for creating the CCameraPresets object.
Clients using MCameraObserver are not recommended to use this extension class since they cannot handle events.
CCamera & aCamera | a reference to a CCamera object providing the settings. |
IMPORT_C TUid | Preset | ( | ) | const |
Gets the current preset set on the camera.
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
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.
TUid aPreset | The UID of the new requested preset. |
IMPORT_C void | UnlockPresetL | ( | ) |
Unlocks the preset to apply further setting changes.
Event KUidECamEventPresetUnlocked is used to notify clients that the preset has been unlocked.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.