|
1 /* |
|
2 * Copyright (c) 2004 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: ARM hardware device for grammar compiling |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 // INCLUDE FILES |
|
24 #include "asrsgrcompilerhwdevice.h" |
|
25 |
|
26 // ============================ MEMBER FUNCTIONS =============================== |
|
27 |
|
28 // ----------------------------------------------------------------------------- |
|
29 // CASRSGrCompilerHwDevice::CASRSGrCompilerHwDevice |
|
30 // C++ default constructor can NOT contain any code, that |
|
31 // might leave. |
|
32 // ----------------------------------------------------------------------------- |
|
33 // |
|
34 CASRSGrCompilerHwDevice::CASRSGrCompilerHwDevice( |
|
35 MASRSGrCompilerHwDeviceObserver& anObserver |
|
36 ) |
|
37 : iObserver( anObserver ), |
|
38 iAlgorithm( NULL ), |
|
39 iIsInitialised( EFalse ), |
|
40 iReserved( 0 ) |
|
41 { |
|
42 // Nothing |
|
43 } |
|
44 |
|
45 // ----------------------------------------------------------------------------- |
|
46 // CASRSGrCompilerHwDevice::ConstructL |
|
47 // Symbian 2nd phase constructor can leave. |
|
48 // ----------------------------------------------------------------------------- |
|
49 // |
|
50 void CASRSGrCompilerHwDevice::ConstructL(void) |
|
51 { |
|
52 User::Leave( KErrNotSupported ); |
|
53 } |
|
54 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // CASRSGrCompilerHwDevice::NewL |
|
57 // Two-phased constructor. |
|
58 // ----------------------------------------------------------------------------- |
|
59 // |
|
60 EXPORT_C CASRSGrCompilerHwDevice* CASRSGrCompilerHwDevice::NewL( |
|
61 MASRSGrCompilerHwDeviceObserver& anObserver ) // The observer |
|
62 { |
|
63 CASRSGrCompilerHwDevice* self = new( ELeave ) CASRSGrCompilerHwDevice( anObserver ); |
|
64 |
|
65 CleanupStack::PushL( self ); |
|
66 self->ConstructL(); |
|
67 CleanupStack::Pop(); |
|
68 |
|
69 return self; |
|
70 } |
|
71 |
|
72 |
|
73 // ----------------------------------------------------------------------------- |
|
74 // ~CASRSGrCompilerHwDevice |
|
75 // Destructor. |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 EXPORT_C CASRSGrCompilerHwDevice::~CASRSGrCompilerHwDevice() |
|
79 { |
|
80 } |
|
81 |
|
82 // ----------------------------------------------------------------------------- |
|
83 // CustomInterface |
|
84 // Provides clients with an interface, given an UID. |
|
85 // Returns: NULL - No custom interface with that UID |
|
86 // ----------------------------------------------------------------------------- |
|
87 // |
|
88 EXPORT_C TAny* CASRSGrCompilerHwDevice::CustomInterface( |
|
89 TUid /*aInterfaceId*/ ) // UID of the interface |
|
90 { |
|
91 return NULL; |
|
92 } |
|
93 |
|
94 // ----------------------------------------------------------------------------- |
|
95 // InitializeL |
|
96 // Initializes the device. Subsequent calls reset the device. |
|
97 // Returns: none |
|
98 // ----------------------------------------------------------------------------- |
|
99 // |
|
100 EXPORT_C void CASRSGrCompilerHwDevice::InitializeL(void) |
|
101 { |
|
102 User::Leave( KErrNotSupported ); |
|
103 } |
|
104 |
|
105 // ----------------------------------------------------------------------------- |
|
106 // ClearL |
|
107 // Clears the device |
|
108 // Returns: None |
|
109 // ----------------------------------------------------------------------------- |
|
110 // |
|
111 EXPORT_C void CASRSGrCompilerHwDevice::ClearL(void) |
|
112 { |
|
113 User::Leave( KErrNotSupported ); |
|
114 } |
|
115 |
|
116 // ----------------------------------------------------------------------------- |
|
117 // Compiles a speaker independent grammar. |
|
118 // Clears the device |
|
119 // Returns: None |
|
120 // ----------------------------------------------------------------------------- |
|
121 // |
|
122 EXPORT_C void CASRSGrCompilerHwDevice::CompileGrammarL( |
|
123 CSICompiledGrammar& /*aSICompiledGrammar*/ ) // The grammar |
|
124 |
|
125 { |
|
126 User::Leave( KErrNotSupported ); |
|
127 } |
|
128 |
|
129 // ----------------------------------------------------------------------------- |
|
130 // Compiles a speaker independent grammar. |
|
131 // Clears the device |
|
132 // Returns: None |
|
133 // ----------------------------------------------------------------------------- |
|
134 // |
|
135 EXPORT_C void CASRSGrCompilerHwDevice::CombineGrammarL( |
|
136 const RPointerArray<CSICompiledGrammar>& /*aCompiledGrammars*/, // The grammars |
|
137 const RPointerArray<TSIRuleVariantInfo>& /*aExcludedRules*/) // Blacklisted variants |
|
138 { |
|
139 User::Leave( KErrNotSupported ); |
|
140 } |
|
141 |
|
142 // ----------------------------------------------------------------------------- |
|
143 // CancelCompilation |
|
144 // Cancels grammar compilation. No callback is sent to the client. |
|
145 // Returns: None |
|
146 // ----------------------------------------------------------------------------- |
|
147 // |
|
148 EXPORT_C void CASRSGrCompilerHwDevice::CancelCompilation() |
|
149 { |
|
150 } |
|
151 |
|
152 // ----------------------------------------------------------------------------- |
|
153 // CancelCombination |
|
154 // Cancels grammar combination. No callback is sent to the client. |
|
155 // Returns: None |
|
156 // ----------------------------------------------------------------------------- |
|
157 // |
|
158 EXPORT_C void CASRSGrCompilerHwDevice::CancelCombination() |
|
159 { |
|
160 } |
|
161 |
|
162 // ----------------------------------------------------------------------------- |
|
163 // Resolves a recognition result |
|
164 // Clears the device |
|
165 // Returns: None |
|
166 // ----------------------------------------------------------------------------- |
|
167 // |
|
168 EXPORT_C void CASRSGrCompilerHwDevice::ResolveResult( |
|
169 const RArray<TUint>& /*aNBestIDs*/, |
|
170 CSIResultSet& /*aSIResultSet*/, |
|
171 const RPointerArray<CSICompiledGrammar>& /*aSICompiledGrammar*/, |
|
172 const TDesC8& /*aCombinedData*/ |
|
173 ) const |
|
174 { |
|
175 } |
|
176 |
|
177 |
|
178 // ================================ OTHER EXPORTED FUNCTIONS =============================== |
|
179 |
|
180 // ----------------------------------------------------------------------------- |
|
181 // E32Dll |
|
182 // DLL entry function |
|
183 // ----------------------------------------------------------------------------- |
|
184 // |
|
185 #ifndef EKA2 |
|
186 GLDEF_C TInt E32Dll( TDllReason /*aReason*/ ) |
|
187 { |
|
188 return KErrNone; |
|
189 } |
|
190 #endif |
|
191 |
|
192 |
|
193 // End of File |