author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 13 Oct 2010 14:34:59 +0300 | |
branch | RCL_3 |
changeset 29 | c9b63fff5abf |
parent 25 | c6bafb5162d8 |
permissions | -rw-r--r-- |
25 | 1 |
/* |
2 |
* Copyright (c) 2002 - 2006 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: |
|
15 |
* This class is the data model and state machine of the Recorder View. |
|
16 |
* The state machine is defined by a VR_STATEMACHINE resource structure. |
|
17 |
* |
|
18 |
*/ |
|
19 |
||
20 |
||
21 |
#ifndef __CVRRECVIEWMODEL_H__ |
|
22 |
#define __CVRRECVIEWMODEL_H__ |
|
23 |
||
24 |
// INCLUDES |
|
25 |
#include <e32base.h> |
|
26 |
#include <e32std.h> |
|
27 |
#include <e32property.h> |
|
28 |
#include <AknNotifyStd.h> |
|
29 |
#include <badesca.h> |
|
30 |
||
31 |
#include "MVRIHFObserver.h" |
|
32 |
#include "MVRKeyObserver.h" |
|
33 |
#include "MVRDecoratorModel.h" |
|
34 |
#include "MVRButtonPanelModel.h" |
|
35 |
#include "MVRStateInfoModel.h" |
|
36 |
#include "MVRObserver.h" |
|
37 |
#include "MVRSelectionProvider.h" |
|
38 |
#include "MVRVolumeChangeObserver.h" |
|
39 |
||
40 |
#include "MVRSystemEventObserver.h" |
|
41 |
#include "MVRMediaRemovalObserver.h" |
|
42 |
||
43 |
||
44 |
#include "TVRContext.h" |
|
45 |
#include "voicerecorder.hrh" |
|
46 |
||
47 |
#include "MVRStateInfoObserver.h" |
|
48 |
||
49 |
// FORWARD DECLARATIONS |
|
50 |
class CAknGlobalNote; |
|
51 |
class CSendUi; |
|
52 |
class MVRMdaRecorder; |
|
53 |
class CVRMemo; |
|
54 |
class MVRObserver; |
|
55 |
class TResourceReader; |
|
56 |
class TVRState; |
|
57 |
class CVRSystemEventHandler; |
|
58 |
class CVRMediaRemovalMonitor; |
|
59 |
||
60 |
||
61 |
// CLASS DEFINITION |
|
62 |
/** |
|
63 |
* This class is the data model and state machine of the Recorder View. |
|
64 |
* The state machine is defined by a VR_STATEMACHINE resource structure. |
|
65 |
*/ |
|
66 |
NONSHARABLE_CLASS( CVRRecViewModel ): |
|
67 |
public CBase, |
|
68 |
public MVRDecoratorModel, public MVRButtonPanelModel, |
|
69 |
public MVRStateInfoModel, public MVRObserver, |
|
70 |
public MVRKeyObserver, public MVRVolumeChangeObserver, |
|
71 |
public MVRSystemEventObserver, |
|
72 |
public MVRMediaRemovalObserver |
|
73 |
{ |
|
74 |
private: // nested classes |
|
75 |
||
76 |
class TVRLabelLayoutLink |
|
77 |
{ |
|
78 |
public: |
|
79 |
/** |
|
80 |
* Constructs this object from a VR_LABEL_LINK resource |
|
81 |
* @param aReader A resource reader object initialised |
|
82 |
* to a resource. |
|
83 |
*/ |
|
84 |
void ReadFromResource( TResourceReader& aReader ); |
|
85 |
public: |
|
86 |
||
87 |
// Link to the latin layout |
|
88 |
TInt iEuroId; |
|
89 |
||
90 |
// Link to the APAC layout |
|
91 |
TInt iApacId; |
|
92 |
||
93 |
// Link to the A/H layout |
|
94 |
TInt iArabicHebrewId; |
|
95 |
}; |
|
96 |
||
97 |
public: // Constructors and destructor |
|
98 |
||
99 |
/** |
|
100 |
* Default constructor. |
|
101 |
*/ |
|
102 |
CVRRecViewModel(); |
|
103 |
||
104 |
/** |
|
105 |
* Destructor |
|
106 |
*/ |
|
107 |
~CVRRecViewModel(); |
|
108 |
||
109 |
/** |
|
110 |
* Constructs the model from a VR_STATEMACHINE resource. |
|
111 |
* @param aReader A resource reader object initialised to a resource. |
|
112 |
*/ |
|
113 |
void ConstructFromResourceL( TResourceReader& aReader ); |
|
114 |
||
115 |
public: // from MVRKeyObserver |
|
116 |
||
117 |
/** |
|
118 |
* This function is called when a subject wants to report a key event. |
|
119 |
* @param aKeyEvent The key event. |
|
120 |
* @param aType The type of key event: EEventKey, EEventKeyUp |
|
121 |
* or EEventKeyDown |
|
122 |
* @return Indicates whether or not the key event was used. |
|
123 |
*/ |
|
124 |
TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent, |
|
125 |
const TEventCode aType ); |
|
126 |
||
127 |
public: // from MVRDecoratorModel |
|
128 |
||
129 |
/** |
|
130 |
* Returns the resource id for current softkeys |
|
131 |
* @return Softkey resource identifier |
|
132 |
*/ |
|
133 |
TInt CbaResourceId() const; |
|
134 |
||
135 |
/** |
|
136 |
* Returns the resource id for current menu bar |
|
137 |
* @return Menu bar resource identifier. |
|
138 |
*/ |
|
139 |
TInt MenuBarResourceId() const; |
|
140 |
||
141 |
/** |
|
142 |
* Used to get the state of the volume control component. |
|
143 |
*/ |
|
144 |
void GetVolumeControlState( TVRVolumeControlState& aState, |
|
145 |
TInt& aVolume ); |
|
146 |
||
147 |
/** |
|
148 |
* Specifies the current help context. |
|
149 |
* @param aContext the context IDs are placed here |
|
150 |
*/ |
|
151 |
void GetHelpContext( TCoeHelpContext& aContext ) const; |
|
152 |
||
153 |
||
154 |
/** |
|
155 |
* Registers an observer for receiving |
|
156 |
* update notifications from this interface. |
|
157 |
* @param aObserver The observer object. |
|
158 |
*/ |
|
159 |
void SetDecoratorObserver( MVRObserver* aObserver ); |
|
160 |
||
161 |
/** |
|
162 |
* Tells in return value if CBA Buttons should be enabled or not |
|
163 |
* @return ETrue if buttons should be enabled, EFalse otherwise |
|
164 |
*/ |
|
165 |
TBool CBAEnabled() const; |
|
166 |
||
167 |
public: // from MVRButtonPanelModel |
|
168 |
||
169 |
/** |
|
170 |
* Returns the number of buttons. |
|
171 |
* @return number of buttons (>=0) |
|
172 |
*/ |
|
173 |
TInt ButtonCount() const; |
|
174 |
||
175 |
/** |
|
176 |
* Returns the state of a specific button. |
|
177 |
* @param aButtonId Button identifier |
|
178 |
* @return ENormal or EDimmed |
|
179 |
*/ |
|
180 |
TInt ButtonState( TInt aButtonId ) const; |
|
181 |
||
182 |
/** |
|
183 |
* Returns the command id of a specific button. |
|
184 |
* @param aButtonId Button identifier |
|
185 |
* @return One of TVRCommands |
|
186 |
*/ |
|
187 |
TInt CommandId( TInt aButtonId ) const; |
|
188 |
||
189 |
/** |
|
190 |
* Returns the id of the button that should have initial focus. |
|
191 |
* @return Button identifier |
|
192 |
*/ |
|
193 |
TInt InitialFocusButtonId() const; |
|
194 |
||
195 |
/** |
|
196 |
* Registers an observer for receiving |
|
197 |
* update notifications from this interface. |
|
198 |
* @param aObserver The observer object. |
|
199 |
*/ |
|
200 |
void SetButtonPanelObserver( MVRObserver* aObserver ); |
|
201 |
||
202 |
/** |
|
203 |
* Checks if button panel model needs to reset the focus |
|
204 |
* for example after a state change |
|
205 |
* @return Is reset needed |
|
206 |
*/ |
|
207 |
TBool ResetNeeded(); |
|
208 |
||
209 |
/** |
|
210 |
* Returns an ID of the current visual state. |
|
211 |
* @returns Visual state Id. |
|
212 |
*/ |
|
213 |
TUint VisualStateId() const; |
|
214 |
||
215 |
/** |
|
216 |
* Checks if there is a call incoming at the moment |
|
217 |
* @return ETrue if call incoming, EFalse otherwise |
|
218 |
*/ |
|
219 |
TBool IncomingCall() const; |
|
220 |
||
221 |
/** |
|
222 |
* Checks if model is in a state where it can take and handle |
|
223 |
* new commands |
|
224 |
* @return Can model handle new commands |
|
225 |
*/ |
|
226 |
TBool CanHandleCommands() const; |
|
227 |
||
228 |
public: // from MVRStateInfoModel |
|
229 |
||
230 |
/** |
|
231 |
* Returns the length of the current memo |
|
232 |
* @return The duration in microseconds. |
|
233 |
*/ |
|
234 |
TTimeIntervalMicroSeconds Duration() const; |
|
235 |
||
236 |
/** |
|
237 |
* Returns the playing or recording position of the current memo. |
|
238 |
* @return The position in microseconds. |
|
239 |
*/ |
|
240 |
TTimeIntervalMicroSeconds Position() const; |
|
241 |
||
242 |
/** |
|
243 |
* Returns the text content for a label. |
|
244 |
* @param aName Returned text is placed in this descriptor |
|
245 |
* @param aLabelIndex Label identifier (>=0) |
|
246 |
*/ |
|
247 |
void GetLabel( TDes& aName, TInt aLabelIndex ) const; |
|
248 |
||
249 |
/** |
|
250 |
* Returns the resource id for a label. |
|
251 |
* @param aLabelIndex Label identifier (>=0) |
|
252 |
* @return The resource id for the specified label |
|
253 |
*/ |
|
254 |
TInt ResourceIdForLabel( TInt aLabelIndex, TAknLayoutId aLayout ) const; |
|
255 |
||
256 |
/** |
|
257 |
* Registers an observer for receiving |
|
258 |
* update notifications from this interface. |
|
259 |
* @param aObserver The observer object. |
|
260 |
*/ |
|
261 |
void SetStateInfoObserver( MVRObserver* aObserver ); |
|
262 |
||
263 |
/** |
|
264 |
* Determines if model has a progress bar |
|
265 |
* @return ETrue, if model has a progress bar, otherwise EFalse |
|
266 |
*/ |
|
267 |
TBool HasProgressBar() const; |
|
268 |
||
269 |
/** |
|
270 |
* Determines if model has a volume control in this state |
|
271 |
* @return ETrue, if model has a volume control, otherwise EFalse |
|
272 |
*/ |
|
273 |
TBool HasVolumeControl() const; |
|
274 |
||
275 |
/** |
|
276 |
* Registers an observer to communicate about the changes in InfoPanel. |
|
277 |
* @param aObserver The observer object. |
|
278 |
*/ |
|
279 |
void SetStateInfoPanelObserver( MVRStateInfoObserver* aObserver ); |
|
280 |
||
281 |
public: // from MVRObserver |
|
282 |
||
283 |
/** |
|
284 |
* Called to notify a change in the observed subject's state. |
|
285 |
*/ |
|
286 |
void Update( TVRUpdateCommand aCommand ); |
|
287 |
||
288 |
public: // from MVRSelectionProvider |
|
289 |
||
290 |
/** |
|
291 |
* Returns the current memo name in an array |
|
292 |
* Ownership is transferred. Caller must destroy the returned array. |
|
293 |
* @return The array containing 0 or 1 names. |
|
294 |
*/ |
|
295 |
MDesCArray* GetSelectedFilesLC() const; |
|
296 |
||
297 |
public: // from MVRVolumeChangeObserver |
|
298 |
||
299 |
/** |
|
300 |
* Called to notify a change in volume settings. |
|
301 |
* @param aStep Volume level in steps |
|
302 |
* @param aMaxSteps How many steps there are (10 usually). |
|
303 |
*/ |
|
304 |
void SetVolume( TInt aStep, TInt aMaxSteps ); |
|
305 |
||
306 |
/*** |
|
307 |
* Indicates if volume can be set, because rinto tone |
|
308 |
* volume change has no effect if the tone is playing. |
|
309 |
*/ |
|
310 |
TBool CanSetVolume(); |
|
311 |
||
312 |
public: // CVRSystemEventObserver |
|
313 |
||
314 |
void HandleSystemEventL(); |
|
315 |
||
316 |
void HandleMMCEjectEventL(); |
|
317 |
||
318 |
public: // new methods |
|
319 |
||
320 |
/** |
|
321 |
* Handles a option menu / command button / softkey command. |
|
322 |
* @param aCommandId Command identifier, one of TVRCommands |
|
323 |
*/ |
|
324 |
void HandleCommandL( TInt aCommandId ); |
|
325 |
||
326 |
/** |
|
327 |
* Returns iInRecording flag |
|
328 |
* @return True or False |
|
329 |
*/ |
|
330 |
TBool GetInRecordingFlag(); |
|
331 |
||
332 |
/** |
|
333 |
* set iInRecording flag |
|
334 |
* |
|
335 |
*/ |
|
336 |
void SetInRecordingFlag(TBool); |
|
337 |
||
338 |
||
339 |
/** |
|
340 |
* Check if stop has been called before |
|
341 |
* @return True or False |
|
342 |
*/ |
|
343 |
TBool GetIfStopCalled(); |
|
344 |
||
345 |
||
346 |
/** |
|
347 |
* Enters a new state machine context. |
|
348 |
* Executes the initial state transition defined by the context. |
|
349 |
* @param aContext Identifies the new context. |
|
350 |
*/ |
|
351 |
void EnterContextL( const TVRRecViewContexts& aContext ); |
|
352 |
||
353 |
/** |
|
354 |
* Leaves the current state machine context. |
|
355 |
*/ |
|
356 |
void LeaveContext(); |
|
357 |
||
358 |
/** |
|
359 |
* Sets the memo name. Forwards the call to CVRMemo. |
|
360 |
* @param aFilename The new file name |
|
361 |
*/ |
|
362 |
void SetMemoName( const TDesC& aFilename ); |
|
363 |
||
364 |
/** |
|
365 |
* Sets the memo name to a new, unique, one. |
|
366 |
* Forwards the call to CVRMemo. |
|
367 |
*/ |
|
368 |
void SetMemoNameNewL( TBool aEmbedded = EFalse ); |
|
369 |
||
370 |
/** |
|
371 |
* Sets the path to directory where memos will be saved. |
|
372 |
* Forwards the call to CVRMemo. |
|
373 |
*/ |
|
374 |
void SetSavingLocationL( const TDesC& aPath ); |
|
375 |
||
376 |
/** |
|
377 |
* Returns the complete file name (path and everything). |
|
378 |
* @return Reference to the memo name. |
|
379 |
*/ |
|
380 |
const TDesC& Filename() const; |
|
381 |
||
382 |
/** |
|
383 |
* Returns embedding status. |
|
384 |
* @param ETrue if the current context is an embedded one. |
|
385 |
*/ |
|
386 |
TBool IsEmbedded() const; |
|
387 |
||
388 |
/** |
|
389 |
* Indicates if we are in a state that can accept |
|
390 |
* more commands (i.e. all async calls have completed). |
|
391 |
* @return ETrue if it's ok to proceed calling methods. |
|
392 |
*/ |
|
393 |
TBool CanAcceptCommands() const; |
|
394 |
||
395 |
/** |
|
396 |
* Sends the current memo via MMS/Infra/Bluetooth/Email |
|
397 |
* @param aSendUi The CSendUi object used for sending |
|
398 |
*/ |
|
399 |
void SendViaL( CSendUi* aSendUi ); |
|
400 |
||
401 |
/** |
|
402 |
* Activates the recorder view model |
|
403 |
*/ |
|
404 |
void ActivateL(); |
|
405 |
||
406 |
/** |
|
407 |
* Deactivates the recorder view model |
|
408 |
*/ |
|
409 |
void Deactivate(); |
|
410 |
||
411 |
/** |
|
412 |
* Sets the file handle to record into |
|
413 |
*/ |
|
414 |
void SetFileHandle( RFile& aFile ); |
|
415 |
||
416 |
/** |
|
417 |
* Returns the active file handle of CVRMemo object |
|
418 |
*/ |
|
419 |
RFile& MemoFileHandle(); |
|
420 |
||
421 |
/** |
|
422 |
* Enables or disables the Volume Control drawing in current |
|
423 |
* visual state |
|
424 |
* @param aVolumeControl ETrue if Volume Control should be enabled |
|
425 |
* EFalse if disabled |
|
426 |
*/ |
|
427 |
void EnableVolumeControl( TBool aVolumeControl ); |
|
428 |
||
429 |
/** |
|
430 |
* Returns the active quality setting. |
|
431 |
* @return Quality setting of the active memo |
|
432 |
*/ |
|
433 |
TVRQuality Quality() const; |
|
434 |
||
29
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
435 |
|
25 | 436 |
private: // new methods |
437 |
||
438 |
/** |
|
439 |
* Enters a new state. |
|
440 |
* Executes a function identified by the state transition. |
|
441 |
* Notifies all registered observers. |
|
442 |
* @param aNewState identifies the new state. |
|
443 |
* @param aForce force change state (even if new is same as old) |
|
444 |
*/ |
|
445 |
void ChangeState( TUint aNewState, TBool aForced = EFalse ); |
|
446 |
||
447 |
/** |
|
448 |
* Retrieves transition information to the given transition object. |
|
449 |
* @param aTransition Transition to be filled in. |
|
450 |
* @param aCommandId The command that triggered this transition. |
|
451 |
*/ |
|
452 |
void GetTransition( TVRContext::TTransition& aTransition, |
|
453 |
TUint aCommandId ) const; |
|
454 |
||
455 |
/** |
|
456 |
* Retrieves transition information to the given transition object. |
|
457 |
* This is used the retrieve the initial transition of a state. |
|
458 |
* @param aTransition Transition to be filled in. |
|
459 |
*/ |
|
460 |
void GetTransition( TVRContext::TTransition& aTransition ) const; |
|
461 |
||
462 |
/** |
|
463 |
* Calls the specified function. |
|
464 |
* @param aFunctionId Function identifier (TVRFunctions) |
|
465 |
* @return EFalse if the function want's to cancel the state change |
|
466 |
*/ |
|
467 |
TBool CallFunctionByIdL( TInt aFunctionId ); |
|
468 |
||
469 |
/** |
|
470 |
* Returns the text content for a label. |
|
471 |
* This is a leaving variant of GetLabel(). It is called by |
|
472 |
* GetLabel() inside a TRAP. |
|
473 |
* @param aName Returned text is placed in this descriptor |
|
474 |
* @param aLabelIndex Label identifier (>=0) |
|
475 |
*/ |
|
476 |
void GetLabelL( TDes& aName, TInt aLabelIndex ) const; |
|
477 |
||
478 |
/** |
|
479 |
* Stops recording and saves the memo. |
|
480 |
* The specified note text is displayed while saving. |
|
481 |
* @param aResourceId Identifies the note text. |
|
482 |
*/ |
|
483 |
void StopAndSaveL( TInt aResourceId ); |
|
484 |
||
485 |
/** |
|
486 |
* Stops recording and saves the memo. |
|
487 |
* The specified note text is displayed while saving. |
|
488 |
* Leaves the memo detached so that application can be closed. |
|
489 |
* @param aResourceId Identifies the note text. |
|
490 |
*/ |
|
491 |
void StopAndCloseL( TInt aResourceId ); |
|
492 |
||
493 |
/** |
|
494 |
* Shows a global note. |
|
495 |
* @param aResourceId Identifies the note text. |
|
496 |
* @param aNoteType Identifies the note type. |
|
497 |
*/ |
|
498 |
void ShowNoteL( TInt aResourceId, TAknGlobalNoteType aNoteType ); |
|
499 |
||
500 |
/** |
|
501 |
* Loads the volume settings (IHF & ear piece) from VoiceRecorder.ini |
|
502 |
*/ |
|
503 |
void LoadVolumeSettingsL(); |
|
504 |
||
505 |
/** |
|
506 |
* Saves the volume settings (IHF & ear piece) to VoiceRecorder.ini |
|
507 |
* Note: This method is non-leaving and ignores all errors, because |
|
508 |
* it's called inside the destructor. LoadVolumeSettingsL() has |
|
509 |
* sanity checking so the situation isn't fatal if the saving fails. |
|
510 |
*/ |
|
511 |
void SaveVolumeSettings(); |
|
512 |
||
513 |
/** |
|
514 |
* Sets IHF on/off, if the phone is not in voice on alerting state |
|
515 |
* @param aIhf ETrue == set IHF on, EFalse == set IHF off |
|
516 |
*/ |
|
517 |
void SetIHFIfCallNotActive( TBool aIhf ); |
|
518 |
||
519 |
/* |
|
520 |
* Checks if the current default speaker is loudspeaker or earpiece |
|
521 |
*/ |
|
522 |
void CheckIhfState(); |
|
523 |
||
524 |
/** |
|
525 |
* Sets the volume on the media server client object according |
|
526 |
* to the current active IHF setting. |
|
527 |
*/ |
|
528 |
void SetRecorderVolume(); |
|
529 |
||
530 |
/** |
|
531 |
* Reads the default speaker setting and sets iIhfState accordingly |
|
532 |
*/ |
|
533 |
void ReadDefaultSpeakerL(); |
|
534 |
||
535 |
/* |
|
536 |
* Handles error in Update method. |
|
537 |
* @param aErr Id of the error |
|
538 |
*/ |
|
539 |
void HandleUpdateErrorL( TInt aErr ); |
|
540 |
||
541 |
/* |
|
542 |
* Formats time to R_QTN_TIME_DURAT_LONG or |
|
543 |
* R_QTN_TIME_DURAT_MIN_SEC_WITH_ZERO depending of time value |
|
544 |
* @param aTime Time that is formatted |
|
545 |
* @param aString Buffer that holds the formatted time |
|
546 |
*/ |
|
547 |
void FormatTimeL( const TTime& aTime, TDes& aString ) const; |
|
548 |
||
549 |
/* |
|
550 |
* Generates an array of services that should be dimmed from the |
|
551 |
* options menu "Send" selection list |
|
552 |
* @return A pointer to an array that consists of the service Uids |
|
553 |
* that should be dimmed |
|
554 |
*/ |
|
555 |
CArrayFixFlat<TUid>* SendViaServicesToDimLC(); |
|
556 |
||
557 |
private: // data |
|
558 |
||
559 |
/** |
|
560 |
* The state machine structure. |
|
561 |
*/ |
|
562 |
TVRContext iContexts[ ENumContexts ]; |
|
563 |
||
564 |
/** |
|
565 |
* The current context. |
|
566 |
*/ |
|
567 |
TVRRecViewContexts iContext; |
|
568 |
||
569 |
/** |
|
570 |
* Pointer to the current state. Contained in iContexts. |
|
571 |
*/ |
|
572 |
TVRState* iState; |
|
573 |
||
574 |
/** |
|
575 |
* Pointer to the voice memo object. Owned |
|
576 |
*/ |
|
577 |
CVRMemo* iMemo; |
|
578 |
||
579 |
/** |
|
580 |
* Pointer to the recorder object. Owned |
|
581 |
*/ |
|
582 |
MVRMdaRecorder* iRecorder; |
|
583 |
||
584 |
/** |
|
585 |
* Pointer to a global information note object. Owned |
|
586 |
*/ |
|
587 |
CAknGlobalNote* iGlobalNote; |
|
588 |
||
589 |
/** |
|
590 |
* Pointer to an array of UI states. Owned |
|
591 |
*/ |
|
592 |
CArrayFixSeg< TVRState > iStateArray; |
|
593 |
||
594 |
/** |
|
595 |
* Pointer to an array of label sets. Owned. |
|
596 |
*/ |
|
597 |
CArrayPtrSeg< CDesCArray > iLabelSets; |
|
598 |
||
599 |
/** |
|
600 |
* Pointer to an array of label resource ids. Owned. |
|
601 |
*/ |
|
602 |
TVRLabelLayoutLink* iLabelLayoutLinks; |
|
603 |
||
604 |
/** |
|
605 |
* Pointer to the button panel observer. Not owned. |
|
606 |
*/ |
|
607 |
MVRObserver* iButtonPanelObserver; |
|
608 |
||
609 |
/** |
|
610 |
* Pointer to the decorator observer. Not owned. |
|
611 |
*/ |
|
612 |
MVRObserver* iDecoratorObserver; |
|
613 |
||
614 |
/** |
|
615 |
* Pointer to the state info observer. Not owned. |
|
616 |
*/ |
|
617 |
MVRObserver* iStateInfoObserver; |
|
618 |
||
619 |
/** |
|
620 |
* Format string placeholder. |
|
621 |
* R_QTN_DATE_USUAL_WITH_ZERO is loaded to it in construction. |
|
622 |
*/ |
|
623 |
TBuf< VRLABELMAXLENGTH > iDateUsualWithZero; |
|
624 |
||
625 |
/** |
|
626 |
* Format string placeholder. |
|
627 |
* R_QTN_TIME_USUAL_WITH_ZERO is loaded to it in construction. |
|
628 |
*/ |
|
629 |
TBuf< VRLABELMAXLENGTH > iTimeUsualWithZero; |
|
630 |
||
631 |
/** |
|
632 |
* Format string placeholder. |
|
633 |
* R_QTN_TIME_DURAT_MIN_SEC_WITH_ZERO is loaded to it in construction. |
|
634 |
*/ |
|
635 |
TBuf< VRLABELMAXLENGTH > iTimeDuratMinSecWithZero; |
|
636 |
||
637 |
/** |
|
638 |
* Format string placeholder. |
|
639 |
* R_QTN_TIME_DURAT_LONG is loaded to it in construction. |
|
640 |
*/ |
|
641 |
TBuf< VRLABELMAXLENGTH > iTimeDuratLong; |
|
642 |
||
643 |
/** |
|
644 |
* ETrue if the model has succesfully entered a context. |
|
645 |
*/ |
|
646 |
TBool iContextEntered; |
|
647 |
||
648 |
/** |
|
649 |
* For listening call events. Owned. |
|
650 |
*/ |
|
651 |
CVRSystemEventHandler* iCurrentCallHandler; |
|
652 |
||
653 |
CVRMediaRemovalMonitor* iCurrentMMCEjectHandler; |
|
654 |
||
655 |
||
656 |
/** |
|
657 |
* Current logical state (i.e. what the user sees, not the actual |
|
658 |
* state of the HW) of the IHF |
|
659 |
*/ |
|
660 |
TBool iIhfState; |
|
661 |
||
662 |
/** |
|
663 |
* Prefered volume of the IHF |
|
664 |
*/ |
|
665 |
TInt iIhfVolume; |
|
666 |
||
667 |
/** |
|
668 |
* Used to tell the IHF change event listener, that the next IHF |
|
669 |
* change is not made with voice key and is to be ignored |
|
670 |
*/ |
|
671 |
TBool iIgnoreNextIhfChange; |
|
672 |
||
673 |
/** |
|
674 |
* Indicates if the view is actually active, so that the model |
|
675 |
* knows when to ignore IHF change events |
|
676 |
*/ |
|
677 |
TBool iActive; |
|
678 |
||
679 |
/** |
|
680 |
* Default speaker when playing |
|
681 |
*/ |
|
682 |
TVRSpeaker iDefaultSpeaker; |
|
683 |
||
684 |
/** |
|
685 |
* Indicates if End key is pressed so view deactivation can trigger |
|
686 |
* right operation ( paused memo is saved as well ) |
|
687 |
*/ |
|
688 |
TBool iIsEndKey; |
|
689 |
||
690 |
/* |
|
691 |
* Id for canceling waitnote |
|
692 |
*/ |
|
693 |
TInt iNoteId; |
|
694 |
||
695 |
/* |
|
696 |
* |
|
697 |
*/ |
|
698 |
TBool iIsNoteLaunched; |
|
699 |
||
700 |
/** |
|
701 |
* Default audio format for recording audio clip |
|
702 |
*/ |
|
703 |
TInt iVRAudioFormat; |
|
704 |
||
705 |
/** |
|
706 |
* Allow In-call recording functionality |
|
707 |
*/ |
|
708 |
TInt iVRAllowInCallRecording; |
|
709 |
||
710 |
||
711 |
/** |
|
712 |
* The call state retrieved on previous notification |
|
713 |
*/ |
|
714 |
TInt iPreviousCallState; |
|
715 |
||
716 |
/** |
|
717 |
* Should the button panel reset itself on update |
|
718 |
*/ |
|
719 |
TBool iResetButtons; |
|
720 |
||
721 |
/** |
|
722 |
* If model can handle commands. i.e. no critical command handling |
|
723 |
* just ongoing, e.g. waiting start tone play before starting |
|
724 |
* recording |
|
725 |
*/ |
|
726 |
TBool iCanHandleCommands; |
|
727 |
||
728 |
/** |
|
729 |
* Pointer to the state info panel observer. Not owned. |
|
730 |
*/ |
|
731 |
MVRStateInfoObserver* iStateInfoPanelObserver; |
|
732 |
||
733 |
/** |
|
734 |
* State of the CBA buttons. If EFalse LSK/RSK deliver ECmdNOP which |
|
735 |
* causes no action. |
|
736 |
*/ |
|
737 |
TBool iCBAEnabled; |
|
738 |
}; |
|
739 |
||
740 |
#endif // __CVRRECVIEWMODEL_H__ |