|
1 /* |
|
2 * Copyright (c) 2004-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: The TNssVasCoreConstant provides constant values used by the VAS. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NSSVASCORECONSTANT_H |
|
20 #define NSSVASCORECONSTANT_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <e32property.h> |
|
25 |
|
26 |
|
27 // CONSTANTS |
|
28 // default DB value for new item |
|
29 const TInt KNssVASDbDefaultValue = -1; |
|
30 |
|
31 // this value is used for recording time [micro second] |
|
32 const TInt KNssVASRecordTime = 5000000; //4000000; |
|
33 |
|
34 // this value is used for Vas API's UID |
|
35 const TUid KNssVASApiUid = { 0x101F853F }; |
|
36 |
|
37 _LIT( KVasDatabaseName, "c:nssvasdatabase.db"); |
|
38 _LIT( KVasDatabaseFormatString, "SECURE[10201AFE]"); |
|
39 static const TInt KVasDatabaseDrive = 'C'; |
|
40 |
|
41 |
|
42 // Char used to separate firstname-lastname |
|
43 // Note that first and only first symbol is used. |
|
44 // Do not make it empty (""), it will cause run-time error in |
|
45 // CNssContactHandlerImplementation |
|
46 _LIT ( KNameSeparator, "_" ); |
|
47 |
|
48 |
|
49 // Indexes for extension training |
|
50 _LIT( KNameTrainingIndex, "1" ); |
|
51 _LIT( KExtensionTrainingIndex, "2" ); |
|
52 |
|
53 // Number of characters required by escape character (separator) and index |
|
54 const TInt KTrainingIndexSize = 2; |
|
55 |
|
56 // Format string which is substituted with name |
|
57 _LIT( KExtensionFormatString, "%U" ); |
|
58 |
|
59 |
|
60 // Indexes of RRD data |
|
61 // Contact ID |
|
62 const TInt KVasContactIdRrdLocation = 0; |
|
63 // Field ID |
|
64 const TInt KVasFieldIdRrdLocation = 1; |
|
65 // Type of the extension command (SINDE action) |
|
66 const TInt KVasExtensionRrdLocation = 2; |
|
67 // Type of the voice tag (see TVasTagType) |
|
68 const TInt KVasTagTypeRrdLocation = 3; |
|
69 // Extension command id |
|
70 const TInt KVasExtensionCommandRrdLocation = 4; |
|
71 |
|
72 // SINDE command |
|
73 enum TVasExtensionCommand |
|
74 { |
|
75 EDefaultCommand, |
|
76 EMobileCommand, |
|
77 EGeneralCommand, |
|
78 EWorkCommand, |
|
79 EHomeCommand, |
|
80 EEmailCommand, |
|
81 EVideoCommand, |
|
82 EVoipCommand, |
|
83 EMessageCommand |
|
84 }; |
|
85 |
|
86 // Extension action of the voice tag |
|
87 // Located in KVasExtensionRrdLocation |
|
88 enum TVasExtensionAction |
|
89 { |
|
90 EDial, |
|
91 ENewMessage, |
|
92 ENewEmail |
|
93 }; |
|
94 |
|
95 // Type of the voice tag which is saved to VAS database |
|
96 // Located in KVasTagTypeRrdLocation |
|
97 enum TVasTagType |
|
98 { |
|
99 ETagTypeUnknown = 0, |
|
100 ETagTypeName, |
|
101 ETagTypeCompanyName, |
|
102 ETagTypeNickName |
|
103 }; |
|
104 |
|
105 // Publish & Subscribe constants |
|
106 |
|
107 // All the SIND values are part of the whole system state. Should be set |
|
108 // and read by various Nokia processes |
|
109 // Therefore SIND properties are published in the system category |
|
110 const TUid KSINDUID = {KUidSystemCategoryValue}; |
|
111 |
|
112 enum TSINDKeys |
|
113 { |
|
114 ERecognitionState=0, |
|
115 ETrainingContactsState, |
|
116 EVoiceTagSelectionTagId, |
|
117 EVoiceTagSelectionContextId, |
|
118 // Key used for cache sync updates between the VCommandHandler instances |
|
119 ECommandHandlerTickKey |
|
120 }; |
|
121 |
|
122 // Recognition state values for P&S |
|
123 enum TRecognitionStateValues |
|
124 { |
|
125 ERecognitionStarted = 0, |
|
126 ERecognitionSpeechEnd, |
|
127 ERecognitionSuccess, |
|
128 ERecognitionFail |
|
129 }; |
|
130 |
|
131 // Contact handler state values for P&S |
|
132 // Tell if contact handler is busy training contacts and other clients |
|
133 // should delay VAS operations |
|
134 enum TTrainingContactsStateValues |
|
135 { |
|
136 EContactsNoTraining = 0, |
|
137 EContactsTraining |
|
138 }; |
|
139 |
|
140 _LIT( KNssVASDBOutOfSync, "VASDB OutOfSync" ); |
|
141 |
|
142 /** |
|
143 * The TNssVasCoreConstant provides constant values used by the VASAPI methods and clients. |
|
144 * |
|
145 * @lib NssVasApi.lib |
|
146 * @since 2.0 |
|
147 */ |
|
148 class TNssVasCoreConstant |
|
149 { |
|
150 public: |
|
151 |
|
152 /** |
|
153 * TNssTrainedType will have all the enums to represent the trained type. |
|
154 */ |
|
155 enum TNssTrainedType |
|
156 { |
|
157 EVasNotTrained, |
|
158 EVasTrainVoice, |
|
159 EVasTrainText |
|
160 }; |
|
161 |
|
162 |
|
163 /** |
|
164 * TNssTrainingCapability will have all the enums to represent the training capabilities |
|
165 * |
|
166 */ |
|
167 enum TNssTrainingCapability |
|
168 { |
|
169 EVasTrainCapVoice |
|
170 }; |
|
171 |
|
172 // For Virtual Phonebook compliance |
|
173 // (Not used inside VAS) |
|
174 enum TNssVASErrorCode |
|
175 { |
|
176 EVasSuccess, |
|
177 EVasFailure |
|
178 }; |
|
179 |
|
180 enum TNssVASPanicCodes |
|
181 { |
|
182 EVasDBSrsDBOutOfSync |
|
183 }; |
|
184 }; |
|
185 |
|
186 #endif /* __VASCORECONSTANT_H__ */ |
|
187 |
|
188 // End of file |