# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1277306029 -10800 # Node ID 773be20e0a25947ca28d74402eead3994631108b # Parent 51d10d255e92a00a4de11fda8a18b7fcd82acff6 Revision: 201023 Kit: 2010125 diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/applications/src/applicationsplugin.cpp --- a/harvesterplugins/applications/src/applicationsplugin.cpp Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/applications/src/applicationsplugin.cpp Wed Jun 23 18:13:49 2010 +0300 @@ -135,7 +135,7 @@ OstTraceExt1( TRACE_NORMAL, CAPPLICATIONSPLUGIN_ADDWIDGETINFOL, "CApplicationsPlugin::AddWidgetInfoL;PATH=%S", &temp ); //GetWidgetPropertyValueL returns CWidgetPropertyValue* which in turn has an operator to convert to TDesC - aDocument->AddFieldL(KApplicationFieldCaption, *(iWidgetRegistry.GetWidgetPropertyValueL( aUid, EBundleDisplayName )), CDocumentField::EStoreYes | CDocumentField::EIndexTokenized ); + aDocument->AddFieldL(KApplicationFieldCaption, *(iWidgetRegistry.GetWidgetPropertyValueL( aUid, EBundleDisplayName )), CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText); //For applications, no content to go into exceprt field. //For more info, check the appclass-hierarchy.txt @@ -157,7 +157,7 @@ //We index the exe name (without extension), only if the title is not present. if( aAppInfo.iShortCaption.Compare(KNullDesC) ) { - aDocument->AddFieldL(KApplicationFieldCaption, aAppInfo.iShortCaption, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized ); + aDocument->AddFieldL(KApplicationFieldCaption, aAppInfo.iShortCaption, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText); } else { diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/calendar/inc/ccalendarplugin.h --- a/harvesterplugins/calendar/inc/ccalendarplugin.h Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/calendar/inc/ccalendarplugin.h Wed Jun 23 18:13:49 2010 +0300 @@ -40,7 +40,12 @@ _LIT(KCalendarLocationField, "Location"); _LIT(KCalendarStartTimeField, "StartTime"); _LIT(KCalendarEndTimeField, "EndTime"); +_LIT(KCalenderCompletedField, "CompletedDate"); _LIT(KCalendarAttendeesField, "Attendees"); +_LIT(KCalendarPriorityField, "Priority"); +_LIT(KCalendarPriorityHigh, "High"); +_LIT(KCalendarPriorityMedium, "Normal"); +_LIT(KCalendarPriorityLow, "Low"); class CCalendarPlugin : public CIndexingPlugin, public MDelayedCallbackObserver, public MCalProgressCallBack, public MCalChangeCallBack2 { diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/calendar/src/ccalendarplugin.cpp --- a/harvesterplugins/calendar/src/ccalendarplugin.cpp Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/calendar/src/ccalendarplugin.cpp Wed Jun 23 18:13:49 2010 +0300 @@ -40,9 +40,7 @@ /** The delay between harvesting chunks. */ const TInt KHarvestingDelay = 2000; - -_LIT(KCalendarTimeFormat,"%F%/0%Y %M %D %H%T"); // Locale independent YYYYMMDDHHSS - +_LIT(KCalendarTimeFormat,"%04d %02d %02d %02d %02d"); // --------------------------------------------------------------------------- // CMessagePlugin::NewL // --------------------------------------------------------------------------- @@ -352,6 +350,7 @@ { if (!iIndexer) return; + OstTrace1( TRACE_NORMAL, CCALENDARPLUGIN_CREATEENTRYL, "CCalendarPlugin::CreateEntryL();Uid=%d", aLocalUid ); CPIXLOGSTRING2("CCalendarPlugin::CreateEntryL(): Uid = %d.", aLocalUid); @@ -387,17 +386,53 @@ index_item->AddFieldL(KCalendarSummaryField, entry->SummaryL()); index_item->AddFieldL(KCalendarDescriptionField, entry->DescriptionL()); index_item->AddFieldL(KCalendarLocationField, entry->LocationL()); + + TUint priority = entry->PriorityL(); + + switch(priority) + { + case 1: + index_item->AddFieldL(KCalendarPriorityField, KCalendarPriorityHigh); + break; + case 2: + index_item->AddFieldL(KCalendarPriorityField, KCalendarPriorityMedium); + break; + case 3: + index_item->AddFieldL(KCalendarPriorityField, KCalendarPriorityLow); + break; + default: + index_item->AddFieldL(KCalendarPriorityField, KNullDesC); + break; + } TBuf<30> dateString; - - TTime startTime = entry->StartTimeL().TimeUtcL(); - startTime.FormatL(dateString, KCalendarTimeFormat); + TDateTime datetime = entry->StartTimeL().TimeUtcL().DateTime(); + dateString.Format( KCalendarTimeFormat, datetime.Year(), + TInt(datetime.Month()+ 1), + datetime.Day() + 1, + datetime.Hour()+ 1, + datetime.Minute()); index_item->AddFieldL(KCalendarStartTimeField, dateString, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); - TTime endTime = entry->EndTimeL().TimeUtcL(); - endTime.FormatL(dateString, KCalendarTimeFormat); + TDateTime endTime = entry->EndTimeL().TimeUtcL().DateTime(); + dateString.Format( KCalendarTimeFormat, endTime.Year(), + TInt(endTime.Month()+ 1), + endTime.Day() + 1, + endTime.Hour()+ 1, + endTime.Minute()); index_item->AddFieldL(KCalendarEndTimeField, dateString, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); - + + TTime completedTime = entry->CompletedTimeL().TimeUtcL(); + if( completedTime != Time::NullTTime() && CCalEntry::ETodo == entry->EntryTypeL()) + { + TDateTime compTime = completedTime.DateTime(); + dateString.Format( KCalendarTimeFormat, compTime.Year(), + TInt(compTime.Month()+ 1), + compTime.Day() + 1, + compTime.Hour()+ 1, + compTime.Minute()); + index_item->AddFieldL(KCalenderCompletedField, dateString, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); + } index_item->AddFieldL(KMimeTypeField, KMimeTypeCalendar, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); TInt excerptLength = 1 /*single 1-character delimiters*/ + entry->DescriptionL().Length() + entry->LocationL().Length(); diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/contacts/src/ccontactsplugin.cpp --- a/harvesterplugins/contacts/src/ccontactsplugin.cpp Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/contacts/src/ccontactsplugin.cpp Wed Jun 23 18:13:49 2010 +0300 @@ -151,6 +151,7 @@ { case EContactDbObserverEventContactChanged: case EContactDbObserverEventGroupChanged: + case EContactDbObserverEventOwnCardChanged: OstTrace1( TRACE_NORMAL, DUP3_CCONTACTSPLUGIN_HANDLEDATABASEEVENTL, "CContactsPlugin::HandleDatabaseEventL;Monitored update id=%d", aEvent.iContactId ); CPIXLOGSTRING2("CContactsPlugin::DelayedCallbackL(): Monitored update id=%d.", aEvent.iContactId); #ifdef __PERFORMANCE_DATA @@ -164,6 +165,7 @@ case EContactDbObserverEventContactDeleted: case EContactDbObserverEventGroupDeleted: + case EContactDbObserverEventOwnCardDeleted: OstTrace1( TRACE_NORMAL, CCONTACTSPLUGIN_HANDLEDATABASEEVENTL, "CContactsPlugin::HandleDatabaseEventL();Monitored delete id=%d", aEvent.iContactId ); CPIXLOGSTRING2("CContactsPlugin::DelayedCallbackL(): Monitored delete id=%d.", aEvent.iContactId); #ifdef __PERFORMANCE_DATA diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/file/src/cfileplugin.cpp --- a/harvesterplugins/file/src/cfileplugin.cpp Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/file/src/cfileplugin.cpp Wed Jun 23 18:13:49 2010 +0300 @@ -630,7 +630,8 @@ if (pos > 0) { fileFoldername.Copy(aFilePath.Mid(pos+1)); - index_item->AddFieldL(KNameField, fileFoldername); + index_item->AddFieldL(KNameField, fileFoldername, + CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText ); } //check for the extension, for folders names store the extension field as NULL @@ -640,7 +641,7 @@ if( file.ExtPresent()) { TPtrC extension = file.Ext(); - index_item->AddFieldL(KExtensionField, extension); + index_item->AddFieldL(KExtensionField, extension, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText); } index_item->AddFieldL(KMimeTypeField, KMimeTypeFile, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); } diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/media/audio/src/cpixmediaaudiodoc.cpp --- a/harvesterplugins/media/audio/src/cpixmediaaudiodoc.cpp Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/media/audio/src/cpixmediaaudiodoc.cpp Wed Jun 23 18:13:49 2010 +0300 @@ -29,7 +29,8 @@ #include "cpixmediaaudiodocTraces.h" #endif - +_LIT( KFormatDateTime, "%04d %02d %02d %02d %02d"); // yyyy mm dd hh mm +_LIT( KExcerptFormat, "%04d/%02d/%02d %02d:%02d"); // ----------------------------------------------------------------------------- // CCPIXDocFetcher::NewL() // ----------------------------------------------------------------------------- @@ -101,56 +102,243 @@ //additional properties here CMdEProperty* property(NULL); CMdEPropertyDef& artistPropDef1 = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KArtistProperty ); - if(aObject.Property( artistPropDef1, property ) != KErrNotFound) - { - //Add field to document - CMdETextProperty* textProperty = ( CMdETextProperty* ) property; - AddFiledtoDocumentL(*index_item, - MdeConstants::MediaObject::KArtistProperty, - textProperty->Value()); - AddToFieldExcerptL(textProperty->Value());//Add artist to excerpt - } + if(aObject.Property( artistPropDef1, property ) != KErrNotFound) + { + //Add field to document + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KArtistProperty, + textProperty->Value(), + CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText); + AddToFieldExcerptL(textProperty->Value());//Add artist to excerpt + } CMdEPropertyDef& albumPropDef = aObjectDef.GetPropertyDefL(MdeConstants::Audio::KAlbumProperty ); if(aObject.Property( albumPropDef, property )!= KErrNotFound) { //Add field to document - CMdETextProperty* textProperty = ( CMdETextProperty* ) property; + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property); AddFiledtoDocumentL(*index_item, MdeConstants::Audio::KAlbumProperty, - textProperty->Value()); + textProperty->Value(), + CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText); AddToFieldExcerptL(textProperty->Value());//Add Album to excerpt } + CMdEPropertyDef& artistPropDef = aObjectDef.GetPropertyDefL(MdeConstants::Audio::KAlbumArtistProperty ); if(aObject.Property( artistPropDef, property ) != KErrNotFound) - { - //Add field to document - CMdETextProperty* textProperty = ( CMdETextProperty* ) property; - AddFiledtoDocumentL(*index_item, - MdeConstants::Audio::KAlbumArtistProperty, - textProperty->Value()); - AddToFieldExcerptL(textProperty->Value());//Add Albumartist to excerpt - } + { + //Add field to document + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); + AddFiledtoDocumentL(*index_item, + MdeConstants::Audio::KAlbumArtistProperty, + textProperty->Value(), + CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText); + AddToFieldExcerptL(textProperty->Value());//Add Albumartist to excerpt + } + //orginal artist property CMdEPropertyDef& origartistPropDef = aObjectDef.GetPropertyDefL(MdeConstants::Audio::KOriginalArtistProperty ); if(aObject.Property( origartistPropDef, property ) != KErrNotFound) { //Add field to document - CMdETextProperty* textProperty = ( CMdETextProperty* ) property; + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); AddFiledtoDocumentL(*index_item, MdeConstants::Audio::KOriginalArtistProperty, - textProperty->Value()); + textProperty->Value(), + CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText); AddToFieldExcerptL(textProperty->Value());//Add Original to excerpt - } + } + //Get composer property CMdEPropertyDef& composerPropDef = aObjectDef.GetPropertyDefL(MdeConstants::Audio::KComposerProperty ); if(aObject.Property( composerPropDef, property ) != KErrNotFound) { //Add field to document - CMdETextProperty* textProperty = ( CMdETextProperty* ) property; + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); AddFiledtoDocumentL(*index_item, MdeConstants::Audio::KComposerProperty, - textProperty->Value()); + textProperty->Value(), + CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText); AddToFieldExcerptL(textProperty->Value());//Add composer to excerpt } - index_item->AddExcerptL(*iExcerpt); + //Get author property + CMdEPropertyDef& authorPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KAuthorProperty ); + if(aObject.Property( authorPropDef, property ) != KErrNotFound) + { + //Add field to document + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KAuthorProperty, + textProperty->Value(), + CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText); + AddToFieldExcerptL(textProperty->Value()); + } + //Get comment property + CMdEPropertyDef& commentPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KCommentProperty ); + if(aObject.Property( commentPropDef, property ) != KErrNotFound) + { + //Add field to document + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KCommentProperty, + textProperty->Value()); + AddToFieldExcerptL(textProperty->Value()); + } + + //Get description property + CMdEPropertyDef& descriprionPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KDescriptionProperty ); + if(aObject.Property( descriprionPropDef, property ) != KErrNotFound) + { + //Add field to document + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KDescriptionProperty, + textProperty->Value()); + AddToFieldExcerptL(textProperty->Value()); + } + //Copyright property + CMdEPropertyDef& copyrightPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KCopyrightProperty ); + if(aObject.Property( copyrightPropDef, property ) != KErrNotFound) + { + //Add field to document + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KCopyrightProperty, + textProperty->Value()); + AddToFieldExcerptL(textProperty->Value()); + } + //Get genre property + CMdEPropertyDef& genrePropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KGenreProperty ); + if(aObject.Property( genrePropDef, property ) != KErrNotFound) + { + //Add field to document + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KGenreProperty, + textProperty->Value()); + AddToFieldExcerptL(textProperty->Value()); + } + + //Size property + CMdEPropertyDef& sizePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KSizeProperty); + if(aObject.Property( sizePropDef, property )!= KErrNotFound) + { + //Add field to document + if( property->Def().PropertyType() == EPropertyUint32 ) + { + CMdEUint32Property& sizeProperty = static_cast < CMdEUint32Property& > (*property ); + TBuf<32> buf; + buf.Format(_L("%u"), sizeProperty.Value()); + AddFiledtoDocumentL(*index_item, + MdeConstants::Object::KSizeProperty, + buf, + CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); + AddToFieldExcerptL(buf); + } + } + + //Get legal property + CMdEPropertyDef& legalPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KLegalProperty ); + if(aObject.Property( legalPropDef, property ) != KErrNotFound) + { + //Add field to document + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KLegalProperty, + textProperty->Value()); + AddToFieldExcerptL(textProperty->Value()); + } + //Get track property + CMdEPropertyDef& trackPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KTrackProperty ); + if(aObject.Property( trackPropDef, property ) != KErrNotFound) + { + //Add field to document + if( property->Def().PropertyType() == EPropertyUint16 ) + { + CMdEUint16Property& trackProperty = static_cast < CMdEUint16Property& > (*property ); + TBuf<32> buf; + buf.Format(_L("%d"), trackProperty.Value()); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KTrackProperty, + buf); + } + } + // Capturedate property + CMdEPropertyDef& captureDatePropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KCaptureDateProperty); + if(aObject.Property( captureDatePropDef, property ) != KErrNotFound) + { + //Add field to document + if(EPropertyTime == property->Def().PropertyType()) + { + CMdETimeProperty& timeProperty = static_cast < CMdETimeProperty& > (*property); + TDateTime time = timeProperty.Value().DateTime(); + TBuf<32> buf; + buf.Format( KFormatDateTime, time.Year(), + time.Month() + 1, + time.Day() + 1, + time.Hour(), + time.Minute()); + + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KCaptureDateProperty, + buf, + CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); + + //Format for excerpt field + buf.Format( KExcerptFormat, time.Year(), + time.Month() + 1, + time.Day() + 1, + time.Hour(), + time.Minute()); + AddToFieldExcerptL(buf); + } + } + //Get LastModifiedDate property + CMdEPropertyDef& dateTimePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KLastModifiedDateProperty); + if(aObject.Property( dateTimePropDef, property ) != KErrNotFound) + { + //Add field to document + if(EPropertyTime == property->Def().PropertyType()) + { + CMdETimeProperty& timeProperty = static_cast < CMdETimeProperty& > (*property); + TDateTime time = timeProperty.Value().DateTime(); + TBuf<32> buf; + buf.Format( KFormatDateTime, time.Year(), + time.Month() + 1, + time.Day() + 1, + time.Hour(), + time.Minute()); + + AddFiledtoDocumentL(*index_item, + MdeConstants::Object::KLastModifiedDateProperty, + buf, + CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); + //Format for excerpt field + buf.Format( KExcerptFormat, time.Year(), + time.Month() + 1, + time.Day() + 1, + time.Hour(), + time.Minute()); + AddToFieldExcerptL(buf); + } + } + //Get duration property + CMdEPropertyDef& durationPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KDurationProperty ); + if(aObject.Property( durationPropDef, property ) != KErrNotFound) + { + //Add field to document + if( property->Def().PropertyType() == EPropertyReal32 ) + { + CMdEReal32Property& durationProperty = static_cast < CMdEReal32Property& > (*property ); + TBuf<32> buf; + buf.Format(_L("%f"), durationProperty.Value()); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KDurationProperty, + buf ); + } + } + if( iExcerpt ) + { + index_item->AddExcerptL(*iExcerpt); + } CPIXLOGSTRING("END CCPIXMediaAudioDoc::GetCpixDocumentL"); OstTraceFunctionExit0( CCPIXMEDIAAUDIODOC_GETCPIXDOCUMENTL_EXIT ); return index_item; diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/media/image/src/cpixmediaimagedoc.cpp --- a/harvesterplugins/media/image/src/cpixmediaimagedoc.cpp Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/media/image/src/cpixmediaimagedoc.cpp Wed Jun 23 18:13:49 2010 +0300 @@ -30,8 +30,8 @@ #endif -_LIT( KFormatDateTime, "%04d %02d %02dT%02d:%02d:%02dZ"); // yyyy-mm-ddThh:mm:ssZ - +_LIT( KFormatDateTime, "%04d %02d %02d %02d %02d"); // yyyy mm dd hh mm +_LIT( KExcerptFormat, "%04d/%02d/%02d %02d:%02d"); //yyyy/mm/dd hh:mm // ----------------------------------------------------------------------------- // CCPIXDocFetcher::NewL() // ----------------------------------------------------------------------------- @@ -96,32 +96,123 @@ CPIXLOGSTRING("START CCPIXMediaImageDoc::GetCpixDocumentL"); CSearchDocument* index_item = CCPIXDocFetcher::GetCpixDocumentL(aObject,aAppClass,aObjectDef); ResetExcerpt(); //Reset excerpt initially - //URI and Excerpt is done add additional properties here + //URI and Excerpt is done add additional properties here CMdEProperty* property(NULL); - //Title property + CMdEPropertyDef& titlePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KTitleProperty ); - if(aObject.Property( titlePropDef, property ) != KErrNotFound) - { - //Add field to document - CMdETextProperty* textProperty = ( CMdETextProperty* ) property; - AddFiledtoDocumentL(*index_item, - MdeConstants::Object::KTitleProperty, - textProperty->Value()); - AddToFieldExcerptL(textProperty->Value()); - } - + if(aObject.Property( titlePropDef, property ) != KErrNotFound) + { + //Add field to document excerpt. + CMdETextProperty* textProperty = ( CMdETextProperty* ) property; + AddToFieldExcerptL(textProperty->Value()); + } + //Get user comment field CMdEPropertyDef& commentPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KCommentProperty ); if(aObject.Property( commentPropDef, property )!= KErrNotFound) { //Add field to document - CMdETextProperty* textProperty = ( CMdETextProperty* ) property; + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); AddFiledtoDocumentL(*index_item, MdeConstants::MediaObject::KCommentProperty, textProperty->Value()); AddToFieldExcerptL(textProperty->Value()); } - CMdEPropertyDef& dateTimePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Image::KDateTimeOriginalProperty); + + //Get user description field + CMdEPropertyDef& descriptionPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KDescriptionProperty ); + if(aObject.Property( descriptionPropDef, property )!= KErrNotFound) + { + //Add field to document + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KDescriptionProperty, + textProperty->Value()); + AddToFieldExcerptL(textProperty->Value()); + } + + //Get user copyright field + CMdEPropertyDef& copyRightPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KCopyrightProperty ); + if(aObject.Property( copyRightPropDef, property )!= KErrNotFound) + { + //Add field to document + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KCopyrightProperty, + textProperty->Value()); + AddToFieldExcerptL(textProperty->Value()); + } + + //Get user genre field + CMdEPropertyDef& genrePropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KGenreProperty ); + if(aObject.Property( genrePropDef, property )!= KErrNotFound) + { + //Add field to document + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KGenreProperty, + textProperty->Value()); + AddToFieldExcerptL(textProperty->Value()); + } + + //Get legal property field + CMdEPropertyDef& legalPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KLegalProperty ); + if(aObject.Property( legalPropDef, property )!= KErrNotFound) + { + //Add field to document + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KLegalProperty, + textProperty->Value()); + AddToFieldExcerptL(textProperty->Value()); + } + //Size property + CMdEPropertyDef& sizePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KSizeProperty); + if(aObject.Property( sizePropDef, property )!= KErrNotFound) + { + //Add field to document + if( property->Def().PropertyType() == EPropertyUint32 ) + { + CMdEUint32Property& sizeProperty = static_cast < CMdEUint32Property& > (*property ); + TBuf<32> buf; + buf.Format(_L("%u"), sizeProperty.Value()); + AddFiledtoDocumentL(*index_item, + MdeConstants::Object::KSizeProperty, + buf, + CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); + AddToFieldExcerptL(buf); + } + } + //Get DateTimeOrginal property + CMdEPropertyDef& dateTimeOrgPropDef = aObjectDef.GetPropertyDefL(MdeConstants::Image::KDateTimeOriginalProperty); + if(aObject.Property( dateTimeOrgPropDef, property ) != KErrNotFound) + { + //Add field to document + if(EPropertyTime == property->Def().PropertyType()) + { + CMdETimeProperty& timeProperty = static_cast < CMdETimeProperty& > (*property); + TDateTime time = timeProperty.Value().DateTime(); + TBuf<32> buf; + buf.Format( KFormatDateTime, time.Year(), + time.Month() + 1, + time.Day() + 1, + time.Hour(), + time.Minute()); + AddFiledtoDocumentL(*index_item, + MdeConstants::Image::KDateTimeOriginalProperty, + buf, + CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); + //Format for excerpt field + buf.Format( KExcerptFormat, time.Year(), + time.Month() + 1, + time.Day() + 1, + time.Hour(), + time.Minute()); + AddToFieldExcerptL(buf); + } + } + //Get LastModifiedDate property + CMdEPropertyDef& dateTimePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KLastModifiedDateProperty); if(aObject.Property( dateTimePropDef, property ) != KErrNotFound) { //Add field to document @@ -130,19 +221,30 @@ CMdETimeProperty& timeProperty = static_cast < CMdETimeProperty& > (*property); TDateTime time = timeProperty.Value().DateTime(); TBuf<32> buf; - buf.Format( KFormatDateTime, time.Year(), - time.Month() + 1, - time.Day() + 1, - time.Hour(), - time.Minute(), - time.Second() ); + buf.Format( KFormatDateTime, time.Year(), + time.Month() + 1, + time.Day() + 1, + time.Hour(), + time.Minute()); + AddFiledtoDocumentL(*index_item, - MdeConstants::Image::KDateTimeOriginalProperty, + MdeConstants::Object::KLastModifiedDateProperty, buf, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); + //Format for excerpt field + buf.Format( KExcerptFormat, time.Year(), + time.Month() + 1, + time.Day() + 1, + time.Hour(), + time.Minute()); + AddToFieldExcerptL(buf); } } - index_item->AddExcerptL(*iExcerpt); + if( iExcerpt ) + { + index_item->AddExcerptL(*iExcerpt); + } + //Latitude error currently /* TODO- Bhuvi Location is a seperate object for each image object if any such relation * exist it has to be searched from Relation table and from there we have to open diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/media/mediautils/src/cpixdocfetcher.cpp --- a/harvesterplugins/media/mediautils/src/cpixdocfetcher.cpp Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/media/mediautils/src/cpixdocfetcher.cpp Wed Jun 23 18:13:49 2010 +0300 @@ -38,6 +38,7 @@ _LIT(KMediaIdField, "MediaId"); _LIT(KExtensionField, "Extension"); _LIT(KExcerptDelimiter, " "); +_LIT(KFormatDateTime, "%04d %02d %02d %02d %02d"); // yyyy mm dd hh mm // ----------------------------------------------------------------------------- // CCPIXDocFetcher::NewL() @@ -126,7 +127,8 @@ //Uri is our Document ID AddFiledtoDocumentL(*index_item, KNameField, //URI as Name field - name); + name, + CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText); //Store media ID for client to generate path and launch corresponding Item TBuf mediaBuf; @@ -143,7 +145,8 @@ //Get the media file extension and store TBuf extension; GetExtension(aObject.Uri(),extension); - AddFiledtoDocumentL( *index_item, KExtensionField, extension ); + AddFiledtoDocumentL( *index_item, KExtensionField, extension, + CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText); CMdEProperty* property(NULL); CMdEPropertyDef& titlePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KTitleProperty ); @@ -153,25 +156,42 @@ if(aObject.Property( titlePropDef, property ) != KErrNotFound) { //Add field to document - CMdETextProperty* textProperty = ( CMdETextProperty* ) property; + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); if(textProperty->Value() != KNullDesC) { AddFiledtoDocumentL(*index_item, MdeConstants::Object::KTitleProperty, - textProperty->Value()); + textProperty->Value(), + CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText); } } + //Item type as MIME type CMdEPropertyDef& mimeTypePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KItemTypeProperty); if(aObject.Property( mimeTypePropDef, property )!= KErrNotFound) { //Add field to document - CMdETextProperty* textProperty = ( CMdETextProperty* ) property; + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); AddFiledtoDocumentL(*index_item, _L(CPIX_MIMETYPE_FIELD), textProperty->Value(), CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); } + //Get ratings field + CMdEPropertyDef& ratingsPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KRatingProperty ); + if(aObject.Property( ratingsPropDef, property )!= KErrNotFound) + { + //Add field to document + if( property->Def().PropertyType() == EPropertyInt32 ) + { + CMdEInt32Property& ratingProperty = static_cast < CMdEInt32Property& > (*property ); + TBuf<32> buf; + buf.Format(_L("%d"), ratingProperty.Value()); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KRatingProperty, + buf ); + } + } CleanupStack::Pop(index_item);//pop up } CPIXLOGSTRING("END CCPIXDocFetcher::GetCpixDocumentL"); diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/media/video/src/cpixmediavideodoc.cpp --- a/harvesterplugins/media/video/src/cpixmediavideodoc.cpp Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/media/video/src/cpixmediavideodoc.cpp Wed Jun 23 18:13:49 2010 +0300 @@ -29,7 +29,8 @@ #include "cpixmediavideodocTraces.h" #endif - +_LIT( KFormatDateTime, "%04d %02d %02d %02d %02d"); // yyyy mm dd hh mm +_LIT( KExcerptFormat, "%04d/%02d/%02d %02d:%02d"); //yyyy/mm/dd hh:mm // ----------------------------------------------------------------------------- // CCPIXDocFetcher::NewL() // ----------------------------------------------------------------------------- @@ -103,7 +104,7 @@ if(aObject.Property( descriptionPropDef, property ) != KErrNotFound) { //Add field to document - CMdETextProperty* textProperty = ( CMdETextProperty* ) property; + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); AddFiledtoDocumentL(*index_item, MdeConstants::MediaObject::KDescriptionProperty, textProperty->Value()); @@ -113,45 +114,205 @@ if(aObject.Property( artistPropDef, property )!= KErrNotFound) { //Add field to document - CMdETextProperty* textProperty = ( CMdETextProperty* ) property; + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); AddFiledtoDocumentL(*index_item, MdeConstants::MediaObject::KArtistProperty, - textProperty->Value()); + textProperty->Value(), + CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText); AddToFieldExcerptL(textProperty->Value()); } CMdEPropertyDef& authorPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KAuthorProperty ); if(aObject.Property( authorPropDef, property ) != KErrNotFound) { //Add field to document - CMdETextProperty* textProperty = ( CMdETextProperty* ) property; + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); AddFiledtoDocumentL(*index_item, MdeConstants::MediaObject::KAuthorProperty, - textProperty->Value()); + textProperty->Value(), + CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText); AddToFieldExcerptL(textProperty->Value()); - } - CMdEPropertyDef& copyrightPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KCopyrightProperty ); - if(aObject.Property( copyrightPropDef, property ) != KErrNotFound) - { - //Add field to document - CMdETextProperty* textProperty = ( CMdETextProperty* ) property; - AddFiledtoDocumentL(*index_item, - MdeConstants::MediaObject::KCopyrightProperty, - textProperty->Value()); - AddToFieldExcerptL(textProperty->Value()); - } + } CMdEPropertyDef& commentPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KCommentProperty ); if(aObject.Property( commentPropDef, property ) != KErrNotFound) { //Add field to document - CMdETextProperty* textProperty = ( CMdETextProperty* ) property; + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); AddFiledtoDocumentL(*index_item, MdeConstants::MediaObject::KCommentProperty, textProperty->Value()); AddToFieldExcerptL(textProperty->Value()); } - index_item->AddExcerptL(*iExcerpt); + + //Get description property + CMdEPropertyDef& descriprionPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KDescriptionProperty ); + if(aObject.Property( descriprionPropDef, property ) != KErrNotFound) + { + //Add field to document + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KDescriptionProperty, + textProperty->Value()); + AddToFieldExcerptL(textProperty->Value()); + } + + CMdEPropertyDef& copyrightPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KCopyrightProperty ); + if(aObject.Property( copyrightPropDef, property ) != KErrNotFound) + { + //Add field to document + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KCopyrightProperty, + textProperty->Value()); + AddToFieldExcerptL(textProperty->Value()); + } + //Get genre property + CMdEPropertyDef& genrePropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KGenreProperty ); + if(aObject.Property( genrePropDef, property ) != KErrNotFound) + { + //Add field to document + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KGenreProperty, + textProperty->Value()); + AddToFieldExcerptL(textProperty->Value()); + } + //Size property + CMdEPropertyDef& sizePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KSizeProperty); + if(aObject.Property( sizePropDef, property )!= KErrNotFound) + { + //Add field to document + if( property->Def().PropertyType() == EPropertyUint32 ) + { + CMdEUint32Property& sizeProperty = static_cast < CMdEUint32Property& > (*property ); + TBuf<32> buf; + buf.Format(_L("%u"), sizeProperty.Value()); + AddFiledtoDocumentL(*index_item, + MdeConstants::Object::KSizeProperty, + buf, + CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); + AddToFieldExcerptL(buf); + } + } + //Get resolution property + CMdEPropertyDef& resolutionPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KResolutionUnitProperty ); + if(aObject.Property( resolutionPropDef, property ) != KErrNotFound) + { + //Add field to document + if( property->Def().PropertyType() == EPropertyUint16 ) + { + CMdEUint16Property& resolutionProperty = static_cast < CMdEUint16Property& > (*property ); + TBuf<32> buf; + buf.Format(_L("%d"), resolutionProperty.Value()); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KResolutionUnitProperty, + buf, + CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); + } + } + //Get legal property + CMdEPropertyDef& legalPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KLegalProperty ); + if(aObject.Property( legalPropDef, property ) != KErrNotFound) + { + //Add field to document + CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property ); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KLegalProperty, + textProperty->Value()); + } + //Get track property + CMdEPropertyDef& trackPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KTrackProperty ); + if(aObject.Property( trackPropDef, property ) != KErrNotFound) + { + //Add field to document + if( property->Def().PropertyType() == EPropertyUint16 ) + { + CMdEUint16Property& trackProperty = static_cast < CMdEUint16Property& > (*property ); + TBuf<32> buf; + buf.Format(_L("%d"), trackProperty.Value()); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KTrackProperty, + buf); + } + } + // Capturedate property + CMdEPropertyDef& captureDatePropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KCaptureDateProperty); + if(aObject.Property( captureDatePropDef, property ) != KErrNotFound) + { + //Add field to document + if(EPropertyTime == property->Def().PropertyType()) + { + CMdETimeProperty& timeProperty = static_cast < CMdETimeProperty& > (*property); + TDateTime time = timeProperty.Value().DateTime(); + TBuf<32> buf; + buf.Format( KFormatDateTime, time.Year(), + time.Month() + 1, + time.Day() + 1, + time.Hour(), + time.Minute()); + + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KCaptureDateProperty, + buf, + CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); + //Format for excerpt field + buf.Format( KExcerptFormat, time.Year(), + time.Month() + 1, + time.Day() + 1, + time.Hour(), + time.Minute()); + AddToFieldExcerptL(buf); + } + } + //Get LastModifiedDate property + CMdEPropertyDef& dateTimePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KLastModifiedDateProperty); + if(aObject.Property( dateTimePropDef, property ) != KErrNotFound) + { + //Add field to document + if(EPropertyTime == property->Def().PropertyType()) + { + CMdETimeProperty& timeProperty = static_cast < CMdETimeProperty& > (*property); + TDateTime time = timeProperty.Value().DateTime(); + TBuf<32> buf; + buf.Format( KFormatDateTime, time.Year(), + time.Month() + 1, + time.Day() + 1, + time.Hour(), + time.Minute()); + + AddFiledtoDocumentL(*index_item, + MdeConstants::Object::KLastModifiedDateProperty, + buf, + CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); + //Format for excerpt field + buf.Format( KExcerptFormat, time.Year(), + time.Month() + 1, + time.Day() + 1, + time.Hour(), + time.Minute()); + AddToFieldExcerptL(buf); + } + } + //Get duration property + CMdEPropertyDef& durationPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KDurationProperty ); + if(aObject.Property( durationPropDef, property ) != KErrNotFound) + { + //Add field to document + if( property->Def().PropertyType() == EPropertyReal32 ) + { + CMdEReal32Property& durationProperty = static_cast < CMdEReal32Property& > (*property ); + TBuf<32> buf; + buf.Format(_L("%f"), durationProperty.Value()); + AddFiledtoDocumentL(*index_item, + MdeConstants::MediaObject::KDurationProperty, + buf, + CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); + } + } + if( iExcerpt ) + { + index_item->AddExcerptL(*iExcerpt); + } OstTraceFunctionExit0( CCPIXMEDIAVIDEODOC_GETCPIXDOCUMENTL_EXIT ); return index_item; } - diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/messaging/email/qtemailfetcher/bwins/qtemailfetcheru.def --- a/harvesterplugins/messaging/email/qtemailfetcher/bwins/qtemailfetcheru.def Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/messaging/email/qtemailfetcher/bwins/qtemailfetcheru.def Wed Jun 23 18:13:49 2010 +0300 @@ -24,4 +24,5 @@ ?handleMailFoldersListed@QEmailFetcher@@QAEXH@Z @ 23 NONAME ; void QEmailFetcher::handleMailFoldersListed(int) ??0QEmailFetcher@@AAE@AAVMEmailItemObserver@@@Z @ 24 NONAME ; QEmailFetcher::QEmailFetcher(class MEmailItemObserver &) ?metaObject@QEmailFetcher@@UBEPBUQMetaObject@@XZ @ 25 NONAME ; struct QMetaObject const * QEmailFetcher::metaObject(void) const + ?getMailboxorfolderSearchDocument@QEmailFetcher@@AAEPAVCSearchDocument@@_K0W4TEmailDocType@@VQString@@@Z @ 26 NONAME ; class CSearchDocument * QEmailFetcher::getMailboxorfolderSearchDocument(unsigned long long, unsigned long long, enum TEmailDocType, class QString) diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/messaging/email/qtemailfetcher/eabi/qtemailfetcheru.def --- a/harvesterplugins/messaging/email/qtemailfetcher/eabi/qtemailfetcheru.def Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/messaging/email/qtemailfetcher/eabi/qtemailfetcheru.def Wed Jun 23 18:13:49 2010 +0300 @@ -24,4 +24,5 @@ _ZNK13QEmailFetcher10metaObjectEv @ 23 NONAME _ZTI13QEmailFetcher @ 24 NONAME _ZTV13QEmailFetcher @ 25 NONAME + _ZN13QEmailFetcher32getMailboxorfolderSearchDocumentEyy13TEmailDocType7QString @ 26 NONAME diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/messaging/email/qtemailfetcher/qtemailfetcher.cpp --- a/harvesterplugins/messaging/email/qtemailfetcher/qtemailfetcher.cpp Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/messaging/email/qtemailfetcher/qtemailfetcher.cpp Wed Jun 23 18:13:49 2010 +0300 @@ -34,6 +34,7 @@ _LIT(KMsgBody, "Body"); _LIT(KMailBoxId, "MailBoxId"); _LIT(KFolderId, "FolderId"); +_LIT(KHasAttachment, "HasAttachment"); _LIT(KMailBoxName, "MailBoxName"); _LIT(KFolderName, "FolderName"); _LIT(KMimeTypeField, CPIX_MIMETYPE_FIELD); @@ -195,13 +196,13 @@ //Use qt_Qstring2TPtrC since we are working with const EmailMessageEnvelope. doc = CSearchDocument::NewL( qt_QString2TPtrC( QString().setNum( aEnvelope.id() ) ), KMsgBaseAppClassGeneric ); - doc->AddFieldL( KMimeTypeField, KMimeTypeMsg, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); + doc->AddFieldL( KMimeTypeField, KMimeTypeMsg, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized | CDocumentField::EAggregateNo); doc->AddFieldL( KMsgSubject, qt_QString2TPtrC( aEnvelope.subject() ), CDocumentField::EStoreYes | CDocumentField::EIndexTokenized ); doc->AddFieldL( KMsgRecipients, qt_QString2TPtrC( recipients ), CDocumentField::EStoreYes | CDocumentField::EIndexTokenized ); doc->AddFieldL( KMsgBody, qt_QString2TPtrC( msgBody ), CDocumentField::EStoreYes | CDocumentField::EIndexTokenized ); - doc->AddFieldL( KMailBoxId, qt_QString2TPtrC( QString().setNum( aMailboxId ) ), CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized ); - doc->AddFieldL( KFolderId, qt_QString2TPtrC( QString().setNum( aFolderId ) ), CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized ); - + doc->AddFieldL( KMailBoxId, qt_QString2TPtrC( QString().setNum( aMailboxId ) ), CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized | CDocumentField::EAggregateNo ); + doc->AddFieldL( KFolderId, qt_QString2TPtrC( QString().setNum( aFolderId ) ), CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized | CDocumentField::EAggregateNo ); + doc->AddFieldL( KHasAttachment, qt_QString2TPtrC( QString().setNum( aEnvelope.hasAttachments() ) ), CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized | CDocumentField::EAggregateNo); // NmApiMailbox aMailBox; // iEmailService->getMailbox( aMailboxId, aMailBox ); // doc->AddFieldL( KMailBoxName, qt_QString2TPtrC(aMailBox.name()) , CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized ); diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/messaging/smsmms/src/cmessagedatahandler.cpp --- a/harvesterplugins/messaging/smsmms/src/cmessagedatahandler.cpp Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/messaging/smsmms/src/cmessagedatahandler.cpp Wed Jun 23 18:13:49 2010 +0300 @@ -66,7 +66,8 @@ _LIT(KFolderField, FOLDER_FIELD); _LIT(KBodyField, BODY_FIELD); _LIT(KSubjectField, SUBJECT_FIELD); - +_LIT(KAttachmentField, ATTACHMENT_FIELD); +_LIT(KValueAttachment, "Attachment"); // ============================ MEMBER FUNCTIONS =============================== // --------------------------------------------------------------------------- @@ -358,7 +359,8 @@ TMsvId service = 0; iMsvSession.GetEntry(aMsvId, service, entry); HBufC *fromNameOrNumberBuf = entry.iDetails.AllocLC(); - index_item->AddFieldL(KFromField, *fromNameOrNumberBuf); + index_item->AddFieldL(KFromField, *fromNameOrNumberBuf, + CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText); // Add the recipients as content items TBuf<64> to_field; @@ -370,7 +372,8 @@ to_field = KToField; if (i>0) to_field.AppendNum(i); - index_item->AddFieldL(to_field, recipientArray.MdcaPoint(i)); + index_item->AddFieldL(to_field, recipientArray.MdcaPoint(i), + CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText); } // Add the body text as a content item @@ -436,6 +439,11 @@ CMsvStore* msvStore = iMmsMtm->Entry().ReadStoreL(); CleanupStack::PushL( msvStore ); MMsvAttachmentManager& attManager = msvStore->AttachmentManagerL(); + //Add attachment value field + TInt count = attManager.AttachmentCount(); + if (count > 0) + index_item->AddFieldL(KAttachmentField, KValueAttachment); + for ( TInt i = 0; i < attManager.AttachmentCount(); i++ ) { CMsvAttachment* attInfo = attManager.GetAttachmentInfoL(i); diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/notes/src/notesplugin.cpp --- a/harvesterplugins/notes/src/notesplugin.cpp Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/notes/src/notesplugin.cpp Wed Jun 23 18:13:49 2010 +0300 @@ -53,7 +53,7 @@ _LIT(KNpdUpdateTime , "Date"); //Reference from CPix calender harvester plugin. -_LIT(KNotesTimeFormat , "%F%/0%Y %M %D %H%T"); // Locale independent YYYYMMDDHHMM +_LIT(KNotesTimeFormat,"%04d %02d %02d %02d %02d"); // --------------------------------------------------------------------------- // CNotesPlugin::NewL @@ -346,8 +346,13 @@ index_item->AddFieldL(KNpdMemo, entry->DescriptionL()); // Add Date fields TBuf<30> dateString; - TTime endTime = entry->EndTimeL().TimeUtcL(); - endTime.FormatL(dateString, KNotesTimeFormat); + TDateTime datetime = entry->EndTimeL().TimeUtcL().DateTime(); + dateString.Format( KNotesTimeFormat, datetime.Year(), + TInt(datetime.Month()+ 1), + datetime.Day() + 1, + datetime.Hour()+ 1, + datetime.Minute()); + index_item->AddFieldL(KNpdUpdateTime, dateString, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); index_item->AddFieldL(KMimeTypeField, KMimeTypeNotes, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized); diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/tsrc/harvesterplugintester/conf/harvesterplugintester.cfg --- a/harvesterplugins/tsrc/harvesterplugintester/conf/harvesterplugintester.cfg Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/tsrc/harvesterplugintester/conf/harvesterplugintester.cfg Wed Jun 23 18:13:49 2010 +0300 @@ -193,6 +193,13 @@ [Endtest] [Test] +title TestCreateAllContactFields +create HarvesterPluginTester foobar +foobar TestCreateAllContactFields And +delete foobar +[Endtest] + +[Test] title TestCreateContactIndexItemL_Edit create HarvesterPluginTester foobar foobar TestCreateContactIndexItemL_Edit update ContactNew ContactModified @@ -251,7 +258,7 @@ [Test] title TestAudioHarvestingUpdateIndex create HarvesterPluginTester foobar -foobar TestAudiooHarvestingUpdateIndex c:\data\eagle_landed.mp3 eagle_landed.mp3 testaudio.wmv +foobar TestAudioHarvestingUpdateIndex c:\data\eagle_landed.mp3 eagle_landed.mp3 testaudio.mp3 delete foobar [Endtest] diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/tsrc/harvesterplugintester/inc/ccalendarobserver.h --- a/harvesterplugins/tsrc/harvesterplugintester/inc/ccalendarobserver.h Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/tsrc/harvesterplugintester/inc/ccalendarobserver.h Wed Jun 23 18:13:49 2010 +0300 @@ -24,7 +24,7 @@ #include "calprogresscallback.h" _LIT8(KGuid, "AGlobalUid"); -class CCalendarObserver : public MCalProgressCallBack +class CCalendarObserver : public CBase, public MCalProgressCallBack { public: static CCalendarObserver* NewL(); diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/tsrc/harvesterplugintester/inc/cmessagesessionobserver.h --- a/harvesterplugins/tsrc/harvesterplugintester/inc/cmessagesessionobserver.h Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/tsrc/harvesterplugintester/inc/cmessagesessionobserver.h Wed Jun 23 18:13:49 2010 +0300 @@ -20,7 +20,7 @@ #include -class CMessageSessionObserver : public MMsvSessionObserver +class CMessageSessionObserver : public CBase, public MMsvSessionObserver { public: static CMessageSessionObserver* NewL(); diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/tsrc/harvesterplugintester/inc/harvesterplugintester.h --- a/harvesterplugins/tsrc/harvesterplugintester/inc/harvesterplugintester.h Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/tsrc/harvesterplugintester/inc/harvesterplugintester.h Wed Jun 23 18:13:49 2010 +0300 @@ -152,7 +152,7 @@ */ virtual TInt TestStartHarvesterL( CStifItemParser& aItem ); - virtual TInt TestFormBaseAppClass( CStifItemParser& aItem ); + virtual TInt TestFormBaseAppClassL( CStifItemParser& aItem ); virtual TInt TestDatabasePathL( CStifItemParser& aItem ); @@ -215,6 +215,8 @@ virtual TInt TestCreateContactIndexItemL( CStifItemParser& aItem ); + virtual TInt TestCreateAllContactFieldsL( CStifItemParser& aItem ); + virtual TInt TestCreateContactGroupL( CStifItemParser& aItem ); virtual TInt TestStartCalenderHarvesterL( CStifItemParser& aItem ); diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/tsrc/harvesterplugintester/src/cmessagesessionobserver.cpp --- a/harvesterplugins/tsrc/harvesterplugintester/src/cmessagesessionobserver.cpp Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/tsrc/harvesterplugintester/src/cmessagesessionobserver.cpp Wed Jun 23 18:13:49 2010 +0300 @@ -169,7 +169,7 @@ TMsvAttachmentId attaId = KMsvNullIndexEntryId; RFs iFSsession; - iFSsession.Connect(); + User::LeaveIfError( iFSsession.Connect()); RFile testfile; CMsvMimeHeaders* mimeHeaders = CMsvMimeHeaders::NewL(); @@ -216,8 +216,8 @@ entry.SetUnread( EFalse ); iMmsClient->Entry().ChangeL( entry ); iMmsClient->SaveMessageL(); - delete iMmsClient; + iMmsClient = NULL; delete mtmReg; return newMsgId; } @@ -290,6 +290,7 @@ delete iSmtpClient; + iSmtpClient = NULL; delete mtmReg; return newMsgId; } diff -r 51d10d255e92 -r 773be20e0a25 harvesterplugins/tsrc/harvesterplugintester/src/harvesterplugintesterblocks.cpp --- a/harvesterplugins/tsrc/harvesterplugintester/src/harvesterplugintesterblocks.cpp Fri Jun 11 13:39:26 2010 +0300 +++ b/harvesterplugins/tsrc/harvesterplugintester/src/harvesterplugintesterblocks.cpp Wed Jun 23 18:13:49 2010 +0300 @@ -90,7 +90,7 @@ // First string is the function name used in TestScripter script file. // Second is the actual implementation member function. ENTRY( "TestStartHarvester", CHarvesterPluginTester::TestStartHarvesterL ), - ENTRY( "TestFormBaseAppClass", CHarvesterPluginTester::TestFormBaseAppClass ), + ENTRY( "TestFormBaseAppClass", CHarvesterPluginTester::TestFormBaseAppClassL ), ENTRY( "TestDatabasePath", CHarvesterPluginTester::TestDatabasePathL ), ENTRY( "TestCreateIndexItemL_Add", CHarvesterPluginTester::TestCreateIndexItemL ), ENTRY( "TestCreateIndexItemL_Update", CHarvesterPluginTester::TestCreateIndexItemL ), @@ -113,6 +113,7 @@ ENTRY( "TestUpdateNoteL", CHarvesterPluginTester::TestUpdateNoteL ), ENTRY( "TestContactsHarvesting", CHarvesterPluginTester::TestStartContactsHarvesterL ), ENTRY( "TestCreateContactIndexItemL_Add", CHarvesterPluginTester::TestCreateContactIndexItemL ), + ENTRY( "TestCreateAllContactFields", CHarvesterPluginTester::TestCreateAllContactFieldsL ), ENTRY( "TestCreateContactIndexItemL_Edit", CHarvesterPluginTester::TestCreateContactIndexItemL ), ENTRY( "TestCreateContactIndexItemL_Delete", CHarvesterPluginTester::TestCreateContactIndexItemL ), ENTRY( "TestCreateContactGroup", CHarvesterPluginTester::TestCreateContactGroupL ), @@ -173,11 +174,12 @@ iPluginTester->iWaitForHarvester->Start();//Wait here till Harvesting is complete. delete filePlugin; delete iPluginTester; + iPluginTester = NULL; doLog( iLog, KErrNone, KNoErrorString ); return KErrNone; } -TInt CHarvesterPluginTester::TestFormBaseAppClass( CStifItemParser& aItem ) +TInt CHarvesterPluginTester::TestFormBaseAppClassL( CStifItemParser& aItem ) { // Print to UI _LIT( KFilePluginBaseAppClass, "FormBaseAppClass" ); @@ -212,7 +214,7 @@ } delete filePlugin; delete iPluginTester; - + iPluginTester = NULL; doLog( iLog, error, KTestFormBaseAppClassNoError ); return error; } @@ -248,6 +250,7 @@ CleanupStack::PopAndDestroy( buffer ); delete filePlugin; delete iPluginTester; + iPluginTester = NULL; doLog( iLog, error, KTestDatabasePathNoError ); return error; } @@ -259,15 +262,24 @@ ESearchTypeNoResultsExpected }; -TInt doSearch( const TDesC& aSearchString, const TDesC& aBaseAppClass, TSearchType aSearchType ) +TInt doSearchL( const TDesC& aSearchString, const TDesC& aBaseAppClass, TSearchType aSearchType ) { + _LIT(KHeaderPrefix, "$prefix(\""); + _LIT(KTrailerPrefix, "\")"); RSearchServerSession session; User::LeaveIfError( session.Connect() ); CCPixSearcher* searcher = CCPixSearcher::NewLC( session ); - searcher->OpenDatabaseL( aBaseAppClass ); - TInt docCount = searcher->SearchL( aSearchString, KNullDesC); + //Form prefix search query + searcher->OpenDatabaseL( aBaseAppClass ); + HBufC* searchbuf = HBufC::NewLC(KHeaderPrefix().Length() + aSearchString.Length() + KTrailerPrefix().Length()); + TPtr searchstring = searchbuf->Des(); + searchstring.Append(KHeaderPrefix); + searchstring.Append(aSearchString); + searchstring.Append(KTrailerPrefix); + TInt docCount = searcher->SearchL( searchstring, KNullDesC); + CleanupStack::PopAndDestroy( searchbuf ); CleanupStack::PopAndDestroy( searcher ); session.Close(); @@ -309,7 +321,7 @@ TPtrC searchString; while( aItem.GetNextString ( searchString ) == KErrNone && error == KErrNone ) { - error = doSearch( searchString, KAppBasePath, ESearchTypeResultsExpected ); + error = doSearchL( searchString, KAppBasePath, ESearchTypeResultsExpected ); } filePlugin->CreateContentIndexItemL( filePathName, ECPixRemoveAction ); } @@ -323,7 +335,7 @@ TPtrC searchString; while( aItem.GetNextString ( searchString ) == KErrNone && error == KErrNone ) { - error = doSearch( searchString, KAppBasePath, ESearchTypeNoResultsExpected ); + error = doSearchL( searchString, KAppBasePath, ESearchTypeNoResultsExpected ); } } } @@ -337,7 +349,7 @@ TPtrC searchString; while( aItem.GetNextString ( searchString ) == KErrNone && error == KErrNone ) { - error = doSearch( searchString, KAppBasePath, ESearchTypeResultsExpected ); + error = doSearchL( searchString, KAppBasePath, ESearchTypeResultsExpected ); } } } @@ -358,7 +370,7 @@ _LIT( KDirectoryToCreate, "C:\\data\\TestFolder\\" ); RFs fs; - fs.Connect(); + User::LeaveIfError( fs.Connect() ); TBool folderExists = BaflUtils::FolderExists(fs, KDirectoryToCreate); if(!folderExists) { @@ -368,12 +380,13 @@ if(error == KErrNone) { - error = doSearch( _L("TestFolder"), KAppBaseFolderFilePath, ESearchTypeResultsExpected ); + error = doSearchL( _L("TestFolder"), KAppBaseFolderFilePath, ESearchTypeResultsExpected ); fs.RmDir(KDirectoryToCreate); } fs.Close(); delete filePlugin; delete iPluginTester; + iPluginTester = NULL; doLog( iLog, error, _L("Error: TestFolderCreateL") ); return error; @@ -383,7 +396,7 @@ { TInt error = KErrNone; RFs fs; - fs.Connect(); + User::LeaveIfError( fs.Connect() ); CFilePlugin* filePlugin = CFilePlugin::NewL(); CFolderRenamedHarvester* iFolderRenameHarvester = CFolderRenamedHarvester::NewL( *filePlugin, fs); @@ -407,7 +420,7 @@ } iPluginTester->iWaitForHarvester->Start();//Wait here till Harvesting is complete. - error = doSearch( _L("TestRenameFolder"), KAppBaseFolderFilePath, ESearchTypeResultsExpected ); + error = doSearchL( _L("TestRenameFolder"), KAppBaseFolderFilePath, ESearchTypeResultsExpected ); if(error == KErrNone) { @@ -418,13 +431,15 @@ User::After( (TTimeIntervalMicroSeconds32)35000000 ); //Search for the renamed directory - error = doSearch( _L("TestFolderRenamed"), KAppBaseFolderFilePath, ESearchTypeNoResultsExpected ); + error = doSearchL( _L("TestFolderRenamed"), KAppBaseFolderFilePath, ESearchTypeNoResultsExpected ); fs.RmDir(KDirectoryRenamed); delete filePlugin; delete iFolderRenameHarvester; + iFolderRenameHarvester = NULL; delete iPluginTester; + iPluginTester = NULL; fs.Close(); doLog( iLog, error, _L("Error: TestFolderRenameL") ); @@ -461,6 +476,7 @@ delete plugin; delete iPluginTester; + iPluginTester = NULL; delete sessionobserver; delete msgSession; doLog(iLog,KErrNone,KNoErrorString); @@ -502,6 +518,7 @@ delete plugin; delete iPluginTester; + iPluginTester = NULL; delete sessionobserver; delete msgSession; doLog(iLog,error,_L("Error in TestMessageHarvesterWithMessageL")); @@ -552,6 +569,7 @@ delete plugin; delete iPluginTester; + iPluginTester = NULL; delete sessionobserver; delete msgSession; doLog(iLog,error,_L("Error in TestMessageHarvesterChangeDriveL")); @@ -582,6 +600,7 @@ iPluginTester->iWaitForHarvester->Start();//Wait here till Harvesting is complete. delete plugin; delete iPluginTester; + iPluginTester = NULL; doLog( iLog, KErrNone, KNoErrorString ); return KErrNone; } @@ -627,12 +646,12 @@ { error = aItem.GetNextString( string ); if( KErrNone == error ) - error = doSearch( string , _L( BOOKMARK_QBASEAPPCLASS ), ESearchTypeResultsExpected ); + error = doSearchL( string , _L( BOOKMARK_QBASEAPPCLASS ), ESearchTypeResultsExpected ); } delete plugin; delete iPluginTester; - + iPluginTester = NULL; favoritesDb.Close(); favSession.Close(); @@ -670,6 +689,7 @@ iPluginTester->iWaitForHarvester->Start();//Wait here till Harvesting is complete. delete appsPlugin; delete iPluginTester; + iPluginTester = NULL; doLog( iLog, KErrNone, KNoErrorString ); return KErrNone; } @@ -686,6 +706,7 @@ delete appsPlugin; delete iPluginTester; + iPluginTester = NULL; doLog( iLog, KErrNone, KNoErrorString ); return KErrNone; } @@ -698,7 +719,8 @@ plugin->StartHarvestingL( _L(NOTES_QBASEAPPCLASS) ); iPluginTester->iWaitForHarvester->Start();//Wait here till Harvesting is complete. delete plugin; - delete iPluginTester; + delete iPluginTester; + iPluginTester = NULL; doLog( iLog, KErrNone, KNoErrorString ); return KErrNone; } @@ -762,7 +784,7 @@ session->AddNoteL(memo->Des()); plugin->StartHarvestingL( _L(NOTES_QBASEAPPCLASS) ); iPluginTester->iWaitForHarvester->Start();//Wait here till Harvesting is complete. - error = doSearch( aString2, _L(NOTES_QBASEAPPCLASS), ESearchTypeResultsExpected ); + error = doSearchL( aString2, _L(NOTES_QBASEAPPCLASS), ESearchTypeResultsExpected ); delete session; doLog( iLog, error, KNoErrorString ); @@ -770,6 +792,7 @@ delete memo; delete plugin; delete iPluginTester; + iPluginTester = NULL; return error; } @@ -792,14 +815,14 @@ session->AddNoteL( buf8->Des()); User::After( (TTimeIntervalMicroSeconds32)35000000 ); delete buf8; - error = doSearch( _L("TestNote"), _L( NOTES_QBASEAPPCLASS ), ESearchTypeResultsExpected ); + error = doSearchL( _L("TestNote"), _L( NOTES_QBASEAPPCLASS ), ESearchTypeResultsExpected ); doLog( iLog, error, KSearchError ); if( error == KErrNone) { session->DeleteNoteEntryL(); User::After( (TTimeIntervalMicroSeconds32)35000000 ); //Delete the Note entry added previously and search for result - error = doSearch( _L("TestNote"), _L( NOTES_QBASEAPPCLASS ), ESearchTypeResultsExpected ); + error = doSearchL( _L("TestNote"), _L( NOTES_QBASEAPPCLASS ), ESearchTypeResultsExpected ); //If the entery is succesfully deleted, make error to KErrNone.To show testcase success if(error == KErrNotFound) error = KErrNone; @@ -807,6 +830,7 @@ delete session; delete plugin; delete iPluginTester; + iPluginTester = NULL; doLog( iLog, error, KSearchError ); return KErrNone; } @@ -831,7 +855,7 @@ TBuf<20> oldsearchstring; oldsearchstring.Copy( oldString ); iPluginTester->iWaitForHarvester->Start(); - error = doSearch( oldsearchstring, _L( NOTES_QBASEAPPCLASS ), ESearchTypeResultsExpected ); + error = doSearchL( oldsearchstring, _L( NOTES_QBASEAPPCLASS ), ESearchTypeResultsExpected ); doLog( iLog, error, KSearchError ); TBuf<20> newsearchstring; @@ -842,14 +866,15 @@ session->UpdateNoteEntryL( oldbuf8->Des(), newbuf8->Des() ); plugin->StartHarvestingL( _L(NOTES_QBASEAPPCLASS) ); iPluginTester->iWaitForHarvester->Start(); - error = doSearch( newsearchstring, _L( NOTES_QBASEAPPCLASS ), ESearchTypeResultsExpected ); + error = doSearchL( newsearchstring, _L( NOTES_QBASEAPPCLASS ), ESearchTypeResultsExpected ); doLog( iLog, error, KSearchError ); delete newbuf8; delete oldbuf8; delete session; delete plugin; - delete iPluginTester; + delete iPluginTester; + iPluginTester = NULL; return error; } @@ -862,6 +887,7 @@ iPluginTester->iWaitForHarvester->Start();//Wait here till Harvesting is complete. delete plugin; delete iPluginTester; + iPluginTester = NULL; doLog( iLog, KErrNone, KNoErrorString ); return KErrNone; } @@ -917,7 +943,7 @@ aContactId = CreateNewContactL( *db, ContactName, _L("1234") ); iPluginTester->iWaitForHarvester->Start();//Wait here till Harvesting is complete. - error = doSearch( ContactName, _L( CONTACT_QBASEAPPCLASS ), ESearchTypeResultsExpected ); + error = doSearchL( ContactName, _L( CONTACT_QBASEAPPCLASS ), ESearchTypeResultsExpected ); db->DeleteContactL(aContactId); } } @@ -953,27 +979,8 @@ CleanupStack::PopAndDestroy(contactItem); CleanupStack::PopAndDestroy(newCard); - error = doSearch( NewContactName, _L( CONTACT_QBASEAPPCLASS ), ESearchTypeResultsExpected ); + error = doSearchL( NewContactName, _L( CONTACT_QBASEAPPCLASS ), ESearchTypeResultsExpected ); } - /*CContactItem* contactItem = db->OpenContactL( aContactId ); - CleanupStack::PushL( contactItem ); - // First get the item's field set - CContactItemFieldSet& fieldSet=contactItem->CardFields(); - // Search the field set for the given name field - TInt index = fieldSet.Find( KUidContactFieldGivenName ); - CContactItemField &field= fieldSet[index]; - if( aItem.GetNextString ( NewContactName ) == KErrNone ) - { - field.TextStorage()->SetTextL( NewContactName ); - // Commit the change back to database and clean up - db->CommitContactL( *contactItem ); - } - CleanupStack::PopAndDestroy(contactItem)*/; - - /*plugin->StartHarvestingL( _L(CONTACT_QBASEAPPCLASS) ); - iPluginTester->iWaitForHarvester->Start(); - error = doSearch( NewContactName, _L( CONTACT_QBASEAPPCLASS ), ESearchTypeResultsExpected ); - db->DeleteContactL( aContactId );*/ } } if( IndexAction.Compare( KActionDelete ) == 0 ) @@ -985,25 +992,98 @@ //Add a contact to contactdatabase and later delete it aContactId = CreateNewContactL( *db, ContactName, _L("123455")); iPluginTester->iWaitForHarvester->Start(); - error = doSearch( ContactName, _L( CONTACT_QBASEAPPCLASS ), ESearchTypeResultsExpected ); + error = doSearchL( ContactName, _L( CONTACT_QBASEAPPCLASS ), ESearchTypeResultsExpected ); if(error == KErrNone) { plugin->StartHarvestingL( _L(CONTACT_QBASEAPPCLASS)); db->DeleteContactL(aContactId); iPluginTester->iWaitForHarvester->Start(); - error = doSearch( ContactName, _L( CONTACT_QBASEAPPCLASS ), ESearchTypeNoResultsExpected ); + error = doSearchL( ContactName, _L( CONTACT_QBASEAPPCLASS ), ESearchTypeNoResultsExpected ); } } } - } - + } delete db; delete plugin; delete iPluginTester; - + iPluginTester = NULL; doLog( iLog, error, KSearchError ); return KErrNone; } + +TInt CHarvesterPluginTester::TestCreateAllContactFieldsL( CStifItemParser& aItem ) + { + TInt error = KErrNone; + TPtrC ContactName; + _LIT( KBirthDate, "19970107:"); + _LIT( KSearchError, "Search Failed" ); + + CContactsPlugin* plugin = CContactsPlugin::NewL(); + CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin ); + plugin->StartPluginL(); + CContactDatabase* db = CContactDatabase::OpenL(); + if( aItem.GetNextString ( ContactName ) == KErrNone ) + { + plugin->StartHarvestingL( _L(CONTACT_QBASEAPPCLASS) ); + CContactCard* newCard = CContactCard::NewLC(); + + // Create the firstName field and add the data to it + CContactItemField* firstName = CContactItemField::NewLC( KStorageTypeText, KUidContactFieldGivenName ); + firstName->TextStorage()->SetTextL(ContactName); + newCard->AddFieldL(*firstName); + CleanupStack::Pop(firstName); + + CContactItemField* suffix = CContactItemField::NewLC( KStorageTypeText, KUidContactFieldSuffixName ); + suffix->TextStorage()->SetTextL(_L("Mr")); + newCard->AddFieldL(*suffix); + CleanupStack::Pop(suffix); + + CContactItemField* assistant = CContactItemField::NewLC( KStorageTypeText, KUidContactFieldAssistant ); + assistant->TextStorage()->SetTextL(_L("Jane")); + newCard->AddFieldL(*assistant); + CleanupStack::Pop(assistant); + + CContactItemField* department = CContactItemField::NewLC( KStorageTypeText, KUidContactFieldDepartmentName ); + department->TextStorage()->SetTextL(_L("Services")); + newCard->AddFieldL(*department); + CleanupStack::Pop(department); + + CContactItemField* birthday = CContactItemField::NewLC( KStorageTypeDateTime, KUidContactFieldBirthday ); + TTime time(KBirthDate); + birthday->DateTimeStorage()->SetTime(time); + newCard->AddFieldL(*birthday); + CleanupStack::Pop(birthday); + + CContactItemField* anniversary = CContactItemField::NewLC( KStorageTypeText, KUidContactFieldAnniversary ); + anniversary->TextStorage()->SetTextL(_L("2002-10-10")); + newCard->AddFieldL(*anniversary); + CleanupStack::Pop(anniversary); + + // Create the phoneNo field and add the data to it + CContactItemField* phoneNumber = CContactItemField::NewLC( KStorageTypeText, KUidContactFieldPhoneNumber ); + phoneNumber->TextStorage()->SetTextL(_L("1234")); + newCard->AddFieldL(*phoneNumber); + CleanupStack::Pop(phoneNumber); + + // Add newCard to the database + const TContactItemId contactId = db->AddNewContactL(*newCard); + CleanupStack::PopAndDestroy(newCard); + + iPluginTester->iWaitForHarvester->Start(); + + error = doSearchL( ContactName, _L( CONTACT_QBASEAPPCLASS ), ESearchTypeResultsExpected ); + if( error == KErrNone ) + { + error = doSearchL( _L("jan"), _L( CONTACT_QBASEAPPCLASS ), ESearchTypeResultsExpected ); + } + } + delete db; + delete plugin; + delete iPluginTester; + iPluginTester = NULL; + doLog( iLog, error, KSearchError ); + return error; + } TInt CHarvesterPluginTester::TestCreateContactGroupL( CStifItemParser& aItem ) { TInt error = KErrNone; @@ -1021,7 +1101,7 @@ CContactItem* newitem = db->CreateContactGroupL( _L("TestGroup") ); db->AddContactToGroupL( aContactId, newitem->Id() ); iPluginTester->iWaitForHarvester->Start(); - error = doSearch( GroupName, _L( CONTACT_QBASEAPPCLASS ), ESearchTypeResultsExpected ); + error = doSearchL( GroupName, _L( CONTACT_QBASEAPPCLASS ), ESearchTypeResultsExpected ); //update the group by adding a new contact, to get update event CContactGroup* group = static_cast(db->OpenContactLX(newitem->Id())); @@ -1043,6 +1123,7 @@ delete plugin; delete iPluginTester; + iPluginTester = NULL; delete db; doLog( iLog, error, KSearchError ); return KErrNone; @@ -1057,6 +1138,7 @@ iPluginTester->iWaitForHarvester->Start();//Wait here till Harvesting is complete. delete plugin; delete iPluginTester; + iPluginTester = NULL; doLog( iLog, KErrNone, KNoErrorString ); return KErrNone; } @@ -1075,7 +1157,7 @@ session->AddEntryL(); iPluginTester->iWaitForHarvester->Start(); User::After((TTimeIntervalMicroSeconds32)30000000); - error = doSearch( _L("Meeting"), _L( CALENDAR_QBASEAPPCLASS ), ESearchTypeResultsExpected ); + error = doSearchL( _L("Meeting"), _L( CALENDAR_QBASEAPPCLASS ), ESearchTypeResultsExpected ); doLog( iLog, error, KSearchError ); // For update event @@ -1087,7 +1169,7 @@ session->DeleteEntryL(); iPluginTester->iWaitForHarvester->Start(); //Delete the calender entry added previously and search for result - error = doSearch( _L("scheduled"), _L( CALENDAR_QBASEAPPCLASS ), ESearchTypeResultsExpected ); + error = doSearchL( _L("scheduled"), _L( CALENDAR_QBASEAPPCLASS ), ESearchTypeResultsExpected ); //If the entery is succesfully deleted, make error to KErrNone.To show testcase success if(error == KErrNotFound) @@ -1096,6 +1178,7 @@ delete session; delete plugin; delete iPluginTester; + iPluginTester = NULL; doLog( iLog, error, KSearchError ); return KErrNone; } @@ -1133,6 +1216,7 @@ MessagingUtils::RemoveMmsEntryL( msgSession, msgid ); delete plugin; delete iPluginTester; + iPluginTester = NULL; delete sessionobserver; delete msgSession; doLog(iLog,error,KSearchError); @@ -1164,6 +1248,7 @@ MessagingUtils::RemoveMmsEntryL( msgSession, msgid ); delete plugin; delete iPluginTester; + iPluginTester = NULL; delete sessionobserver; delete msgSession; doLog(iLog,error,KSearchError); @@ -1183,7 +1268,7 @@ plugin->StartPluginL(); //Initialize the Plugin //Copy file path RFs fileSession; - fileSession.Connect(); + User::LeaveIfError( fileSession.Connect() ); _LIT(KPathToMusic,"c:\\data\\music\\"); fileSession.Delete(_L("c:\\data\\music\\Eagle_Landed.mp3")); //Delete if already exist //pause harvester while copy @@ -1208,6 +1293,7 @@ doLog(iLog,error,_L("Error in TestAudioHarvestingL")); delete plugin; delete iPluginTester; + iPluginTester = NULL; fileSession.Close(); //End search return error; @@ -1225,7 +1311,7 @@ CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin ); plugin->StartPluginL(); RFs fSession; - fSession.Connect(); + User::LeaveIfError( fSession.Connect()); CleanupClosePushL( fSession ); if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone)) { @@ -1263,6 +1349,7 @@ CleanupStack::PopAndDestroy(); delete plugin; delete iPluginTester; + iPluginTester = NULL; return error; } @@ -1276,7 +1363,7 @@ CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin ); plugin->StartPluginL(); RFs fSession; - fSession.Connect(); + User::LeaveIfError( fSession.Connect()); CleanupClosePushL( fSession ); if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone)) { @@ -1310,6 +1397,7 @@ CleanupStack::PopAndDestroy(); delete plugin; delete iPluginTester; + iPluginTester = NULL; return error; } @@ -1416,7 +1504,7 @@ CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin ); plugin->StartPluginL(); RFs fSession; - fSession.Connect(); + User::LeaveIfError( fSession.Connect()); CleanupClosePushL( fSession ); if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone)) { @@ -1450,6 +1538,7 @@ CleanupStack::PopAndDestroy(); delete plugin; delete iPluginTester; + iPluginTester = NULL; doLog( iLog, error, _L("Error in TestVideoHarvestingIndexL") ); return error; } @@ -1467,7 +1556,7 @@ CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin ); plugin->StartPluginL(); RFs fSession; - fSession.Connect(); + User::LeaveIfError( fSession.Connect()); CleanupClosePushL( fSession ); if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone)) { @@ -1505,6 +1594,7 @@ CleanupStack::PopAndDestroy(); delete plugin; delete iPluginTester; + iPluginTester = NULL; return error; } @@ -1518,7 +1608,7 @@ CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin ); plugin->StartPluginL(); RFs fSession; - fSession.Connect(); + User::LeaveIfError( fSession.Connect()); CleanupClosePushL( fSession ); if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone)) { @@ -1552,6 +1642,7 @@ CleanupStack::PopAndDestroy(); delete plugin; delete iPluginTester; + iPluginTester = NULL; return error; } @@ -1565,7 +1656,7 @@ CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin ); plugin->StartPluginL(); RFs fSession; - fSession.Connect(); + User::LeaveIfError( fSession.Connect()); CleanupClosePushL( fSession ); if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone)) { @@ -1599,6 +1690,7 @@ CleanupStack::PopAndDestroy(); delete plugin; delete iPluginTester; + iPluginTester = NULL; return error; } @@ -1615,7 +1707,7 @@ CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin ); plugin->StartPluginL(); RFs fSession; - fSession.Connect(); + User::LeaveIfError( fSession.Connect()); CleanupClosePushL( fSession ); if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone)) { @@ -1652,6 +1744,7 @@ CleanupStack::PopAndDestroy(); delete plugin; delete iPluginTester; + iPluginTester = NULL; return error; } @@ -1665,7 +1758,7 @@ CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin ); plugin->StartPluginL(); RFs fSession; - fSession.Connect(); + User::LeaveIfError( fSession.Connect() ); CleanupClosePushL( fSession ); if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone)) { @@ -1699,6 +1792,7 @@ CleanupStack::PopAndDestroy(); delete plugin; delete iPluginTester; + iPluginTester = NULL; return error; } @@ -1716,7 +1810,8 @@ //iPluginTester->iWaitForHarvester->Start(); //Start Wait AO and let it complete doLog(iLog,error,_L("Error in TestAudioMMCEventL")); delete plugin; - delete iPluginTester; + delete iPluginTester; + iPluginTester = NULL; //End search return err; } @@ -1735,7 +1830,8 @@ //iPluginTester->iWaitForHarvester->Start(); //Start Wait AO and let it complete doLog(iLog,error,_L("Error in TestVideoMMCEventL")); delete plugin; - delete iPluginTester; + delete iPluginTester; + iPluginTester = NULL; //End search return err; } @@ -1754,7 +1850,8 @@ //iPluginTester->iWaitForHarvester->Start(); //Start Wait AO and let it complete doLog(iLog,error,_L("Error in TestImageMMCEventL")); delete plugin; - delete iPluginTester; + delete iPluginTester; + iPluginTester = NULL; //End search return err; } diff -r 51d10d255e92 -r 773be20e0a25 searchui/Searchapplication/Searchapplication.pro --- a/searchui/Searchapplication/Searchapplication.pro Fri Jun 11 13:39:26 2010 +0300 +++ b/searchui/Searchapplication/Searchapplication.pro Wed Jun 23 18:13:49 2010 +0300 @@ -35,6 +35,7 @@ CONFIG += hb CONFIG += console +CONFIG += hb console mobility TRANSLATIONS += searchsw.ts nft:DEFINES += NFT @@ -53,9 +54,11 @@ TARGET.UID3 = 0x2002C377 TARGET.CAPABILITY = CAP_APPLICATION AllFiles TrustedUI TARGET.EPOCSTACKSIZE = 0x14000 // 80kB - TARGET.EPOCHEAPSIZE = 0x20000 0x1000000 // 128kB - 16MB + TARGET.EPOCHEAPSIZE = 0x20000 0x800000 // 128kB - 16MB rom:DEFINES += ROM SKINICON = qtg_large_search + INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE + INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE } win32 { diff -r 51d10d255e92 -r 773be20e0a25 searchui/Searchapplication/src/main.cpp --- a/searchui/Searchapplication/src/main.cpp Fri Jun 11 13:39:26 2010 +0300 +++ b/searchui/Searchapplication/src/main.cpp Wed Jun 23 18:13:49 2010 +0300 @@ -30,7 +30,7 @@ int main(int argc, char *argv[]) { SEARCH_FUNC_ENTRY("SEARCH::Search::main"); - + PERF_APP_LAUNCH_END("SearchApplication Main Called"); HbApplication app(argc, argv); QTranslator translator; @@ -58,8 +58,9 @@ QTranslator notesTranslator; notesTranslator.load("notes_" + lang, path); app.installTranslator(¬esTranslator); - + PERF_APP_LAUNCH_END("Search Component Cunstructions starts"); Search search; + PERF_APP_LAUNCH_END("Search Component Cunstructions Ends"); #ifdef ROM QDir::setCurrent("Z:/"); #else @@ -70,6 +71,7 @@ QObject::connect(&search, SIGNAL(exit()), &app, SLOT(quit()), Qt::QueuedConnection); search.start(); + PERF_APP_LAUNCH_END("SearchApplication Ends, Main Event Loop"); int ret = app.exec(); SEARCH_FUNC_EXIT("SEARCH::Search::main"); return ret; diff -r 51d10d255e92 -r 773be20e0a25 searchui/inc/Search_global.h --- a/searchui/inc/Search_global.h Fri Jun 11 13:39:26 2010 +0300 +++ b/searchui/inc/Search_global.h Wed Jun 23 18:13:49 2010 +0300 @@ -26,6 +26,13 @@ #include #endif #endif +//#define OST_TRACE_COMPILER_IN_USE //Uncomment to enable performance measurements. + +#ifdef OST_TRACE_COMPILER_IN_USE +#define PERF_APP_LAUNCH_END(str) qDebug() << "Search_App_Launch :"< #include #include - +#include #include - +#define hbApp qobject_cast(qApp) // states const char wizardProgressiveStateUri[] = @@ -133,7 +133,32 @@ wizardProgressiveState, SLOT(_customizeGoButton(bool))); // set initial state for statemachine - searchRootState->setInitialState(wizardProgressiveState); + if (hbApp->activateReason() == Hb::ActivationReasonActivity) + { + + QVariantHash params = hbApp->activateParams(); + QString var = params.value("activityname").toString(); + + if (var == "SearchView") + { + searchRootState->setInitialState(wizardProgressiveState); + } + else if (var == "SearchDeviceQueryView") + { + searchRootState->setInitialState(wizardProgressiveState); + + } + else if (var == "SearchWebQueryView") + { + //set initial state as internet + } + } + else if (hbApp->activateReason() == Hb::ActivationReasonNormal) + { + + searchRootState->setInitialState(wizardProgressiveState); + + } guiRootState->setInitialState(searchRootState); this->setInitialState(parallel); diff -r 51d10d255e92 -r 773be20e0a25 searchui/stateproviders/searchstateprovider/inc/searchprogressivestate.h --- a/searchui/stateproviders/searchstateprovider/inc/searchprogressivestate.h Fri Jun 11 13:39:26 2010 +0300 +++ b/searchui/stateproviders/searchstateprovider/inc/searchprogressivestate.h Wed Jun 23 18:13:49 2010 +0300 @@ -30,10 +30,9 @@ #include "search_global.h" #include -//Uncomment to enable performance measurements. -//#define OST_TRACE_COMPILER_IN_USE + -#ifdef OST_TRACE_COMPILER_IN_USE +#ifdef OST_TRACE_COMPILER_IN_USE //defined in Search_global.h #define PERF_CAT_API_TIME_RESTART m_categorySearchApiTime.restart(); #define PERF_CAT_UI_TIME_RESTART m_categorySearchUiTime.restart(); @@ -46,7 +45,9 @@ #define PERF_CAT_GETDOC_TIME_ACCUMULATE m_getDocumentCatergoryTimeAccumulator += m_categoryGetDocumentApiTime.elapsed(); #define PERF_CAT_GETDOC_ACCUMULATOR_RESET m_getDocumentCatergoryTimeAccumulator = 0; #define PERF_CAT_GETDOC_ACCUMULATOR_ENDLOG qDebug() << "Get Doc on category (API): " << mTemplist.at( mDatabasecount-1 ) << "took " << m_getDocumentCatergoryTimeAccumulator << "msec"; - +#define PERF_RESULT_ITEM_LAUNCH_TIME_RESTART m_resultItemLaunchTime.restart(); +#define PERF_RESULT_ITEM_FOR_LAUNCHING(string) qDebug() <<"Result_Item_Launching: Launching "< #include #include -#include +#include #include #include #include @@ -53,6 +53,7 @@ #include #include #include +#define hbApp qobject_cast(qApp) const char *SEARCHSTATEPROVIDER_DOCML = ":/xml/searchstateprovider.docml"; const char *TOC_VIEW = "tocView"; const char *TUT_SEARCHPANEL_WIDGET = "searchPanel"; @@ -64,7 +65,7 @@ SearchProgressiveState::SearchProgressiveState(QState *parent) : QState(parent), mMainWindow(NULL), mView(NULL), mListView(NULL), mDocumentLoader(NULL), mModel(NULL), mSearchHandler(NULL), - notesEditor(0), mAiwMgr(0), mRequest(0) + mNotesEditor(0), mAiwMgr(0), mRequest(0) { mMainWindow = hbInstance->allMainWindows().at(0); @@ -123,7 +124,7 @@ { mSearchPanel->setSearchOptionsEnabled(true); - mSearchPanel->setPlaceholderText("Search device"); + mSearchPanel->setPlaceholderText(hbTrId("txt_search_dialog_search_device")); mSearchPanel->setCancelEnabled(false); } @@ -167,6 +168,23 @@ m_categoryGetDocumentApiTime.start(); m_getDocumentCatergoryTimeAccumulator = 0; #endif + + //Notes Editor Interface loading + QDir dir(NOTES_EDITOR_PLUGIN_PATH); + QString pluginName = dir.absoluteFilePath(NOTES_EDITOR_PLUGIN_NAME); + + // Create plugin loader. + mNotespluginLoader = new QPluginLoader(pluginName); + + if (mNotespluginLoader) + { + // Load the plugin. + mNotespluginLoader->load(); + + QObject *plugin = qobject_cast ( + mNotespluginLoader->instance()); + mNotesEditor = qobject_cast (plugin); + } } // --------------------------------------------------------------------------- // SearchProgressiveState::~SearchProgressiveState @@ -189,9 +207,10 @@ { delete mSearchHandlerList.at(i); } - if(notesEditor) + if (mNotespluginLoader) { - delete notesEditor; + mNotespluginLoader->unload(); + delete mNotespluginLoader; } } // --------------------------------------------------------------------------- @@ -319,6 +338,8 @@ SLOT(setSettings())); } + connect(mMainWindow, SIGNAL(viewReady()), this, SLOT(viewReady())); + } // --------------------------------------------------------------------------- // SearchProgressiveState::deActivateSignals @@ -346,6 +367,7 @@ disconnect(mSearchPanel, SIGNAL(searchOptionsClicked()), this, SLOT(setSettings())); } + disconnect(mMainWindow, SIGNAL(viewReady()), this, SLOT(viewReady())); } // --------------------------------------------------------------------------- // SearchProgressiveState::onAsyncSearchComplete @@ -562,12 +584,13 @@ { QStandardItem* item = mModel->itemFromIndex(index); if (item == NULL) - return; + return;PERF_RESULT_ITEM_LAUNCH_TIME_RESTART QList args; bool t; mRequest = NULL; if (item->data(Qt::UserRole + 1).toString().contains("contact")) { + PERF_RESULT_ITEM_FOR_LAUNCHING("contact") mRequest = mAiwMgr->create("com.nokia.services.phonebookservices", "Fetch", "open(int)", false); @@ -576,6 +599,8 @@ } else if (item->data(Qt::UserRole + 1).toString().contains("bookmark")) { + PERF_RESULT_ITEM_FOR_LAUNCHING("bookmark") + PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG("") } else if (item->data(Qt::UserRole + 1).toString().contains("calendar")) @@ -598,10 +623,13 @@ } else if (item->data(Qt::UserRole + 1).toString().contains("applications")) { + PERF_RESULT_ITEM_FOR_LAUNCHING("applications") TRAP_IGNORE(LaunchApplicationL(TUid::Uid((item->data(Qt::UserRole)).toString().toInt(&t, 16)))); + PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG("") } else if (item->data(Qt::UserRole + 1).toString().contains("file")) { + PERF_RESULT_ITEM_FOR_LAUNCHING("file") QString uid = item->data(Qt::UserRole).toString(); QFile file(uid); mRequest = mAiwMgr->create(file, false); @@ -611,6 +639,7 @@ || (item->data(Qt::UserRole + 1).toString().contains("audio")) || (item->data(Qt::UserRole + 1).toString().contains("image"))) { + PERF_RESULT_ITEM_FOR_LAUNCHING("media") QString uid = getDrivefromMediaId( item->data(Qt::UserRole + 2).toString()); uid.append(':'); @@ -622,14 +651,16 @@ else if (item->data(Qt::UserRole + 1).toString().contains("notes")) { - if (!notesEditor) + PERF_RESULT_ITEM_FOR_LAUNCHING("notes") + if(mNotesEditor) { - notesEditor = new NotesEditor(this); + mNotesEditor->edit(item->data(Qt::UserRole).toInt()); } - notesEditor->edit(item->data(Qt::UserRole).toInt()); + PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG("") } else if (item->data(Qt::UserRole + 1).toString().contains("msg")) { + PERF_RESULT_ITEM_FOR_LAUNCHING("msg") mRequest = mAiwMgr->create("com.nokia.services.hbserviceprovider", "conversationview", "view(int)", false); @@ -665,6 +696,7 @@ void SearchProgressiveState::handleOk(const QVariant& var) { Q_UNUSED(var); +PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG ("") } // --------------------------------------------------------------------------- // SearchProgressiveState::handleError @@ -1269,6 +1301,7 @@ CleanupStack::PopAndDestroy(&appArcSession); } CleanupStack::PopAndDestroy(&wsSession); +PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG ("") } // --------------------------------------------------------------------------- // SearchProgressiveState::_viewingCompleted @@ -1277,4 +1310,21 @@ { if (calAgandaViewerPluginInstance) calAgandaViewerPluginInstance->deleteLater(); +PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG ("") } +// --------------------------------------------------------------------------- +// SearchProgressiveState::viewReady +// --------------------------------------------------------------------------- +void SearchProgressiveState::viewReady() + { + if (hbApp) + { + if (hbApp->activateReason() == Hb::ActivationReasonActivity) + { + QVariantHash params = hbApp->activateParams(); + QString searchKey = params.value("query").toString(); + if (searchKey.length() > 0) + mSearchPanel->setCriteria(searchKey); + } + }PERF_APP_LAUNCH_END("SearchAppplication View is ready"); + } diff -r 51d10d255e92 -r 773be20e0a25 searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_searchprogressivestate.cpp --- a/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_searchprogressivestate.cpp Fri Jun 11 13:39:26 2010 +0300 +++ b/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_searchprogressivestate.cpp Wed Jun 23 18:13:49 2010 +0300 @@ -225,7 +225,7 @@ { SearchProgressiveState* progressiveState = new SearchProgressiveState(); QEvent *event = new QEvent(QEvent::None); - + progressiveState->onEntry(event); progressiveState->getSettingCategory(0, true); progressiveState->getSettingCategory(1, true); progressiveState->getSettingCategory(2, true); @@ -234,7 +234,7 @@ progressiveState->getSettingCategory(5, true); progressiveState->getSettingCategory(6, true); progressiveState->getSettingCategory(7, true); - progressiveState->onEntry(event); + progressiveState->startNewSearch("jpg"); QTest::qWait(2000); QVERIFY(progressiveState->mModel->rowCount()); @@ -394,6 +394,7 @@ QTest::qWait(200); QModelIndex index = progressiveState->mModel->index(1, 0); QStandardItem* item = progressiveState->mModel->itemFromIndex(index); + if(item) QString uid = progressiveState->getDrivefromMediaId(item->data( Qt::UserRole + 2).toString()); //QVERIFY(uid.length()); diff -r 51d10d255e92 -r 773be20e0a25 searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/t_searchstateprovider.pro --- a/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/t_searchstateprovider.pro Fri Jun 11 13:39:26 2010 +0300 +++ b/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/t_searchstateprovider.pro Wed Jun 23 18:13:49 2010 +0300 @@ -33,10 +33,6 @@ DESTDIR = $$PWD/../../../../../bin/debug/ } -#LIBS += -lappservices -LIBS += -lstatemodel -#LIBS += -searchstateprovider.dll -#LIBS += -searchruntimeprovider.dll LIBS += -lsearchindevicehandler LIBS += -lxqservice LIBS += -lqcpixsearchclient @@ -45,8 +41,14 @@ LIBS += -laknicon LIBS += -lapgrfx LIBS += -lbitgdi -LIBS += -lnoteseditor -LIBS += -lxqutils +#LIBS += -lnoteseditor +LIBS += -lxqutils +LIBS += -lapparc +LIBS += -lefsrv +LIBS += -lapgrfx +LIBS += -lws32 +LIBS += -lavkon + CONFIG += qtestlib \ symbian_test \ debug_and_release \ @@ -74,8 +76,9 @@ TARGET.UID3 = 0x20026F9A TARGET.CAPABILITY = CAP_APPLICATION AllFiles TARGET.EPOCSTACKSIZE = 0x14000 // 80kB -TARGET.EPOCHEAPSIZE = 0x20000 0x1000000 // 128kB - 16MB +TARGET.EPOCHEAPSIZE = 0x20000 0x800000 // 128kB - 16MB INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE +INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE } include(t_searchstateprovider.pri) diff -r 51d10d255e92 -r 773be20e0a25 searchui/tsrc/indexdb/indexdb.pro --- a/searchui/tsrc/indexdb/indexdb.pro Fri Jun 11 13:39:26 2010 +0300 +++ b/searchui/tsrc/indexdb/indexdb.pro Wed Jun 23 18:13:49 2010 +0300 @@ -1,42 +1,12 @@ TEMPLATE = subdirs symbian{ - BLD_INF_RULES.prj_exports += "data/applications/_1/_0.cfs \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\applications\_1\_0.cfs" \ - "data/applications/_1/deletable \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\applications\_1\deletable" \ - "data/applications/_1/segments \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\applications\_1\segments" \ - "data/bookmark/_1/_0.cfs \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\bookmark\_1\_0.cfs" \ - "data/bookmark/_1/deletable \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\bookmark\_1\deletable" \ - "data/bookmark/_1/segments \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\bookmark\_1\segments" \ - "data/calendar/_1/_0.cfs \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\calendar\_1\_0.cfs" \ - "data/calendar/_1/deletable \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\calendar\_1\deletable" \ - "data/calendar/_1/segments \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\calendar\_1\segments" \ - "data/contact/_1/_0.cfs \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\contact\_1\_0.cfs" \ - "data/contact/_1/deletable \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\contact\_1\deletable" \ - "data/contact/_1/segments \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\contact\_1\segments" \ - "data/file/content/_0/_0.cfs \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\file\content\_0\_0.cfs" \ - "data/file/content/_0/deletable \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\file\content\_0\deletable" \ - "data/file/content/_0/segments \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\file\content\_0\segments" \ - "data/file/folder/_1/_0.cfs \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\file\folder\_1\_0.cfs" \ - "data/file/folder/_1/deletable \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\file\folder\_1\deletable" \ - "data/file/folder/_1/segments \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\file\folder\_1\segments" \ - "data/media/audio/_1/_0.cfs \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\media\audio\_1\_0.cfs" \ - "data/media/audio/_1/deletable \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\media\audio\_1\deletable" \ - "data/media/audio/_1/segments \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\media\audio\_1\segments" \ - "data/media/image/_1/_0.cfs \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\media\image\_1\_0.cfs" \ - "data/media/image/_1/deletable \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\media\image\_1\deletable" \ - "data/media/image/_1/segments \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\media\image\_1\segments" \ - "data/media/video/_0/_0.cfs \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\media\video\_0\_0.cfs" \ - "data/media/video/_0/deletable \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\media\video\_0\deletable" \ - "data/media/video/_0/segments \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\media\video\_0\segments" \ - "data/msg/smsmms/_1/_0.cfs \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\msg\smsmms\_1\_0.cfs" \ - "data/msg/smsmms/_1/deletable \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\msg\smsmms\_1\deletable" \ - "data/msg/smsmms/_1/segments \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\msg\smsmms\_1\segments" \ - "data/notes/_1/_0.cfs \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\notes\_1\_0.cfs" \ - "data/notes/_1/deletable \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\notes\_1\deletable" \ - "data/notes/_1/segments \epoc32\winscw\c\private\2001f6f7\indexing\indexdb\root\notes\_1\segments" \ - "data/cpixreg.txt \epoc32\winscw\c\private\2001f6f7\cpixreg.txt" \ - "data/cpixreg.txt \epoc32\winscw\c\private\2001f6f7\clucenelockdir\1.txt" \ - "data/cpixcontentinfo.sq \epoc32\winscw\c\private\2001f6fb\cpixcontentinfo.sq" - + BLD_INF_RULES.prj_exports += "data/water.jpg \epoc32\winscw\c\data\water.jpg" \ + "data/sea.jpg \epoc32\winscw\c\data\sea.jpg" \ + "data/rock.jpg \epoc32\winscw\c\data\tree.jpg" \ + "data/bluesky.jpg \epoc32\winscw\c\data\bluesky.jpg" \ + "data/jungle.jpg \epoc32\winscw\c\data\jungle.jpg" \ + "data/snow.jpg \epoc32\winscw\c\data\snow.jpg" \ + "data/mountain.jpg \epoc32\winscw\c\data\mountain.jpg "