1 /* |
|
2 * Copyright (c) 2008 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: LC VT states class definition. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef T_LCVTSTATES_H |
|
20 #define T_LCVTSTATES_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include "tlcvtmediastate.h" |
|
25 #include "tlcvtaudiostate.h" |
|
26 |
|
27 class CVtEngModel; |
|
28 class MVtEngCameraPreferences; |
|
29 |
|
30 /** |
|
31 * TLcVtStates |
|
32 * |
|
33 * Contains information about Application UI's current status. |
|
34 * |
|
35 * @since S60 v3.2 |
|
36 */ |
|
37 NONSHARABLE_CLASS( TLcVtStates ) : public TLcVtFlagContainer |
|
38 { |
|
39 |
|
40 public: // enumerations |
|
41 |
|
42 /** |
|
43 * Lc VT plugin execution state (will be set by the plugin state classes) |
|
44 */ |
|
45 enum TLcVtExecState |
|
46 { |
|
47 EExecStateStarting, |
|
48 EExecStateRunning, |
|
49 EExecStateResetting, |
|
50 EExecStateFinalized |
|
51 }; |
|
52 |
|
53 public: |
|
54 |
|
55 /** |
|
56 * Constructor. |
|
57 */ |
|
58 TLcVtStates( CVtEngModel& aModel ); |
|
59 |
|
60 /** |
|
61 * Updates UI states. |
|
62 */ |
|
63 void Update(); |
|
64 |
|
65 /** |
|
66 * Return whether or not ColorToneSetting |
|
67 * is supported by current camera. |
|
68 * |
|
69 * @return ETrue if at least one color tone setting is available, |
|
70 * EFalse otherwise. |
|
71 */ |
|
72 TBool IsColorToneSettingAvailable() const; |
|
73 |
|
74 /** |
|
75 * Return whether or not WhiteBalanceSetting |
|
76 * is supported by current camera. |
|
77 * |
|
78 * @return ETrue if at least one white balance setting is available, |
|
79 * EFalse otherwise. |
|
80 */ |
|
81 TBool IsWhiteBalanceSettingAvailable() const; |
|
82 |
|
83 /** |
|
84 * Return whether or not ontrast setting |
|
85 * is supported by current camera. |
|
86 * |
|
87 * @return ETrue if at contrast setting is available, |
|
88 * EFalse otherwise. |
|
89 */ |
|
90 TBool IsContrastSettingAvailable() const; |
|
91 |
|
92 /** |
|
93 * Return whether or not brightness setting |
|
94 * is supported by current camera. |
|
95 * |
|
96 * @return ETrue if brightness setting is available, |
|
97 * EFalse otherwise. |
|
98 */ |
|
99 TBool IsBrightnessSettingAvailable() const; |
|
100 |
|
101 /** |
|
102 * Returns reference to media state object |
|
103 * |
|
104 * @return Reference to media state object. |
|
105 */ |
|
106 inline const TLcVtMediaState& MediaState() const; |
|
107 |
|
108 /** |
|
109 * Returns reference to audio state object |
|
110 * |
|
111 * @return Reference to audio state object. |
|
112 */ |
|
113 inline const TLcVtAudioState& AudioState() const; |
|
114 |
|
115 /** |
|
116 * Sets or clears EIsCLIReceived |
|
117 * |
|
118 * @param aSet ETrue if setting will be set, EFalse otherwise. |
|
119 */ |
|
120 inline void SetCLIReceived( TBool aSet ); |
|
121 |
|
122 /** |
|
123 * Check if EIsCLIReceived is set |
|
124 * |
|
125 * @return ETrue if EIsCLIReceived is set EFalse otherwise |
|
126 */ |
|
127 inline TBool IsCLIReceived() const; |
|
128 |
|
129 /** |
|
130 * Sets or clears EIsLayoutChangeNeeded |
|
131 * |
|
132 * @param aSet ETrue if setting will be set, EFalse otherwise. |
|
133 */ |
|
134 inline void SetLayoutChangeNeeded( TBool aSet ); |
|
135 |
|
136 /** |
|
137 * Check if EIsLayoutChangeNeeded is set |
|
138 * |
|
139 * @return ETrue if EIsLayoutChangeNeeded is set EFalse otherwise |
|
140 */ |
|
141 inline TBool IsLayoutChangeNeeded() const; |
|
142 |
|
143 /** |
|
144 * Sets or clears EIsDeviceLockOn |
|
145 * |
|
146 * @param aSet ETrue if setting will be set, EFalse otherwise. |
|
147 */ |
|
148 inline void SetDeviceLockOn( TBool aSet ); |
|
149 |
|
150 /** |
|
151 * Check if EIsDeviceLockOn is set |
|
152 * |
|
153 * @return ETrue if EIsDeviceLockOn is set EFalse otherwise |
|
154 */ |
|
155 inline TBool IsDeviceLockOn() const; |
|
156 |
|
157 /** |
|
158 * Sets or clears EDetailsReceived |
|
159 * |
|
160 * @param aSet ETrue if setting will be set, EFalse otherwise. |
|
161 */ |
|
162 inline void SetDetailsReceived( TBool aSet ); |
|
163 |
|
164 /** |
|
165 * Check if EDetailsReceived is set |
|
166 * |
|
167 * @return ETrue if EDetailsReceived is set EFalse otherwise |
|
168 */ |
|
169 inline TBool IsDetailsReceived() const; |
|
170 |
|
171 /** |
|
172 * Sets or clears EWaitingForFirstFrame |
|
173 * |
|
174 * @param aSet ETrue if setting will be set, EFalse otherwise. |
|
175 */ |
|
176 inline void SetWaitingForFirstFrame( TBool aSet ); |
|
177 |
|
178 /** |
|
179 * Check if EWaitingForFirstFrame is set |
|
180 * |
|
181 * @return ETrue if EWaitingForFirstFrame is set EFalse otherwise |
|
182 */ |
|
183 inline TBool IsWaitingForFirstFrame() const; |
|
184 |
|
185 /** |
|
186 * Sets or clears EUseSQCif |
|
187 * |
|
188 * @param aSet ETrue if setting will be set, EFalse otherwise. |
|
189 */ |
|
190 inline void SetUseSQCif( TBool aSet ); |
|
191 |
|
192 /** |
|
193 * Check if EUseSQCif is set |
|
194 * |
|
195 * @return ETrue if EUseSQCif is set EFalse otherwise |
|
196 */ |
|
197 inline TBool IsUseSQCif() const; |
|
198 |
|
199 /** |
|
200 * Sets or clears EIsThisApplicationForeground |
|
201 * |
|
202 * @param aSet ETrue if setting will be set, EFalse otherwise. |
|
203 */ |
|
204 inline void SetThisApplicationForeground( TBool aSet ); |
|
205 |
|
206 /** |
|
207 * Check if EIsThisApplicationForeground is set |
|
208 * |
|
209 * @return ETrue if EIsThisApplicationForeground is set EFalse otherwise |
|
210 */ |
|
211 inline TBool IsThisApplicationForeground() const; |
|
212 |
|
213 /** |
|
214 * Sets or clears EIsDisableBlindSetting |
|
215 * |
|
216 * @param aSet ETrue if setting will be set, EFalse otherwise. |
|
217 */ |
|
218 inline void SetDisableBlindSetting( TBool aSet ); |
|
219 |
|
220 /** |
|
221 * Check if EIsDisableBlindSetting is set |
|
222 * |
|
223 * @return ETrue if EIsDisableBlindSetting is set EFalse otherwise |
|
224 */ |
|
225 inline TBool IsDisableBlindSetting() const; |
|
226 |
|
227 /** |
|
228 * Sets or clears EExecShowCameraInUse |
|
229 * |
|
230 * @param aSet ETrue if setting will be set, EFalse otherwise. |
|
231 */ |
|
232 inline void SetExecShowCameraInUse( TBool aSet ); |
|
233 |
|
234 /** |
|
235 * Check if EExecShowCameraInUse is set |
|
236 * |
|
237 * @return ETrue if EExecShowCameraInUse is set EFalse otherwise |
|
238 */ |
|
239 inline TBool IsExecShowCameraInUse() const; |
|
240 |
|
241 /** |
|
242 * Sets or clears EIsWaitingCall |
|
243 * |
|
244 * @param aSet ETrue if setting will be set, EFalse otherwise. |
|
245 */ |
|
246 inline void SetWaitingCall( TBool aSet ); |
|
247 |
|
248 /** |
|
249 * Check if there is waiting video/voice call. |
|
250 * |
|
251 * @return ETrue if waiting call is ongoing, EFalse otherwise |
|
252 */ |
|
253 inline TBool IsWaitingCall() const; |
|
254 |
|
255 /** |
|
256 * Returns application's execution state. |
|
257 * @return Application's current execution state. |
|
258 */ |
|
259 inline TLcVtExecState ExecState() const; |
|
260 |
|
261 /** |
|
262 * Sets application's execution state. |
|
263 * @param aState Application's new execution state. |
|
264 */ |
|
265 inline void SetExecState( const TLcVtExecState aState ); |
|
266 |
|
267 private: // methods to be accessed only by certain classes (see friends) |
|
268 |
|
269 |
|
270 |
|
271 private: |
|
272 |
|
273 // Enumeration for ui state flags. |
|
274 enum TFlags |
|
275 { |
|
276 /** Set if CLI is received */ |
|
277 EIsCLIReceived = ( 1<<0 ), |
|
278 |
|
279 /** Set if layout change is needed */ |
|
280 EIsLayoutChangeNeeded = ( 1<<1 ), |
|
281 |
|
282 /** Set if device lock is on */ |
|
283 EIsDeviceLockOn = ( 1<<2 ), |
|
284 |
|
285 /** Set if details have been received */ |
|
286 EDetailsReceived = ( 1<<3 ), |
|
287 |
|
288 /** Set if waiting for first frame */ |
|
289 EWaitingForFirstFrame = ( 1<<4 ), |
|
290 |
|
291 /** Set if SQCIF is being used */ |
|
292 EUseSQCif = ( 1 << 5 ), |
|
293 |
|
294 /** Set if application on foreground */ |
|
295 EIsThisApplicationForeground = ( 1<<6 ), |
|
296 |
|
297 /** Set if blind setting should be temporarily disabled. |
|
298 This is used in preventing blind bitmap from flashing |
|
299 while operations involving multiple engine commands/events |
|
300 take place (e.g. 'Swap image places' and layout switch). */ |
|
301 EIsDisableBlindSetting = ( 1<<7 ), |
|
302 |
|
303 /** Set if camera in use note should be shown. */ |
|
304 EExecShowCameraInUse = ( 1<<8 ), |
|
305 |
|
306 /** Set if waiting call exists */ |
|
307 EIsWaitingCall = ( 1<<9 ), |
|
308 }; |
|
309 |
|
310 // Engine media state |
|
311 TLcVtMediaState iMediaState; |
|
312 |
|
313 // Engine audio state |
|
314 TLcVtAudioState iAudioState; |
|
315 |
|
316 // Refrence to engine |
|
317 CVtEngModel& iModel; |
|
318 |
|
319 // Refrence to camera prefrences |
|
320 MVtEngCameraPreferences* iCameraPref; |
|
321 |
|
322 // Application execution state |
|
323 TLcVtExecState iExecState; |
|
324 |
|
325 private: // friends |
|
326 |
|
327 //friend class TLcVtStateBase; |
|
328 |
|
329 }; |
|
330 |
|
331 #include "tlcvtstates.inl" |
|
332 |
|
333 #endif // T_LCVTSTATES_H |
|