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: Camera setting provider, which queries the settings from settingmodel. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAM_SETTINGPROVIDER_H |
|
20 #define CAM_SETTINGPROVIDER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "mcamsettingprovider.h" |
|
24 #include "mcamsettingsmodelobserver.h" |
|
25 |
|
26 |
|
27 class MCamSettingsModel; |
|
28 class CCamAppController; |
|
29 |
|
30 class CCamSettingProvider : public CBase, |
|
31 //public MCamSettingsModelObserver, |
|
32 public MCamSettingProvider |
|
33 { |
|
34 // ========================================================================= |
|
35 // Constructors and destructor |
|
36 public: |
|
37 static CCamSettingProvider* NewL ( CCamAppController& aController, MCamSettingsModel* aSettingsModel ); |
|
38 static CCamSettingProvider* NewLC( CCamAppController& aController, MCamSettingsModel* aSettingsModel ); |
|
39 virtual ~CCamSettingProvider(); |
|
40 |
|
41 // ------------------------------------------------------------------------- |
|
42 // From MCamSettingProvider |
|
43 public: |
|
44 virtual void |
|
45 ProvideCameraParamL( |
|
46 const NCamCameraController::TCamCameraParamId& aParamId, |
|
47 TAny* aParamData ); |
|
48 |
|
49 virtual void |
|
50 ProvideCameraSettingL( |
|
51 const NCamCameraController::TCamCameraSettingId& aSettingId, |
|
52 TAny* aSettingData ); |
|
53 |
|
54 virtual void |
|
55 ProvidePendingSettingChangesL( |
|
56 RArray<NCamCameraController::TCamCameraSettingId>& aSettingIds ); |
|
57 |
|
58 virtual TInt PendingSettingChangeCount() const; |
|
59 |
|
60 /** |
|
61 * Set the supported ISO rates. |
|
62 */ |
|
63 virtual void SetSupportedISORatesL( const RArray<TInt>& aSupportedIsoRates ); |
|
64 |
|
65 // ------------------------------------------------------------------------- |
|
66 // New methods |
|
67 public: |
|
68 |
|
69 /** |
|
70 * Clear all pending setting changes. |
|
71 */ |
|
72 void Reset(); |
|
73 |
|
74 /** |
|
75 * Add an array of pending setting changes. |
|
76 */ |
|
77 void AddPendingSettingChangesL( |
|
78 const RArray<TCamSettingItemIds>& aUiSettingIds ); |
|
79 |
|
80 /** |
|
81 * Add one pending setting change. |
|
82 */ |
|
83 void AddPendingSettingChangeL( TCamSettingItemIds aUiSettingId ); |
|
84 |
|
85 // ------------------------------------------------------------------------- |
|
86 // Private constructors |
|
87 private: |
|
88 |
|
89 void ConstructL(); |
|
90 |
|
91 CCamSettingProvider( CCamAppController& aController, MCamSettingsModel* aSettingsModel ); |
|
92 |
|
93 // ========================================================================= |
|
94 // Data |
|
95 private: |
|
96 |
|
97 MCamSettingsModel* iSettingsModel; |
|
98 CCamAppController& iController; |
|
99 RArray<NCamCameraController::TCamCameraSettingId> iPendingSettingChanges; |
|
100 |
|
101 TInt iEvStepAsUiValue; |
|
102 |
|
103 RArray<TInt> iSupportedISORates; |
|
104 TBool iValidISORates; |
|
105 |
|
106 // ========================================================================= |
|
107 }; |
|
108 |
|
109 #endif // CAM_CONSTANTSETTINGPROVIDER_H |
|