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