34 |
34 |
35 /** The milliseconds delay between harvesting chunks. */ |
35 /** The milliseconds delay between harvesting chunks. */ |
36 const TInt KHarvestingDelay = 1000; |
36 const TInt KHarvestingDelay = 1000; |
37 /** Number of bookmarks to process in one active scheduler cycle */ |
37 /** Number of bookmarks to process in one active scheduler cycle */ |
38 const TInt KBookmarksPerRunL = 1; |
38 const TInt KBookmarksPerRunL = 1; |
39 _LIT(KExcerptDelimiter, " "); |
39 //_LIT(KExcerptDelimiter, " "); |
40 /** Bookmark list size for dynamic array*/ |
40 /** Bookmark list size for dynamic array*/ |
41 const TInt KBookmarkListSize = 100; |
41 const TInt KBookmarkListSize = 100; |
42 |
42 |
43 // ----------------------------------------------------------------------------- |
43 // ----------------------------------------------------------------------------- |
44 CBookmarksPlugin* CBookmarksPlugin::NewL() |
44 CBookmarksPlugin* CBookmarksPlugin::NewL() |
268 GetDomainNameL( aItem->Url(), domain ); |
268 GetDomainNameL( aItem->Url(), domain ); |
269 index_item->AddFieldL(KBookMarkDomain, domain , CDocumentField::EStoreYes | CDocumentField::EIndexTokenized); |
269 index_item->AddFieldL(KBookMarkDomain, domain , CDocumentField::EStoreYes | CDocumentField::EIndexTokenized); |
270 OstTraceExt1( TRACE_NORMAL, DUP1_CBOOKMARKSPLUGIN_DOINDEXINGL, "CBookmarksPlugin::DoIndexingL();domain=%S", domain ); |
270 OstTraceExt1( TRACE_NORMAL, DUP1_CBOOKMARKSPLUGIN_DOINDEXINGL, "CBookmarksPlugin::DoIndexingL();domain=%S", domain ); |
271 CPIXLOGSTRING2("CBookmarksPlugin::DoIndexingL(): domain = %S", &domain ); |
271 CPIXLOGSTRING2("CBookmarksPlugin::DoIndexingL(): domain = %S", &domain ); |
272 } |
272 } |
|
273 |
|
274 //For bookmarks, only URL should go into exceprt field. |
|
275 //For more info, check the appclass-hierarchy.txt |
|
276 |
273 //Add Excerpt as it is must have field. What should be excerpt in bookmarks ? |
277 //Add Excerpt as it is must have field. What should be excerpt in bookmarks ? |
274 HBufC* excerpt = HBufC::NewLC(aItem->Url().Length() + aItem->Name().Length() + 1); |
278 HBufC* excerpt = HBufC::NewLC( aItem->Url().Length() + 1 ); |
275 TPtr ptr = excerpt->Des(); |
279 TPtr ptr = excerpt->Des(); |
276 ptr.Append(aItem->Name()); |
280 ptr.Append( aItem->Url() ); |
277 ptr.Append(KExcerptDelimiter); |
281 index_item->AddExcerptL( *excerpt ); |
278 ptr.Append(aItem->Url()); |
282 CleanupStack::PopAndDestroy( excerpt ); |
279 index_item->AddExcerptL(*excerpt); |
|
280 CleanupStack::PopAndDestroy(excerpt); |
|
281 |
283 |
282 // Send for indexing |
284 // Send for indexing |
283 TRAPD(err, iIndexer->AddL(*index_item)); |
285 TRAPD(err, iIndexer->AddL(*index_item)); |
284 if (err == KErrNone) |
286 if (err == KErrNone) |
285 { |
287 { |