camerauis/cameraapp/generic/common/inc/MCamAppController.h
branchRCL_3
changeset 24 bac7acad7cb3
parent 0 1ddebce53859
equal deleted inserted replaced
23:61bc0f252b2b 24:bac7acad7cb3
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Defines abstract API's for the controller observers*
       
    15 */
       
    16 
       
    17 
       
    18 #ifndef MCAMAPPCONTROLLER_H
       
    19 #define MCAMAPPCONTROLLER_H
       
    20 
       
    21 #include "CamSettings.hrh"
       
    22 
       
    23 #include "CamPSI.h" // TCamEvCompRange
       
    24 
       
    25 class MCamControllerObserver;
       
    26 class CCameraUiConfigManager;
       
    27 /**
       
    28 * Abstract API for controller observer from the settings plugin. 
       
    29 * 
       
    30 */
       
    31 class MCamAppController
       
    32     {
       
    33     public:
       
    34         
       
    35         /**
       
    36         * Add a controller observer.
       
    37         * @since 2.8
       
    38         * @param aObserver Pointer to an object implementing 
       
    39         *                   MCamControllerObserver
       
    40         * @return ?description
       
    41         */
       
    42         virtual void AddControllerObserverL( 
       
    43                      const MCamControllerObserver* aObserver ) = 0;
       
    44 
       
    45         /**
       
    46         * Remove a controller observer
       
    47         * @since 2.8
       
    48         * @param aObserver Pointer to the observer to remove. The object
       
    49         *                  does not have to be added as an observer.
       
    50         */
       
    51         virtual void RemoveControllerObserver
       
    52                      ( const MCamControllerObserver* aObserver ) = 0;
       
    53         
       
    54         /**
       
    55         * Return number of images that can still be captured
       
    56         * @since 2.8
       
    57         * @param aStorage storage location - defaults to current loation
       
    58         * @param aBurstActive - set to ETrue if burst mode is active
       
    59         * @return the number of images
       
    60         */
       
    61         virtual TInt ImagesRemaining( TCamMediaStorage aStorage,
       
    62                               TBool            aBurstActive, 
       
    63                               TInt             aQualityIndex ) = 0;
       
    64         
       
    65         /*
       
    66         * Return amount of video that can still be captured
       
    67         * @since 2.8
       
    68         * @return the amount of video in secs
       
    69         */
       
    70         virtual TTimeIntervalMicroSeconds RecordTimeRemaining() = 0;
       
    71 
       
    72         /**
       
    73         * Previews a new value for the specified integer setting
       
    74         * @param aSettingItem specifies which setting item that want
       
    75         * to preview.
       
    76         * @param aSettingValue the new integer value for the specified 
       
    77         * setting item to be previewed.
       
    78         * @since 2.8
       
    79         */
       
    80         virtual void PreviewSettingChangeL( TInt aSettingItem,
       
    81                                             TInt aSettingValue ) = 0;
       
    82         
       
    83         
       
    84         /**
       
    85         * Cancels all preview changes, since last commit/cancel.
       
    86         * @since 2.8
       
    87         */
       
    88         virtual void CancelPreviewChangesL() = 0;
       
    89 
       
    90         /**
       
    91         * Commits last preview change.
       
    92         * @since 2.8
       
    93         */
       
    94         virtual void CommitPreviewChanges() = 0;
       
    95         
       
    96         /**
       
    97         * Restore Camera settings to default
       
    98         * @since 3.0
       
    99         * @param aIsEmbedded if app is embedded
       
   100         */
       
   101         virtual void RestoreFactorySettingsL( TBool aIsEmbedded ) = 0;
       
   102         
       
   103         
       
   104         /**
       
   105         * Returns the current integer value for the specified setting
       
   106         * without the filtering usually performed on storage location.
       
   107         * This is neccesary to allow the video/photo settings list to show
       
   108         * the selected storage location rather than the forced storage location.
       
   109         * @return the current integer setting value
       
   110         * @param aSettingItem specifies which setting item that want the value of.
       
   111         * @since 2.8
       
   112         */
       
   113         virtual TInt IntegerSettingValueUnfiltered( TInt aSettingItem ) const = 0;
       
   114         
       
   115         /**
       
   116         * Returns the current integer value for the specified setting
       
   117         * @return the current integer setting value
       
   118         * @param aSettingItem specifies which setting item that want the value of.
       
   119         * @since 2.8
       
   120         */
       
   121         virtual TInt IntegerSettingValue( TInt aSettingItem ) const = 0;
       
   122     
       
   123         /**
       
   124         * Sets a new value for the specified integer setting
       
   125         * @param aSettingItem specifies which setting item that want to set the value of.
       
   126         * @param aSettingValue the new integer value for the specified setting item.
       
   127         * @since 2.8
       
   128         */
       
   129         virtual void SetIntegerSettingValueL( TInt aSettingItem, TInt aSettingValue ) = 0;
       
   130     
       
   131         /**
       
   132         * Returns the current text value for the specified setting
       
   133         * @return the current text setting value
       
   134         * @param aSettingItem specifies which setting item that want the text value of.
       
   135         * @since 2.8
       
   136         */
       
   137         virtual TPtrC TextSettingValue( TInt aSettingItem ) const = 0;
       
   138     
       
   139         /**
       
   140         * Sets a new value for the specified integer setting
       
   141         * @param aSettingItem specifies which setting item that want to set the value of.
       
   142         * @param aSettingValue the new integer value for the specified setting item.
       
   143         * @since 2.8
       
   144         */
       
   145         virtual void SetTextSettingValueL( TInt aSettingItem,
       
   146                                            const TDesC& aSettingValue ) = 0;
       
   147         
       
   148         /**
       
   149         * Increments the engine usage count
       
   150         * @since 2.8
       
   151         */
       
   152         virtual void IncCameraUsers() = 0;
       
   153 
       
   154         /**
       
   155         * Decrements the engine usage count If the engine is no longer required
       
   156         * then it is released. If it is still processing, the engine count will 
       
   157         * be checked when the current process completes and the engine will be 
       
   158         * released if it is no longer needed.
       
   159         * @since 2.8
       
   160         */
       
   161         virtual void DecCameraUsers() = 0;
       
   162 
       
   163         /**
       
   164          * Return range of EV value supported for current product
       
   165          * @since 3.0
       
   166          * @return TEvRange struct
       
   167          */
       
   168         virtual TCamEvCompRange EvRange() const = 0;
       
   169 
       
   170         /**
       
   171         * Restart the idle timer
       
   172         * @since 2.8
       
   173         */
       
   174         virtual void StartIdleTimer() = 0;
       
   175         
       
   176         /*
       
   177          * Get handle to CameraUiConfigManager
       
   178          */ 
       
   179         virtual CCameraUiConfigManager* UiConfigManagerPtr() = 0;
       
   180     };
       
   181 
       
   182 #endif //
       
   183