238 // |
238 // |
239 // ---------------------------------------------------------------------------- |
239 // ---------------------------------------------------------------------------- |
240 void CPcsSession::GetAsyncPcsResultsL(const RMessage2& aMessage) |
240 void CPcsSession::GetAsyncPcsResultsL(const RMessage2& aMessage) |
241 { |
241 { |
242 __LATENCY_MARK ( _L("CPcsSession::GetAsyncPcsResultsL") ); |
242 __LATENCY_MARK ( _L("CPcsSession::GetAsyncPcsResultsL") ); |
243 PRINT( _L("Enter CPcsSession::GetAsyncPcsResultsL") ); |
243 PRINT ( _L("Enter CPcsSession::GetAsyncPcsResultsL") ); |
244 |
244 |
245 if ( iBufferOverFlow == EFalse ) |
245 if ( iBufferOverFlow == EFalse ) |
246 { |
246 { |
247 |
|
248 // ------------------------------------------------------------- |
247 // ------------------------------------------------------------- |
249 |
248 |
250 // Read search query from the message |
249 // Read search query from the message |
251 CPsQuery* psQuery = ReadQueryLC( 0, aMessage ); |
250 CPsQuery* psQuery = ReadQueryLC( 0, aMessage ); |
252 |
251 |
253 // ------------------------------------------------------------- |
252 // ------------------------------------------------------------- |
254 |
253 |
255 RPointerArray<CPsClientData> searchResults; |
254 RPointerArray<CPsClientData> searchResults; |
256 RPointerArray<CPsPattern> searchSeqs; |
255 RPointerArray<CPsPattern> searchSeqs; |
257 |
256 |
258 iServer->PluginInterface()->PerformSearchL(*iSettings, |
257 |
259 *psQuery, |
258 if( !iServer->IsChineseVariant() ) |
260 searchResults, |
259 { |
261 searchSeqs); |
260 PRINT ( _L("----Algorithm1 search----") ); |
|
261 iServer->PluginInterface()->PerformSearchL(*iSettings, |
|
262 *psQuery, |
|
263 searchResults, |
|
264 searchSeqs); |
|
265 } |
|
266 else |
|
267 { |
|
268 PRINT ( _L("----Algorithm2 fake search----") ); |
|
269 } |
|
270 |
262 CleanupStack::PopAndDestroy( psQuery ); |
271 CleanupStack::PopAndDestroy( psQuery ); |
263 |
272 |
264 // Dynamic data buffer |
273 // Dynamic data buffer |
265 CBufFlat* buf = CBufFlat::NewL(KBufferMaxLen); |
274 CBufFlat* buf = CBufFlat::NewL(KBufferMaxLen); |
266 CleanupStack::PushL(buf); |
275 CleanupStack::PushL(buf); |
382 RPointerArray<TDesC> searchSeqs; |
391 RPointerArray<TDesC> searchSeqs; |
383 |
392 |
384 // To hold matched location |
393 // To hold matched location |
385 RArray<TPsMatchLocation> sequenceLoc; |
394 RArray<TPsMatchLocation> sequenceLoc; |
386 |
395 |
387 iServer->PluginInterface()->SearchInputL(*psQuery, |
396 if( !iServer->IsChineseVariant() ) |
388 *data, |
397 { |
389 searchSeqs, |
398 PRINT ( _L("----Algorithm1 searchinput----") ); |
390 sequenceLoc); |
399 iServer->PluginInterface()->SearchInputL(*psQuery, |
391 |
400 *data, |
|
401 searchSeqs, |
|
402 sequenceLoc); |
|
403 } |
|
404 else |
|
405 { |
|
406 PRINT ( _L("----Algorithm2 fake searchinput----") ); |
|
407 } |
392 |
408 |
393 // Delete the search query and search data |
409 // Delete the search query and search data |
394 CleanupStack::PopAndDestroy( data ); |
410 CleanupStack::PopAndDestroy( data ); |
395 CleanupStack::PopAndDestroy( psQuery ); |
411 CleanupStack::PopAndDestroy( psQuery ); |
396 |
412 |
460 // |
476 // |
461 // ---------------------------------------------------------------------------- |
477 // ---------------------------------------------------------------------------- |
462 void CPcsSession::SearchMatchStringL(const RMessage2& aMessage) |
478 void CPcsSession::SearchMatchStringL(const RMessage2& aMessage) |
463 { |
479 { |
464 PRINT ( _L("Enter CPcsSession::SearchMatchStringL") ); |
480 PRINT ( _L("Enter CPcsSession::SearchMatchStringL") ); |
465 //__LATENCY_MARK ( _L("CPcsSession::SearchMatchStringL") ); |
481 __LATENCY_MARK ( _L("CPcsSession::SearchMatchStringL") ); |
466 |
482 |
467 // ------------------------------------------------------------- |
483 // ------------------------------------------------------------- |
468 |
484 |
469 // Create result buffer |
485 // Create result buffer |
470 HBufC* des = HBufC::NewLC(KBufferMaxLen); |
486 HBufC* des = HBufC::NewLC(KBufferMaxLen); |
507 aMessage.Write(2, *des); |
523 aMessage.Write(2, *des); |
508 aMessage.Complete(KErrNone); |
524 aMessage.Complete(KErrNone); |
509 CleanupStack::PopAndDestroy(des); |
525 CleanupStack::PopAndDestroy(des); |
510 |
526 |
511 PRINT ( _L("End CPcsSession::SearchMatchStringL") ); |
527 PRINT ( _L("End CPcsSession::SearchMatchStringL") ); |
512 //__LATENCY_MARKEND ( _L("CPcsSession::SearchMatchStringL") ); |
528 __LATENCY_MARKEND ( _L("CPcsSession::SearchMatchStringL") ); |
513 |
|
514 } |
529 } |
515 |
530 |
516 // ---------------------------------------------------------------------------- |
531 // ---------------------------------------------------------------------------- |
517 // CPcsSession::IsLanguageSupportedL |
532 // CPcsSession::IsLanguageSupportedL |
518 // |
533 // |