|
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: Engine factory implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "ocrsharedata.h" |
|
21 #include "ocradaptor.h" |
|
22 #include "ocrengine.h" |
|
23 #include "language.h" |
|
24 #include <ocrsrv.h> |
|
25 |
|
26 // ================= MEMBER FUNCTIONS ======================= |
|
27 |
|
28 // ---------------------------------------------------------- |
|
29 // OCREngineFactory::ReleaseOCREngine |
|
30 // Description : Release engine |
|
31 // ---------------------------------------------------------- |
|
32 // |
|
33 EXPORT_C void OCREngineFactory::ReleaseOCREngine(MOCREngineInterface* /*aEngine*/) |
|
34 { |
|
35 } |
|
36 |
|
37 // ---------------------------------------------------------- |
|
38 // OCREngineFactory::CreateOCREngineL |
|
39 // Description : Create engine |
|
40 // ---------------------------------------------------------- |
|
41 // |
|
42 EXPORT_C MOCREngineInterface* OCREngineFactory::CreateOCREngineL(MOCREngineObserver& /*aObserver*/, |
|
43 const TOcrEngineEnv /*aEngineEnv*/, |
|
44 TEngineType /*aEngineType*/) |
|
45 { |
|
46 User::Leave(KErrNotSupported); |
|
47 return NULL; |
|
48 } |
|
49 |
|
50 OCREngineFactory::OCREngineFactory() |
|
51 { |
|
52 } |
|
53 |
|
54 // --------------------------------------------------------------- |
|
55 // COCREngine::COCREngine |
|
56 // Description : self-construct |
|
57 // --------------------------------------------------------------- |
|
58 // |
|
59 COCREngine::COCREngine() |
|
60 { |
|
61 } |
|
62 |
|
63 // --------------------------------------------------------------- |
|
64 // COCREngine::~COCREngine |
|
65 // Description : Destruct |
|
66 // --------------------------------------------------------------- |
|
67 // |
|
68 COCREngine::~COCREngine() |
|
69 { |
|
70 } |
|
71 |
|
72 // ----------------------------------------------------------------------------- |
|
73 // CShareData::CShareData |
|
74 // Description : C++ default constructor can NOT contain any code, that |
|
75 // might leave. |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 CShareData::CShareData() |
|
79 { |
|
80 } |
|
81 |
|
82 // ----------------------------------------------------------------------------- |
|
83 // CShareData::~CShareData |
|
84 // Description : destructor. |
|
85 // ----------------------------------------------------------------------------- |
|
86 // |
|
87 CShareData::~CShareData() |
|
88 { |
|
89 } |
|
90 |
|
91 // ----------------------------------------------------------------------------- |
|
92 // CEngineAdaptor::CEngineAdaptor |
|
93 // Description : C++ default constructor can NOT contain any code, that |
|
94 // might leave. |
|
95 // ----------------------------------------------------------------------------- |
|
96 // |
|
97 CEngineAdaptor::CEngineAdaptor(MOCREngineObserver& aObserver) |
|
98 : CActive(EPriorityNormal), iObserver(aObserver) |
|
99 { |
|
100 } |
|
101 |
|
102 // ----------------------------------------------------------------------------- |
|
103 // CEngineAdaptor::~CEngineAdaptor |
|
104 // Description : Destructor |
|
105 // ----------------------------------------------------------------------------- |
|
106 // |
|
107 CEngineAdaptor::~CEngineAdaptor() |
|
108 { |
|
109 } |
|
110 |
|
111 // --------------------------------------------------------- |
|
112 // CEngineAdaptor::RunL() |
|
113 // Description : callback function for request complete, |
|
114 // either layout analysis complete, |
|
115 // or recognize complete |
|
116 // or recognize process information is given |
|
117 // --------------------------------------------------------- |
|
118 // |
|
119 void CEngineAdaptor::RunL() |
|
120 { |
|
121 } |
|
122 |
|
123 // --------------------------------------------------------- |
|
124 // CEngineAdaptor::RunError(...) |
|
125 // Description : Deal with errors from RunL() |
|
126 // --------------------------------------------------------- |
|
127 // |
|
128 TInt CEngineAdaptor::RunError(TInt /*aError*/) |
|
129 { |
|
130 return KErrNone; |
|
131 } |
|
132 |
|
133 // ---------------------------------------------------------- |
|
134 // CEngineAdaptor::DoCancel |
|
135 // Description : from CActive |
|
136 // ---------------------------------------------------------- |
|
137 // |
|
138 void CEngineAdaptor::DoCancel() |
|
139 { |
|
140 } |
|
141 |
|
142 // --------------------------------------------------------------- |
|
143 // COCREngineList::COCREngineList |
|
144 // Description : self-construct |
|
145 // --------------------------------------------------------------- |
|
146 // |
|
147 COCREngineList::COCREngineList() |
|
148 { |
|
149 } |
|
150 |
|
151 // --------------------------------------------------------------- |
|
152 // COCREngineList::~COCREngineList |
|
153 // Description : destruct |
|
154 // --------------------------------------------------------------- |
|
155 // |
|
156 COCREngineList::~COCREngineList() |
|
157 { |
|
158 } |
|
159 |
|
160 // --------------------------------------------------------------- |
|
161 // COCREngineImplBase::~COCREngineImplBase |
|
162 // Description : Destructor. |
|
163 // --------------------------------------------------------------- |
|
164 // |
|
165 COCREngineImplBase::~COCREngineImplBase() |
|
166 { |
|
167 } |
|
168 |
|
169 // --------------------------------------------------------------- |
|
170 // COCREngineImplBase::CancelRecognition() |
|
171 // Description : Cancel recognition operation |
|
172 // ------------------------------------------------------------- |
|
173 // |
|
174 TBool COCREngineImplBase::IsEngineActive() const |
|
175 { |
|
176 return EFalse; |
|
177 } |
|
178 |
|
179 // --------------------------------------------------------------- |
|
180 // COCREngineImplBase::IsLanguageSupported |
|
181 // Description : IsLanguageSupported |
|
182 // ------------------------------------------------------------- |
|
183 // |
|
184 TBool COCREngineImplBase::IsLanguageSupported(const TLanguage /*aLanguage*/) |
|
185 { |
|
186 return EFalse; |
|
187 } |
|
188 |
|
189 // --------------------------------------------------------------- |
|
190 // COCREngineImplBase::CancelRecognition() |
|
191 // Description : Cancel recognition operation |
|
192 // ------------------------------------------------------------- |
|
193 // |
|
194 void COCREngineImplBase::CancelOperation() |
|
195 { |
|
196 } |
|
197 |
|
198 // ------------------------------------------------------------- |
|
199 // COCREngineImplBase::GetInstalledLanguageL |
|
200 // Description : Get installed language information |
|
201 // ------------------------------------------------------------- |
|
202 // |
|
203 void COCREngineImplBase::GetInstalledLanguage(RArray<TLanguage>& /*aLanguages*/) const |
|
204 { |
|
205 } |
|
206 |
|
207 // ------------------------------------------------------------- |
|
208 // COCREngineImplBase::SetActiveLanguageL |
|
209 // Description : Set active language |
|
210 // ------------------------------------------------------------- |
|
211 // |
|
212 void COCREngineImplBase::SetActiveLanguageL(const RArray<TLanguage>& /*aActiveLanguage*/) |
|
213 { |
|
214 } |
|
215 |
|
216 // --------------------------------------------------------------- |
|
217 // COCREngineImplBase::RefreshInstalledLanguageL |
|
218 // Description : Refresh installed language |
|
219 // ------------------------------------------------------------- |
|
220 // |
|
221 void COCREngineImplBase::RefreshInstalledLanguageL() |
|
222 { |
|
223 } |
|
224 |
|
225 // --------------------------------------------------------------- |
|
226 // COCREngineImplBase::CancelRecognition() |
|
227 // Description : Cancel recognition operation |
|
228 // ------------------------------------------------------------- |
|
229 // |
|
230 TVersion COCREngineImplBase::GetVersion() const |
|
231 { |
|
232 return (TVersion(1, 0, 0)); |
|
233 } |
|
234 |
|
235 // --------------------------------------------------------------- |
|
236 // COCREngineRecognizeBlock::~COCREngineRecognizeBlock |
|
237 // Description : Destructor |
|
238 // --------------------------------------------------------------- |
|
239 // |
|
240 COCREngineRecognizeBlock::~COCREngineRecognizeBlock() |
|
241 { |
|
242 } |
|
243 |
|
244 // ------------------------------------------------------------- |
|
245 // COCREngineRecognizeBlock::RecognizeBlockL |
|
246 // Description : Recognize a specified block |
|
247 // ------------------------------------------------------------- |
|
248 // |
|
249 void COCREngineRecognizeBlock::RecognizeBlockL(const TInt /*aBitmapHandle*/, |
|
250 const TOCRLayoutBlockInfo /*aLayoutInfo*/) |
|
251 { |
|
252 } |
|
253 |
|
254 // --------------------------------------------------------------- |
|
255 // COCREngineRecognizeBlock::Base |
|
256 // Description : Provide base functions to be called |
|
257 // --------------------------------------------------------------- |
|
258 // |
|
259 MOCREngineBase* COCREngineRecognizeBlock::Base() const |
|
260 { |
|
261 return NULL; |
|
262 } |
|
263 |
|
264 // ------------------------------------------------------------- |
|
265 // COCREngineRecognizeBlock::RecognizeSpecialregionL |
|
266 // Description : Recognize a special region |
|
267 // ------------------------------------------------------------- |
|
268 // |
|
269 void COCREngineRecognizeBlock::RecognizeSpecialRegionL(const TInt /*aBitmapHandle*/, |
|
270 const TRegionInfo /*aRegionInfo*/) |
|
271 { |
|
272 } |
|
273 |
|
274 // --------------------------------------------------------------- |
|
275 // COCREngineLayoutRecognize::~COCREngineLayoutRecognize |
|
276 // Description : Destructor |
|
277 // --------------------------------------------------------------- |
|
278 // |
|
279 COCREngineLayoutRecognize::~COCREngineLayoutRecognize() |
|
280 { |
|
281 } |
|
282 |
|
283 // --------------------------------------------------------------- |
|
284 // COCREngineLayoutRecognize::LayoutAnalysisL |
|
285 // Description : Layout analysis |
|
286 // ------------------------------------------------------------- |
|
287 // |
|
288 void COCREngineLayoutRecognize::LayoutAnalysisL(const TInt /*aBitmapHandle*/, |
|
289 const TOCRLayoutSetting /*aSettings*/) |
|
290 { |
|
291 } |
|
292 |
|
293 // ------------------------------------------------------------- |
|
294 // COCREngineLayoutRecognize::RecognizeL |
|
295 // Description : Recognize text |
|
296 // ------------------------------------------------------------- |
|
297 // |
|
298 void COCREngineLayoutRecognize::RecognizeL(const TOCRRecognizeSetting /*aSettings*/, |
|
299 const RArray<TInt>& /*aBlock*/) |
|
300 { |
|
301 } |
|
302 |
|
303 // --------------------------------------------------------------- |
|
304 // COCREngineLayoutRecognize::Base |
|
305 // Description : Provide base functions to be called |
|
306 // --------------------------------------------------------------- |
|
307 // |
|
308 MOCREngineBase* COCREngineLayoutRecognize::Base() const |
|
309 { |
|
310 return NULL; |
|
311 } |
|
312 |
|
313 // End of file |