--- a/harvesterplugins/applications/src/applicationsplugin.cpp Fri May 14 15:53:17 2010 +0300
+++ b/harvesterplugins/applications/src/applicationsplugin.cpp Thu May 27 12:52:35 2010 +0300
@@ -137,8 +137,12 @@
//GetWidgetPropertyValueL returns CWidgetPropertyValue* which in turn has an operator to convert to TDesC
aDocument->AddFieldL(KApplicationFieldCaption, *(iWidgetRegistry.GetWidgetPropertyValueL( aUid, EBundleDisplayName )), CDocumentField::EStoreYes | CDocumentField::EIndexTokenized );
- iWidgetRegistry.GetWidgetBundleName( aUid, temp );
- aDocument->AddExcerptL( temp );
+ //For applications, no content to go into exceprt field.
+ //For more info, check the appclass-hierarchy.txt
+ //iWidgetRegistry.GetWidgetBundleName( aUid, temp );
+ //aDocument->AddExcerptL( temp );
+ aDocument->AddExcerptL( KNullDesC );
+
OstTraceExt1( TRACE_NORMAL, DUP1_CAPPLICATIONSPLUGIN_ADDWIDGETINFOL, "CApplicationsPlugin::AddWidgetInfoL;DisplayName=%S", &temp );
CPIXLOGSTRING2("AddApplicationInfo(): DisplayName = %S ", &temp );
}
@@ -150,9 +154,26 @@
TBuf<KMaxFileName> docidString = aAppInfo.iUid.Name(); //This returns stuff in the form "[UID]". So remove the brackets.
docidString = docidString.Mid( KUidStartIndex, KUidEndIndex );
- aDocument->AddFieldL(KApplicationFieldCaption, aAppInfo.iShortCaption, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized );
- aDocument->AddFieldL(KApplicationFieldAbsolutePath, aAppInfo.iFullName, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized );
- aDocument->AddExcerptL( aAppInfo.iCaption );
+ //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 );
+ }
+ else
+ {
+ //Find the *last* location of '\' and remove the .exe to get just the filename.
+ TInt location = aAppInfo.iFullName.LocateReverse('\\');
+ if( location > 0 )
+ {
+ TInt lengthOfNameWithoutExtention = aAppInfo.iFullName.Length() -location -1; //-1 to increment one past '\'.
+ TPtrC appName = aAppInfo.iFullName.Right( lengthOfNameWithoutExtention );
+ aDocument->AddFieldL(KApplicationFieldAbsolutePath, appName.Left( appName.Length() -4 /*remove ".exe"*/), CDocumentField::EStoreYes | CDocumentField::EIndexTokenized );
+ }
+ }
+ //For applications, no content to go into exceprt field, for more info, check the appclass-hierarchy.txt
+ //aDocument->AddExcerptL( aAppInfo.iCaption );
+ aDocument->AddExcerptL( KNullDesC );
+
OstTraceExt2( TRACE_NORMAL, _ADDAPPLICATIONINFOL, "::AddApplicationInfoL;UID=%S;PATH=%S", &docidString, &aAppInfo.iFullName );
OstTraceExt2( TRACE_NORMAL, DUP1__ADDAPPLICATIONINFOL, "::AddApplicationInfoL;Excerpt=%S;Caption=%S", &aAppInfo.iCaption, &aAppInfo.iShortCaption );
@@ -176,6 +197,9 @@
ret = cap().iAppIsHidden;
}
+ //This commented code is left here as the following functionality may need to be
+ //returned if and when this or similar APIs are available for 10.1
+
//Application should not be listed hidden in application shell.
// TBuf<NCentralRepositoryConstants::KMaxUnicodeStringLength> uidResult;
// if( iHiddenApplicationsRepository->Get( KMenuHideApplication, uidResult ) == KErrNone )
--- a/harvesterplugins/bookmarks/src/bookmarksplugin.cpp Fri May 14 15:53:17 2010 +0300
+++ b/harvesterplugins/bookmarks/src/bookmarksplugin.cpp Thu May 27 12:52:35 2010 +0300
@@ -36,7 +36,7 @@
const TInt KHarvestingDelay = 1000;
/** Number of bookmarks to process in one active scheduler cycle */
const TInt KBookmarksPerRunL = 1;
-_LIT(KExcerptDelimiter, " ");
+//_LIT(KExcerptDelimiter, " ");
/** Bookmark list size for dynamic array*/
const TInt KBookmarkListSize = 100;
@@ -270,14 +270,16 @@
OstTraceExt1( TRACE_NORMAL, DUP1_CBOOKMARKSPLUGIN_DOINDEXINGL, "CBookmarksPlugin::DoIndexingL();domain=%S", domain );
CPIXLOGSTRING2("CBookmarksPlugin::DoIndexingL(): domain = %S", &domain );
}
+
+ //For bookmarks, only URL should go into exceprt field.
+ //For more info, check the appclass-hierarchy.txt
+
//Add Excerpt as it is must have field. What should be excerpt in bookmarks ?
- HBufC* excerpt = HBufC::NewLC(aItem->Url().Length() + aItem->Name().Length() + 1);
+ HBufC* excerpt = HBufC::NewLC( aItem->Url().Length() + 1 );
TPtr ptr = excerpt->Des();
- ptr.Append(aItem->Name());
- ptr.Append(KExcerptDelimiter);
- ptr.Append(aItem->Url());
- index_item->AddExcerptL(*excerpt);
- CleanupStack::PopAndDestroy(excerpt);
+ ptr.Append( aItem->Url() );
+ index_item->AddExcerptL( *excerpt );
+ CleanupStack::PopAndDestroy( excerpt );
// Send for indexing
TRAPD(err, iIndexer->AddL(*index_item));
--- a/harvesterplugins/calendar/src/ccalendarplugin.cpp Fri May 14 15:53:17 2010 +0300
+++ b/harvesterplugins/calendar/src/ccalendarplugin.cpp Thu May 27 12:52:35 2010 +0300
@@ -400,11 +400,9 @@
index_item->AddFieldL(KMimeTypeField, KMimeTypeCalendar, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
- TInt excerptLength = 3 + entry->SummaryL().Length() + entry->DescriptionL().Length() + entry->LocationL().Length();
+ TInt excerptLength = 1 /*single 1-character delimiters*/ + entry->DescriptionL().Length() + entry->LocationL().Length();
HBufC* excerpt = HBufC::NewLC(excerptLength);
TPtr excerptDes = excerpt->Des();
- excerptDes.Copy(entry->SummaryL());
- excerptDes.Append(KExcerptDelimiter);
excerptDes.Append(entry->DescriptionL());
excerptDes.Append(KExcerptDelimiter);
excerptDes.Append(entry->LocationL());
--- a/harvesterplugins/contacts/inc/ccontactsplugin.h Fri May 14 15:53:17 2010 +0300
+++ b/harvesterplugins/contacts/inc/ccontactsplugin.h Thu May 27 12:52:35 2010 +0300
@@ -101,6 +101,11 @@
void AddToExcerptL(CSearchDocument& aDocument, CContactItemFieldSet& aFieldSet, TUid aFieldId, const TDesC& aFieldName );
/**
+ * Helper function: adds information field to the document and to the excerpt field(if available)
+ */
+ void AddFieldToDocumentAndExcerptL(CSearchDocument& aDocument, CContactItemFieldSet& aFieldSet, TUid aFieldId, const TDesC& aFieldName );
+
+ /**
* Creates the actual contact book index item
*/
void CreateContactIndexItemL(TInt aContentId, TCPixActionType aActionType);
--- a/harvesterplugins/contacts/src/ccontactsplugin.cpp Fri May 14 15:53:17 2010 +0300
+++ b/harvesterplugins/contacts/src/ccontactsplugin.cpp Thu May 27 12:52:35 2010 +0300
@@ -300,6 +300,17 @@
}
}
+// ---------------------------------------------------------------------------
+// Helper: Adds the field to the document AND to the exceprt field.
+// This function helps avoid calling two functions explicitly for most fields.
+// This function needs to be a member function as it has to call member functions.
+// Improvement: AddFieldL need to be a member function - can be refactored.
+// ---------------------------------------------------------------------------
+void CContactsPlugin::AddFieldToDocumentAndExcerptL(CSearchDocument& aDocument, CContactItemFieldSet& aFieldSet, TUid aFieldId, const TDesC& aFieldName )
+ {
+ AddFieldL( aDocument, aFieldSet, aFieldId, aFieldName );
+ AddToExcerptL( aDocument, aFieldSet, aFieldId, aFieldName );
+ }
// ---------------------------------------------------------------------------
// CContactsPlugin::CreateMessageIndexItemL
@@ -333,52 +344,56 @@
}
else//If the contact item is a regular contact.
{
- CContactItemFieldSet& fieldSet = contact->CardFields();
- AddFieldL( *index_item, fieldSet, KUidContactFieldGivenName, KContactsGivenNameField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldFamilyName, KContactsFamilyNameField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldCompanyName, KContactsCompanyNameField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldPhoneNumber, KContactsPhoneNumberField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldAddress, KContactsAddressField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldNote, KContactsNoteField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldJobTitle, KContactsJobTitleField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldSecondName, KContactsSecondNameField );
-
- AddFieldL( *index_item, fieldSet, KUidContactFieldPrefixName, KContactsPrefixField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldSuffixName, KContactsSuffixField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldAdditionalName, KContactsAdditionalNameField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldEMail, KContactsEMailField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldUrl, KContactsUrlField );
-
- AddFieldL( *index_item, fieldSet, KUidContactFieldPostOffice, KContactsPostOfficeField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldExtendedAddress, KContactsExtendedAddressField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldLocality, KContactsLocalityField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldRegion, KContactsRegionField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldPostcode, KContactsPostcodeField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldCountry, KContactsCountryField );
-
- AddFieldL( *index_item, fieldSet, KUidContactFieldSIPID, KContactsSIPIDField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldSpouse, KContactsSpouseField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldChildren, KContactsChildrenField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldClass, KContactsClassField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldFax, KContactsFaxField );
-
- AddFieldL( *index_item, fieldSet, KUidContactFieldGivenNamePronunciation, KContactsGivenNamePronunciationField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldFamilyNamePronunciation, KContactsFamilyNamePronunciationField );
- AddFieldL( *index_item, fieldSet, KUidContactFieldCompanyNamePronunciation, KContactsCompanyNamePronunciationField );
- //left: Birthday; Anniversary (date kind of type), Picture, Logo..
-
if (iExcerpt)
{
delete iExcerpt;
iExcerpt = NULL;
}
iExcerpt = HBufC::NewL(2);
- AddToExcerptL( *index_item, fieldSet, KUidContactFieldGivenName, KContactsGivenNameField );
- AddToExcerptL( *index_item, fieldSet, KUidContactFieldFamilyName, KContactsFamilyNameField );
- AddToExcerptL( *index_item, fieldSet, KUidContactFieldPhoneNumber, KContactsPhoneNumberField );
- AddToExcerptL( *index_item, fieldSet, KUidContactFieldCompanyName, KContactsCompanyNameField );
- AddToExcerptL( *index_item, fieldSet, KUidContactFieldLocality, KContactsLocalityField );
- AddToExcerptL( *index_item, fieldSet, KUidContactFieldCountry, KContactsCountryField );
+
+ CContactItemFieldSet& fieldSet = contact->CardFields();
+
+ //For contacts, all fields __except__ GivenName and FamilyName should be added to excerpt.
+ //See appclass-hierarchy.txt for details.
+ /* The order of fields in excerpt is as below. The order in this case
+ * is the order of fields shown when you 'Edit' the contact.
+ */
+ AddFieldL( *index_item, fieldSet, KUidContactFieldGivenName, KContactsGivenNameField );
+ AddFieldL( *index_item, fieldSet, KUidContactFieldFamilyName, KContactsFamilyNameField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldPhoneNumber, KContactsPhoneNumberField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldEMail, KContactsEMailField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldSIPID, KContactsSIPIDField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldCompanyName, KContactsCompanyNameField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldJobTitle, KContactsJobTitleField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldNote, KContactsNoteField );
+
+ /* The following fields are not displayed when 'Edit'-ing the contact.
+ * The order here is arbitrary.
+ */
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldAddress, KContactsAddressField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldSecondName, KContactsSecondNameField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldPrefixName, KContactsPrefixField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldSuffixName, KContactsSuffixField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldAdditionalName, KContactsAdditionalNameField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldUrl, KContactsUrlField );
+
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldPostOffice, KContactsPostOfficeField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldExtendedAddress, KContactsExtendedAddressField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldLocality, KContactsLocalityField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldRegion, KContactsRegionField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldPostcode, KContactsPostcodeField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldCountry, KContactsCountryField );
+
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldSpouse, KContactsSpouseField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldChildren, KContactsChildrenField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldClass, KContactsClassField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldFax, KContactsFaxField );
+
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldGivenNamePronunciation, KContactsGivenNamePronunciationField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldFamilyNamePronunciation, KContactsFamilyNamePronunciationField );
+ AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldCompanyNamePronunciation, KContactsCompanyNamePronunciationField );
+ //left: Birthday; Anniversary (date kind of type), Picture, Logo..
+
index_item->AddExcerptL(*iExcerpt);
}
--- a/harvesterplugins/file/src/cfileplugin.cpp Fri May 14 15:53:17 2010 +0300
+++ b/harvesterplugins/file/src/cfileplugin.cpp Thu May 27 12:52:35 2010 +0300
@@ -650,8 +650,9 @@
index_item->AddFieldL(KMimeTypeField, KMimeTypeFolder, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
}
+ //Only content to be added to exceprt field. See appclass-hierarchy.txt
//Add excerpt field
- index_item->AddExcerptL(aFilePath);
+ //index_item->AddExcerptL(aFilePath);
CleanupStack::Pop(index_item);
return index_item;
--- a/harvesterplugins/media/audio/src/cpixmediaaudiodoc.cpp Fri May 14 15:53:17 2010 +0300
+++ b/harvesterplugins/media/audio/src/cpixmediaaudiodoc.cpp Thu May 27 12:52:35 2010 +0300
@@ -24,6 +24,7 @@
#include <mdeobjectdef.h>
#include "harvesterserverlogger.h"
#include "OstTraceDefinitions.h"
+#include "csearchdocument.h"
#ifdef OST_TRACE_COMPILER_IN_USE
#include "cpixmediaaudiodocTraces.h"
#endif
@@ -92,8 +93,23 @@
CPIXLOGSTRING("START CCPIXMediaAudioDoc::GetCpixDocumentL");
//Get basic document
CSearchDocument* index_item = CCPIXDocFetcher::GetCpixDocumentL(aObject,aAppClass,aObjectDef);
- //URI and Excerpt is done add additional properties here
+ //Reset Excerpt and append
+ ResetExcerpt();
+ TInt slashpos = GetUri().LocateReverse('\\');
+ TPtrC name = GetUri().Mid( (slashpos+1) );
+ AddToFieldExcerptL(name); //Add name to excerpt field
+ //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
+ }
CMdEPropertyDef& albumPropDef = aObjectDef.GetPropertyDefL(MdeConstants::Audio::KAlbumProperty );
if(aObject.Property( albumPropDef, property )!= KErrNotFound)
{
@@ -102,6 +118,7 @@
AddFiledtoDocumentL(*index_item,
MdeConstants::Audio::KAlbumProperty,
textProperty->Value());
+ AddToFieldExcerptL(textProperty->Value());//Add Album to excerpt
}
CMdEPropertyDef& artistPropDef = aObjectDef.GetPropertyDefL(MdeConstants::Audio::KAlbumArtistProperty );
if(aObject.Property( artistPropDef, property ) != KErrNotFound)
@@ -111,6 +128,7 @@
AddFiledtoDocumentL(*index_item,
MdeConstants::Audio::KAlbumArtistProperty,
textProperty->Value());
+ AddToFieldExcerptL(textProperty->Value());//Add Albumartist to excerpt
}
CMdEPropertyDef& origartistPropDef = aObjectDef.GetPropertyDefL(MdeConstants::Audio::KOriginalArtistProperty );
if(aObject.Property( origartistPropDef, property ) != KErrNotFound)
@@ -120,6 +138,7 @@
AddFiledtoDocumentL(*index_item,
MdeConstants::Audio::KOriginalArtistProperty,
textProperty->Value());
+ AddToFieldExcerptL(textProperty->Value());//Add Original to excerpt
}
CMdEPropertyDef& composerPropDef = aObjectDef.GetPropertyDefL(MdeConstants::Audio::KComposerProperty );
if(aObject.Property( composerPropDef, property ) != KErrNotFound)
@@ -129,16 +148,9 @@
AddFiledtoDocumentL(*index_item,
MdeConstants::Audio::KComposerProperty,
textProperty->Value());
+ AddToFieldExcerptL(textProperty->Value());//Add composer to excerpt
}
- 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());
- }
+ index_item->AddExcerptL(*iExcerpt);
CPIXLOGSTRING("END CCPIXMediaAudioDoc::GetCpixDocumentL");
OstTraceFunctionExit0( CCPIXMEDIAAUDIODOC_GETCPIXDOCUMENTL_EXIT );
return index_item;
--- a/harvesterplugins/media/image/src/cpixmediaimagedoc.cpp Fri May 14 15:53:17 2010 +0300
+++ b/harvesterplugins/media/image/src/cpixmediaimagedoc.cpp Thu May 27 12:52:35 2010 +0300
@@ -24,6 +24,7 @@
#include <mdeobjectdef.h>
#include "harvesterserverlogger.h"
#include "OstTraceDefinitions.h"
+#include "csearchdocument.h"
#ifdef OST_TRACE_COMPILER_IN_USE
#include "cpixmediaimagedocTraces.h"
#endif
@@ -94,8 +95,21 @@
//Get basic document
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
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());
+ }
+
//Get user comment field
CMdEPropertyDef& commentPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KCommentProperty );
if(aObject.Property( commentPropDef, property )!= KErrNotFound)
@@ -105,6 +119,7 @@
AddFiledtoDocumentL(*index_item,
MdeConstants::MediaObject::KCommentProperty,
textProperty->Value());
+ AddToFieldExcerptL(textProperty->Value());
}
CMdEPropertyDef& dateTimePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Image::KDateTimeOriginalProperty);
if(aObject.Property( dateTimePropDef, property ) != KErrNotFound)
@@ -127,6 +142,7 @@
CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
}
}
+ 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
--- a/harvesterplugins/media/mediautils/inc/cpixdocfetcher.h Fri May 14 15:53:17 2010 +0300
+++ b/harvesterplugins/media/mediautils/inc/cpixdocfetcher.h Thu May 27 12:52:35 2010 +0300
@@ -94,6 +94,12 @@
* @param aExtension reference of descriptor buffer to be filled with file extension
*/
void GetExtension(const TDesC& aUri, TDes& aExtension);
+
+ /*
+ * Add the value to excerpt field
+ * @param TDesC& aExcerptValue excerpt value
+ */
+ void AddToFieldExcerptL(const TDesC& aExcerptValue);
protected:
/*
* second phase constructor ConstructL
@@ -103,6 +109,13 @@
* Default constructor
*/
CCPIXDocFetcher(); //Default constructor
+ /*
+ * reset the excerpt
+ */
+ void ResetExcerpt();
+
+ // Excerpt field
+ HBufC* iExcerpt;
private:
/*
* Convert URI to Absolute URI
--- a/harvesterplugins/media/mediautils/src/cpixdocfetcher.cpp Fri May 14 15:53:17 2010 +0300
+++ b/harvesterplugins/media/mediautils/src/cpixdocfetcher.cpp Thu May 27 12:52:35 2010 +0300
@@ -27,6 +27,7 @@
#define CPIX_MIMETYPE_FIELD L"_mimetype"
#define LCPIX_MIMETYPE_FIELD L"_mimetype"
+const TInt KInitialExcerptLength = 5;
const TInt KStartPosition = 2; //Start position of absolute path
const TInt KDrivePosition = 0; //Drive position in object Uri
const TInt KMaxMediaLength = 14;
@@ -36,6 +37,7 @@
_LIT(KNameField, "Name");
_LIT(KMediaIdField, "MediaId");
_LIT(KExtensionField, "Extension");
+_LIT(KExcerptDelimiter, " ");
// -----------------------------------------------------------------------------
// CCPIXDocFetcher::NewL()
@@ -67,6 +69,7 @@
CCPIXDocFetcher::~CCPIXDocFetcher()
{
iFs.Close();
+ delete iExcerpt;
}
// -----------------------------------------------------------------------------
@@ -77,6 +80,7 @@
{
//Heap variables if any
User::LeaveIfError(iFs.Connect());
+ iExcerpt = NULL;
}
// -----------------------------------------------------------------------------
@@ -89,6 +93,19 @@
}
// -----------------------------------------------------------------------------
+// CCPIXDocFetcher::ResetExcerpt()
+// -----------------------------------------------------------------------------
+//
+void CCPIXDocFetcher::ResetExcerpt()
+ {
+ if(iExcerpt)
+ {
+ delete iExcerpt;
+ iExcerpt = NULL;
+ }
+ }
+
+// -----------------------------------------------------------------------------
// CCPIXDocFetcher::GetCpixDocumentL()
// -----------------------------------------------------------------------------
//
@@ -130,6 +147,9 @@
CMdEProperty* property(NULL);
CMdEPropertyDef& titlePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KTitleProperty );
+ /*Requirement Excerpt should have all item specific field in priority order so has to be handled
+ *at plugin specific document handler
+ */
if(aObject.Property( titlePropDef, property ) != KErrNotFound)
{
//Add field to document
@@ -139,17 +159,7 @@
AddFiledtoDocumentL(*index_item,
MdeConstants::Object::KTitleProperty,
textProperty->Value());
- index_item->AddExcerptL(textProperty->Value());
}
- else
- {
- index_item->AddExcerptL(aObject.Uri());
- }
- }
- else
- {
- //No property title
- index_item->AddExcerptL(aObject.Uri());
}
//Item type as MIME type
CMdEPropertyDef& mimeTypePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KItemTypeProperty);
@@ -214,6 +224,30 @@
}
// -----------------------------------------------------------------------------
+// CCPIXDocFetcher::AddToFieldExcerptL()
+// -----------------------------------------------------------------------------
+//
+void CCPIXDocFetcher::AddToFieldExcerptL(const TDesC& aExcerptValue)
+ {
+ if(!iExcerpt)
+ {
+ iExcerpt = HBufC::NewL(KInitialExcerptLength);
+ }
+ if(aExcerptValue.Compare(KNullDesC) != 0)//value is not Null
+ {
+ TInt currentSize = iExcerpt->Size();
+ TInt newSize = currentSize + aExcerptValue.Size() + 1;
+ if(newSize > currentSize) //New size is bigger so we have to reallocate
+ {
+ iExcerpt = iExcerpt->ReAllocL(newSize);
+ }
+ TPtr ptr = iExcerpt->Des();
+ ptr.Append(aExcerptValue);
+ ptr.Append(KExcerptDelimiter);
+ }
+ }
+
+// -----------------------------------------------------------------------------
// CCPIXDocFetcher::SetAbsoluteURI()
// -----------------------------------------------------------------------------
//
--- a/harvesterplugins/media/video/src/cpixmediavideodoc.cpp Fri May 14 15:53:17 2010 +0300
+++ b/harvesterplugins/media/video/src/cpixmediavideodoc.cpp Thu May 27 12:52:35 2010 +0300
@@ -24,6 +24,7 @@
#include <mdeobjectdef.h>
#include "harvesterserverlogger.h"
#include "OstTraceDefinitions.h"
+#include "csearchdocument.h"
#ifdef OST_TRACE_COMPILER_IN_USE
#include "cpixmediavideodocTraces.h"
#endif
@@ -92,8 +93,22 @@
//Get basic document
CPIXLOGSTRING("CCPIXMediaVideoDoc::GetCpixDocumentL()");
CSearchDocument* index_item = CCPIXDocFetcher::GetCpixDocumentL(aObject,aAppClass,aObjectDef);
+ ResetExcerpt(); //Reset excerpt initially
+ TInt slashpos = GetUri().LocateReverse('\\');
+ TPtrC name = GetUri().Mid( (slashpos+1) );
+ AddToFieldExcerptL(name); //Add name to excerpt field
//URI and Excerpt is done add additional properties here
CMdEProperty* property(NULL);
+ CMdEPropertyDef& descriptionPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KDescriptionProperty );
+ if(aObject.Property( descriptionPropDef, property ) != KErrNotFound)
+ {
+ //Add field to document
+ CMdETextProperty* textProperty = ( CMdETextProperty* ) property;
+ AddFiledtoDocumentL(*index_item,
+ MdeConstants::MediaObject::KDescriptionProperty,
+ textProperty->Value());
+ AddToFieldExcerptL(textProperty->Value());
+ }
CMdEPropertyDef& artistPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KArtistProperty );
if(aObject.Property( artistPropDef, property )!= KErrNotFound)
{
@@ -102,43 +117,40 @@
AddFiledtoDocumentL(*index_item,
MdeConstants::MediaObject::KArtistProperty,
textProperty->Value());
+ AddToFieldExcerptL(textProperty->Value());
}
CMdEPropertyDef& authorPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KAuthorProperty );
if(aObject.Property( authorPropDef, property ) != KErrNotFound)
{
- //Add field to document
- CMdETextProperty* textProperty = ( CMdETextProperty* ) property;
- AddFiledtoDocumentL(*index_item,
+ //Add field to document
+ CMdETextProperty* textProperty = ( CMdETextProperty* ) property;
+ AddFiledtoDocumentL(*index_item,
MdeConstants::MediaObject::KAuthorProperty,
textProperty->Value());
+ 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,
+ //Add field to document
+ CMdETextProperty* textProperty = ( CMdETextProperty* ) property;
+ AddFiledtoDocumentL(*index_item,
MdeConstants::MediaObject::KCopyrightProperty,
textProperty->Value());
+ AddToFieldExcerptL(textProperty->Value());
}
- CMdEPropertyDef& descriptionPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KDescriptionProperty );
- if(aObject.Property( descriptionPropDef, property ) != KErrNotFound)
- {
- //Add field to document
- CMdETextProperty* textProperty = ( CMdETextProperty* ) property;
- AddFiledtoDocumentL(*index_item,
- MdeConstants::MediaObject::KDescriptionProperty,
- textProperty->Value());
- }
+
CMdEPropertyDef& commentPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KCommentProperty );
if(aObject.Property( commentPropDef, property ) != KErrNotFound)
{
- //Add field to document
- CMdETextProperty* textProperty = ( CMdETextProperty* ) property;
- AddFiledtoDocumentL(*index_item,
+ //Add field to document
+ CMdETextProperty* textProperty = ( CMdETextProperty* ) property;
+ AddFiledtoDocumentL(*index_item,
MdeConstants::MediaObject::KCommentProperty,
textProperty->Value());
+ AddToFieldExcerptL(textProperty->Value());
}
+ index_item->AddExcerptL(*iExcerpt);
OstTraceFunctionExit0( CCPIXMEDIAVIDEODOC_GETCPIXDOCUMENTL_EXIT );
return index_item;
}
--- a/harvesterplugins/messaging/smsmms/src/cmessagedatahandler.cpp Fri May 14 15:53:17 2010 +0300
+++ b/harvesterplugins/messaging/smsmms/src/cmessagedatahandler.cpp Thu May 27 12:52:35 2010 +0300
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: Harvester message plugin
- *
+*
*/
@@ -630,61 +630,65 @@
const TDesC& aBodyText,
const TMsvId& aFolderId)
{
+ //Note:Only From/To (as appropriate): and Body: fields to be added to excerpt for now.
+ //See appclass-hierarchy.txt for details.
+
_LIT(KEllipsis, "...");
_LIT(KSpace, " ");
TInt excerptLength = KMsgBodyExcerptSymbols + KEllipsis().Length();
- TMsvEntry entry;
- TMsvId service = 0;
- iMsvSession.GetEntry(aFolderId, service, entry);
- HBufC *folder_str = entry.iDetails.AllocLC();
-
- excerptLength += folder_str->Length();
- excerptLength += KSpace().Length();
+ //Not removing commented out code as this may come back into use in near future.
+// TMsvEntry entry;
+// TMsvId service = 0;
+// iMsvSession.GetEntry(aFolderId, service, entry);
+// HBufC *folder_str = entry.iDetails.AllocLC();
+//
+// excerptLength += folder_str->Length();
+// excerptLength += KSpace().Length();
- if ((aFromAddress.Length() > 0) && (aFolderId == KMsvGlobalInBoxIndexEntryIdValue))
- {
- excerptLength += aFromAddress.Length();
- excerptLength += KSpace().Length();
- }
- if ((aRecipientArray.MdcaCount() > 0) && (aFolderId != KMsvGlobalInBoxIndexEntryIdValue))
- {
- excerptLength += aRecipientArray.MdcaPoint(0).Length();
- excerptLength += KSpace().Length();
- }
- if (aSubject.Length() > 0)
- {
- excerptLength += aSubject.Length();
- excerptLength += KSpace().Length();
- }
+ if( aFolderId == KMsvGlobalInBoxIndexEntryIdValue && aFromAddress.Length() > 0 )
+ {
+ excerptLength += aFromAddress.Length();
+ excerptLength += KSpace().Length();
+ }
+ else if( aFolderId != KMsvGlobalInBoxIndexEntryIdValue && aRecipientArray.MdcaCount() > 0 )
+ {
+ excerptLength += aRecipientArray.MdcaPoint(0).Length();
+ excerptLength += KSpace().Length();
+ }
HBufC* excerpt = HBufC::NewL(excerptLength);
TPtr excerptPtr = excerpt->Des();
- excerptPtr.Copy(*folder_str);
- excerptPtr.Append(KSpace);
+ //Not removing commented out code as this may come back into use in near future.
+// excerptPtr.Copy(*folder_str);
+// excerptPtr.Append(KSpace);
- if ((aFromAddress.Length() > 0) && (aFolderId == KMsvGlobalInBoxIndexEntryIdValue))
- {
- excerptPtr.Append(aFromAddress);
- excerptPtr.Append(KSpace);
- }
- if ((aRecipientArray.MdcaCount() > 0) && (aFolderId != KMsvGlobalInBoxIndexEntryIdValue))
- {
- excerptPtr.Append(aRecipientArray.MdcaPoint(0));
- excerptPtr.Append(KSpace);
- }
- if (aSubject.Length() > 0)
- {
- excerptPtr.Append(aSubject);
- excerptPtr.Append(KSpace);
- }
+ //For inbox items, From: is present while for sent items To: is present.
+ if ((aFromAddress.Length() > 0) && (aFolderId == KMsvGlobalInBoxIndexEntryIdValue))
+ {
+ excerptPtr.Append(aFromAddress);
+ excerptPtr.Append(KSpace);
+ }
+ else if ((aRecipientArray.MdcaCount() > 0) && (aFolderId != KMsvGlobalInBoxIndexEntryIdValue))
+ {
+ excerptPtr.Append(aRecipientArray.MdcaPoint(0));
+ excerptPtr.Append(KSpace);
+ }
+
+ //Not deleting this code as it might have to be brought back into use
+ //in (possibly near) future.
+// if (aSubject.Length() > 0)
+// {
+// excerptPtr.Append(aSubject);
+// excerptPtr.Append(KSpace);
+// }
excerptPtr.Append(aBodyText.Left(KMsgBodyExcerptSymbols));
if (aBodyText.Length() > KMsgBodyExcerptSymbols)
excerptPtr.Append(KEllipsis);
- CleanupStack::PopAndDestroy(folder_str);
+// CleanupStack::PopAndDestroy(folder_str);
CleanupStack::PushL(excerpt);
return excerpt;
}
--- a/harvesterplugins/notes/src/notesplugin.cpp Fri May 14 15:53:17 2010 +0300
+++ b/harvesterplugins/notes/src/notesplugin.cpp Thu May 27 12:52:35 2010 +0300
@@ -352,13 +352,14 @@
index_item->AddFieldL(KMimeTypeField, KMimeTypeNotes, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
- TInt excerptLength = entry->DescriptionL().Length();
- HBufC* excerpt = HBufC::NewLC(excerptLength);
- TPtr excerptDes = excerpt->Des();
- excerptDes.Append(entry->DescriptionL());
-
- index_item->AddExcerptL(*excerpt);
- CleanupStack::PopAndDestroy(excerpt);
+ //For notes, no content is expected in excerpt for now.
+ //See appclass-hierarchy.txt for details.
+// TInt excerptLength = entry->DescriptionL().Length();
+// HBufC* excerpt = HBufC::NewLC(excerptLength);
+// TPtr excerptDes = excerpt->Des();
+// excerptDes.Append(entry->DescriptionL());
+// index_item->AddExcerptL(*excerpt);
+// CleanupStack::PopAndDestroy(excerpt);
// Send for indexing
if (aActionType == ECPixAddAction)
--- a/harvesterplugins/tsrc/harvesterplugintester/inc/harvesterobserver.h Fri May 14 15:53:17 2010 +0300
+++ b/harvesterplugins/tsrc/harvesterplugintester/inc/harvesterobserver.h Thu May 27 12:52:35 2010 +0300
@@ -40,7 +40,7 @@
//from MIndexingService
void AddHarvestingQueue(CIndexingPlugin* aPlugin, const TDesC& aQualifiedBaseAppClass, TBool aForceReharvest = EFalse);
- void RemoveHarvestingQueue(CIndexingPlugin* /*aPlugin*/, const TDesC& /*aQualifiedBaseAppClass*/) {};
+ void RemoveHarvestingQueue(CIndexingPlugin* /*aPlugin*/, const TDesC& /*aQualifiedBaseAppClass*/, TBool /*aRemovePersist = EFalse*/){};
void HarvestingCompleted(CIndexingPlugin* aPlugin, const TDesC& aQualifiedBaseAppClass, TInt aError);
private:
--- a/searchui/indevicehandler/tsrc/t_indevicehandler/src/t_indevicehandler.cpp Fri May 14 15:53:17 2010 +0300
+++ b/searchui/indevicehandler/tsrc/t_indevicehandler/src/t_indevicehandler.cpp Thu May 27 12:52:35 2010 +0300
@@ -46,11 +46,11 @@
void SearchInDeviceHandlerTest::testhandleAsyncSearchResult()
{
InDeviceHandler* indevicehandler = new InDeviceHandler();
- indevicehandler->setCategory("file");
+ indevicehandler->setCategory("media");
QSignalSpy
spy(indevicehandler, SIGNAL(handleAsyncSearchResult(int, int)));
- indevicehandler->searchAsync("txt");
- QTest::qWait(200);
+ indevicehandler->searchAsync("jpg*");
+ QTest::qWait(2000);
QCOMPARE(spy.count(), 1);
delete indevicehandler;
@@ -58,15 +58,15 @@
void SearchInDeviceHandlerTest::testhandleDocument()
{
InDeviceHandler* indevicehandler = new InDeviceHandler();
- indevicehandler->setCategory("file");
+ indevicehandler->setCategory("media");
- indevicehandler->searchAsync("txt");
- QTest::qWait(200);
+ indevicehandler->searchAsync("jpg*");
+ QTest::qWait(2000);
QSignalSpy spy(indevicehandler,
SIGNAL(handleDocument(int, QCPixDocument*)));
indevicehandler->getDocumentAsyncAtIndex(0);
- QTest::qWait(200);
+ QTest::qWait(2000);
QCOMPARE(spy.count(), 1);
delete indevicehandler;
@@ -83,14 +83,14 @@
void SearchInDeviceHandlerTest::testgetDocumentAsyncAtIndex()
{
InDeviceHandler* indevicehandler = new InDeviceHandler();
- indevicehandler->setCategory("file");
+ indevicehandler->setCategory("media");
- indevicehandler->searchAsync("txt");
- QTest::qWait(200);
+ indevicehandler->searchAsync("jpg*");
+ QTest::qWait(2000);
QSignalSpy spy(indevicehandler,
SIGNAL(handleDocument(int, QCPixDocument*)));
indevicehandler->getDocumentAsyncAtIndex(0);
- QTest::qWait(200);
+ QTest::qWait(2000);
QCOMPARE(spy.count(), 1);
delete indevicehandler;
}
@@ -98,21 +98,21 @@
void SearchInDeviceHandlerTest::testsearchAsync()
{
InDeviceHandler* indevicehandler = new InDeviceHandler();
- indevicehandler->setCategory("file");
+ indevicehandler->setCategory("media");
QSignalSpy spy(indevicehandler, SIGNAL(handleAsyncSearchResult(int,int)));
indevicehandler->searchAsync(NULL);
- QTest::qWait(200);
+ QTest::qWait(2000);
QCOMPARE(spy.count(), 0);
- indevicehandler->searchAsync("txt");
- QTest::qWait(200);
+ indevicehandler->searchAsync("jpg*");
+ QTest::qWait(2000);
QCOMPARE(spy.count(), 1);
delete indevicehandler;
}
void SearchInDeviceHandlerTest::testcancelLastSearch()
{
InDeviceHandler* indevicehandler = new InDeviceHandler();
- indevicehandler->setCategory("file");
- indevicehandler->searchAsync("txt");
+ indevicehandler->setCategory("media");
+ indevicehandler->searchAsync("jpg*");
indevicehandler->cancelLastSearch();
delete indevicehandler;
}
@@ -120,9 +120,9 @@
{
InDeviceHandler* indevicehandler = new InDeviceHandler();
QCOMPARE(indevicehandler->getSearchResultCount(),0);
- indevicehandler->setCategory("file");
- indevicehandler->searchAsync("txt");
- QTest::qWait(200);
+ indevicehandler->setCategory("media");
+ indevicehandler->searchAsync("jpg*");
+ QTest::qWait(2000);
QVERIFY(indevicehandler->getSearchResultCount());
delete indevicehandler;
--- a/searchui/rom/search.iby Fri May 14 15:53:17 2010 +0300
+++ b/searchui/rom/search.iby Thu May 27 12:52:35 2010 +0300
@@ -27,7 +27,7 @@
// Application registration file.
data=DATAZ_/private/10003a3f/import/apps/Searchapplication_reg.rsc /private/10003a3f/import/apps/Searchapplication_reg.rsc
-data=DATAZ_/resource/apps/Searchapplication.mif /resource/apps/Searchapplication.mif
+
//SearchIndevice handler
file=/epoc32/release/armv5/urel/searchindevicehandler.dll SHARED_LIB_DIR/searchindevicehandler.dll
--- a/searchui/stateproviders/searchstateprovider/inc/searchprogressivestate.h Fri May 14 15:53:17 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/inc/searchprogressivestate.h Thu May 27 12:52:35 2010 +0300
@@ -130,7 +130,7 @@
* get the application icon .
* @since S60 ?S60_version.
*/
- HbIcon getAppIconFromAppId(TUid auid);
+ HbIcon getAppIconFromAppIdL(TUid auid);
/**
* resizing the symbain icon .
@@ -211,23 +211,7 @@
/**
* slot connects to search state for internet search
* @since S60 ?S60_version.
- */
- void cancelSearch();
- /**
- * slot connects to model for rows insert completion
- * @since S60 ?S60_version.
- */
- void getrowsInserted();
-
- /**
- * slot connects to model for rows delete completion
- * @since S60 ?S60_version.
- */
- void getrowsRemoved();
- /**
- * slot added for Application manager
- * @since S60 ?S60_version.
- */
+ */
void handleOk(const QVariant& var);
@@ -308,6 +292,18 @@
QStringList filterDoc(const QCPixDocument* aDoc, const QString& filter1,
const QString& filter2, const QString& filter3 = QString());
+ /**
+ * Function to convert bitmap to pixmap
+ */
+ void fromBitmapAndMaskToPixmapL(CFbsBitmap* fbsBitmap,
+ CFbsBitmap* fbsMask, QPixmap& pixmap);
+
+ /**
+ * Function to get pixmap
+ */
+ void GetPixmapByFilenameL(TDesC& fileName, const QSize &size,
+ QPixmap& pixmap);
+
signals:
/**
@@ -412,15 +408,54 @@
*
*/
bool loadSettings;
+
+ /**
+ *
+ * Icon List to be created in boot up for all categories
+ */
QList<HbIcon> mIconArray;
+
+ /**
+ * Hbicon to be created
+ *
+ */
HbIcon mIcon;
+
+ /**
+ * to get drive info
+ *
+ */
RFs iFs;
+ /**
+ * Calendar plugin info
+ *
+ */
EventViewerPluginInterface *calAgandaViewerPluginInstance;
+
+ /**
+ * to create Notes editor
+ *
+ */
NotesEditor *notesEditor;
+
private:
+ /**
+ * Application manager handler to perform resultitem opening.
+ *
+ */
XQApplicationManager* mAiwMgr;
+
+ /**
+ * Request handler to to open resultItems
+ *
+ */
XQAiwRequest* mRequest;
+
+ /**
+ * ListView icon Size.
+ *
+ */
QSize mListViewIconSize;
#ifdef OST_TRACE_COMPILER_IN_USE
QTime m_totalSearchUiTime;
--- a/searchui/stateproviders/searchstateprovider/searchstateprovider.pro Fri May 14 15:53:17 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/searchstateprovider.pro Thu May 27 12:52:35 2010 +0300
@@ -47,6 +47,7 @@
LIBS += -lapgrfx
LIBS += -lbitgdi
LIBS += -lnoteseditor
+LIBS += -lxqutils
coverage:DEFINES += COVERAGE_MEASUREMENT
--- a/searchui/stateproviders/searchstateprovider/src/searchprogressivestate.cpp Fri May 14 15:53:17 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/src/searchprogressivestate.cpp Thu May 27 12:52:35 2010 +0300
@@ -42,7 +42,7 @@
#include <fbs.h>
#include <AknInternalIconUtils.h>
#include <AknIconUtils.h>
-#include <apgcli.h>
+#include <apaidpartner.h>
#include <qpluginloader.h>
#include <eventviewerplugininterface.h>
#include <noteseditor.h>
@@ -51,6 +51,8 @@
#include <apgcli.h>
#include <AknTaskList.h>
#include <apacmdln.h>
+#include <xqconversions.h>
+#include <apparc.h>
const char *SEARCHSTATEPROVIDER_DOCML = ":/xml/searchstateprovider.docml";
const char *TOC_VIEW = "tocView";
const char *TUT_SEARCHPANEL_WIDGET = "searchPanel";
@@ -120,6 +122,10 @@
if (mSearchPanel)
{
mSearchPanel->setSearchOptionsEnabled(true);
+
+ mSearchPanel->setPlaceholderText("Search device");
+
+ mSearchPanel->setCancelEnabled(false);
}
constructHandlers();
@@ -138,20 +144,20 @@
//Icon creation in array
RArray<TUid> appUid;
appUid.Append(TUid::Uid(0x20022EF9));//contact
- appUid.Append(TUid::Uid(0x10207C62));//media(audio)
- appUid.Append(TUid::Uid(0x200211FE));//video not assigned
+ appUid.Append(TUid::Uid(0x10207C62));//audio
+ appUid.Append(TUid::Uid(0x200211FE));//video
appUid.Append(TUid::Uid(0x20000A14));//image
appUid.Append(TUid::Uid(0x2001FE79));//msg
- appUid.Append(TUid::Uid(0x20022F35));//email not assigned
+ appUid.Append(TUid::Uid(0x200255BA));//email
appUid.Append(TUid::Uid(0x10005901));//calender
appUid.Append(TUid::Uid(0x20029F80));//notes
//appUid.Append(TUid::Uid(0x20022F35));//application
- appUid.Append(TUid::Uid(0x20022F35));//bookmark not assigned
+ appUid.Append(TUid::Uid(0x10008D39));//bookmark
appUid.Append(TUid::Uid(0x2002BCC0));//files
for (int i = 0; i < appUid.Count(); i++)
{
- mIconArray.append(getAppIconFromAppId(appUid[i]));
+ TRAP_IGNORE(mIconArray.append(getAppIconFromAppIdL(appUid[i])));
}
#ifdef OST_TRACE_COMPILER_IN_USE
//start() the timers to avoid worrying abt having to start()/restart() later
@@ -311,16 +317,8 @@
SLOT(startNewSearch(QString)));
connect(mSearchPanel, SIGNAL(searchOptionsClicked()), this,
SLOT(setSettings()));
- connect(mSearchPanel, SIGNAL(exitClicked()), this,
- SLOT(cancelSearch()));
}
- if (mModel)
- {
- connect(mModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this,
- SLOT(getrowsInserted()));
- connect(mModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this,
- SLOT(getrowsRemoved()));
- }
+
}
// ---------------------------------------------------------------------------
// SearchProgressiveState::deActivateSignals
@@ -347,15 +345,6 @@
SLOT(startNewSearch(QString)));
disconnect(mSearchPanel, SIGNAL(searchOptionsClicked()), this,
SLOT(setSettings()));
- disconnect(mSearchPanel, SIGNAL(exitClicked()), this,
- SLOT(cancelSearch()));
- }
- if (mModel)
- {
- disconnect(mModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this,
- SLOT(getrowsInserted()));
- disconnect(mModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this,
- SLOT(getrowsRemoved()));
}
}
// ---------------------------------------------------------------------------
@@ -397,18 +386,6 @@
QStringList liststr;
QString secondrow = aDoc->excerpt();
QString firstrow;
- //-------------- html tag creation-------------------
- /* QString htmlTagPre = QString("<u>");
- QString htmlTagPost = QString("</u>");
- int insertpt = secondrow.indexOf(mOriginalString, 0, Qt::CaseInsensitive);
- if (insertpt >= 0)
- {
- secondrow.insert(insertpt, htmlTagPre);
-
- secondrow.insert(insertpt + mOriginalString.length()
- + htmlTagPre.length(), htmlTagPost);
- }
-*/ //--------------------Html Tag Creation completed------------
QStandardItem* listitem = new QStandardItem();
if (aDoc->baseAppClass().contains("contact"))
@@ -504,6 +481,7 @@
{
firstrow.append(filterDoc(aDoc, "Subject"));
liststr << firstrow << secondrow;
+ listitem->setData(mIconArray.at(5), Qt::DecorationRole);
}
else if (aDoc->baseAppClass().contains("calendar"))
{
@@ -531,8 +509,8 @@
firstrow.append(filterDoc(aDoc, "Name"));
liststr << firstrow;
bool ok;
- listitem->setData(getAppIconFromAppId(TUid::Uid(aDoc->docId().toInt(
- &ok, 16))), Qt::DecorationRole);
+ TRAP_IGNORE(listitem->setData(getAppIconFromAppIdL(TUid::Uid(aDoc->docId().toInt(
+ &ok, 16))), Qt::DecorationRole));
}
else if (aDoc->baseAppClass().contains("bookmark"))
{
@@ -542,6 +520,7 @@
firstrow = "UnKnown";
}
liststr << firstrow << secondrow;
+ listitem->setData(mIconArray.at(8), Qt::DecorationRole);
}
else if (aDoc->baseAppClass().contains("file"))
{
@@ -555,20 +534,7 @@
listitem->setData(aDoc->docId(), Qt::UserRole);
listitem->setData(aDoc->baseAppClass(), Qt::UserRole + 1);
mModel->appendRow(listitem);
- delete aDoc;
- }
-// ---------------------------------------------------------------------------
-// SearchProgressiveState::getSettingCategory
-// ---------------------------------------------------------------------------
-void SearchProgressiveState::getSettingCategory(int item, bool avalue)
- {
- mSelectedCategory.insert(item, avalue);
- }
-// ---------------------------------------------------------------------------
-// SearchProgressiveState::getrowsInserted
-// ---------------------------------------------------------------------------
-void SearchProgressiveState::getrowsInserted()
- {
+
mResultparser++;
if (mResultparser < mResultcount)
{
@@ -580,30 +546,14 @@
PERF_CAT_GETDOC_ACCUMULATOR_ENDLOG
searchOnCategory(mSearchString);
}
+ delete aDoc;
}
// ---------------------------------------------------------------------------
-// SearchProgressiveState::getrowsRemoved
+// SearchProgressiveState::getSettingCategory
// ---------------------------------------------------------------------------
-void SearchProgressiveState::getrowsRemoved()
+void SearchProgressiveState::getSettingCategory(int item, bool avalue)
{
- if (mModel->rowCount() != 0)
- {
- mModel->removeRow(0);
- }
- else
- {
- mListView->reset();
- if (mOriginalString.length())
- {
- mDatabasecount = 0;
- /*mSearchString = "$prefix(\"";
- mSearchString += mOriginalString;
- mSearchString += "\")";*/
- mSearchString = mOriginalString;
- mSearchString.append('*');
- searchOnCategory(mSearchString);
- }
- }
+ mSelectedCategory.insert(item, avalue);
}
// ---------------------------------------------------------------------------
// SearchProgressiveState::openResultitem
@@ -611,6 +561,8 @@
void SearchProgressiveState::openResultitem(QModelIndex index)
{
QStandardItem* item = mModel->itemFromIndex(index);
+ if (item == NULL)
+ return;
QList<QVariant> args;
bool t;
mRequest = NULL;
@@ -775,7 +727,7 @@
{
if (mModel)
{
- mModel->removeRows(0, mModel->rowCount());
+ mModel->clear();
}
}
// ---------------------------------------------------------------------------
@@ -840,6 +792,11 @@
{
PERF_CAT_API_TIME_RESTART
mSearchHandler->searchAsync(aKeyword, "_aggregate");
+
+ }
+ else
+ {
+ searchOnCategory(mSearchString);
}
}
else if (mDatabasecount >= mTemplist.count())
@@ -868,7 +825,7 @@
{
clear();
}
- else if (mOriginalString.length())
+ if (mOriginalString.length())
{
mDatabasecount = 0;
mLinkindex = 0;
@@ -997,84 +954,108 @@
}
}
// ---------------------------------------------------------------------------
-// SearchProgressiveState::cancelSearch
-// ---------------------------------------------------------------------------
-void SearchProgressiveState::cancelSearch()
- {
- for (int i = 0; i < mSearchHandlerList.count(); i++)
- {
- mSearchHandlerList.at(i)->cancelLastSearch();
- }
- }
-// ---------------------------------------------------------------------------
// SearchProgressiveState::getAppIconFromAppId
// ---------------------------------------------------------------------------
-HbIcon SearchProgressiveState::getAppIconFromAppId(TUid auid)
+HbIcon SearchProgressiveState::getAppIconFromAppIdL(TUid auid)
{
HbIcon icon;
- CAknIcon* aknIcon = NULL;
- CFbsBitmap* bitmap = NULL;
- CFbsBitmap* mask = NULL;
- QPixmap pixmap;
- MAknsSkinInstance* skin = AknsUtils::SkinInstance();
- if (skin)
+ RApaLsSession apaLsSession;
+ CleanupClosePushL(apaLsSession);
+ User::LeaveIfError(apaLsSession.Connect());
+ CApaAppServiceInfoArray* skinArray(NULL);
+ TRAPD( err, skinArray = apaLsSession.GetAppServiceOpaqueDataLC(auid, TUid::Uid(0x2002DCF3));
+ if (err == KErrNone && skinArray )
+ {
+ TArray<TApaAppServiceInfo> tmpArray( skinArray->Array() );
+ if ( tmpArray.Count() )
+ {
+ TPtrC8 opaque(tmpArray[0].OpaqueData());
+ const TPtrC16 iconName((TText16*) opaque.Ptr(),(opaque.Length()+1)>>1);
+ icon = HbIcon( XQConversions:: s60DescToQString( iconName ) );
+ }
+ }
+ CleanupStack::PopAndDestroy(skinArray);
+ );
+ if (icon.isNull() || !(icon.size().isValid()))
{
- TRAPD( err,
- {
- AknsUtils::CreateAppIconLC( skin, auid,
- EAknsAppIconTypeList, bitmap, mask );
- CleanupStack::Pop(2); //for trap
- }
- );
- if (err == KErrNone)
+ TSize iconSize(mListViewIconSize.width(), mListViewIconSize.height());
+ CApaMaskedBitmap* apaMaskedBitmap = CApaMaskedBitmap::NewLC();
+ TInt err = apaLsSession.GetAppIcon(auid, iconSize, *apaMaskedBitmap);
+ TInt iconsCount(0);
+ apaLsSession.NumberOfOwnDefinedIcons(auid, iconsCount);
+ QPixmap pixmap;
+ if ((err == KErrNone) && (iconsCount > 0))
{
- TRAPD( err1,
- {aknIcon = CAknIcon::NewL();
- aknIcon->SetBitmap(bitmap);
- aknIcon->SetMask(mask);});
- if (err1 == KErrNone)
- {
- }
- }
- }
- if (aknIcon)
- {
- //need to disable compression to properly convert the bitmap
- AknIconUtils::DisableCompression(aknIcon->Bitmap());
- AknIconUtils::SetSize(aknIcon->Bitmap(), TSize(mListViewIconSize.width(),
- mListViewIconSize.height()),
- EAspectRatioPreservedAndUnusedSpaceRemoved);
- if (aknIcon->Bitmap()->Header().iCompression == ENoBitmapCompression)
- {
- pixmap = fromSymbianCFbsBitmap(aknIcon->Bitmap());
- QPixmap mask = fromSymbianCFbsBitmap(aknIcon->Mask());
- pixmap.setAlphaChannel(mask);
+ fromBitmapAndMaskToPixmapL(apaMaskedBitmap,
+ apaMaskedBitmap->Mask(), pixmap);
+ pixmap = pixmap.scaled(mListViewIconSize,
+ Qt::KeepAspectRatioByExpanding);
+ icon = HbIcon(QIcon(pixmap));
}
else
{
- CFbsBitmap *temp(NULL);
- TRAPD( err,
- {temp = copyBitmapLC(aknIcon->Bitmap());
- pixmap = fromSymbianCFbsBitmap(temp);
- CleanupStack::PopAndDestroy();});
- if (err == KErrNone)
+ HBufC* fileNameFromApparc;
+ TInt err2 = apaLsSession.GetAppIcon(auid, fileNameFromApparc);
+ CleanupStack::PushL(fileNameFromApparc);
+ if (err2 == KErrNone)
{
- TRAPD( err1,
- {temp = copyBitmapLC(aknIcon->Mask());
- QPixmap mask = fromSymbianCFbsBitmap(temp);
- CleanupStack::PopAndDestroy();
- pixmap.setAlphaChannel(mask);});
- if (err1 == KErrNone)
+ QString fileName = XQConversions::s60DescToQString(
+ fileNameFromApparc->Des());
+ if (fileName.contains(QString(".mif")))
{
+ TPtr ptr(fileNameFromApparc->Des());
+ GetPixmapByFilenameL(ptr, mListViewIconSize, pixmap);
+ pixmap = pixmap.scaled(mListViewIconSize,
+ Qt::KeepAspectRatioByExpanding);
+ icon = HbIcon(QIcon(pixmap));
}
}
+ CleanupStack::Pop(fileNameFromApparc);
}
- pixmap = pixmap.scaled(mListViewIconSize, Qt::KeepAspectRatioByExpanding);
- icon = HbIcon(QIcon(pixmap));
+ CleanupStack::PopAndDestroy(apaMaskedBitmap);
}
+ CleanupStack::PopAndDestroy(&apaLsSession);
+
+ if (icon.isNull() || !(icon.size().isValid()))
+ icon = HbIcon("qtg_large_application");
return icon;
}
// ---------------------------------------------------------------------------
+// SearchProgressiveState::GetPixmapByFilenameL
+// ---------------------------------------------------------------------------
+void SearchProgressiveState::GetPixmapByFilenameL(TDesC& fileName,
+ const QSize &size, QPixmap& pixmap)
+ {
+ CFbsBitmap *bitamp(0);
+ CFbsBitmap *mask(0);
+
+ if (AknIconUtils::IsMifFile(fileName))
+ {
+ // SVG icon
+ // SVG always has only one icon
+ TInt bitmapIndex = 0;
+ TInt maskIndex = 1;
+ AknIconUtils::ValidateLogicalAppIconId(fileName, bitmapIndex,
+ maskIndex);
+
+ AknIconUtils::CreateIconLC(bitamp, mask, fileName, bitmapIndex,
+ maskIndex);
+ }
+
+ AknIconUtils::DisableCompression(bitamp);
+ AknIconUtils::SetSize(bitamp, TSize(size.width(), size.height()),
+ EAspectRatioPreservedAndUnusedSpaceRemoved);
+
+ AknIconUtils::DisableCompression(mask);
+ AknIconUtils::SetSize(mask, TSize(size.width(), size.height()),
+ EAspectRatioPreservedAndUnusedSpaceRemoved);
+
+ fromBitmapAndMaskToPixmapL(bitamp, mask, pixmap);
+
+ // bitmap and icon, AknsUtils::CreateIconLC doesn't specify the order
+ CleanupStack::Pop(2);
+ }
+// ---------------------------------------------------------------------------
// SearchProgressiveState::TDisplayMode2Format
// ---------------------------------------------------------------------------
QImage::Format SearchProgressiveState::TDisplayMode2Format(TDisplayMode mode)
@@ -1147,6 +1128,31 @@
return bmp;
}
// ---------------------------------------------------------------------------
+// SearchProgressiveState::fromBitmapAndMaskToPixmapL
+// ---------------------------------------------------------------------------
+void SearchProgressiveState::fromBitmapAndMaskToPixmapL(
+ CFbsBitmap* fbsBitmap, CFbsBitmap* fbsMask, QPixmap& pixmap)
+ {
+ if (fbsBitmap->Header().iCompression == ENoBitmapCompression)
+ {
+ pixmap = fromSymbianCFbsBitmap(fbsBitmap);
+ QPixmap mask = fromSymbianCFbsBitmap(fbsMask);
+ pixmap.setAlphaChannel(mask);
+ }
+ else
+ { // we need special handling for icons in 9.2 (NGA)
+ // let's hope that in future it will be in QT code
+ CFbsBitmap *temp(NULL);
+ temp = copyBitmapLC(fbsBitmap);
+ pixmap = fromSymbianCFbsBitmap(temp);
+ CleanupStack::PopAndDestroy();
+ temp = copyBitmapLC(fbsMask);
+ QPixmap mask = fromSymbianCFbsBitmap(temp);
+ CleanupStack::PopAndDestroy();
+ pixmap.setAlphaChannel(mask);
+ }
+ }
+// ---------------------------------------------------------------------------
// SearchProgressiveState::filterDoc
// ---------------------------------------------------------------------------
QString SearchProgressiveState::filterDoc(const QCPixDocument* aDoc,
--- a/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/inc/t_searchstateprovider.h Fri May 14 15:53:17 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/inc/t_searchstateprovider.h Thu May 27 12:52:35 2010 +0300
@@ -62,18 +62,13 @@
void test_customizeGoButton();
void testsettingsaction();
void testcancelSearch();
- void testgetrowsInserted();
- void testgetrowsRemoved();
void testhandleOkError();
- void test_viewingCompleted();
- void testsearchOnCategory();
void testclear();
void testnoResultsFound();
void testcreateSuggestionLink();
void testTDisplayMode2Format();
- void testfromSymbianCFbsBitmap();
void testgetDrivefromMediaId();
- void testLaunchApplicationL();
+ void testLaunchApplication();
void testfilterDoc();
/**
--- a/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_searchprogressivestate.cpp Fri May 14 15:53:17 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_searchprogressivestate.cpp Thu May 27 12:52:35 2010 +0300
@@ -85,6 +85,7 @@
progressiveState->getSettingCategory(6, true);
progressiveState->getSettingCategory(7, true);
progressiveState->setSelectedCategories();
+ QVERIFY(progressiveState->mTemplist.count());
delete progressiveState;
}
void SearchStateProviderTest::testgetAppIconFromAppId()
@@ -112,16 +113,22 @@
SearchProgressiveState* progressiveState = new SearchProgressiveState();
QEvent *event = new QEvent(QEvent::None);
progressiveState->onEntry(event);
- progressiveState->mSearchHandler
- = progressiveState->mSearchHandlerList.at(1);
- progressiveState->onAsyncSearchComplete(-1, 10);
- QCOMPARE(progressiveState->mResultcount,0);
+ progressiveState->getSettingCategory(0, true);
+ progressiveState->getSettingCategory(1, true);
+ progressiveState->getSettingCategory(2, true);
+ progressiveState->getSettingCategory(3, true);
+ progressiveState->getSettingCategory(4, true);
+ progressiveState->getSettingCategory(5, true);
+ progressiveState->getSettingCategory(6, true);
+ progressiveState->getSettingCategory(7, true);
- progressiveState->onAsyncSearchComplete(0, -1);
- QCOMPARE(progressiveState->mResultcount,0);
- progressiveState->mSearchHandler->searchAsync("txt", "_aggregate");
- QTest::qWait(100);
- //QCOMPARE(progressiveState->mResultcount,10);
+ progressiveState->mSearchHandler
+ = progressiveState->mSearchHandlerList.at(2);
+
+
+ progressiveState->mSearchHandler->searchAsync("jpg*", "_aggregate");
+ QTest::qWait(2000);
+ QVERIFY(progressiveState->mResultcount);
delete progressiveState;
// delete wind;
@@ -143,7 +150,7 @@
progressiveState->onGetDocumentComplete(-1, NULL);
QCOMPARE(progressiveState->mModel->rowCount(),0);
- progressiveState->startNewSearch("d");
+ progressiveState->startNewSearch("contact");
QTest::qWait(2000);
int i = progressiveState->mModel->rowCount();
QVERIFY(progressiveState->mModel->rowCount());
@@ -159,14 +166,37 @@
SearchProgressiveState* progressiveState = new SearchProgressiveState();
QEvent *event = new QEvent(QEvent::None);
- progressiveState->mSelectedCategory.insert(1, true);
+ progressiveState->getSettingCategory(0, true);
+ progressiveState->getSettingCategory(1, true);
+ progressiveState->getSettingCategory(2, true);
+ progressiveState->getSettingCategory(3, true);
+ progressiveState->getSettingCategory(4, true);
+ progressiveState->getSettingCategory(5, true);
+ progressiveState->getSettingCategory(6, true);
+ progressiveState->getSettingCategory(7, true);
+
progressiveState->onEntry(event);
- progressiveState->startNewSearch("a");
- QTest::qWait(100);
- progressiveState->cancelSearch();
+ progressiveState->startNewSearch("Creat");
+ QTest::qWait(2000);
+
//code for getting the model index from model
- QModelIndex index = progressiveState->mModel->index(0, 0);
- progressiveState->openResultitem(index);
+ /*QModelIndex index = progressiveState->mModel->index(0, 0);
+ progressiveState->openResultitem(index);
+ QTest::qWait(200);
+ progressiveState->startNewSearch("jpg");
+ QTest::qWait(200);
+ progressiveState->cancelSearch();
+ //code for getting the model index from model
+ index = progressiveState->mModel->index(0, 0);
+ progressiveState->openResultitem(index);
+
+ QTest::qWait(200);
+ progressiveState->startNewSearch("note");
+ QTest::qWait(200);
+ progressiveState->cancelSearch();
+ //code for getting the model index from model
+ index = progressiveState->mModel->index(3, 0);
+ progressiveState->openResultitem(index);*/
delete progressiveState;
// delete wind;
}
@@ -181,8 +211,15 @@
QEvent *event = new QEvent(QEvent::None);
progressiveState->onEntry(event);
+ progressiveState->getSettingCategory(0, false);
+ progressiveState->getSettingCategory(1, false);
+ progressiveState->getSettingCategory(2, false);
+ progressiveState->getSettingCategory(4, false);
+ progressiveState->getSettingCategory(5, false);
+ progressiveState->getSettingCategory(6, false);
+ progressiveState->getSettingCategory(7, false);
progressiveState->getSettingCategory(3, true);
- QCOMPARE(progressiveState->mSelectedCategory.count(),1);
+ QCOMPARE(progressiveState->mSelectedCategory.count(),8);
delete progressiveState;
// delete wind;
}
@@ -204,9 +241,19 @@
{
SearchProgressiveState* progressiveState = new SearchProgressiveState();
QEvent *event = new QEvent(QEvent::None);
- progressiveState->mSelectedCategory.insert(5, true);
+
+ progressiveState->getSettingCategory(0, true);
+ progressiveState->getSettingCategory(1, true);
+ progressiveState->getSettingCategory(2, true);
+ progressiveState->getSettingCategory(3, true);
+ progressiveState->getSettingCategory(4, true);
+ progressiveState->getSettingCategory(5, true);
+ progressiveState->getSettingCategory(6, true);
+ progressiveState->getSettingCategory(7, true);
progressiveState->onEntry(event);
- progressiveState->startNewSearch("d");
+ progressiveState->startNewSearch("jpg");
+ QTest::qWait(2000);
+ QVERIFY(progressiveState->mModel->rowCount());
delete progressiveState;
}
void SearchStateProviderTest::test_customizeGoButton()
@@ -234,7 +281,6 @@
QCOMPARE(progressiveState->mResultcount, 0);
progressiveState->settingsaction(true);
QTest::qWait(50);
- progressiveState->cancelSearch();
QCOMPARE(progressiveState->mResultcount, 0);
delete progressiveState;
}
@@ -249,18 +295,10 @@
progressiveState->onEntry(event);
progressiveState->getSettingCategory(5, true);
progressiveState->startNewSearch("d");
- progressiveState->cancelSearch();
delete progressiveState;
}
-void SearchStateProviderTest::testgetrowsInserted()
- {
- }
-void SearchStateProviderTest::testgetrowsRemoved()
- {
-
- }
void SearchStateProviderTest::testhandleOkError()
{
SearchProgressiveState* progressiveState = new SearchProgressiveState();
@@ -272,17 +310,7 @@
progressiveState->handleError(ret, QString());
delete progressiveState;
}
-void SearchStateProviderTest::test_viewingCompleted()
- {
- }
-// ---------------------------------------------------------------------------
-// ---------------------------------------------------------------------------
-//
-void SearchStateProviderTest::testsearchOnCategory()
- {
-
- }
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
//
@@ -361,10 +389,10 @@
delete progressiveState;
}
-void SearchStateProviderTest::testfromSymbianCFbsBitmap()
- {
- }
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
void SearchStateProviderTest::testgetDrivefromMediaId()
{
SearchProgressiveState* progressiveState = new SearchProgressiveState();
@@ -387,12 +415,12 @@
//QVERIFY(uid.length());
delete progressiveState;
}
-void SearchStateProviderTest::testLaunchApplicationL()
+void SearchStateProviderTest::testLaunchApplication()
{
SearchProgressiveState* progressiveState = new SearchProgressiveState();
QEvent *event = new QEvent(QEvent::None);
progressiveState->onEntry(event);
- progressiveState->LaunchApplicationL(TUid::Uid(0x20011383));
+ // progressiveState->LaunchApplicationL(TUid::Uid(0x20011383));
delete progressiveState;
}
// ---------------------------------------------------------------------------
--- a/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/t_searchstateprovider.pro Fri May 14 15:53:17 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/t_searchstateprovider.pro Thu May 27 12:52:35 2010 +0300
@@ -46,7 +46,7 @@
LIBS += -lapgrfx
LIBS += -lbitgdi
LIBS += -lnoteseditor
-
+LIBS += -lxqutils
CONFIG += qtestlib \
symbian_test \
debug_and_release \
Binary file searchui/tsrc/indexdb/data/applications/_1/_0.cfs has changed
Binary file searchui/tsrc/indexdb/data/applications/_1/deletable has changed
Binary file searchui/tsrc/indexdb/data/applications/_1/segments has changed
Binary file searchui/tsrc/indexdb/data/bookmark/_1/_0.cfs has changed
Binary file searchui/tsrc/indexdb/data/bookmark/_1/deletable has changed
Binary file searchui/tsrc/indexdb/data/bookmark/_1/segments has changed
Binary file searchui/tsrc/indexdb/data/calendar/_1/_0.cfs has changed
Binary file searchui/tsrc/indexdb/data/calendar/_1/deletable has changed
Binary file searchui/tsrc/indexdb/data/calendar/_1/segments has changed
Binary file searchui/tsrc/indexdb/data/contact/_1/_0.cfs has changed
Binary file searchui/tsrc/indexdb/data/contact/_1/deletable has changed
Binary file searchui/tsrc/indexdb/data/contact/_1/segments has changed
Binary file searchui/tsrc/indexdb/data/cpixcontentinfo.sq has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/searchui/tsrc/indexdb/data/cpixreg.txt Thu May 27 12:52:35 2010 +0300
@@ -0,0 +1,31 @@
+@0:root applications=C:\Private\2001f6f7\indexing\indexdb\root\applications
+@0:root bookmark=C:\Private\2001f6f7\indexing\indexdb\root\bookmark
+@0:root calendar=C:\Private\2001f6f7\indexing\indexdb\root\calendar
+@0:root contact=C:\Private\2001f6f7\indexing\indexdb\root\contact
+@0:root notes=C:\Private\2001f6f7\indexing\indexdb\root\notes
+@c:root file content=C:\Private\2001f6f7\indexing\indexdb\root\file\content
+@c:root file folder=C:\Private\2001f6f7\indexing\indexdb\root\file\folder
+@c:root media audio=C:\Private\2001f6f7\indexing\indexdb\root\media\audio
+@c:root media image=C:\Private\2001f6f7\indexing\indexdb\root\media\image
+@c:root media video=C:\Private\2001f6f7\indexing\indexdb\root\media\video
+@c:root msg smsmms=C:\Private\2001f6f7\indexing\indexdb\root\msg\smsmms
+@t:root file content=T:\Private\2001f6f7\indexing\indexdb\root\file\content
+@t:root file folder=T:\Private\2001f6f7\indexing\indexdb\root\file\folder
+@t:root media audio=T:\Private\2001f6f7\indexing\indexdb\root\media\audio
+@t:root media image=T:\Private\2001f6f7\indexing\indexdb\root\media\image
+@t:root media video=T:\Private\2001f6f7\indexing\indexdb\root\media\video
+@u:root file content=U:\Private\2001f6f7\indexing\indexdb\root\file\content
+@u:root file folder=U:\Private\2001f6f7\indexing\indexdb\root\file\folder
+@u:root media audio=U:\Private\2001f6f7\indexing\indexdb\root\media\audio
+@u:root media image=U:\Private\2001f6f7\indexing\indexdb\root\media\image
+@u:root media video=U:\Private\2001f6f7\indexing\indexdb\root\media\video
+@x:root file content=X:\Private\2001f6f7\indexing\indexdb\root\file\content
+@x:root file folder=X:\Private\2001f6f7\indexing\indexdb\root\file\folder
+@x:root media audio=X:\Private\2001f6f7\indexing\indexdb\root\media\audio
+@x:root media image=X:\Private\2001f6f7\indexing\indexdb\root\media\image
+@x:root media video=X:\Private\2001f6f7\indexing\indexdb\root\media\video
+@y:root file content=Y:\Private\2001f6f7\indexing\indexdb\root\file\content
+@y:root file folder=Y:\Private\2001f6f7\indexing\indexdb\root\file\folder
+@y:root media audio=Y:\Private\2001f6f7\indexing\indexdb\root\media\audio
+@y:root media image=Y:\Private\2001f6f7\indexing\indexdb\root\media\image
+@y:root media video=Y:\Private\2001f6f7\indexing\indexdb\root\media\video
Binary file searchui/tsrc/indexdb/data/file/content/_0/_0.cfs has changed
Binary file searchui/tsrc/indexdb/data/file/content/_0/deletable has changed
Binary file searchui/tsrc/indexdb/data/file/content/_0/segments has changed
Binary file searchui/tsrc/indexdb/data/file/folder/_1/_0.cfs has changed
Binary file searchui/tsrc/indexdb/data/file/folder/_1/deletable has changed
Binary file searchui/tsrc/indexdb/data/file/folder/_1/segments has changed
Binary file searchui/tsrc/indexdb/data/media/audio/_1/_0.cfs has changed
Binary file searchui/tsrc/indexdb/data/media/audio/_1/deletable has changed
Binary file searchui/tsrc/indexdb/data/media/audio/_1/segments has changed
Binary file searchui/tsrc/indexdb/data/media/image/_1/_0.cfs has changed
Binary file searchui/tsrc/indexdb/data/media/image/_1/deletable has changed
Binary file searchui/tsrc/indexdb/data/media/image/_1/segments has changed
Binary file searchui/tsrc/indexdb/data/media/video/_0/_0.cfs has changed
Binary file searchui/tsrc/indexdb/data/media/video/_0/deletable has changed
Binary file searchui/tsrc/indexdb/data/media/video/_0/segments has changed
Binary file searchui/tsrc/indexdb/data/msg/smsmms/_1/_0.cfs has changed
Binary file searchui/tsrc/indexdb/data/msg/smsmms/_1/deletable has changed
Binary file searchui/tsrc/indexdb/data/msg/smsmms/_1/segments has changed
Binary file searchui/tsrc/indexdb/data/notes/_1/_0.cfs has changed
Binary file searchui/tsrc/indexdb/data/notes/_1/deletable has changed
Binary file searchui/tsrc/indexdb/data/notes/_1/segments has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/searchui/tsrc/indexdb/indexdb.pro Thu May 27 12:52:35 2010 +0300
@@ -0,0 +1,59 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+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"
+
+
+
+
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/searchui/tsrc/tsrc.pro Thu May 27 12:52:35 2010 +0300
@@ -0,0 +1,31 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = subdirs
+
+SUBDIRS += indexdb \
+../indevicehandler/tsrc/t_indevicehandler \
+ ../stateproviders/searchstateprovider/tsrc/t_searchstateprovider
+
+
+CONFIG += ordered
+
+
+
+
+symbian: {
+ CONFIG += symbian_test
+}