CCamera::CCameraPresets Class Reference

#include <ecamadvsettings.h>

Link against: ecamadvsettings.lib

class CCamera::CCameraPresets : public CBase

Inherits from

  • CCamera::CCameraPresets

    Detailed Description

    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.

    Constructor & Destructor Documentation

    ~CCameraPresets ( )

    IMPORT_C~CCameraPresets()

    Destructor

    Member Function Documentation

    GetAffectedSettingsL ( RArray< TUid > & )

    IMPORT_C voidGetAffectedSettingsL(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

    ParameterDescription
    aSettingsAn empty array of TUids which would be populated by the implementation with the specific settings.

    GetAssociatedSettingsL ( TUid, RArray< TUid > & )

    IMPORT_C voidGetAssociatedSettingsL(TUidaPreset,
    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

    ParameterDescription
    aPresetthe UID of the preset in question.
    aSettingsAn 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 voidGetFeatureRestrictedSettingsL(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.
    ParameterDescription
    aFeatureRestrictedSettingsAn 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 voidGetRangeRestrictedSettingsL(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.
    ParameterDescription
    aRangeRestrictedSettingsAn 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 voidGetSupportedPresetsL(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.

    ParameterDescription
    aPresetsAn 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 voidIsPresetUnlockSupportedL(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.
    ParameterDescription
    aUnlockSupportedETrue indicates preset unlock feature is supported. EFalse indicates preset lock feature is not supported.

    LockPresetL ( )

    IMPORT_C voidLockPresetL()

    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.

    ParameterDescription
    aCameraa reference to a CCamera object providing the settings.

    Returns: a pointer to a fully constructed CCameraPresets object.

    Preset ( )

    IMPORT_C TUidPreset()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

    Returns: The UID of the current preset. If there is no active preset then the returned value is KNullUid.

    SetPreset ( TUid )

    IMPORT_C voidSetPreset(TUidaPreset)

    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.

    ParameterDescription
    aPresetThe UID of the new requested preset.

    UnlockPresetL ( )

    IMPORT_C voidUnlockPresetL()

    Unlocks the preset to apply further setting changes.

    Note:

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