|
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: Predective text input engine core local methods. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <ecom/ecom.h> |
|
20 #include <PtiCore.h> |
|
21 #include "PtiUserDictionary.h" |
|
22 |
|
23 const TUid KPtiCoreInterfaceUid = { 0x101F87FC }; |
|
24 |
|
25 // |
|
26 // LOCAL METHODS |
|
27 // |
|
28 |
|
29 void Cleanup( TAny* aAny ) |
|
30 { |
|
31 RImplInfoPtrArray* implArray = |
|
32 reinterpret_cast< RImplInfoPtrArray*> ( aAny ); |
|
33 implArray->ResetAndDestroy(); |
|
34 implArray->Close(); |
|
35 } |
|
36 |
|
37 // |
|
38 // CPtiCore |
|
39 // |
|
40 |
|
41 // --------------------------------------------------------------------------- |
|
42 // CPtiCore::~CPtiCore |
|
43 // |
|
44 // --------------------------------------------------------------------------- |
|
45 // |
|
46 EXPORT_C CPtiCore::~CPtiCore() |
|
47 { |
|
48 REComSession::DestroyedImplementation(TUid::Uid(iDtorKeyId)); |
|
49 } |
|
50 |
|
51 |
|
52 // --------------------------------------------------------------------------- |
|
53 // CPtiCore::CreateCoreL |
|
54 // |
|
55 // --------------------------------------------------------------------------- |
|
56 // |
|
57 EXPORT_C CPtiCore* CPtiCore::CreateCoreL(TUid aCoreUid) |
|
58 { |
|
59 TUid dtorIDKey; |
|
60 CPtiCore* iface = (CPtiCore*)REComSession::CreateImplementationL(aCoreUid, dtorIDKey); |
|
61 if (iface) |
|
62 { |
|
63 iface->SetDestructorKeyId(dtorIDKey.iUid); |
|
64 } |
|
65 return iface; |
|
66 } |
|
67 |
|
68 |
|
69 // --------------------------------------------------------------------------- |
|
70 // CPtiCore::ListCoresLC |
|
71 // |
|
72 // --------------------------------------------------------------------------- |
|
73 // |
|
74 EXPORT_C CArrayFix<TInt>* CPtiCore::ListCoresLC() |
|
75 { |
|
76 RImplInfoPtrArray infoArray; |
|
77 TInt i; |
|
78 |
|
79 CArrayFixFlat<TInt>* result = new (ELeave) CArrayFixFlat<TInt>(KDefaultCoresGran); |
|
80 CleanupStack::PushL( result ); |
|
81 |
|
82 CleanupStack::PushL( TCleanupItem( Cleanup, &infoArray ) ); |
|
83 REComSession::ListImplementationsL(KPtiCoreInterfaceUid, infoArray); |
|
84 |
|
85 for (i = 0; i < infoArray.Count(); i++) |
|
86 { |
|
87 result->AppendL(infoArray[i]->ImplementationUid().iUid); |
|
88 } |
|
89 |
|
90 CleanupStack::PopAndDestroy(); // infoArray |
|
91 |
|
92 return result; |
|
93 } |
|
94 |
|
95 |
|
96 // --------------------------------------------------------------------------- |
|
97 // CPtiCore::SetCurrentInputSequence |
|
98 // |
|
99 // --------------------------------------------------------------------------- |
|
100 // |
|
101 EXPORT_C TInt CPtiCore::SetCurrentInputSequence(TPtrC8 /*aInput*/) |
|
102 { |
|
103 return KErrNotSupported; |
|
104 } |
|
105 |
|
106 |
|
107 // --------------------------------------------------------------------------- |
|
108 // CPtiCore::Convert |
|
109 // |
|
110 // --------------------------------------------------------------------------- |
|
111 // |
|
112 EXPORT_C TInt CPtiCore::Convert(TPtiCharConversion /*aType*/, |
|
113 TAny* /*aInput*/, |
|
114 TInt /*aInputLength*/, |
|
115 TAny* /*aOutput*/) |
|
116 { |
|
117 return KErrNotSupported; |
|
118 } |
|
119 |
|
120 |
|
121 // --------------------------------------------------------------------------- |
|
122 // CPtiCore::GetSpelling |
|
123 // |
|
124 // --------------------------------------------------------------------------- |
|
125 // |
|
126 EXPORT_C TInt CPtiCore::GetSpelling(TUint16 /*aInput*/, |
|
127 TDes& /*aOutput*/, |
|
128 TPtiSpelling /*aType*/) |
|
129 { |
|
130 return KErrNotSupported; |
|
131 } |
|
132 |
|
133 |
|
134 // --------------------------------------------------------------------------- |
|
135 // CPtiCore::SetExternalKeyMapL |
|
136 // |
|
137 // --------------------------------------------------------------------------- |
|
138 // |
|
139 EXPORT_C TInt CPtiCore::SetExternalKeyMapL(TPtiEngineInputMode /*aMode*/, |
|
140 TPtiKey /*aKey*/, |
|
141 TDesC& /*aKeyMap*/, |
|
142 TPtiTextCase /*aCase*/) |
|
143 { |
|
144 return KErrNotSupported; |
|
145 } |
|
146 |
|
147 |
|
148 // --------------------------------------------------------------------------- |
|
149 // CPtiCore::CommitCurrentWord |
|
150 // |
|
151 // --------------------------------------------------------------------------- |
|
152 // |
|
153 EXPORT_C TInt CPtiCore::CommitCurrentWord() |
|
154 { |
|
155 return KErrNotSupported; |
|
156 } |
|
157 |
|
158 |
|
159 // --------------------------------------------------------------------------- |
|
160 // CPtiCore::GetCurrentWord |
|
161 // |
|
162 // --------------------------------------------------------------------------- |
|
163 // |
|
164 EXPORT_C TPtrC CPtiCore::GetCurrentWord() const |
|
165 { |
|
166 return TPtrC(); |
|
167 } |
|
168 |
|
169 |
|
170 // --------------------------------------------------------------------------- |
|
171 // CPtiCore::NumberOfCandidates |
|
172 // |
|
173 // --------------------------------------------------------------------------- |
|
174 // |
|
175 EXPORT_C TInt CPtiCore::NumberOfCandidates() |
|
176 { |
|
177 return 0; |
|
178 } |
|
179 |
|
180 |
|
181 // --------------------------------------------------------------------------- |
|
182 // CPtiCore::GetCandidateListL |
|
183 // |
|
184 // --------------------------------------------------------------------------- |
|
185 // |
|
186 EXPORT_C TInt CPtiCore::GetCandidateListL(CDesCArray& /*aList*/) |
|
187 { |
|
188 return KErrNotSupported; |
|
189 } |
|
190 |
|
191 |
|
192 // --------------------------------------------------------------------------- |
|
193 // CPtiCore::GetNextWordCandidateListL |
|
194 // |
|
195 // --------------------------------------------------------------------------- |
|
196 // |
|
197 EXPORT_C TInt CPtiCore::GetNextWordCandidateListL(CDesCArray& /*aList*/) |
|
198 { |
|
199 return KErrNotSupported; |
|
200 } |
|
201 |
|
202 |
|
203 // --------------------------------------------------------------------------- |
|
204 // CPtiCore::GetFirstCandidate |
|
205 // |
|
206 // --------------------------------------------------------------------------- |
|
207 // |
|
208 EXPORT_C TInt CPtiCore::GetFirstCandidate(TDes& /*aResult*/) |
|
209 { |
|
210 return KErrNotSupported; |
|
211 } |
|
212 |
|
213 |
|
214 // --------------------------------------------------------------------------- |
|
215 // CPtiCore::GetNextCandidate |
|
216 // |
|
217 // --------------------------------------------------------------------------- |
|
218 // |
|
219 EXPORT_C TInt CPtiCore::GetNextCandidate(TDes& /*aResult*/) |
|
220 { |
|
221 return KErrNotSupported; |
|
222 } |
|
223 |
|
224 |
|
225 // --------------------------------------------------------------------------- |
|
226 // CPtiCore::GetPreviousCandidate |
|
227 // |
|
228 // --------------------------------------------------------------------------- |
|
229 // |
|
230 EXPORT_C TInt CPtiCore::GetPreviousCandidate(TDes& /*aResult*/) |
|
231 { |
|
232 return KErrNotSupported; |
|
233 } |
|
234 |
|
235 |
|
236 // --------------------------------------------------------------------------- |
|
237 // CPtiCore::AddUserDictionaryEntry |
|
238 // |
|
239 // --------------------------------------------------------------------------- |
|
240 // |
|
241 EXPORT_C TInt CPtiCore::AddUserDictionaryEntry(MPtiUserDictionaryEntry& /*aEntry*/, CPtiUserDictionary* /*aDict*/) |
|
242 { |
|
243 return KErrNotSupported; |
|
244 } |
|
245 |
|
246 |
|
247 // --------------------------------------------------------------------------- |
|
248 // CPtiCore::RemoveUserDictionaryEntry |
|
249 // |
|
250 // --------------------------------------------------------------------------- |
|
251 // |
|
252 EXPORT_C TInt CPtiCore::RemoveUserDictionaryEntry(MPtiUserDictionaryEntry& /*aEntry*/, CPtiUserDictionary* /*aDict*/) |
|
253 { |
|
254 return KErrNotSupported; |
|
255 } |
|
256 |
|
257 |
|
258 // --------------------------------------------------------------------------- |
|
259 // CPtiCore::NumberOfEntriesInUserDictionary |
|
260 // |
|
261 // --------------------------------------------------------------------------- |
|
262 // |
|
263 EXPORT_C TInt CPtiCore::NumberOfEntriesInUserDictionary(CPtiUserDictionary* /*aDict*/) |
|
264 { |
|
265 return 0; |
|
266 } |
|
267 |
|
268 |
|
269 // --------------------------------------------------------------------------- |
|
270 // CPtiCore::GetUserDictionaryEntry |
|
271 // |
|
272 // --------------------------------------------------------------------------- |
|
273 // |
|
274 EXPORT_C TInt CPtiCore::GetUserDictionaryEntry(TInt /*aIndex*/, MPtiUserDictionaryEntry& /*aResult*/, CPtiUserDictionary* /*aDict*/) |
|
275 { |
|
276 return KErrNotSupported; |
|
277 } |
|
278 |
|
279 |
|
280 // --------------------------------------------------------------------------- |
|
281 // CPtiCore::CreateEmptyUserDictionaryL |
|
282 // |
|
283 // --------------------------------------------------------------------------- |
|
284 // |
|
285 EXPORT_C CPtiUserDictionary* CPtiCore::CreateEmptyUserDictionaryL(TInt aMaxSize) |
|
286 { |
|
287 return CPtiUserDictionary::NewL(aMaxSize); |
|
288 } |
|
289 |
|
290 |
|
291 // --------------------------------------------------------------------------- |
|
292 // CPtiCore::AttachUserDictionary |
|
293 // |
|
294 // --------------------------------------------------------------------------- |
|
295 // |
|
296 EXPORT_C TInt CPtiCore::AttachUserDictionary(CPtiUserDictionary* /*aDict*/) |
|
297 { |
|
298 return KErrNotSupported; |
|
299 } |
|
300 |
|
301 |
|
302 // --------------------------------------------------------------------------- |
|
303 // CPtiCore::DetachUserDictionary |
|
304 // |
|
305 // --------------------------------------------------------------------------- |
|
306 // |
|
307 EXPORT_C TBool CPtiCore::DetachUserDictionary(CPtiUserDictionary* /*aDict*/) |
|
308 { |
|
309 return EFalse; |
|
310 } |
|
311 |
|
312 |
|
313 // --------------------------------------------------------------------------- |
|
314 // CPtiCore::GetCandidatePage |
|
315 // |
|
316 // --------------------------------------------------------------------------- |
|
317 // |
|
318 EXPORT_C TPtrC CPtiCore::GetCandidatePage() |
|
319 { |
|
320 return TPtrC(); |
|
321 } |
|
322 |
|
323 |
|
324 // --------------------------------------------------------------------------- |
|
325 // CPtiCore::NextCandidatePage |
|
326 // |
|
327 // --------------------------------------------------------------------------- |
|
328 // |
|
329 EXPORT_C TBool CPtiCore::NextCandidatePage() |
|
330 { |
|
331 return EFalse; |
|
332 } |
|
333 |
|
334 |
|
335 // --------------------------------------------------------------------------- |
|
336 // CPtiCore::PreviousCandidatePage |
|
337 // |
|
338 // --------------------------------------------------------------------------- |
|
339 // |
|
340 EXPORT_C TBool CPtiCore::PreviousCandidatePage() |
|
341 { |
|
342 return EFalse; |
|
343 } |
|
344 |
|
345 |
|
346 // --------------------------------------------------------------------------- |
|
347 // CPtiCore::MoreCandidatePages |
|
348 // |
|
349 // --------------------------------------------------------------------------- |
|
350 // |
|
351 EXPORT_C TBool CPtiCore::MoreCandidatePages() |
|
352 { |
|
353 return EFalse; |
|
354 } |
|
355 |
|
356 |
|
357 // --------------------------------------------------------------------------- |
|
358 // CPtiCore::SetCandidatePageLength |
|
359 // |
|
360 // --------------------------------------------------------------------------- |
|
361 // |
|
362 EXPORT_C void CPtiCore::SetCandidatePageLength(TInt /*aLength*/) |
|
363 { |
|
364 } |
|
365 |
|
366 |
|
367 // --------------------------------------------------------------------------- |
|
368 // CPtiCore::GetPhoneticSpelling |
|
369 // |
|
370 // --------------------------------------------------------------------------- |
|
371 // |
|
372 EXPORT_C TPtrC CPtiCore::GetPhoneticSpelling(TInt /*aIndex*/) const |
|
373 { |
|
374 return TPtrC(); |
|
375 } |
|
376 |
|
377 |
|
378 // --------------------------------------------------------------------------- |
|
379 // CPtiCore::PhoneticSpellingCount |
|
380 // |
|
381 // --------------------------------------------------------------------------- |
|
382 // |
|
383 EXPORT_C TInt CPtiCore::PhoneticSpellingCount() const |
|
384 { |
|
385 return 0; |
|
386 } |
|
387 |
|
388 |
|
389 // --------------------------------------------------------------------------- |
|
390 // CPtiCore::SelectPhoneticSpelling |
|
391 // |
|
392 // --------------------------------------------------------------------------- |
|
393 // |
|
394 EXPORT_C TBool CPtiCore::SelectPhoneticSpelling(TInt /*aIndex*/) |
|
395 { |
|
396 return EFalse; |
|
397 } |
|
398 |
|
399 |
|
400 // --------------------------------------------------------------------------- |
|
401 // CPtiCore::SelectedPhoneticSpelling |
|
402 // |
|
403 // --------------------------------------------------------------------------- |
|
404 // |
|
405 EXPORT_C TInt CPtiCore::SelectedPhoneticSpelling() const |
|
406 { |
|
407 return KErrNotSupported; |
|
408 } |
|
409 |
|
410 |
|
411 // --------------------------------------------------------------------------- |
|
412 // CPtiCore::ToneMark |
|
413 // |
|
414 // --------------------------------------------------------------------------- |
|
415 // |
|
416 EXPORT_C TBool CPtiCore::ToneMark(TText& aToneMark) const |
|
417 { |
|
418 aToneMark = 0; |
|
419 return EFalse; |
|
420 } |
|
421 |
|
422 |
|
423 // --------------------------------------------------------------------------- |
|
424 // CPtiCore::IsToneMarkValidForSpelling |
|
425 // |
|
426 // --------------------------------------------------------------------------- |
|
427 // |
|
428 EXPORT_C TBool CPtiCore::IsToneMarkValidForSpelling() |
|
429 { |
|
430 return EFalse; |
|
431 } |
|
432 |
|
433 |
|
434 // --------------------------------------------------------------------------- |
|
435 // CPtiCore::SetPredictiveChineseChar |
|
436 // |
|
437 // --------------------------------------------------------------------------- |
|
438 // |
|
439 EXPORT_C TBool CPtiCore::SetPredictiveChineseChar(const TDesC& /*aChar*/) |
|
440 { |
|
441 return EFalse; |
|
442 } |
|
443 |
|
444 |
|
445 // --------------------------------------------------------------------------- |
|
446 // CPtiCore::SetToneMark |
|
447 // |
|
448 // --------------------------------------------------------------------------- |
|
449 // |
|
450 EXPORT_C TBool CPtiCore::SetToneMark(TInt /*aToneMark*/) |
|
451 { |
|
452 return EFalse; |
|
453 } |
|
454 |
|
455 |
|
456 // --------------------------------------------------------------------------- |
|
457 // CPtiCore::ReadingTextL |
|
458 // |
|
459 // --------------------------------------------------------------------------- |
|
460 // |
|
461 EXPORT_C TPtrC CPtiCore::ReadingTextL() |
|
462 { |
|
463 return TPtrC(); |
|
464 } |
|
465 |
|
466 |
|
467 // --------------------------------------------------------------------------- |
|
468 // CPtiCore::CompositionData |
|
469 // |
|
470 // --------------------------------------------------------------------------- |
|
471 // |
|
472 EXPORT_C MPtiEngineCompositionDataInterface* CPtiCore::CompositionData() |
|
473 { |
|
474 return NULL; |
|
475 } |
|
476 |
|
477 |
|
478 // --------------------------------------------------------------------------- |
|
479 // CPtiCore::GetCandidatesByInputString |
|
480 // |
|
481 // --------------------------------------------------------------------------- |
|
482 // |
|
483 EXPORT_C HBufC* CPtiCore::GetCandidatesByInputString(const TDesC& /*aInputString*/, |
|
484 RPointerArray<HBufC>& /*aList*/, |
|
485 const TBool /*aIsPredictive*/) |
|
486 { |
|
487 return NULL; |
|
488 } |
|
489 |
|
490 // End of file |