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 "MVRUSBEventObserver.h" |
|
42 |
|
43 #include "TVRContext.h" |
|
44 #include "voicerecorder.hrh" |
|
45 |
|
46 #include "MVRStateInfoObserver.h" |
|
47 |
|
48 // FORWARD DECLARATIONS |
|
49 class CAknGlobalNote; |
|
50 class CSendUi; |
|
51 class MVRMdaRecorder; |
|
52 class CVRMemo; |
|
53 class MVRObserver; |
|
54 class TResourceReader; |
|
55 class TVRState; |
|
56 class CVRSystemEventHandler; |
|
57 class CVRUSBEventHandler; |
|
58 |
|
59 |
|
60 // CLASS DEFINITION |
|
61 /** |
|
62 * This class is the data model and state machine of the Recorder View. |
|
63 * The state machine is defined by a VR_STATEMACHINE resource structure. |
|
64 */ |
|
65 NONSHARABLE_CLASS( CVRRecViewModel ): |
|
66 public CBase, |
|
67 public MVRDecoratorModel, public MVRButtonPanelModel, |
|
68 public MVRStateInfoModel, public MVRObserver, |
|
69 public MVRKeyObserver, public MVRVolumeChangeObserver, |
|
70 public MVRSystemEventObserver, |
|
71 public MVRUSBEventObserver |
|
72 { |
|
73 private: // nested classes |
|
74 |
|
75 class TVRLabelLayoutLink |
|
76 { |
|
77 public: |
|
78 /** |
|
79 * Constructs this object from a VR_LABEL_LINK resource |
|
80 * @param aReader A resource reader object initialised |
|
81 * to a resource. |
|
82 */ |
|
83 void ReadFromResource( TResourceReader& aReader ); |
|
84 public: |
|
85 |
|
86 // Link to the latin layout |
|
87 TInt iEuroId; |
|
88 |
|
89 // Link to the APAC layout |
|
90 TInt iApacId; |
|
91 |
|
92 // Link to the A/H layout |
|
93 TInt iArabicHebrewId; |
|
94 }; |
|
95 |
|
96 public: // Constructors and destructor |
|
97 |
|
98 /** |
|
99 * Default constructor. |
|
100 */ |
|
101 CVRRecViewModel(); |
|
102 |
|
103 /** |
|
104 * Destructor |
|
105 */ |
|
106 ~CVRRecViewModel(); |
|
107 |
|
108 /** |
|
109 * Constructs the model from a VR_STATEMACHINE resource. |
|
110 * @param aReader A resource reader object initialised to a resource. |
|
111 */ |
|
112 void ConstructFromResourceL( TResourceReader& aReader ); |
|
113 |
|
114 public: // from MVRKeyObserver |
|
115 |
|
116 /** |
|
117 * This function is called when a subject wants to report a key event. |
|
118 * @param aKeyEvent The key event. |
|
119 * @param aType The type of key event: EEventKey, EEventKeyUp |
|
120 * or EEventKeyDown |
|
121 * @return Indicates whether or not the key event was used. |
|
122 */ |
|
123 TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent, |
|
124 const TEventCode aType ); |
|
125 |
|
126 public: // from MVRDecoratorModel |
|
127 |
|
128 /** |
|
129 * Returns the resource id for current softkeys |
|
130 * @return Softkey resource identifier |
|
131 */ |
|
132 TInt CbaResourceId() const; |
|
133 |
|
134 /** |
|
135 * Returns the resource id for current menu bar |
|
136 * @return Menu bar resource identifier. |
|
137 */ |
|
138 TInt MenuBarResourceId() const; |
|
139 |
|
140 /** |
|
141 * Used to get the state of the volume control component. |
|
142 */ |
|
143 void GetVolumeControlState( TVRVolumeControlState& aState, |
|
144 TInt& aVolume ); |
|
145 |
|
146 /** |
|
147 * Specifies the current help context. |
|
148 * @param aContext the context IDs are placed here |
|
149 */ |
|
150 void GetHelpContext( TCoeHelpContext& aContext ) const; |
|
151 |
|
152 |
|
153 /** |
|
154 * Registers an observer for receiving |
|
155 * update notifications from this interface. |
|
156 * @param aObserver The observer object. |
|
157 */ |
|
158 void SetDecoratorObserver( MVRObserver* aObserver ); |
|
159 |
|
160 /** |
|
161 * Tells in return value if CBA Buttons should be enabled or not |
|
162 * @return ETrue if buttons should be enabled, EFalse otherwise |
|
163 */ |
|
164 TBool CBAEnabled() const; |
|
165 |
|
166 public: // from MVRButtonPanelModel |
|
167 |
|
168 /** |
|
169 * Returns the number of buttons. |
|
170 * @return number of buttons (>=0) |
|
171 */ |
|
172 TInt ButtonCount() const; |
|
173 |
|
174 /** |
|
175 * Returns the state of a specific button. |
|
176 * @param aButtonId Button identifier |
|
177 * @return ENormal or EDimmed |
|
178 */ |
|
179 TInt ButtonState( TInt aButtonId ) const; |
|
180 |
|
181 /** |
|
182 * Returns the command id of a specific button. |
|
183 * @param aButtonId Button identifier |
|
184 * @return One of TVRCommands |
|
185 */ |
|
186 TInt CommandId( TInt aButtonId ) const; |
|
187 |
|
188 /** |
|
189 * Returns the id of the button that should have initial focus. |
|
190 * @return Button identifier |
|
191 */ |
|
192 TInt InitialFocusButtonId() const; |
|
193 |
|
194 /** |
|
195 * Registers an observer for receiving |
|
196 * update notifications from this interface. |
|
197 * @param aObserver The observer object. |
|
198 */ |
|
199 void SetButtonPanelObserver( MVRObserver* aObserver ); |
|
200 |
|
201 /** |
|
202 * Checks if button panel model needs to reset the focus |
|
203 * for example after a state change |
|
204 * @return Is reset needed |
|
205 */ |
|
206 TBool ResetNeeded(); |
|
207 |
|
208 /** |
|
209 * Returns an ID of the current visual state. |
|
210 * @returns Visual state Id. |
|
211 */ |
|
212 TUint VisualStateId() const; |
|
213 |
|
214 /** |
|
215 * Checks if there is a call incoming at the moment |
|
216 * @return ETrue if call incoming, EFalse otherwise |
|
217 */ |
|
218 TBool IncomingCall() const; |
|
219 |
|
220 /** |
|
221 * Checks if model is in a state where it can take and handle |
|
222 * new commands |
|
223 * @return Can model handle new commands |
|
224 */ |
|
225 TBool CanHandleCommands() const; |
|
226 |
|
227 public: // from MVRStateInfoModel |
|
228 |
|
229 /** |
|
230 * Returns the length of the current memo |
|
231 * @return The duration in microseconds. |
|
232 */ |
|
233 TTimeIntervalMicroSeconds Duration() const; |
|
234 |
|
235 /** |
|
236 * Returns the playing or recording position of the current memo. |
|
237 * @return The position in microseconds. |
|
238 */ |
|
239 TTimeIntervalMicroSeconds Position() const; |
|
240 |
|
241 /** |
|
242 * Returns the text content for a label. |
|
243 * @param aName Returned text is placed in this descriptor |
|
244 * @param aLabelIndex Label identifier (>=0) |
|
245 */ |
|
246 void GetLabel( TDes& aName, TInt aLabelIndex ) const; |
|
247 |
|
248 /** |
|
249 * Returns the resource id for a label. |
|
250 * @param aLabelIndex Label identifier (>=0) |
|
251 * @return The resource id for the specified label |
|
252 */ |
|
253 TInt ResourceIdForLabel( TInt aLabelIndex, TAknLayoutId aLayout ) const; |
|
254 |
|
255 /** |
|
256 * Registers an observer for receiving |
|
257 * update notifications from this interface. |
|
258 * @param aObserver The observer object. |
|
259 */ |
|
260 void SetStateInfoObserver( MVRObserver* aObserver ); |
|
261 |
|
262 /** |
|
263 * Determines if model has a progress bar |
|
264 * @return ETrue, if model has a progress bar, otherwise EFalse |
|
265 */ |
|
266 TBool HasProgressBar() const; |
|
267 |
|
268 /** |
|
269 * Determines if model has a volume control in this state |
|
270 * @return ETrue, if model has a volume control, otherwise EFalse |
|
271 */ |
|
272 TBool HasVolumeControl() const; |
|
273 |
|
274 /** |
|
275 * Registers an observer to communicate about the changes in InfoPanel. |
|
276 * @param aObserver The observer object. |
|
277 */ |
|
278 void SetStateInfoPanelObserver( MVRStateInfoObserver* aObserver ); |
|
279 |
|
280 public: // from MVRObserver |
|
281 |
|
282 /** |
|
283 * Called to notify a change in the observed subject's state. |
|
284 */ |
|
285 void Update( TVRUpdateCommand aCommand ); |
|
286 |
|
287 public: // from MVRSelectionProvider |
|
288 |
|
289 /** |
|
290 * Returns the current memo name in an array |
|
291 * Ownership is transferred. Caller must destroy the returned array. |
|
292 * @return The array containing 0 or 1 names. |
|
293 */ |
|
294 MDesCArray* GetSelectedFilesLC() const; |
|
295 |
|
296 public: // from MVRVolumeChangeObserver |
|
297 |
|
298 /** |
|
299 * Called to notify a change in volume settings. |
|
300 * @param aStep Volume level in steps |
|
301 * @param aMaxSteps How many steps there are (10 usually). |
|
302 */ |
|
303 void SetVolume( TInt aStep, TInt aMaxSteps ); |
|
304 |
|
305 /*** |
|
306 * Indicates if volume can be set, because rinto tone |
|
307 * volume change has no effect if the tone is playing. |
|
308 */ |
|
309 TBool CanSetVolume(); |
|
310 |
|
311 public: // CVRSystemEventObserver |
|
312 |
|
313 void HandleSystemEventL(); |
|
314 |
|
315 |
|
316 void HandleUSBEventL(); |
|
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 |
|
435 |
|
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 /** |
|
654 * For listening USB events. Owned. |
|
655 */ |
|
656 CVRUSBEventHandler* iCurrentUSBHandler; |
|
657 |
|
658 |
|
659 /** |
|
660 * Current logical state (i.e. what the user sees, not the actual |
|
661 * state of the HW) of the IHF |
|
662 */ |
|
663 TBool iIhfState; |
|
664 |
|
665 /** |
|
666 * Prefered volume of the IHF |
|
667 */ |
|
668 TInt iIhfVolume; |
|
669 |
|
670 /** |
|
671 * Used to tell the IHF change event listener, that the next IHF |
|
672 * change is not made with voice key and is to be ignored |
|
673 */ |
|
674 TBool iIgnoreNextIhfChange; |
|
675 |
|
676 /** |
|
677 * Indicates if the view is actually active, so that the model |
|
678 * knows when to ignore IHF change events |
|
679 */ |
|
680 TBool iActive; |
|
681 |
|
682 /** |
|
683 * Default speaker when playing |
|
684 */ |
|
685 TVRSpeaker iDefaultSpeaker; |
|
686 |
|
687 /** |
|
688 * Indicates if End key is pressed so view deactivation can trigger |
|
689 * right operation ( paused memo is saved as well ) |
|
690 */ |
|
691 TBool iIsEndKey; |
|
692 |
|
693 /* |
|
694 * Id for canceling waitnote |
|
695 */ |
|
696 TInt iNoteId; |
|
697 |
|
698 /* |
|
699 * |
|
700 */ |
|
701 TBool iIsNoteLaunched; |
|
702 |
|
703 /** |
|
704 * Default audio format for recording audio clip |
|
705 */ |
|
706 TInt iVRAudioFormat; |
|
707 |
|
708 /** |
|
709 * Allow In-call recording functionality |
|
710 */ |
|
711 TInt iVRAllowInCallRecording; |
|
712 |
|
713 |
|
714 /** |
|
715 * The call state retrieved on previous notification |
|
716 */ |
|
717 TInt iPreviousCallState; |
|
718 |
|
719 /** |
|
720 * Should the button panel reset itself on update |
|
721 */ |
|
722 TBool iResetButtons; |
|
723 |
|
724 /** |
|
725 * If model can handle commands. i.e. no critical command handling |
|
726 * just ongoing, e.g. waiting start tone play before starting |
|
727 * recording |
|
728 */ |
|
729 TBool iCanHandleCommands; |
|
730 |
|
731 /** |
|
732 * Pointer to the state info panel observer. Not owned. |
|
733 */ |
|
734 MVRStateInfoObserver* iStateInfoPanelObserver; |
|
735 |
|
736 /** |
|
737 * State of the CBA buttons. If EFalse LSK/RSK deliver ECmdNOP which |
|
738 * causes no action. |
|
739 */ |
|
740 TBool iCBAEnabled; |
|
741 }; |
|
742 |
|
743 #endif // __CVRRECVIEWMODEL_H__ |
|