--- a/harvesterplugins/calendar/src/ccalendarplugin.cpp Tue Jun 29 22:28:37 2010 +0530
+++ b/harvesterplugins/calendar/src/ccalendarplugin.cpp Mon Jul 12 00:27:06 2010 +0530
@@ -385,53 +385,55 @@
// Add fields
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;
- }
+ index_item->AddFieldL(KCalendarLocationField, entry->LocationL());
TBuf<30> dateString;
- TDateTime datetime = entry->StartTimeL().TimeUtcL().DateTime();
+ TDateTime datetime = entry->StartTimeL().TimeLocalL().DateTime();
dateString.Format( KCalendarTimeFormat, datetime.Year(),
TInt(datetime.Month()+ 1),
datetime.Day() + 1,
- datetime.Hour()+ 1,
+ datetime.Hour(),
datetime.Minute());
index_item->AddFieldL(KCalendarStartTimeField, dateString, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
- TDateTime endTime = entry->EndTimeL().TimeUtcL().DateTime();
+ TDateTime endTime = entry->EndTimeL().TimeLocalL().DateTime();
dateString.Format( KCalendarTimeFormat, endTime.Year(),
TInt(endTime.Month()+ 1),
endTime.Day() + 1,
- endTime.Hour()+ 1,
+ endTime.Hour(),
endTime.Minute());
index_item->AddFieldL(KCalendarEndTimeField, dateString, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
- TTime completedTime = entry->CompletedTimeL().TimeUtcL();
- if( completedTime != Time::NullTTime() && CCalEntry::ETodo == entry->EntryTypeL())
+
+ if( 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);
+ 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;
+ }
+ TTime completedTime = entry->CompletedTimeL().TimeLocalL();
+ if( completedTime != Time::NullTTime())
+ {
+ TDateTime compTime = completedTime.DateTime();
+ dateString.Format( KCalendarTimeFormat, compTime.Year(),
+ TInt(compTime.Month()+ 1),
+ compTime.Day() + 1,
+ compTime.Hour(),
+ compTime.Minute());
+ index_item->AddFieldL(KCalenderCompletedField, dateString, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
+ }
}
index_item->AddFieldL(KMimeTypeField, KMimeTypeCalendar, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
--- a/harvesterplugins/media/audio/inc/mediaplugin.h Tue Jun 29 22:28:37 2010 +0530
+++ b/harvesterplugins/media/audio/inc/mediaplugin.h Mon Jul 12 00:27:06 2010 +0530
@@ -123,6 +123,11 @@
CCPIXMDEDbManager* iDBManager;
CMDSEntity* iMdsItem;
+//for helping with testing.
+#ifdef HARVESTERPLUGINTESTER_FRIEND
+ friend class CHarvesterPluginTester;
+#endif
+
#ifdef __PERFORMANCE_DATA
TTime iStartTime;
TTime iCompleteTime;
--- a/harvesterplugins/media/audio/src/cpixmediaaudiodoc.cpp Tue Jun 29 22:28:37 2010 +0530
+++ b/harvesterplugins/media/audio/src/cpixmediaaudiodoc.cpp Mon Jul 12 00:27:06 2010 +0530
@@ -221,18 +221,15 @@
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);
- }
+ //Add field to document
+ 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
@@ -251,94 +248,83 @@
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);
- }
+ 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);
- }
+ //Add field to document
+ 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(),
+ //Add field to document
+ 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());
- AddToFieldExcerptL(buf);
- }
+
+ 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 );
- }
+ //Add field to document
+ 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);
- }
+
+ index_item->AddExcerptL(*iExcerpt);
+
CPIXLOGSTRING("END CCPIXMediaAudioDoc::GetCpixDocumentL");
OstTraceFunctionExit0( CCPIXMEDIAAUDIODOC_GETCPIXDOCUMENTL_EXIT );
return index_item;
--- a/harvesterplugins/media/audio/src/mediaplugin.cpp Tue Jun 29 22:28:37 2010 +0530
+++ b/harvesterplugins/media/audio/src/mediaplugin.cpp Mon Jul 12 00:27:06 2010 +0530
@@ -88,6 +88,7 @@
delete iObjectJobQueueManager;
delete iMdsUtils;
delete iAudioDocument;
+ iIndexerUtil->UnMountAllDrivesL(_L(MEDIAGENERICAPPCLASS));
delete iIndexerUtil;
delete iMMcMonitor;
delete iDBManager;
@@ -235,7 +236,7 @@
CPIXLOGSTRING2("CAudioPlugin::HandleMdeItemL(): Error %d in adding.", err);
}
}
- else if (aActionType == ECPixUpdateAction)
+ else
{
//If DocID for e.g \music\something.mp3 itself changes the we have to compare
//existing URI with new one and Remove that first and Update to avoid
--- a/harvesterplugins/media/image/inc/imageplugin.h Tue Jun 29 22:28:37 2010 +0530
+++ b/harvesterplugins/media/image/inc/imageplugin.h Mon Jul 12 00:27:06 2010 +0530
@@ -122,6 +122,12 @@
CMMCMonitorUtil* iMMcMonitor;//MMC monitor owned
CCPIXMDEDbManager* iDBManager;
CMDSEntity* iMdsItem;
+
+//for helping with testing.
+#ifdef HARVESTERPLUGINTESTER_FRIEND
+ friend class CHarvesterPluginTester;
+#endif
+
#ifdef __PERFORMANCE_DATA
TTime iStartTime;
TTime iCompleteTime;
--- a/harvesterplugins/media/image/src/cpixmediaimagedoc.cpp Tue Jun 29 22:28:37 2010 +0530
+++ b/harvesterplugins/media/image/src/cpixmediaimagedoc.cpp Mon Jul 12 00:27:06 2010 +0530
@@ -170,75 +170,66 @@
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);
- }
+ //Add field to document
+ 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(),
+ //Add field to document
+ 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());
- AddToFieldExcerptL(buf);
- }
+ 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());
+
}
//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(),
+ 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());
- AddToFieldExcerptL(buf);
- }
+
+ 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);
}
if( iExcerpt )
{
--- a/harvesterplugins/media/image/src/imageplugin.cpp Tue Jun 29 22:28:37 2010 +0530
+++ b/harvesterplugins/media/image/src/imageplugin.cpp Mon Jul 12 00:27:06 2010 +0530
@@ -86,6 +86,7 @@
delete iObjectJobQueueManager;
delete iMdsUtils;
delete iImageDocument;
+ iIndexerUtil->UnMountAllDrivesL(_L(MEDIAGENERICAPPCLASS));
delete iIndexerUtil;
delete iMMcMonitor;
delete iDBManager;
@@ -231,7 +232,7 @@
CPIXLOGSTRING2("CImagePlugin::HandleMdeItemL(): Error %d in adding.", err);
}
}
- else if (aActionType == ECPixUpdateAction)
+ else
{
//If DocID for e.g \image\something.jpeg itself changes the we have to compare
//existing URI with new one and Remove that first and Update to avoid
--- a/harvesterplugins/media/mediautils/inc/cpixindexerutils.h Tue Jun 29 22:28:37 2010 +0530
+++ b/harvesterplugins/media/mediautils/inc/cpixindexerutils.h Mon Jul 12 00:27:06 2010 +0530
@@ -149,6 +149,11 @@
CCPixIndexer *iIndexer[EDriveZ + 1];//Array of all Indexers
RFs iFs; //File session
RSearchServerSession iSearchSession; //Search session
+
+ //for helping with testing.
+ #ifdef HARVESTERPLUGINTESTER_FRIEND
+ friend class CHarvesterPluginTester;
+ #endif
};
#endif /* CPIXINDERUTILS_H_ */
--- a/harvesterplugins/media/video/inc/videoplugin.h Tue Jun 29 22:28:37 2010 +0530
+++ b/harvesterplugins/media/video/inc/videoplugin.h Mon Jul 12 00:27:06 2010 +0530
@@ -107,6 +107,11 @@
CCPIXMDEDbManager* iDBManager;
CMDSEntity* iMdsItem;
+//for helping with testing.
+#ifdef HARVESTERPLUGINTESTER_FRIEND
+ friend class CHarvesterPluginTester;
+#endif
+
#ifdef __PERFORMANCE_DATA
TTime iStartTime;
TTime iCompleteTime;
--- a/harvesterplugins/media/video/src/cpixmediavideodoc.cpp Tue Jun 29 22:28:37 2010 +0530
+++ b/harvesterplugins/media/video/src/cpixmediavideodoc.cpp Mon Jul 12 00:27:06 2010 +0530
@@ -108,16 +108,7 @@
}
//URI and Excerpt is done add additional properties here
- 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());
- }
+
CMdEPropertyDef& artistPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KArtistProperty );
if(aObject.Property( artistPropDef, property )!= KErrNotFound)
{
@@ -189,34 +180,29 @@
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);
- }
+ //Add field to document
+ 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);
- }
+ //Add field to document
+ 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 );
@@ -226,96 +212,86 @@
CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property );
AddFiledtoDocumentL(*index_item,
MdeConstants::MediaObject::KLegalProperty,
- textProperty->Value());
+ 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);
- }
+ 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);
- }
+ 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(),
+ //Add field to document
+ 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());
- AddToFieldExcerptL(buf);
- }
+
+ 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);
- }
+ 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 )
{
--- a/harvesterplugins/media/video/src/videoplugin.cpp Tue Jun 29 22:28:37 2010 +0530
+++ b/harvesterplugins/media/video/src/videoplugin.cpp Mon Jul 12 00:27:06 2010 +0530
@@ -73,6 +73,7 @@
delete iObjectJobQueueManager;
delete iMdsUtils;
delete iVideoDocument;
+ iIndexerUtil->UnMountAllDrivesL(_L(MEDIAGENERICAPPCLASS));
delete iIndexerUtil;
delete iMMcMonitor;
delete iDBManager;
@@ -211,7 +212,7 @@
CPIXLOGSTRING2("CVideoPlugin::HandleMdeItemL(): Error %d in adding.", err);
}
}
- else if (aActionType == ECPixUpdateAction)
+ else
{
//If DocID for e.g \video\something.3gpp itself changes the we have to compare
//existing URI with new one and Remove that first and Update to avoid
--- a/harvesterplugins/notes/src/notesplugin.cpp Tue Jun 29 22:28:37 2010 +0530
+++ b/harvesterplugins/notes/src/notesplugin.cpp Mon Jul 12 00:27:06 2010 +0530
@@ -346,11 +346,11 @@
index_item->AddFieldL(KNpdMemo, entry->DescriptionL());
// Add Date fields
TBuf<30> dateString;
- TDateTime datetime = entry->EndTimeL().TimeUtcL().DateTime();
+ TDateTime datetime = entry->EndTimeL().TimeLocalL().DateTime();
dateString.Format( KNotesTimeFormat, datetime.Year(),
TInt(datetime.Month()+ 1),
datetime.Day() + 1,
- datetime.Hour()+ 1,
+ datetime.Hour(),
datetime.Minute());
index_item->AddFieldL(KNpdUpdateTime, dateString, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
--- a/harvesterplugins/tsrc/harvesterplugintester/Bwins/harvesterplugintesteru.def Tue Jun 29 22:28:37 2010 +0530
+++ b/harvesterplugins/tsrc/harvesterplugintester/Bwins/harvesterplugintesteru.def Mon Jul 12 00:27:06 2010 +0530
@@ -1,3 +1,4 @@
EXPORTS
?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
+ ?getloc@ios_base@std@@QBE?AVlocale@2@XZ @ 2 NONAME ; class std::locale std::ios_base::getloc(void) const
Binary file harvesterplugins/tsrc/harvesterplugintester/conf/eagle_landed.mp3 has changed
--- a/harvesterplugins/tsrc/harvesterplugintester/conf/harvesterplugintester.cfg Tue Jun 29 22:28:37 2010 +0530
+++ b/harvesterplugins/tsrc/harvesterplugintester/conf/harvesterplugintester.cfg Mon Jul 12 00:27:06 2010 +0530
@@ -403,20 +403,6 @@
[Endtest]
[Test]
-title TestAudioHarvestingUpdateIndex
-create HarvesterPluginTester foobar
-foobar TestAudioHarvestingUpdateIndex c:\data\eagle_landed.mp3 eagle_landed.mp3 testaudio.mp3
-delete foobar
-[Endtest]
-
-[Test]
-title TestAudioHarvestingDeleteIndex
-create HarvesterPluginTester foobar
-foobar TestAudioHarvestingDeleteIndex c:\data\eagle_landed.mp3 eagle_landed.mp3
-delete foobar
-[Endtest]
-
-[Test]
title TestMdsSyncController
create HarvesterPluginTester foobar
foobar TestMdsSyncController
@@ -424,44 +410,24 @@
[Endtest]
[Test]
-title TestVideoHarvestingIndex
-create HarvesterPluginTester foobar
-foobar TestVideoHarvestingIndex c:\data\Niagara.wmv Niagara.wmv
-delete foobar
-[Endtest]
-
-[Test]
-title TestVideoHarvestingUpdateIndex
-create HarvesterPluginTester foobar
-foobar TestVideoHarvestingUpdateIndex c:\data\Niagara.wmv Niagara.wmv Falls.wmv
+title TestAudioHandleItem
+create HarvesterPluginTester foobar
+foobar TestAudioHandleItem 3 0
+foobar TestAudioHandleItem 4 0
+foobar TestAudioHandleItem 5 0
+foobar TestAudioHandleItem 3 1
+foobar TestAudioHandleItem 4 1
+foobar TestAudioHandleItem 5 1
+foobar TestAudioHandleItem 3 2
+foobar TestAudioHandleItem 4 2
+foobar TestAudioHandleItem 5 2
delete foobar
[Endtest]
[Test]
-title TestVideoHarvestingDeleteIndex
-create HarvesterPluginTester foobar
-foobar TestVideoHarvestingDeleteIndex c:\data\Niagara.wmv Niagara.wmv
-delete foobar
-[Endtest]
-
-[Test]
-title TestImageHarvestingAddIndex
-create HarvesterPluginTester foobar
-foobar TestImageHarvestingAddIndex c:\data\square.jpg square.jpg
-delete foobar
-[Endtest]
-
-[Test]
-title TestImageHarvestingUpdateIndex
-create HarvesterPluginTester foobar
-foobar TestImageHarvestingUpdateIndex c:\data\square.jpg square.jpg portrait.jpg
-delete foobar
-[Endtest]
-
-[Test]
-title TestImageHarvestingDeleteIndex
-create HarvesterPluginTester foobar
-foobar TestImageHarvestingDeleteIndex c:\data\square.jpg square.jpg
+title TestAudioSyncDbManager
+create HarvesterPluginTester foobar
+foobar TestAudioSyncDbManager
delete foobar
[Endtest]
@@ -469,13 +435,45 @@
title TestAudioMMCEventL
create HarvesterPluginTester foobar
foobar TestAudioMMCEventL 2 0
+foobar TestAudioMMCEventL 2 1
+delete foobar
+[Endtest]
+
+[Test]
+title TestAudioNoIndexer
+create HarvesterPluginTester foobar
+foobar TestAudioNoIndexer 2 3
+foobar TestAudioNoIndexer 2 4
+foobar TestAudioNoIndexer 2 5
delete foobar
[Endtest]
[Test]
-title TestAudioMMCEventL
+title TestVideoHarvesting
create HarvesterPluginTester foobar
-foobar TestAudioMMCEventL 2 1
+foobar TestVideoHarvesting c:\data\Niagara.wmv Niagara.wmv
+delete foobar
+[Endtest]
+
+[Test]
+title TestVideoHandleItem
+create HarvesterPluginTester foobar
+foobar TestVideoHandleItem 10 0
+foobar TestVideoHandleItem 11 0
+foobar TestVideoHandleItem 12 0
+foobar TestVideoHandleItem 10 1
+foobar TestVideoHandleItem 11 1
+foobar TestVideoHandleItem 12 1
+foobar TestVideoHandleItem 10 2
+foobar TestVideoHandleItem 11 2
+foobar TestVideoHandleItem 12 2
+delete foobar
+[Endtest]
+
+[Test]
+title TestVideoSyncDbManager
+create HarvesterPluginTester foobar
+foobar TestVideoSyncDbManager
delete foobar
[Endtest]
@@ -483,13 +481,45 @@
title TestVideoMMCEventL
create HarvesterPluginTester foobar
foobar TestVideoMMCEventL 2 0
+foobar TestVideoMMCEventL 2 1
+delete foobar
+[Endtest]
+
+[Test]
+title TestVideoNoIndexer
+create HarvesterPluginTester foobar
+foobar TestVideoNoIndexer 2 10
+foobar TestVideoNoIndexer 2 11
+foobar TestVideoNoIndexer 2 12
delete foobar
[Endtest]
[Test]
-title TestVideoMMCEventL
+title TestImageHarvesting
create HarvesterPluginTester foobar
-foobar TestVideoMMCEventL 2 1
+foobar TestImageHarvesting c:\data\square.jpg square.jpg
+delete foobar
+[Endtest]
+
+[Test]
+title TestImageHandleItem
+create HarvesterPluginTester foobar
+foobar TestImageHandleItem 3 0
+foobar TestImageHandleItem 4 0
+foobar TestImageHandleItem 5 0
+foobar TestImageHandleItem 3 1
+foobar TestImageHandleItem 4 1
+foobar TestImageHandleItem 5 1
+foobar TestImageHandleItem 3 2
+foobar TestImageHandleItem 4 2
+foobar TestImageHandleItem 5 2
+delete foobar
+[Endtest]
+
+[Test]
+title TestImageSyncDbManager
+create HarvesterPluginTester foobar
+foobar TestImageSyncDbManager
delete foobar
[Endtest]
@@ -497,13 +527,16 @@
title TestImageMMCEventL
create HarvesterPluginTester foobar
foobar TestImageMMCEventL 2 0
+foobar TestImageMMCEventL 2 1
delete foobar
[Endtest]
[Test]
-title TestImageMMCEventL
+title TestImageNoIndexer
create HarvesterPluginTester foobar
-foobar TestImageMMCEventL 2 1
+foobar TestImageNoIndexer 2 3
+foobar TestImageNoIndexer 2 4
+foobar TestImageNoIndexer 2 5
delete foobar
[Endtest]
Binary file harvesterplugins/tsrc/harvesterplugintester/data/cpixmediatest/3GPP-70kB.3gpp has changed
Binary file harvesterplugins/tsrc/harvesterplugintester/data/cpixmediatest/audio1.mp3 has changed
Binary file harvesterplugins/tsrc/harvesterplugintester/data/cpixmediatest/kodak-dc210.jpg has changed
Binary file harvesterplugins/tsrc/harvesterplugintester/data/cpixmediatest/nokia_logo.png has changed
Binary file harvesterplugins/tsrc/harvesterplugintester/data/cpixmediatest/song.wma has changed
--- a/harvesterplugins/tsrc/harvesterplugintester/group/bld.inf Tue Jun 29 22:28:37 2010 +0530
+++ b/harvesterplugins/tsrc/harvesterplugintester/group/bld.inf Mon Jul 12 00:27:06 2010 +0530
@@ -34,6 +34,11 @@
../conf/eagle_landed.mp3 /epoc32/winscw/c/data/eagle_landed.mp3
../conf/niagara.wmv /epoc32/winscw/c/data/niagara.wmv
../conf/square.jpg /epoc32/winscw/c/data/square.jpg
+../data/cpixmediatest/audio1.mp3 /epoc32/winscw/c/data/cpixmediatest/audio1.mp3
+../data/cpixmediatest/song.wma /epoc32/winscw/c/data/cpixmediatest/song.wma
+../data/cpixmediatest/kodak-dc210.jpg /epoc32/winscw/c/data/cpixmediatest/kodak-dc210.jpg
+../data/cpixmediatest/nokia_logo.png /epoc32/winscw/c/data/cpixmediatest/nokia_logo.png
+../data/cpixmediatest/3GPP-70kB.3gpp /epoc32/winscw/c/data/cpixmediatest/3GPP-70kB.3gpp
//Note: Export for ROM build
../conf/testframework.ini z:/system/data/testframework.ini
@@ -45,6 +50,7 @@
../conf/testfile.txt z:/ids/testfile.txt
../conf/eagle_landed.mp3 z:/ids/eagle_landed.mp3
../conf/niagara.wmv z:/ids/niagara.wmv
+
PRJ_EXPORTS
// Specify the source file followed by its destination here
// copy will be used to copy the source file to its destination
--- a/harvesterplugins/tsrc/harvesterplugintester/group/harvesterplugintester.mmp Tue Jun 29 22:28:37 2010 +0530
+++ b/harvesterplugins/tsrc/harvesterplugintester/group/harvesterplugintester.mmp Mon Jul 12 00:27:06 2010 +0530
@@ -234,7 +234,7 @@
OPTION CW -wchar_t on
MACRO _WCHAR_T_DECLARED
-//EPOCALLOWDLLDATA
+EPOCALLOWDLLDATA
//------------------End for Eail plugin -----------------------------
USERINCLUDE ../../../applications/traces
--- a/harvesterplugins/tsrc/harvesterplugintester/inc/harvesterplugintester.h Tue Jun 29 22:28:37 2010 +0530
+++ b/harvesterplugins/tsrc/harvesterplugintester/inc/harvesterplugintester.h Mon Jul 12 00:27:06 2010 +0530
@@ -247,34 +247,40 @@
virtual TInt TestAudioHarvestingL( CStifItemParser& aItem );
- virtual TInt TestAudioHarvestingUpdateIndexL( CStifItemParser& aItem );
-
- virtual TInt TestAudioHarvestingDeleteIndexL( CStifItemParser& aItem );
+ virtual TInt TestAudioHandleItemL( CStifItemParser& aItem );
virtual TInt TestMdsSyncControllerL( CStifItemParser& aItem );
+ virtual TInt TestAudioSyncDbManagerL( CStifItemParser& aItem );
+
+ virtual TInt TestAudioMMCEventL( CStifItemParser& aItem );
+
+ virtual TInt TestAudioNoIndexerL( CStifItemParser& aItem );
+
virtual TInt TestBlacklistPluginL( CStifItemParser& aItem );
virtual TInt TestBlacklistPluginVersionL( CStifItemParser& aItem );
- virtual TInt TestVideoHarvestingIndexL( CStifItemParser& aItem );
-
- virtual TInt TestVideoHarvestingUpdateIndexL( CStifItemParser& aItem );
-
- virtual TInt TestVideoHarvestingDeleteIndexL( CStifItemParser& aItem );
+ virtual TInt TestVideoHarvestingL( CStifItemParser& aItem );
- virtual TInt TestImageHarvestingAddIndexL( CStifItemParser& aItem );
-
- virtual TInt TestImageHarvestingUpdateIndexL( CStifItemParser& aItem );
+ virtual TInt TestVideoHandleItemL( CStifItemParser& aItem );
- virtual TInt TestImageHarvestingDeleteIndexL( CStifItemParser& aItem );
-
- virtual TInt TestAudioMMCEventL( CStifItemParser& aItem );
+ virtual TInt TestVideoSyncDbManagerL ( CStifItemParser& aItem );
virtual TInt TestVideoMMCEventL( CStifItemParser& aItem );
+ virtual TInt TestVideoNoIndexerL( CStifItemParser& aItem );
+
+ virtual TInt TestImageHarvestingL( CStifItemParser& aItem );
+
+ virtual TInt TestImageHandleItemL( CStifItemParser& aItem );
+
+ virtual TInt TestImageSyncDbManagerL ( CStifItemParser& aItem );
+
virtual TInt TestImageMMCEventL( CStifItemParser& aItem );
+ virtual TInt TestImageNoIndexerL( CStifItemParser& aItem );
+
virtual TInt TestStartEmailPluginL( CStifItemParser& aItem );
CSearchDocument* prepareemaildocument();
--- a/harvesterplugins/tsrc/harvesterplugintester/src/harvesterplugintesterblocks.cpp Tue Jun 29 22:28:37 2010 +0530
+++ b/harvesterplugins/tsrc/harvesterplugintester/src/harvesterplugintesterblocks.cpp Mon Jul 12 00:27:06 2010 +0530
@@ -45,11 +45,14 @@
#include <harvesterclient.h>
#include "mdsitementity.h"
#include "cpixmdedbmanager.h"
+#include "cpixindexerutils.h"
#include "cfolderrenamedharvester.h"
#include "videoplugin.h"
#include "imageplugin.h"
#include "cemailplugin.h"
#include "cmessagedatahandler.h"
+#include <common.h>
+
_LIT(KAppBasePath,"@c:root file content");
_LIT(KEmailAppBasePath,"@c:root msg email");
_LIT(KAppBaseFolderFilePath,"@c:root file folder");
@@ -142,21 +145,24 @@
ENTRY( "TestCalenderEntry",CHarvesterPluginTester::TestCalenderEntryL ),
ENTRY( "TestCreateMMS",CHarvesterPluginTester::TestCreateMmsL ),
ENTRY( "TestCreateEmail",CHarvesterPluginTester::TestCreateEmailL ),
- ENTRY( "TestAudioHarvesting",CHarvesterPluginTester::TestAudioHarvestingL ),
- ENTRY( "TestAudioHarvestingUpdateIndex",CHarvesterPluginTester::TestAudioHarvestingUpdateIndexL ),
- ENTRY( "TestAudioHarvestingDeleteIndex",CHarvesterPluginTester::TestAudioHarvestingDeleteIndexL ),
+ ENTRY( "TestAudioHarvesting",CHarvesterPluginTester::TestAudioHarvestingL ),
ENTRY( "TestMdsSyncController",CHarvesterPluginTester::TestMdsSyncControllerL ),
+ ENTRY( "TestAudioHandleItem",CHarvesterPluginTester::TestAudioHandleItemL ),
+ ENTRY( "TestAudioSyncDbManager",CHarvesterPluginTester::TestAudioSyncDbManagerL ),
+ ENTRY( "TestAudioMMCEventL",CHarvesterPluginTester::TestAudioMMCEventL ),
+ ENTRY( "TestAudioNoIndexer",CHarvesterPluginTester::TestAudioNoIndexerL ),
//ENTRY( "TestBlacklistPlugin",CHarvesterPluginTester::TestBlacklistPluginL ),
//ENTRY( "TestBlacklistPluginVersion",CHarvesterPluginTester::TestBlacklistPluginVersionL ),
- ENTRY( "TestVideoHarvestingIndex",CHarvesterPluginTester::TestVideoHarvestingIndexL ),
- ENTRY( "TestVideoHarvestingUpdateIndex",CHarvesterPluginTester::TestVideoHarvestingUpdateIndexL ),
- ENTRY( "TestVideoHarvestingDeleteIndex",CHarvesterPluginTester::TestVideoHarvestingDeleteIndexL ),
- ENTRY( "TestImageHarvestingAddIndex",CHarvesterPluginTester::TestImageHarvestingAddIndexL ),
- ENTRY( "TestImageHarvestingUpdateIndex",CHarvesterPluginTester::TestImageHarvestingUpdateIndexL ),
- ENTRY( "TestImageHarvestingDeleteIndex",CHarvesterPluginTester::TestImageHarvestingDeleteIndexL ),
- ENTRY( "TestAudioMMCEventL",CHarvesterPluginTester::TestAudioMMCEventL ),
- ENTRY( "TestVideoMMCEventL",CHarvesterPluginTester::TestVideoMMCEventL ),
+ ENTRY( "TestVideoHarvesting",CHarvesterPluginTester::TestVideoHarvestingL ),
+ ENTRY( "TestVideoHandleItem",CHarvesterPluginTester::TestVideoHandleItemL ),
+ ENTRY( "TestVideoSyncDbManager",CHarvesterPluginTester::TestVideoSyncDbManagerL ),
+ ENTRY( "TestVideoMMCEventL",CHarvesterPluginTester::TestVideoMMCEventL ),
+ ENTRY( "TestVideoNoIndexer",CHarvesterPluginTester::TestVideoNoIndexerL ),
+ ENTRY( "TestImageHarvesting",CHarvesterPluginTester::TestImageHarvestingL ),
+ ENTRY( "TestImageHandleItem",CHarvesterPluginTester::TestImageHandleItemL ),
+ ENTRY( "TestImageSyncDbManager",CHarvesterPluginTester::TestImageSyncDbManagerL ),
ENTRY( "TestImageMMCEventL",CHarvesterPluginTester::TestImageMMCEventL ),
+ ENTRY( "TestImageNoIndexer",CHarvesterPluginTester::TestImageNoIndexerL ),
ENTRY( "TestStartEmailPlugin",CHarvesterPluginTester::TestStartEmailPluginL ),
ENTRY( "TestHandleEmailDoc",CHarvesterPluginTester::TestHandleEmailDocL ),
//ADD NEW ENTRY HERE
@@ -835,6 +841,7 @@
{
DocumentCount = searcher->SearchL(aQueryString, aDefaultField);
}
+ session.Close();
return DocumentCount;
}
@@ -1596,119 +1603,14 @@
//Wait for one minutes after doc processing to Index and Flush to happen
iPluginTester->SetWaitTime((TTimeIntervalMicroSeconds32)60000000);
iPluginTester->iWaitForHarvester->Start(); //Start Wait AO and let it complete
- TInt count = SearchForTextL(_L("Eagle"),_L(MEDIA_QBASEAPPCLASS),KNullDesC);
- if(count <= 0)
- {
- error = KErrNotFound;
- }
- doLog(iLog,error,_L("Error in TestAudioHarvestingL"));
+ error = doSearchL( _L("Eagle"),_L(MEDIA_QBASEAPPCLASS), ESearchTypeResultsExpected );
+
delete plugin;
delete iPluginTester;
iPluginTester = NULL;
fileSession.Close();
//End search
- return error;
- }
-TInt CHarvesterPluginTester::TestAudioHarvestingUpdateIndexL( CStifItemParser& aItem )
- {
- TInt error = KErrNone;
- TPtrC filepath;
- TPtrC filename;
- TPtrC newFile;
- TBuf<KMaxFileName> srcPath(_L("c:\\data\\Sounds\\"));
- TBuf<KMaxFileName> desPath;
- desPath.Copy( srcPath );
- CAudioPlugin* plugin = CAudioPlugin::NewL();
- CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
- plugin->StartPluginL();
- RFs fSession;
- User::LeaveIfError( fSession.Connect());
- CleanupClosePushL( fSession );
- if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone))
- {
- srcPath.Append( filename );
- if( aItem.GetNextString(newFile) == KErrNone )
- {
- desPath.Append( newFile );
- RHarvesterClient harvester;
- User::LeaveIfError(harvester.Connect());
- harvester.Pause();
- TBool fileExist = BaflUtils::FileExists( fSession, srcPath );
- if(!fileExist)
- {
- BaflUtils::EnsurePathExistsL( fSession, srcPath );//Create folder
- BaflUtils::CopyFile( fSession, filepath, srcPath );
- }
- BaflUtils::RenameFile( fSession, srcPath, desPath );
- harvester.Resume();
- harvester.Close();
- plugin->StartHarvestingL( _L(MEDIA_QBASEAPPCLASS) );
- //wait for index to flush
- iPluginTester->SetWaitTime( (TTimeIntervalMicroSeconds32)60000000 );
- //wait till video harvesting completes
- iPluginTester->iWaitForHarvester->Start();
- TInt count = SearchForTextL(_L("testaudio"), _L(MEDIA_QBASEAPPCLASS), KNullDesC );
- if(count <= 0)
- {
- error = KErrNotFound;
- }
- doLog( iLog, error, _L("Error in TestAudioHarvestingUpdateIndexL") );
- }
- }
- else
- doLog( iLog, KErrNotFound, _L("Error in TestAudioHarvestingUpdateIndexL") );
- CleanupStack::PopAndDestroy();
- delete plugin;
- delete iPluginTester;
- iPluginTester = NULL;
- return error;
- }
-
-TInt CHarvesterPluginTester::TestAudioHarvestingDeleteIndexL( CStifItemParser& aItem )
- {
- TInt error = KErrNone;
- TPtrC filepath;
- TPtrC filename;
- TBuf<KMaxFileName> srcPath(_L("c:\\data\\Sounds\\"));
- CAudioPlugin* plugin = CAudioPlugin::NewL();
- CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
- plugin->StartPluginL();
- RFs fSession;
- User::LeaveIfError( fSession.Connect());
- CleanupClosePushL( fSession );
- if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone))
- {
- srcPath.Append( filename );
- RHarvesterClient harvester;
- User::LeaveIfError(harvester.Connect());
- harvester.Pause();
- TBool fileExist = BaflUtils::FileExists( fSession, srcPath );
- if(!fileExist)
- {
- BaflUtils::EnsurePathExistsL( fSession, srcPath );//Create folder
- BaflUtils::CopyFile( fSession, filepath, srcPath );
- }
- BaflUtils::DeleteFile( fSession, srcPath );
- harvester.Resume();
- harvester.Close();
- plugin->StartHarvestingL( _L(MEDIA_QBASEAPPCLASS) );
- //wait for index to flush
- iPluginTester->SetWaitTime( (TTimeIntervalMicroSeconds32)60000000 );
- //wait till video harvesting completes
- iPluginTester->iWaitForHarvester->Start();
- TInt count = SearchForTextL(_L("eagle"), _L(MEDIA_QBASEAPPCLASS), KNullDesC );
- if(count <= 0)
- {
- // If the search is not found,then testcase is success
- doLog( iLog, error, _L("Error in TestAudioHarvestingDeleteIndexL") );
- }
- }
- else
- doLog( iLog, KErrNotFound, _L("Error in TestAudioHarvestingDeleteIndexL") );
- CleanupStack::PopAndDestroy();
- delete plugin;
- delete iPluginTester;
- iPluginTester = NULL;
+ doLog(iLog,error,_L("Error in TestAudioHarvestingL"));
return error;
}
@@ -1748,7 +1650,83 @@
delete dbcontroller;
return error;
}
-
+
+TInt CHarvesterPluginTester::TestAudioHandleItemL( CStifItemParser& aItem)
+ {
+ TInt error = KErrNone;
+ TInt objId;
+ TInt actionType;
+ aItem.GetNextInt ( objId );
+ aItem.GetNextInt ( actionType );
+ CAudioPlugin* plugin = CAudioPlugin::NewL();
+ CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+ plugin->StartPluginL();
+ TRAPD( err , plugin->HandleMdeItemL(objId, (TCPixActionType)actionType) );
+ doLog(iLog,error,_L("Error in TestAudioHandleItemL"));
+ delete plugin;
+ delete iPluginTester;
+ iPluginTester = NULL;
+ return KErrNone;
+ }
+
+TInt CHarvesterPluginTester::TestAudioSyncDbManagerL( CStifItemParser& /* aItem */)
+ {
+ CAudioPlugin* plugin = CAudioPlugin::NewL();
+ CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+ plugin->StartPluginL();
+ CMDSEntity* entity;
+ entity = CMDSEntity::NewL();
+ entity->Setkey(100);
+ entity->SetUri(_L("\\music\\audio.mp3"));
+ TDriveNumber drive = TDriveNumber(EDriveC);
+ entity->SetDrive(drive);
+ plugin->iDBManager->AddL( entity->Key(),*entity );
+ TRAPD( err , plugin->HandleMdeItemL(entity->Key(), ECPixAddAction));
+ TRAP( err , plugin->HandleMdeItemL(entity->Key(), ECPixUpdateAction));
+ TRAP( err , plugin->HandleMdeItemL(entity->Key(), ECPixRemoveAction));
+ delete plugin;
+ delete iPluginTester;
+ iPluginTester = NULL;
+ return KErrNone;
+ }
+
+TInt CHarvesterPluginTester::TestAudioMMCEventL( CStifItemParser& aItem )
+ {
+ TInt error(KErrNone);
+ TInt drive;
+ TInt mmcstatus;
+ aItem.GetNextInt ( drive );
+ aItem.GetNextInt ( mmcstatus );
+ CAudioPlugin* plugin = CAudioPlugin::NewL();
+ CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+ plugin->StartPluginL(); //Initialize the Plugin
+ TRAPD( err , plugin->HandleMMCEventL( (TDriveNumber)drive , mmcstatus) );
+ //iPluginTester->iWaitForHarvester->Start(); //Start Wait AO and let it complete
+ doLog(iLog,error,_L("Error in TestAudioMMCEventL"));
+ delete plugin;
+ delete iPluginTester;
+ iPluginTester = NULL;
+ //End search
+ return err;
+ }
+
+TInt CHarvesterPluginTester::TestAudioNoIndexerL( CStifItemParser& aItem )
+ {
+ TInt drive;
+ TInt objId;
+ aItem.GetNextInt ( drive );
+ aItem.GetNextInt ( objId );
+ CAudioPlugin* plugin = CAudioPlugin::NewL();
+ CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+ plugin->StartPluginL();
+ plugin->iIndexerUtil->iIndexer[drive]= NULL;
+ TRAPD( err , plugin->HandleMdeItemL(objId, ECPixUpdateAction) );
+ delete plugin;
+ delete iPluginTester;
+ iPluginTester = NULL;
+ return KErrNone;
+ }
+
TInt CHarvesterPluginTester::TestBlacklistPluginL( CStifItemParser& /*aItem*/ )
{
//@todo: This test case shoud be in IDS middleware harvester STIF cases
@@ -1805,7 +1783,7 @@
doLog( iLog, err, KNoErrorString );*/
return err;
}
-TInt CHarvesterPluginTester::TestVideoHarvestingIndexL( CStifItemParser& aItem )
+TInt CHarvesterPluginTester::TestVideoHarvestingL( CStifItemParser& aItem )
{
TInt error = KErrNone;
TPtrC filepath;
@@ -1815,8 +1793,7 @@
CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
plugin->StartPluginL();
RFs fSession;
- User::LeaveIfError( fSession.Connect());
- CleanupClosePushL( fSession );
+ User::LeaveIfError( fSession.Connect());
if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone))
{
TBuf<KMaxFileName> desPath(_L("c:\\data\\Videos\\"));
@@ -1843,121 +1820,72 @@
{
error = KErrNotFound;
}
- }
- else
- error = KErrNotFound;
- CleanupStack::PopAndDestroy();
+ }
+ fSession.Close();
delete plugin;
delete iPluginTester;
iPluginTester = NULL;
- doLog( iLog, error, _L("Error in TestVideoHarvestingIndexL") );
+ doLog( iLog, error, _L("Error in TestVideoHarvesting") );
return error;
}
-TInt CHarvesterPluginTester::TestVideoHarvestingUpdateIndexL( CStifItemParser& aItem )
+TInt CHarvesterPluginTester::TestVideoHandleItemL( CStifItemParser& aItem )
{
- TInt error = KErrNone;
- TPtrC filepath;
- TPtrC filename;
- TPtrC newFile;
- TBuf<KMaxFileName> srcPath(_L("c:\\data\\Videos\\"));
- TBuf<KMaxFileName> desPath;
- desPath.Copy( srcPath );
- CVideoPlugin* plugin = CVideoPlugin::NewL();
+ TInt error = KErrNone;
+ TInt objId;
+ TInt actionType;
+ aItem.GetNextInt ( objId );
+ aItem.GetNextInt ( actionType );
+ CVideoPlugin* plugin = CVideoPlugin::NewL();
CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
plugin->StartPluginL();
- RFs fSession;
- User::LeaveIfError( fSession.Connect());
- CleanupClosePushL( fSession );
- if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone))
- {
- srcPath.Append( filename );
- if( aItem.GetNextString(newFile) == KErrNone )
- {
- desPath.Append( newFile );
- RHarvesterClient harvester;
- User::LeaveIfError(harvester.Connect());
- harvester.Pause();
- TBool fileExist = BaflUtils::FileExists( fSession, srcPath );
- if(!fileExist)
- {
- BaflUtils::EnsurePathExistsL( fSession, srcPath );//Create folder
- BaflUtils::CopyFile( fSession, filepath, srcPath );
- }
- BaflUtils::RenameFile( fSession, srcPath, desPath );
- harvester.Resume();
- harvester.Close();
- plugin->StartHarvestingL( _L(VIDEO_QBASEAPPCLASS) );
- //wait for index to flush
- iPluginTester->SetWaitTime( (TTimeIntervalMicroSeconds32)60000000 );
- //wait till video harvesting completes
- iPluginTester->iWaitForHarvester->Start();
- TInt count = SearchForTextL(_L("Falls"), _L(VIDEO_QBASEAPPCLASS), KNullDesC );
- if(count <= 0)
- {
- error = KErrNotFound;
- }
- doLog( iLog, error, _L("Error in TestVideoHarvestingUpdateIndexL") );
- }
- }
- else
- doLog( iLog, KErrNotFound, _L("Error in TestVideoHarvestingUpdateIndexL") );
- CleanupStack::PopAndDestroy();
+ TRAPD( err , plugin->HandleMdeItemL(objId, (TCPixActionType)actionType) );
+ doLog(iLog,error,_L("Error in TestVideoHandleItemL"));
delete plugin;
delete iPluginTester;
iPluginTester = NULL;
- return error;
+ return KErrNone;
}
-TInt CHarvesterPluginTester::TestVideoHarvestingDeleteIndexL( CStifItemParser& aItem )
+TInt CHarvesterPluginTester::TestVideoSyncDbManagerL( CStifItemParser& /*aItem */)
{
- TInt error = KErrNone;
- TPtrC filepath;
- TPtrC filename;
- TBuf<KMaxFileName> srcPath(_L("c:\\data\\Videos\\"));
- CVideoPlugin* plugin = CVideoPlugin::NewL();
+ CVideoPlugin* plugin = CVideoPlugin::NewL();
CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
plugin->StartPluginL();
- RFs fSession;
- User::LeaveIfError( fSession.Connect());
- CleanupClosePushL( fSession );
- if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone))
- {
- srcPath.Append( filename );
- RHarvesterClient harvester;
- User::LeaveIfError(harvester.Connect());
- harvester.Pause();
- TBool fileExist = BaflUtils::FileExists( fSession, srcPath );
- if(!fileExist)
- {
- BaflUtils::EnsurePathExistsL( fSession, srcPath );//Create folder
- BaflUtils::CopyFile( fSession, filepath, srcPath );
- }
- BaflUtils::DeleteFile( fSession, srcPath );
- harvester.Resume();
- harvester.Close();
- plugin->StartHarvestingL( _L(VIDEO_QBASEAPPCLASS) );
- //wait for index to flush
- iPluginTester->SetWaitTime( (TTimeIntervalMicroSeconds32)60000000 );
- //wait till video harvesting completes
- iPluginTester->iWaitForHarvester->Start();
- TInt count = SearchForTextL(_L("Niagara"), _L(VIDEO_QBASEAPPCLASS), KNullDesC );
- if(count <= 0)
- {
- // If the search is not found,then testcase is success
- doLog( iLog, error, _L("Error in TestVideoHarvestingDeleteIndexL") );
- }
- }
- else
- doLog( iLog, KErrNotFound, _L("Error in TestVideoHarvestingDeleteIndexL") );
- CleanupStack::PopAndDestroy();
+ CMDSEntity* entity;
+ entity = CMDSEntity::NewL();
+ entity->Setkey(101);
+ entity->SetUri(_L("\\video\\video.mpg"));
+ TDriveNumber drive = TDriveNumber(EDriveC);
+ entity->SetDrive(drive);
+ plugin->iDBManager->AddL( entity->Key(),*entity );
+ TRAPD( err , plugin->HandleMdeItemL(entity->Key(), ECPixAddAction));
+ TRAP( err , plugin->HandleMdeItemL(entity->Key(), ECPixUpdateAction));
+ TRAP( err , plugin->HandleMdeItemL(entity->Key(), ECPixRemoveAction));
delete plugin;
delete iPluginTester;
iPluginTester = NULL;
- return error;
+ return KErrNone;
}
-TInt CHarvesterPluginTester::TestImageHarvestingAddIndexL( CStifItemParser& aItem )
+TInt CHarvesterPluginTester::TestVideoNoIndexerL( CStifItemParser& aItem )
+ {
+ TInt drive;
+ TInt objId;
+ aItem.GetNextInt ( drive );
+ aItem.GetNextInt ( objId );
+ CVideoPlugin* plugin = CVideoPlugin::NewL();
+ CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+ plugin->StartPluginL();
+ plugin->iIndexerUtil->iIndexer[drive]= NULL;
+ TRAPD( err , plugin->HandleMdeItemL(objId, ECPixUpdateAction) );
+ delete plugin;
+ delete iPluginTester;
+ iPluginTester = NULL;
+ return KErrNone;
+ }
+
+TInt CHarvesterPluginTester::TestImageHarvestingL( CStifItemParser& aItem )
{
TInt error = KErrNone;
TPtrC filepath;
@@ -1967,8 +1895,7 @@
CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
plugin->StartPluginL();
RFs fSession;
- User::LeaveIfError( fSession.Connect());
- CleanupClosePushL( fSession );
+ User::LeaveIfError( fSession.Connect());
if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone))
{
TBuf<KMaxFileName> desPath(_L("c:\\data\\Images\\"));
@@ -1998,135 +1925,68 @@
else
error = KErrNotFound;
doLog( iLog, error, _L("Error in TestImageHarvestingAddIndexL") );
- CleanupStack::PopAndDestroy();
- delete plugin;
- delete iPluginTester;
- iPluginTester = NULL;
- return error;
- }
-
-TInt CHarvesterPluginTester::TestImageHarvestingUpdateIndexL( CStifItemParser& aItem )
- {
- TInt error = KErrNone;
- TPtrC filepath;
- TPtrC filename;
- TPtrC newFile;
- TBuf<KMaxFileName> srcPath(_L("c:\\data\\Images\\"));
- TBuf<KMaxFileName> desPath;
- desPath.Copy( srcPath );
- CImagePlugin* plugin = CImagePlugin::NewL();
- CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
- plugin->StartPluginL();
- RFs fSession;
- User::LeaveIfError( fSession.Connect());
- CleanupClosePushL( fSession );
- if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone))
- {
- srcPath.Append( filename );
- if( aItem.GetNextString(newFile) == KErrNone )
- {
- desPath.Append( newFile );
- RHarvesterClient harvester;
- User::LeaveIfError(harvester.Connect());
- harvester.Pause();
- TBool fileExist = BaflUtils::FileExists( fSession, srcPath );
- if(!fileExist)
- {
- BaflUtils::EnsurePathExistsL( fSession, srcPath );//Create folder
- BaflUtils::CopyFile( fSession, filepath, srcPath );
- }
- BaflUtils::RenameFile( fSession, srcPath, desPath );
- harvester.Resume();
- harvester.Close();
- plugin->StartHarvestingL( _L(IMAGE_QBASEAPPCLASS) );
- //wait for index to flush
- iPluginTester->SetWaitTime( (TTimeIntervalMicroSeconds32)60000000 );
- iPluginTester->iWaitForHarvester->Start();
- TInt count = SearchForTextL(_L("Portrait"), _L(IMAGE_QBASEAPPCLASS), KNullDesC );
- if(count <= 0)
- {
- error = KErrNotFound;
- }
- doLog( iLog, error, _L("Error in TestImageHarvestingUpdateIndexL") );
- }
- }
- else
- doLog( iLog, KErrNotFound, _L("Error in TestImageHarvestingUpdateIndexL") );
- CleanupStack::PopAndDestroy();
+ fSession.Close();
delete plugin;
delete iPluginTester;
iPluginTester = NULL;
return error;
}
-TInt CHarvesterPluginTester::TestImageHarvestingDeleteIndexL( CStifItemParser& aItem )
+TInt CHarvesterPluginTester::TestImageHandleItemL( CStifItemParser& aItem )
{
- TInt error = KErrNone;
- TPtrC filepath;
- TPtrC filename;
- TBuf<KMaxFileName> srcPath(_L("c:\\data\\Images\\"));
- CImagePlugin* plugin = CImagePlugin::NewL();
+ TInt error = KErrNone;
+ TInt objId;
+ TInt actionType;
+ aItem.GetNextInt ( objId );
+ aItem.GetNextInt ( actionType );
+ CImagePlugin* plugin = CImagePlugin::NewL();
CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
plugin->StartPluginL();
- RFs fSession;
- User::LeaveIfError( fSession.Connect() );
- CleanupClosePushL( fSession );
- if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone))
- {
- srcPath.Append( filename );
- RHarvesterClient harvester;
- User::LeaveIfError(harvester.Connect());
- harvester.Pause();
- TBool fileExist = BaflUtils::FileExists( fSession, srcPath );
- if(!fileExist)
- {
- BaflUtils::EnsurePathExistsL( fSession, srcPath );//Create folder
- BaflUtils::CopyFile( fSession, filepath, srcPath );
- }
- BaflUtils::DeleteFile( fSession, srcPath );
- harvester.Resume();
- harvester.Close();
- plugin->StartHarvestingL( _L(IMAGE_QBASEAPPCLASS) );
- //wait for index to flush
- iPluginTester->SetWaitTime( (TTimeIntervalMicroSeconds32)60000000 );
- //wait till image harvesting completes
- iPluginTester->iWaitForHarvester->Start();
- TInt count = SearchForTextL(_L("Square"), _L(IMAGE_QBASEAPPCLASS), KNullDesC );
- if(count <= 0)
- {
- // If the search is not found,then testcase is success
- doLog( iLog, error, _L("Error in TestImageHarvestingDeleteIndexL") );
- }
- }
- else
- doLog( iLog, KErrNotFound, _L("Error in TestImageHarvestingDeleteIndexL") );
- CleanupStack::PopAndDestroy();
+ TRAPD( err , plugin->HandleMdeItemL(objId, (TCPixActionType)actionType) );
+ doLog(iLog,error,_L("Error in TestImageHandleItemL"));
delete plugin;
delete iPluginTester;
iPluginTester = NULL;
- return error;
+ return KErrNone;
}
-TInt CHarvesterPluginTester::TestAudioMMCEventL( CStifItemParser& aItem )
- {
- TInt error(KErrNone);
- TInt drive;
- TInt mmcstatus;
- aItem.GetNextInt ( drive );
- aItem.GetNextInt ( mmcstatus );
- CAudioPlugin* plugin = CAudioPlugin::NewL();
+TInt CHarvesterPluginTester::TestImageSyncDbManagerL( CStifItemParser& /*aItem */)
+ {
+ CImagePlugin* plugin = CImagePlugin::NewL();
CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
- plugin->StartPluginL(); //Initialize the Plugin
- TRAPD( err , plugin->HandleMMCEventL( (TDriveNumber)drive , mmcstatus) );
- //iPluginTester->iWaitForHarvester->Start(); //Start Wait AO and let it complete
- doLog(iLog,error,_L("Error in TestAudioMMCEventL"));
+ plugin->StartPluginL();
+ CMDSEntity* entity;
+ entity = CMDSEntity::NewL();
+ entity->Setkey(102);
+ entity->SetUri(_L("\\image\\image.jpg"));
+ TDriveNumber drive = TDriveNumber(EDriveC);
+ entity->SetDrive(drive);
+ plugin->iDBManager->AddL( entity->Key(),*entity );
+ TRAPD( err , plugin->HandleMdeItemL(entity->Key(), ECPixAddAction));
+ TRAP( err , plugin->HandleMdeItemL(entity->Key(), ECPixUpdateAction));
+ TRAP( err , plugin->HandleMdeItemL(entity->Key(), ECPixRemoveAction));
delete plugin;
delete iPluginTester;
iPluginTester = NULL;
- //End search
- return err;
+ return KErrNone;
}
-
+
+TInt CHarvesterPluginTester::TestImageNoIndexerL( CStifItemParser& aItem )
+ {
+ TInt drive;
+ TInt objId;
+ aItem.GetNextInt ( drive );
+ aItem.GetNextInt ( objId );
+ CImagePlugin* plugin = CImagePlugin::NewL();
+ CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+ plugin->StartPluginL();
+ plugin->iIndexerUtil->iIndexer[drive]= NULL;
+ TRAPD( err , plugin->HandleMdeItemL(objId, ECPixUpdateAction) );
+ delete plugin;
+ delete iPluginTester;
+ iPluginTester = NULL;
+ return KErrNone;
+ }
TInt CHarvesterPluginTester::TestVideoMMCEventL( CStifItemParser& aItem )
{
TInt error(KErrNone);
Binary file onlinesearchproviders/data/providerdatabase.sq has changed
--- a/onlinesearchproviders/onlinesearchproviders.pro Tue Jun 29 22:28:37 2010 +0530
+++ b/onlinesearchproviders/onlinesearchproviders.pro Mon Jul 12 00:27:06 2010 +0530
@@ -22,5 +22,7 @@
CONFIG += ordered
symbian: {
- BLD_INF_RULES.prj_exports += "rom/issearch.iby CORE_APP_LAYER_IBY_EXPORT_PATH(issearch.iby)"
+ BLD_INF_RULES.prj_exports += "rom/issearch.iby CORE_APP_LAYER_IBY_EXPORT_PATH(issearch.iby)"
+ BLD_INF_RULES.prj_exports += "data/providerdatabase.sq /epoc32/data/z/private/20022F35/providerdatabase.sq"
+
}
\ No newline at end of file
--- a/searchui/onlinehandler/tsrc/t_baiduplugin/src/t_baiduplugin.cpp Tue Jun 29 22:28:37 2010 +0530
+++ b/searchui/onlinehandler/tsrc/t_baiduplugin/src/t_baiduplugin.cpp Mon Jul 12 00:27:06 2010 +0530
@@ -77,7 +77,7 @@
popup->setHeadingWidget(label);
HbAction * action = new HbAction(hbTrId("Back"), popup);
connect(action, SIGNAL(triggered()), this, SLOT(BackEvent()));
- popup->setPrimaryAction(action);
+ popup->addAction(action);
popup->show();
#else
QString url("http://www.baidu.com/s?wd=");
--- a/searchui/onlinehandler/tsrc/t_bingplugin/src/t_bingplugin.cpp Tue Jun 29 22:28:37 2010 +0530
+++ b/searchui/onlinehandler/tsrc/t_bingplugin/src/t_bingplugin.cpp Mon Jul 12 00:27:06 2010 +0530
@@ -78,7 +78,7 @@
popup->setHeadingWidget(label);
HbAction * action = new HbAction(hbTrId("Back"), popup);
connect(action, SIGNAL(triggered()), this, SLOT(BackEvent()));
- popup->setPrimaryAction(action);
+ popup->addAction(action);
popup->show();
#else
QString url("http://www.bing.com/search?q=");
--- a/searchui/onlinehandler/tsrc/t_googleplugin/src/t_googleplugin.cpp Tue Jun 29 22:28:37 2010 +0530
+++ b/searchui/onlinehandler/tsrc/t_googleplugin/src/t_googleplugin.cpp Mon Jul 12 00:27:06 2010 +0530
@@ -81,7 +81,7 @@
popup->setHeadingWidget(label);
HbAction * action = new HbAction(hbTrId("Back"), popup);
connect(action, SIGNAL(triggered()), this, SLOT(BackEvent()));
- popup->setPrimaryAction(action);
+ popup->addAction(action);
popup->show();
#else
qDebug() << "search:activatePlugin armvs" ;
--- a/searchui/searchapplication/searchapplication.pro Tue Jun 29 22:28:37 2010 +0530
+++ b/searchui/searchapplication/searchapplication.pro Mon Jul 12 00:27:06 2010 +0530
@@ -37,7 +37,7 @@
CONFIG += console
CONFIG += hb console mobility
-TRANSLATIONS += searchsw.ts
+TRANSLATIONS += search.ts
nft:DEFINES += NFT
DEPENDPATH += . \
--- a/searchui/searchapplication/src/main.cpp Tue Jun 29 22:28:37 2010 +0530
+++ b/searchui/searchapplication/src/main.cpp Mon Jul 12 00:27:06 2010 +0530
@@ -36,7 +36,7 @@
QTranslator translator;
QString lang = QLocale::system().name();
QString path = "Z:/resource/qt/translations/";
- translator.load("searchsw_" + lang, path);
+ translator.load("search_" + lang, path);
app.installTranslator(&translator);
QTranslator commonTranslator;
--- a/searchui/stateproviders/searchstateprovider/inc/searchonlinestate.h Tue Jun 29 22:28:37 2010 +0530
+++ b/searchui/stateproviders/searchstateprovider/inc/searchonlinestate.h Mon Jul 12 00:27:06 2010 +0530
@@ -154,6 +154,11 @@
*/
void onlineSearchQuery(QString);
+ /**
+ * Signalled when UI is ready on online state
+ */
+ void applicationReady();
+
private:
HbMainWindow* mMainWindow;
/**
--- a/searchui/stateproviders/searchstateprovider/inc/searchprogressivestate.h Tue Jun 29 22:28:37 2010 +0530
+++ b/searchui/stateproviders/searchstateprovider/inc/searchprogressivestate.h Mon Jul 12 00:27:06 2010 +0530
@@ -315,7 +315,12 @@
void inDeviceSearchQuery(QString);
- void launchLink(int,QString);
+ void launchLink(int, QString);
+
+ /**
+ * Signalled when UI is ready on progressive state
+ */
+ void applicationReady();
private:
HbMainWindow* mMainWindow;
--- a/searchui/stateproviders/searchstateprovider/resources/resources.qrc Tue Jun 29 22:28:37 2010 +0530
+++ b/searchui/stateproviders/searchstateprovider/resources/resources.qrc Mon Jul 12 00:27:06 2010 +0530
@@ -1,6 +1,6 @@
<RCC>
<qresource prefix="/xml">
- <file alias="searchstateprovider.docml">searchstateprovider.docml</file>
+ <file alias="searchstateprovider.docml">searchstateprovider.docml.bin</file>
<file alias="delimeterscreen.docml">delimeterscreen.docml</file>
</qresource>
</RCC>
--- a/searchui/stateproviders/searchstateprovider/searchstateprovider.pro Tue Jun 29 22:28:37 2010 +0530
+++ b/searchui/stateproviders/searchstateprovider/searchstateprovider.pro Mon Jul 12 00:27:06 2010 +0530
@@ -36,6 +36,9 @@
LIBS += -L$$PWD/../../../bin/debug
}
+
+DOCML += resources/searchstateprovider.docml
+
LIBS += -lsearchindevicehandler
LIBS += -lxqservice
LIBS += -lqcpixsearchclient
--- a/searchui/stateproviders/searchstateprovider/src/searchonlinestate.cpp Tue Jun 29 22:28:37 2010 +0530
+++ b/searchui/stateproviders/searchstateprovider/src/searchonlinestate.cpp Mon Jul 12 00:27:06 2010 +0530
@@ -271,4 +271,5 @@
}
}
}//PERF_APP_LAUNCH_END("SearchAppplication View is ready");
+ emit applicationReady();
}
--- a/searchui/stateproviders/searchstateprovider/src/searchprogressivestate.cpp Tue Jun 29 22:28:37 2010 +0530
+++ b/searchui/stateproviders/searchstateprovider/src/searchprogressivestate.cpp Mon Jul 12 00:27:06 2010 +0530
@@ -144,22 +144,22 @@
loadSettings = true;
//Icon creation in array
- RArray<TUid> appUid;
- appUid.Append(TUid::Uid(0x20022EF9));//contact
- 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(0x200255BA));//email
- appUid.Append(TUid::Uid(0x10005901));//calender
- appUid.Append(TUid::Uid(0x20029F80));//notes
+ QList<TUid> appUid;
+ appUid.append(TUid::Uid(0x20022EF9));//contact
+ 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(0x200255BA));//email
+ appUid.append(TUid::Uid(0x10005901));//calender
+ appUid.append(TUid::Uid(0x20029F80));//notes
//appUid.Append(TUid::Uid(0x20022F35));//application
- appUid.Append(TUid::Uid(0x10008D39));//bookmark
- appUid.Append(TUid::Uid(0x2002BCC0));//files
+ appUid.append(TUid::Uid(0x10008D39));//bookmark
+ appUid.append(TUid::Uid(0x2002BCC0));//files
- for (int i = 0; i < appUid.Count(); i++)
+ for (int i = 0; i < appUid.count(); i++)
{
- TRAP_IGNORE(mIconArray.append(getAppIconFromAppIdL(appUid[i])));
+ TRAP_IGNORE(mIconArray.append(getAppIconFromAppIdL(appUid.at(i))));
}
#ifdef OST_TRACE_COMPILER_IN_USE
//start() the timers to avoid worrying abt having to start()/restart() later
@@ -500,20 +500,16 @@
}
else if (aDoc->baseAppClass().contains("msg"))
{
- QStringList msgList = filterDoc(aDoc, "Subject", "Body");
- if (msgList.value(0, "").length())
+ QStringList msgList = filterDoc(aDoc, "Folder", "To", "From");
+ if (msgList.value(0).contains("Inbox"))
{
- firstrow.append(msgList.at(0));
+ firstrow.append(msgList.at(2));
}
else
{
if (msgList.value(1, "").length())
firstrow.append(msgList.at(1));
}
- if (firstrow.length() == 0)
- {
- firstrow = " ";// space if subject and body are missing
- }
liststr << firstrow << secondrow;
listitem->setData(mIconArray.at(4), Qt::DecorationRole);
}
@@ -605,7 +601,7 @@
{
PERF_RESULT_ITEM_FOR_LAUNCHING("contact")
mRequest = mAiwMgr->create("com.nokia.services.phonebookservices",
- "Fetch", "open(int)", false);
+ "Fetch", "open(int)", true);
int uid = (item->data(Qt::UserRole)).toInt(&t);
args << uid;
@@ -646,7 +642,7 @@
PERF_RESULT_ITEM_FOR_LAUNCHING("file")
QString uid = item->data(Qt::UserRole).toString();
QFile file(uid);
- mRequest = mAiwMgr->create(file, false);
+ mRequest = mAiwMgr->create(file, true);
args << file.fileName();
}
else if ((item->data(Qt::UserRole + 1).toString().contains("video"))
@@ -659,7 +655,7 @@
uid.append(':');
uid.append(item->data(Qt::UserRole).toString());
QFile file(uid);
- mRequest = mAiwMgr->create(file, false);
+ mRequest = mAiwMgr->create(file, true);
args << file.fileName();
}
@@ -677,7 +673,7 @@
mRequest = mAiwMgr->create("nmail",
"com.nokia.symbian.IEmailMessageView",
- "viewMessage(QVariant,QVariant,QVariant)", false);
+ "viewMessage(QVariant,QVariant,QVariant)", true);
args << item->data(Qt::UserRole + 2).toULongLong(&t) << item->data(
Qt::UserRole + 3).toULongLong(&t) << item->data(Qt::UserRole).toULongLong(&t);
@@ -686,7 +682,7 @@
{
PERF_RESULT_ITEM_FOR_LAUNCHING("msg")
mRequest = mAiwMgr->create("com.nokia.services.hbserviceprovider",
- "conversationview", "view(int)", false);
+ "conversationview", "view(int)", true);
int uid = (item->data(Qt::UserRole)).toInt(&t);
args << uid;
@@ -1344,6 +1340,7 @@
mSearchPanel->setCriteria(searchKey);
}
}PERF_APP_LAUNCH_END("SearchAppplication View is ready");
+ emit applicationReady();
}
void SearchProgressiveState::slotOnlineQuery(QString str)
{
--- a/searchui/stateproviders/searchstateprovider/src/settingswidget.cpp Tue Jun 29 22:28:37 2010 +0530
+++ b/searchui/stateproviders/searchstateprovider/src/settingswidget.cpp Mon Jul 12 00:27:06 2010 +0530
@@ -397,13 +397,12 @@
}
if (!isInternetSelected)
{
- for (int i = 0; i < mActions.count(); i++)
- popup->removeAction(mActions.at(i));
- popup->addActions(mActions);
- if (noItemSelected)
- {
- popup->removeAction(mActions.at(0));
- }
+ mActions.at(0)->setVisible(true);
+
+ if (noItemSelected)
+ {
+ mActions.at(0)->setVisible(false);
+ }
}
}
//----------------------------------------------------------------------------------------------------------------------------