|
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 VUICVERIFICATIONTRAININGSTATE_H |
|
20 #define VUICVERIFICATIONTRAININGSTATE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "vuicstate.h" |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CNssVASDBMgr; |
|
27 class MNssTagMgr; |
|
28 class MNssContextMgr; |
|
29 class MNssTag; |
|
30 class CNssTrainingParameters; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 /** |
|
34 * COMMENT |
|
35 */ |
|
36 NONSHARABLE_CLASS( CVerificationTrainingState ) : public CState |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * Symbian two-phased constructor. |
|
42 */ |
|
43 static CVerificationTrainingState* NewL( CDataStorage& aDataStorage, CUiModel& aUiModel ); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~CVerificationTrainingState(); |
|
49 |
|
50 public: // New functions |
|
51 |
|
52 /** |
|
53 * Handles received event |
|
54 * @param Event to be handled |
|
55 */ |
|
56 virtual void HandleEventL( TInt aEvent ); |
|
57 |
|
58 /** |
|
59 * Executes the state functionality |
|
60 */ |
|
61 virtual void ExecuteL(); |
|
62 |
|
63 protected: // New functions |
|
64 |
|
65 /** |
|
66 * C++ default constructor. |
|
67 */ |
|
68 CVerificationTrainingState( CDataStorage& aDataStorage, CUiModel& aUiModel ); |
|
69 |
|
70 /** |
|
71 * Symbian OS 2nd phase constructor. |
|
72 */ |
|
73 virtual void ConstructL(); |
|
74 |
|
75 private: // Functions |
|
76 |
|
77 /** |
|
78 * Creates voice tags for verification commands |
|
79 */ |
|
80 void CreateTagsL(); |
|
81 |
|
82 /** |
|
83 * Constructs command training parameters |
|
84 */ |
|
85 void ConstructTrainingParametersL(); |
|
86 |
|
87 /** |
|
88 * Trains verification commands voice tags |
|
89 */ |
|
90 void TrainTagsL(); |
|
91 |
|
92 /** |
|
93 * Saves verification commands voice tags |
|
94 */ |
|
95 void SaveTagsL(); |
|
96 |
|
97 /** |
|
98 * Saves current UI language |
|
99 */ |
|
100 void SaveLanguage(); |
|
101 |
|
102 private: // Data |
|
103 |
|
104 enum TInternalState |
|
105 { |
|
106 ENotStarted, |
|
107 EStarted, |
|
108 EContextDeleted, |
|
109 EContextReady, |
|
110 ECommandsTrained, |
|
111 ECommandsSaved |
|
112 }; |
|
113 |
|
114 // Vas stuff for handling context operations |
|
115 CNssVASDBMgr* iVasDbManager; |
|
116 MNssTagMgr* iTagManager; |
|
117 MNssContextMgr* iContextManager; |
|
118 |
|
119 // Training parameters |
|
120 CNssTrainingParameters* iTrainingParameters; |
|
121 |
|
122 // For handling internal state logics |
|
123 TInternalState iInternalState; |
|
124 |
|
125 // Created voice tags |
|
126 RPointerArray<MNssTag>* iTags; |
|
127 |
|
128 // Number of expected callbacks |
|
129 TInt iExpectedCallbacks; |
|
130 }; |
|
131 |
|
132 #endif // VUICVERIFICATIONTRAININGSTATE_H |
|
133 |
|
134 // End of File |