|
1 /* |
|
2 * Copyright (c) 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 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef VUICVERIFICATIONSTATE_H |
|
20 #define VUICVERIFICATIONSTATE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "vuicstate.h" |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 |
|
27 class CVerificationDialog; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 /** |
|
31 * COMMENT |
|
32 */ |
|
33 NONSHARABLE_CLASS( CVerificationState ) : public CState |
|
34 { |
|
35 public: // Constructors and destructor |
|
36 |
|
37 /** |
|
38 * Symbian two-phased constructor. |
|
39 */ |
|
40 static CVerificationState* NewL( CDataStorage& aDataStorage, CUiModel& aUiModel ); |
|
41 |
|
42 /** |
|
43 * Destructor. |
|
44 */ |
|
45 virtual ~CVerificationState(); |
|
46 |
|
47 public: // New functions |
|
48 |
|
49 /** |
|
50 * Handles received event |
|
51 * @param Event to be handled |
|
52 */ |
|
53 virtual void HandleEventL( TInt aEvent ); |
|
54 |
|
55 /** |
|
56 * Executes the state functionality |
|
57 */ |
|
58 virtual void ExecuteL(); |
|
59 |
|
60 protected: // New functions |
|
61 |
|
62 /** |
|
63 * C++ default constructor. |
|
64 */ |
|
65 CVerificationState( CDataStorage& aDataStorage, CUiModel& aUiModel ); |
|
66 |
|
67 /** |
|
68 * Symbian OS 2nd phase constructor. |
|
69 */ |
|
70 virtual void ConstructL(); |
|
71 |
|
72 private: // Functions |
|
73 |
|
74 /** |
|
75 * Handles keypress event |
|
76 * @return ETrue if event was handled else EFalse |
|
77 */ |
|
78 TBool HandleKeypressL(); |
|
79 |
|
80 /** |
|
81 * Plays prompt with name from recognition results with TTS |
|
82 */ |
|
83 void PlayPromptL(); |
|
84 |
|
85 /** |
|
86 * Selects first tag from recognition results |
|
87 */ |
|
88 void SelectTag(); |
|
89 |
|
90 /** |
|
91 * Selects command by position id |
|
92 * @return Command id or KErrGeneral |
|
93 */ |
|
94 TInt SelectCommandById(); |
|
95 |
|
96 private: // Data |
|
97 |
|
98 enum TInternalState |
|
99 { |
|
100 ENotStarted, |
|
101 EStarted, |
|
102 ETtsInitialized, |
|
103 ETtsCompleted, |
|
104 EStartCompleted, |
|
105 ERecordStarted, |
|
106 ERecordEnded, |
|
107 ECompleted |
|
108 }; |
|
109 |
|
110 // Verification dialog |
|
111 CVerificationDialog* iVerificationDialog; |
|
112 |
|
113 // Stores a keypress event from HandleEventL |
|
114 TInt iKeypress; |
|
115 |
|
116 // For handling internal state logics |
|
117 TInternalState iInternalState; |
|
118 |
|
119 // Tag index |
|
120 TInt iTagIndex; |
|
121 }; |
|
122 |
|
123 #endif // VUICVERIFICATIONSTATE_H |
|
124 |
|
125 // End of File |