# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1274955523 -10800 # Node ID c461c7fa72c21d389734299f420e9ef6b3733f4f # Parent 8e4539ab188942c38c96b6facc2001967fc2e8c2 Revision: 201019 Kit: 2010121 diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/client/bwincw/harvesterclientwinscw.def --- a/harvester/client/bwincw/harvesterclientwinscw.def Fri May 14 16:17:23 2010 +0300 +++ b/harvester/client/bwincw/harvesterclientwinscw.def Thu May 27 13:18:43 2010 +0300 @@ -12,4 +12,6 @@ ?Stop@RHarvesterClient@@QAEXXZ @ 11 NONAME ABSENT ; void RHarvesterClient::Stop(void) ?HarvestFile@RHarvesterClient@@QAEXABVTDesC16@@AAV?$RArray@K@@H@Z @ 12 NONAME ; void RHarvesterClient::HarvestFile(class TDesC16 const &, class RArray &, int) ?HarvestFileWithUID@RHarvesterClient@@QAEXABVTDesC16@@AAV?$RArray@K@@HVTUid@@@Z @ 13 NONAME ; void RHarvesterClient::HarvestFileWithUID(class TDesC16 const &, class RArray &, int, class TUid) + ?AddSessionObserverL@RHarvesterClient@@QAEXAAVMHarvesterSessionObserver@@@Z @ 14 NONAME ; void RHarvesterClient::AddSessionObserverL(class MHarvesterSessionObserver &) + ?RemoveSessionObserver@RHarvesterClient@@QAEXXZ @ 15 NONAME ; void RHarvesterClient::RemoveSessionObserver(void) diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/client/eabi/harvesterclientarm.def --- a/harvester/client/eabi/harvesterclientarm.def Fri May 14 16:17:23 2010 +0300 +++ b/harvester/client/eabi/harvesterclientarm.def Thu May 27 13:18:43 2010 +0300 @@ -18,4 +18,6 @@ _ZN16RHarvesterClient18HarvestFileWithUIDERK7TDesC16R6RArrayImEi4TUid @ 17 NONAME _ZTI22CHarvesterRequestQueue @ 18 NONAME ; ## _ZTV22CHarvesterRequestQueue @ 19 NONAME ; ## + _ZN16RHarvesterClient19AddSessionObserverLER25MHarvesterSessionObserver @ 20 NONAME + _ZN16RHarvesterClient21RemoveSessionObserverEv @ 21 NONAME diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/client/group/harvesterclient.mmp --- a/harvester/client/group/harvesterclient.mmp Fri May 14 16:17:23 2010 +0300 +++ b/harvester/client/group/harvesterclient.mmp Thu May 27 13:18:43 2010 +0300 @@ -41,6 +41,7 @@ SOURCEPATH ../src SOURCE harvesterclient.cpp SOURCE harvesterclientao.cpp +SOURCE harvestersessionwatcher.cpp SOURCE harvestereventobserverao.cpp SOURCE harvesterrequestactive.cpp SOURCE harvesterrequestqueue.cpp diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/client/inc/harvestersessionwatcher.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/client/inc/harvestersessionwatcher.h Thu May 27 13:18:43 2010 +0300 @@ -0,0 +1,64 @@ +/* +* Copyright (c) 2007-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: +*/ + +#ifndef HARVESTERSESSIONWATCHER_H +#define HARVESTERSESSIONWATCHER_H + +#include +#include + +NONSHARABLE_CLASS( CHarvesterSessionWatcher ) : public CActive + { +public: + + enum THarvesterWatcherState + { + EIdle, + ERunning, + ESCancelled + }; + + // Cancel and destroy + ~CHarvesterSessionWatcher(); + + // Two-phased constructor. + static CHarvesterSessionWatcher* NewL( MHarvesterSessionObserver& aObserver ); + +public: + + // from base class CActive + void RunL(); + TInt RunError( TInt aError ); + void DoCancel(); + +private: + + CHarvesterSessionWatcher( MHarvesterSessionObserver& aObserver ); + + void ConstructL(); + + void Start(); + +private: + + RProcess iProcess; + + THarvesterWatcherState iState; + + MHarvesterSessionObserver* iObserver; + }; + +#endif // HARVESTERSESSIONWATCHER_H diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/client/src/harvesterclient.cpp --- a/harvester/client/src/harvesterclient.cpp Fri May 14 16:17:23 2010 +0300 +++ b/harvester/client/src/harvesterclient.cpp Thu May 27 13:18:43 2010 +0300 @@ -22,6 +22,7 @@ #include "harvestereventobserverao.h" #include "harvesterlog.h" #include "harvesterclientao.h" +#include "harvestersessionwatcher.h" #include "mdsutils.h" #include "harvesterrequestactive.h" #include "mdscommoninternal.h" @@ -125,6 +126,8 @@ iHEO = NULL; + iSessionWatcher = NULL; + return err; } @@ -164,6 +167,9 @@ { WRITELOG( "RHarvesterClient::Close()" ); + delete iSessionWatcher; + iSessionWatcher = NULL; + // cancels Harvest Complete request if it exist at server UnregisterHarvestComplete(); @@ -199,8 +205,8 @@ if ( iHarvesterClientAO ) { - iHarvesterClientAO->SetObserver( aObserver ); - } + iHarvesterClientAO->SetObserver( aObserver ); + } iObserver = aObserver; } @@ -408,6 +414,33 @@ } // ---------------------------------------------------------------------------------------- +// AddSessionObserver +// ---------------------------------------------------------------------------------------- +// +EXPORT_C void RHarvesterClient::AddSessionObserverL( MHarvesterSessionObserver& aObserver ) + { + if( iSessionWatcher ) + { + delete iSessionWatcher; + iSessionWatcher = NULL; + } + iSessionWatcher = CHarvesterSessionWatcher::NewL( aObserver ); + } + +// ---------------------------------------------------------------------------------------- +// RemoveSessionObserver +// ---------------------------------------------------------------------------------------- +// +EXPORT_C void RHarvesterClient::RemoveSessionObserver() + { + if( iSessionWatcher ) + { + delete iSessionWatcher; + iSessionWatcher = NULL; + } + } + +// ---------------------------------------------------------------------------------------- // RegisterHarvestComplete // ---------------------------------------------------------------------------------------- // diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/client/src/harvestersessionwatcher.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/client/src/harvestersessionwatcher.cpp Thu May 27 13:18:43 2010 +0300 @@ -0,0 +1,125 @@ +/* +* Copyright (c) 2007-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: Harvester session watcher +* +*/ + +#include "harvestersessionwatcher.h" + +// --------------------------------------------------------------------------- +// NewL +// --------------------------------------------------------------------------- +// +CHarvesterSessionWatcher* CHarvesterSessionWatcher::NewL( MHarvesterSessionObserver& aObserver ) + { + CHarvesterSessionWatcher* self = new ( ELeave ) CHarvesterSessionWatcher( aObserver ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + + return self; + } + +// --------------------------------------------------------------------------- +// ~CHarvesterSessionWatcher +// --------------------------------------------------------------------------- +// +CHarvesterSessionWatcher::~CHarvesterSessionWatcher() // destruct + { + Cancel(); + } + +// --------------------------------------------------------------------------- +// CHarvesterSessionWatcher +// First-phase C++ constructor +// --------------------------------------------------------------------------- +// +CHarvesterSessionWatcher::CHarvesterSessionWatcher( MHarvesterSessionObserver& aObserver ) + : CActive( CActive::EPriorityStandard ), iState( EIdle ), iObserver( &aObserver ) + { + // Add to active scheduler. + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------------------------- +// ConstructL +// --------------------------------------------------------------------------- +// +void CHarvesterSessionWatcher::ConstructL() // second-phase constructor + { + _LIT( KHarvesterServerProcess, "HarvesterServer*" ); + TFullName name; + + // find Harvester Server + TFindProcess findProcess( KHarvesterServerProcess ); + if ( findProcess.Next(name) == KErrNone ) + { + User::LeaveIfError( iProcess.Open(name) ); + iState = ERunning; + // logon to get termination signal + iProcess.Logon( iStatus ); + SetActive(); + } + else + { + User::Leave( KErrCommsBreak ); + } + } + +// --------------------------------------------------------------------------- +// DoCancel +// --------------------------------------------------------------------------- +// +void CHarvesterSessionWatcher::DoCancel() + { + iState = ESCancelled; + iProcess.LogonCancel( iStatus ); + iProcess.Close(); + } + +// --------------------------------------------------------------------------- +// RunL +// --------------------------------------------------------------------------- +// +void CHarvesterSessionWatcher::RunL() + { + switch (iState) + { + case EIdle: + case ESCancelled: + { + break; + } + + case ERunning: + { + // server terminated, notify clients + iObserver->HarvesterServerTerminated(); + break; + } + + default: + break; + } + } + +// --------------------------------------------------------------------------- +// RunError +// --------------------------------------------------------------------------- +// +TInt CHarvesterSessionWatcher::RunError( TInt /*aError*/ ) + { + return KErrNone; + } + diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/common/data/200009FE.txt Binary file harvester/common/data/200009FE.txt has changed diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/common/inc/harvestercommon.h --- a/harvester/common/inc/harvestercommon.h Fri May 14 16:17:23 2010 +0300 +++ b/harvester/common/inc/harvestercommon.h Thu May 27 13:18:43 2010 +0300 @@ -93,6 +93,9 @@ const TInt KHarvesterGetRootDirFlags = EDirsFirst; const TInt KHarvesterGetDirFlags = ESortByDate | EAscending | EDirsFirst; +_LIT( KExludedThumbPath, "_PAlbTN"); +_LIT( KExludedMediaArtPath, ".mediaartlocal"); + const TInt KOriginIgnored = 255; const TInt KOriginFastHarvest = 254; diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/conf/harvester.confml Binary file harvester/conf/harvester.confml has changed diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/conf/harvester_200009FE.crml Binary file harvester/conf/harvester_200009FE.crml has changed diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/AudioPlugin/group/harvesteraudioplugin.mmp --- a/harvester/harvesterplugins/AudioPlugin/group/harvesteraudioplugin.mmp Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/AudioPlugin/group/harvesteraudioplugin.mmp Thu May 27 13:18:43 2010 +0300 @@ -60,6 +60,7 @@ LIBRARY centralrepository.lib LIBRARY caf.lib LIBRARY cafutils.lib +LIBRARY platformenv.lib PAGED BYTEPAIRCOMPRESSTARGET diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/AudioPlugin/inc/harvesteraudioplugin.h --- a/harvester/harvesterplugins/AudioPlugin/inc/harvesteraudioplugin.h Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/AudioPlugin/inc/harvesteraudioplugin.h Thu May 27 13:18:43 2010 +0300 @@ -55,6 +55,7 @@ CMdEPropertyDef* iThumbnailPropertyDef; CMdEPropertyDef* iDatePropertyDef; CMdEPropertyDef* iDrmPropertyDef; + CMdEPropertyDef* iDefaultFolderPropertyDef; // Audio property definitions CMdEPropertyDef* iAlbumPropertyDef; @@ -145,7 +146,7 @@ * Get song name, artist, album, genre and composer from normal music * file (eg. mp3). */ - void GetMusicPropertiesL( CHarvesterData* aHD, TBool aIsAdd ); + void GetMusicPropertiesL( CHarvesterData* aHD, TBool aIsAdd, TPtrC aMimeType ); private: CAudioMDParser* iAudioParser; @@ -156,6 +157,9 @@ TBool iHarvestAlbumArt; TInt iMaxTextLength; + + HBufC* iPhoneSoundsPath; + HBufC* iMmcSoundsPath; }; diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/AudioPlugin/inc/harvesteraudiopluginutils.h --- a/harvester/harvesterplugins/AudioPlugin/inc/harvesteraudiopluginutils.h Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/AudioPlugin/inc/harvesteraudiopluginutils.h Thu May 27 13:18:43 2010 +0300 @@ -24,6 +24,10 @@ #include "mimetypemapping.h" +// Wma extension and mime type are shared with actual audio plugin +_LIT( KExtensionWma, "wma" ); +_LIT( KMimeTypeWma, "audio/x-ms-wma"); + enum TAudioMetadataHandling { EMetaDataUtilityHandling, diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/AudioPlugin/src/harvesteraudioplugin.cpp --- a/harvester/harvesterplugins/AudioPlugin/src/harvesteraudioplugin.cpp Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/AudioPlugin/src/harvesteraudioplugin.cpp Thu May 27 13:18:43 2010 +0300 @@ -23,6 +23,7 @@ #include #include #include +#include #include "harvesteraudioplugin.h" #include "harvesteraudiopluginutils.h" @@ -35,8 +36,6 @@ const TUid KHarvesterRepoUid = { 0x200009FE }; const TUint32 KEnableAlbumArtHarvest = 0x00090001; -_LIT( KExtensionWma, "wma" ); - CHarvesterAudioPluginPropertyDefs::CHarvesterAudioPluginPropertyDefs() : CBase() { } @@ -53,6 +52,7 @@ iItemTypePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KItemTypeProperty ); iTitlePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KTitleProperty ); iTimeOffsetPropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KTimeOffsetProperty ); + iDefaultFolderPropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KInDefaultFolder ); // Media property definitions CMdEObjectDef& mediaDef = nsDef.GetObjectDefL( MdeConstants::MediaObject::KMediaObject ); @@ -120,6 +120,9 @@ delete iAudioParser; delete iPropDefs; delete iTNM; + + delete iPhoneSoundsPath; + delete iMmcSoundsPath; } // --------------------------------------------------------------------------- @@ -141,6 +144,17 @@ { TRAP_IGNORE( iTNM = CThumbnailManager::NewL( *this ) ); } + + + TFileName sounds = PathInfo::SoundsPath(); + + TFileName phonePath = PathInfo::PhoneMemoryRootPath(); + phonePath.Append( sounds ); + iPhoneSoundsPath = phonePath.AllocL(); + + TFileName mmcPath = PathInfo::MemoryCardRootPath(); + mmcPath.Append( sounds ); + iMmcSoundsPath = mmcPath.Right( mmcPath.Length() - 1 ).AllocL(); } // --------------------------------------------------------------------------- @@ -245,7 +259,7 @@ // get properties for file types supported by CMetaDataUtility. if( mapping->iHandler == EMetaDataUtilityHandling ) { - GetMusicPropertiesL( aHD, aIsAdd ); + GetMusicPropertiesL( aHD, aIsAdd, mapping->iMimeType ); } } } @@ -328,7 +342,7 @@ // --------------------------------------------------------------------------- // void CHarvesterAudioPlugin::GetMusicPropertiesL( CHarvesterData* aHD, - TBool aIsAdd ) + TBool aIsAdd, TPtrC aMimeType ) { #ifdef _DEBUG TTime dStart, dStop; @@ -347,12 +361,17 @@ // Prefetch max text lengt for validity checking iMaxTextLength = iPropDefs->iCopyrightPropertyDef->MaxTextLengthL(); } - - TPtrC ext; - MdsUtils::GetExt( uri, ext ); - - // Check for possibly protected content - if( ext.CompareF( KExtensionWma ) == 0 ) + + TBool possiblyProtectedContent( EFalse ); + if( aMimeType.Length() > 0 ) + { + if( aMimeType == KMimeTypeWma ) + { + possiblyProtectedContent = ETrue; + } + } + + if( possiblyProtectedContent ) { ContentAccess::CContent* content = ContentAccess::CContent::NewLC( uri ); ContentAccess::CData* data = content->OpenContentLC( ContentAccess::EPeek ); @@ -366,7 +385,7 @@ } CleanupStack::PopAndDestroy( 2 ); // content, data } - + TBool parsed( EFalse ); TRAPD( parseError, parsed = iAudioParser->ParseL( uri ) ); @@ -395,7 +414,22 @@ TTimeIntervalSeconds timeOffsetSeconds = User::UTCOffset(); TInt16 timeOffsetMinutes = timeOffsetSeconds.Int() / 60; CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iTimeOffsetPropertyDef, &timeOffsetMinutes, aIsAdd ); - + + if( !mdeObject.Placeholder() ) + { + if( uri.FindF( iMmcSoundsPath->Des()) != KErrNotFound || + uri.FindF( iPhoneSoundsPath->Des()) != KErrNotFound ) + { + TBool inDefaultFolder( ETrue ); + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iDefaultFolderPropertyDef, &inDefaultFolder, aIsAdd ); + } + else + { + TBool inDefaultFolder( EFalse ); + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iDefaultFolderPropertyDef, &inDefaultFolder, aIsAdd ); + } + } + if ( song.Length() > 0 && song.Length() < KMaxTitleFieldLength ) { diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/AudioPlugin/src/harvesteraudiopluginutils.cpp --- a/harvester/harvesterplugins/AudioPlugin/src/harvesteraudiopluginutils.cpp Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/AudioPlugin/src/harvesteraudiopluginutils.cpp Thu May 27 13:18:43 2010 +0300 @@ -34,7 +34,6 @@ _LIT( KMimeTypeMxmf, "audio/vnd.nokia.mobile-xmf" ); _LIT( KMimeTypeWav, "audio/wav" ); _LIT( KMimeTypeAu, "audio/au" ); -_LIT( KMimeTypeWma, "audio/x-ms-wma"); _LIT( KMimeTypeAudioMatroska, "audio/x-matroska"); _LIT( KExtensionMp3, "mp3" ); @@ -48,7 +47,6 @@ _LIT( KExtensionMxmf, "mxmf" ); _LIT( KExtensionWav, "wav" ); _LIT( KExtensionAu, "au" ); -_LIT( KExtensionWma, "wma" ); _LIT( KExtensionNrt, "nrt" ); _LIT( KExtensionMka, "mka" ); diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/ImagePlugin/group/harvesterimageplugin.mmp --- a/harvester/harvesterplugins/ImagePlugin/group/harvesterimageplugin.mmp Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/ImagePlugin/group/harvesterimageplugin.mmp Thu May 27 13:18:43 2010 +0300 @@ -48,12 +48,13 @@ LIBRARY efsrv.lib LIBRARY imageconversion.lib LIBRARY fbscli.lib -LIBRARY lbs.lib -LIBRARY etel3rdparty.lib +LIBRARY lbs.lib +LIBRARY etel3rdparty.lib LIBRARY harvesterplugininterface.lib LIBRARY mdeclient.lib -LIBRARY harvesterdata.lib -LIBRARY harvestercommon.lib +LIBRARY harvesterdata.lib +LIBRARY harvestercommon.lib +LIBRARY platformenv.lib PAGED BYTEPAIRCOMPRESSTARGET diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/ImagePlugin/inc/harvesterimageplugin.h --- a/harvester/harvesterplugins/ImagePlugin/inc/harvesterimageplugin.h Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/ImagePlugin/inc/harvesterimageplugin.h Thu May 27 13:18:43 2010 +0300 @@ -56,6 +56,7 @@ CMdEPropertyDef* iCaptureDatePropertyDef; CMdEPropertyDef* iResolutionUnitPropertyDef; CMdEPropertyDef* iArtistPropertyDef; + CMdEPropertyDef* iDefaultFolderPropertyDef; // Image property definitions CMdEPropertyDef* iPixelYDimensionPropertyDef; @@ -199,6 +200,9 @@ CHarvesterImagePluginPropertyDefs* iPropDefs; TInt iMaxTextLength; + + HBufC* iPhoneImagesPath; + HBufC* iMmcImagesPath; }; #endif diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/ImagePlugin/src/harvesterimageplugin.cpp --- a/harvester/harvesterplugins/ImagePlugin/src/harvesterimageplugin.cpp Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/ImagePlugin/src/harvesterimageplugin.cpp Thu May 27 13:18:43 2010 +0300 @@ -20,12 +20,14 @@ #include #include #include +#include #include "harvesterlog.h" #include "mdsutils.h" #include "harvesterexifutil.h" #include "harvesterimageplugin.h" #include "mdeobjectwrapper.h" +#include "mdscommoninternal.h" using namespace MdeConstants; @@ -82,6 +84,7 @@ iSizePropertyDef = &objectDef.GetPropertyDefL( Object::KSizeProperty ); iTimeOffsetPropertyDef = &objectDef.GetPropertyDefL( Object::KTimeOffsetProperty ); iItemTypePropertyDef = &objectDef.GetPropertyDefL( Object::KItemTypeProperty ); + iDefaultFolderPropertyDef = &objectDef.GetPropertyDefL( Object::KInDefaultFolder ); // Media property definitions CMdEObjectDef& mediaDef = nsDef.GetObjectDefL( MediaObject::KMediaObject ); @@ -191,6 +194,9 @@ delete iPropDefs; + delete iPhoneImagesPath; + delete iMmcImagesPath; + iMimeTypeMappings.Close(); iFbs.Disconnect(); } @@ -255,7 +261,16 @@ User::LeaveIfError( iMimeTypeMappings.InsertInOrder( TMimeTypeMapping( KExtOtb(), KOtbMime(), EOtherHandling ), cmp ) ); + + TFileName images = PathInfo::ImagesPath(); + TFileName phonePath = PathInfo::PhoneMemoryRootPath(); + phonePath.Append( images ); + iPhoneImagesPath = phonePath.AllocL(); + + TFileName mmcPath = PathInfo::MemoryCardRootPath(); + mmcPath.Append( images ); + iMmcImagesPath = mmcPath.Right( mmcPath.Length() - 1 ).AllocL(); } void CHarvesterImagePlugin::HarvestL( CHarvesterData* aHD ) @@ -711,8 +726,22 @@ // Item Type CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iItemTypePropertyDef, &aFileData.iMime16, aIsAdd ); + + const TDesC& uri = mdeObject.Uri(); + if( uri.FindF( iMmcImagesPath->Des()) != KErrNotFound || + uri.FindF( iPhoneImagesPath->Des()) != KErrNotFound || + uri.FindF( KDCIMFolder ) != KErrNotFound ) + { + TBool inDefaultFolder( ETrue ); + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iDefaultFolderPropertyDef, &inDefaultFolder, aIsAdd ); + } + else + { + TBool inDefaultFolder( EFalse ); + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iDefaultFolderPropertyDef, &inDefaultFolder, aIsAdd ); + } } - + if( aFileData.iJpeg ) { // Time offset diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/OMADRMPlugin/group/harvesteromadrmplugin.mmp --- a/harvester/harvesterplugins/OMADRMPlugin/group/harvesteromadrmplugin.mmp Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/OMADRMPlugin/group/harvesteromadrmplugin.mmp Thu May 27 13:18:43 2010 +0300 @@ -53,6 +53,7 @@ LIBRARY mdeclient.lib LIBRARY harvesterdata.lib LIBRARY harvestercommon.lib +LIBRARY platformenv.lib PAGED BYTEPAIRCOMPRESSTARGET diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/OMADRMPlugin/inc/harvesteromadrmplugin.h --- a/harvester/harvesterplugins/OMADRMPlugin/inc/harvesteromadrmplugin.h Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/OMADRMPlugin/inc/harvesteromadrmplugin.h Thu May 27 13:18:43 2010 +0300 @@ -83,6 +83,7 @@ CMdEPropertyDef* iDescriptionPropertyDef; CMdEPropertyDef* iAuthorPropertyDef; CMdEPropertyDef* iGenrePropertyDef; + CMdEPropertyDef* iDefaultFolderPropertyDef; private: CHarvesterOmaDrmPluginPropertyDefs(); @@ -157,6 +158,15 @@ CHarvesterOmaDrmPluginPropertyDefs* iPropDefs; TInt iMaxTextLength; + + HBufC* iPhoneImagesPath; + HBufC* iMmcImagesPath; + + HBufC* iPhoneVideosPath; + HBufC* iMmcVideosPath; + + HBufC* iPhoneSoundsPath; + HBufC* iMmcSoundsPath; }; #endif // __CHarvesterOMADRMPlugin_H__ diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/OMADRMPlugin/src/harvesteromadrmplugin.cpp --- a/harvester/harvesterplugins/OMADRMPlugin/src/harvesteromadrmplugin.cpp Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/OMADRMPlugin/src/harvesteromadrmplugin.cpp Thu May 27 13:18:43 2010 +0300 @@ -17,10 +17,12 @@ #include #include +#include #include "mdsutils.h" #include "harvesteromadrmplugin.h" #include "harvesterlog.h" +#include "harvestercommon.h" #include "mdeobjectwrapper.h" #include "mdscommoninternal.h" #include @@ -38,6 +40,7 @@ _LIT(KRmMimetype, "realmedia"); _LIT( KSvgMime, "image/svg+xml" ); +_LIT( KRingingToneMime, "application/vnd.nokia.ringing-tone" ); _LIT(KInUse, "InUse"); @@ -56,6 +59,7 @@ iSizePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KSizeProperty ); iItemTypePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KItemTypeProperty ); iTitlePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KTitleProperty ); + iDefaultFolderPropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KInDefaultFolder ); CMdEObjectDef& mediaDef = nsDef.GetObjectDefL( MdeConstants::MediaObject::KMediaObject ); iDrmPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KDRMProperty ); @@ -104,6 +108,15 @@ { WRITELOG("CHarvesterOMADRMPlugin::~CHarvesterOMADRMPlugin()"); + delete iPhoneImagesPath; + delete iMmcImagesPath; + + delete iPhoneVideosPath; + delete iMmcVideosPath; + + delete iPhoneSoundsPath; + delete iMmcSoundsPath; + delete iPropDefs; } @@ -113,6 +126,39 @@ void CHarvesterOMADRMPlugin::ConstructL() { WRITELOG( "CHarvesterOMADRMPlugin::ConstructL()" ); + + TFileName phoneRoot = PathInfo::PhoneMemoryRootPath(); + TFileName mmcRoot = PathInfo::MemoryCardRootPath(); + + TFileName images = PathInfo::ImagesPath(); + + TFileName phoneImagePath( phoneRoot ); + phoneImagePath.Append( images ); + iPhoneImagesPath = phoneImagePath.AllocL(); + + TFileName mmcImagePath( mmcRoot ); + mmcImagePath.Append( images ); + iMmcImagesPath = mmcImagePath.Right( mmcImagePath.Length() - 1 ).AllocL(); + + TFileName videos = PathInfo::VideosPath(); + + TFileName phoneVideoPath( phoneRoot ); + phoneVideoPath.Append( videos ); + iPhoneVideosPath = phoneVideoPath.AllocL(); + + TFileName mmcVideoPath( mmcRoot ); + mmcVideoPath.Append( videos ); + iMmcVideosPath = mmcVideoPath.Right( mmcVideoPath.Length() - 1 ).AllocL(); + + TFileName sounds = PathInfo::SoundsPath(); + + TFileName phoneSoundPath( phoneRoot ); + phoneSoundPath.Append( sounds ); + iPhoneSoundsPath = phoneSoundPath.AllocL(); + + TFileName mmcSoundPath( mmcRoot ); + mmcSoundPath.Append( sounds ); + iMmcSoundsPath = mmcSoundPath.Right( mmcSoundPath.Length() - 1 ).AllocL(); } void CHarvesterOMADRMPlugin::HarvestL( CHarvesterData* aHD ) @@ -250,7 +296,7 @@ } // --------------------------------------------------------------------------- -// HandleNewObjectL +// HandleObjectPropertiesL // --------------------------------------------------------------------------- // void CHarvesterOMADRMPlugin::HandleObjectPropertiesL( @@ -283,8 +329,57 @@ // File size CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iSizePropertyDef, &aVHD.iFileSize, aIsAdd ); + + TPtrC objectDefName( mdeObject.Def().Name() ); + if( objectDefName == MdeConstants::Image::KImageObject ) + { + const TDesC& uri = mdeObject.Uri(); + if( uri.FindF( iMmcImagesPath->Des()) != KErrNotFound || + uri.FindF( iPhoneImagesPath->Des()) != KErrNotFound || + uri.FindF( KDCIMFolder ) != KErrNotFound ) + { + TBool inDefaultFolder( ETrue ); + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iDefaultFolderPropertyDef, &inDefaultFolder, aIsAdd ); + } + else + { + TBool inDefaultFolder( EFalse ); + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iDefaultFolderPropertyDef, &inDefaultFolder, aIsAdd ); + } + } + else if( objectDefName == MdeConstants::Video::KVideoObject ) + { + const TDesC& uri = mdeObject.Uri(); + if( uri.FindF( iMmcVideosPath->Des()) != KErrNotFound || + uri.FindF( iPhoneVideosPath->Des()) != KErrNotFound || + uri.FindF( KDCIMFolder ) != KErrNotFound ) + { + TBool inDefaultFolder( ETrue ); + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iDefaultFolderPropertyDef, &inDefaultFolder, aIsAdd ); + } + else + { + TBool inDefaultFolder( EFalse ); + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iDefaultFolderPropertyDef, &inDefaultFolder, aIsAdd ); + } + } + else if( objectDefName == MdeConstants::Audio::KAudioObject ) + { + const TDesC& uri = mdeObject.Uri(); + if( uri.FindF( iMmcSoundsPath->Des()) != KErrNotFound || + uri.FindF( iPhoneSoundsPath->Des()) != KErrNotFound ) + { + TBool inDefaultFolder( ETrue ); + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iDefaultFolderPropertyDef, &inDefaultFolder, aIsAdd ); + } + else + { + TBool inDefaultFolder( EFalse ); + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iDefaultFolderPropertyDef, &inDefaultFolder, aIsAdd ); + } + } } - + // Item Type if(aVHD.iMimetype.Length() > 0) { @@ -344,6 +439,50 @@ err = content->GetStringAttribute( ContentAccess::EMimeType, mime ); delete content; } + +#ifdef _DEBUG + if( err == KErrInUse || err == KErrLocked ) + { + TPtrC fileName( aUri.Mid(2) ); + WRITELOG1( "CHarvesterOMADRMPlugin :: Checking open file handles to %S", &fileName ); + + CFileList* fileList = 0; + TOpenFileScan fileScan( iFs ); + + TRAP_IGNORE( fileScan.NextL( fileList ) ); + + while ( fileList ) + { + const TInt count( fileList->Count() ); + for (TInt i = 0; i < count; i++ ) + { + if ( (*fileList)[i].iName == aUri.Mid(2) ) + { + TFullName processName; + TFindThread find(_L("*")); + while( find.Next( processName ) == KErrNone ) + { + RThread thread; + TInt error = thread.Open( processName ); + + if ( error == KErrNone ) + { + if ( thread.Id().Id() == fileScan.ThreadId() ) + { + processName = thread.Name(); + thread.Close(); + WRITELOG1( "CHarvesterOMADRMPlugin :: %S has a file handle open", &processName ); + break; + } + thread.Close(); + } + } + } + } + TRAP_IGNORE( fileScan.NextL( fileList ) ); + } + } +#endif if( err == KErrInUse || err == KErrLocked ) { @@ -391,6 +530,13 @@ aObjectType.Copy( KVideo ); return; } + + if( mime == KRingingToneMime ) + { + WRITELOG1( "CHarvesterOMADRMPlugin::GetObjectType - mimetype %S. Object type changed to Audio", &mime ); + aObjectType.Copy( KAudio ); + return; + } } WRITELOG1( "CHarvesterOMADRMPlugin::GetObjectType - ERROR: mimetype %S. No object type found", &mime ); diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/RTPPlugin/inc/harvesterrtpplugin.h --- a/harvester/harvesterplugins/RTPPlugin/inc/harvesterrtpplugin.h Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/RTPPlugin/inc/harvesterrtpplugin.h Thu May 27 13:18:43 2010 +0300 @@ -43,6 +43,7 @@ CMdEPropertyDef* iSizePropertyDef; CMdEPropertyDef* iItemTypePropertyDef; CMdEPropertyDef* iTitlePropertyDef; + CMdEPropertyDef* iDefaultFolderPropertyDef; // Media property definitions CMdEPropertyDef* iCaptureDatePropertyDef; diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/RTPPlugin/src/harvesterrtpplugin.cpp --- a/harvester/harvesterplugins/RTPPlugin/src/harvesterrtpplugin.cpp Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/RTPPlugin/src/harvesterrtpplugin.cpp Thu May 27 13:18:43 2010 +0300 @@ -50,6 +50,7 @@ iSizePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KSizeProperty ); iItemTypePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KItemTypeProperty ); iTitlePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KTitleProperty ); + iDefaultFolderPropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KInDefaultFolder ); CMdEObjectDef& mediaDef = nsDef.GetObjectDefL( MdeConstants::MediaObject::KMediaObject ); iCaptureDatePropertyDef =& mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KCaptureDateProperty ); @@ -285,6 +286,10 @@ // Mime Type CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iItemTypePropertyDef, &aClipDetails.iMimeType, aIsAdd ); + // Default folder + TBool inDefaultFolder( ETrue ); + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, + *iPropDefs->iDefaultFolderPropertyDef, &inDefaultFolder, aIsAdd ); } // Title (is set from URI by default) diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/VideoPlugin/group/harvestervideoplugin.mmp --- a/harvester/harvesterplugins/VideoPlugin/group/harvestervideoplugin.mmp Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/VideoPlugin/group/harvestervideoplugin.mmp Thu May 27 13:18:43 2010 +0300 @@ -54,6 +54,7 @@ LIBRARY harvestercommon.lib LIBRARY caf.lib LIBRARY cafutils.lib +LIBRARY platformenv.lib STATICLIBRARY hxmetadatautil.lib diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/VideoPlugin/inc/harvestervideoplugin.h --- a/harvester/harvesterplugins/VideoPlugin/inc/harvestervideoplugin.h Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/VideoPlugin/inc/harvestervideoplugin.h Thu May 27 13:18:43 2010 +0300 @@ -139,6 +139,7 @@ CMdEPropertyDef* iArtistPropertyDef; CMdEPropertyDef* iDescriptionPropertyDef; CMdEPropertyDef* iDrmPropertyDef; + CMdEPropertyDef* iDefaultFolderPropertyDef; CMdEPropertyDef* iAudioFourCCDef; @@ -234,6 +235,9 @@ // not own CHarvesterMediaIdUtil* iMediaIdUtil; + + HBufC* iPhoneVideosPath; + HBufC* iMmcVideosPath; }; #endif // __CHARVESTERVIDEOPLUGIN_H__ diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/VideoPlugin/src/harvestervideoplugin.cpp --- a/harvester/harvesterplugins/VideoPlugin/src/harvestervideoplugin.cpp Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/VideoPlugin/src/harvestervideoplugin.cpp Thu May 27 13:18:43 2010 +0300 @@ -21,6 +21,7 @@ #include #include #include +#include #include "mdsutils.h" #include "harvestervideoplugin.h" @@ -98,6 +99,7 @@ iTimeOffsetPropertyDef = &objectDef.GetPropertyDefL( Object::KTimeOffsetProperty ); iItemTypePropertyDef = &objectDef.GetPropertyDefL( Object::KItemTypeProperty ); iTitlePropertyDef = &objectDef.GetPropertyDefL( Object::KTitleProperty ); + iDefaultFolderPropertyDef = &objectDef.GetPropertyDefL( Object::KInDefaultFolder ); CMdEObjectDef& mediaDef = nsDef.GetObjectDefL( MediaObject::KMediaObject ); iReleaseDatePropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KReleaseDateProperty ); @@ -164,6 +166,9 @@ iMimeTypeMappings.Close(); RMediaIdUtil::ReleaseInstance(); + delete iPhoneVideosPath; + delete iMmcVideosPath; + WRITELOG("CHarvesterVideoPlugin::CHarvesterVideoPlugin()"); } @@ -269,6 +274,16 @@ TVideoMetadataHandling( TVideoMetadataHandling::EHexilMetadataHandling, KVideo(), KMimeTypeWmv(), KMimeTypeWmv() ) ), cmp ) ); + + TFileName videos = PathInfo::VideosPath(); + + TFileName phonePath = PathInfo::PhoneMemoryRootPath(); + phonePath.Append( videos ); + iPhoneVideosPath = phonePath.AllocL(); + + TFileName mmcPath = PathInfo::MemoryCardRootPath(); + mmcPath.Append( videos ); + iMmcVideosPath = mmcPath.Right( mmcPath.Length() - 1 ).AllocL(); iMediaIdUtil = &RMediaIdUtil::GetInstanceL(); } @@ -399,7 +414,7 @@ } else { - WRITELOG1( "CHarvesterVideoPlugin::HarvestSingleFileL() - TRAP error: %d", error ); + WRITELOG1( "CHarvesterVideoPlugin::HarvestL() - TRAP error: %d", error ); TInt convertedError = KErrNone; MdsUtils::ConvertTrapError( error, convertedError ); aHD->SetErrorCode( convertedError ); @@ -434,6 +449,12 @@ void CHarvesterVideoPlugin::GatherDataL( CMdEObject& aMetadataObject, CVideoHarvestData& aVHD ) { +#ifdef _DEBUG + TTime dStart, dStop; + dStart.UniversalTime(); + dStop.UniversalTime(); + WRITELOG1( "CHarvesterVideoPlugin::GatherDataL start %d us", (TInt)dStop.MicroSecondsFrom(dStart).Int64() ); +#endif const TDesC& uri = aMetadataObject.Uri(); WRITELOG1( "CHarvesterVideoPlugin - Gather data from file %S", &uri ); @@ -759,7 +780,6 @@ aVHD.iMimeBuf = mime.Alloc(); } - helixMetadata->ResetL(); CleanupStack::PopAndDestroy( helixMetadata ); // don't destory mime type pointers just clean array @@ -933,6 +953,11 @@ WRITELOG( "CHarvesterVideoPlugin - Closing file" ); CleanupStack::PopAndDestroy( &file ); +#ifdef _DEBUG + dStop.UniversalTime(); + WRITELOG1( "CHarvesterVideoPlugin::GatherDataL start %d us", (TInt)dStop.MicroSecondsFrom(dStart).Int64() ); +#endif + WRITELOG( "CHarvesterVideoPlugin - Start adding data to object" ); } @@ -970,6 +995,21 @@ // File size CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iSizePropertyDef, &aVHD.iFileSize, aIsAdd ); + + // Default folder + const TDesC& uri = mdeObject.Uri(); + if( uri.FindF( iMmcVideosPath->Des()) != KErrNotFound || + uri.FindF( iPhoneVideosPath->Des()) != KErrNotFound || + uri.FindF( KDCIMFolder ) != KErrNotFound ) + { + TBool inDefaultFolder( ETrue ); + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iDefaultFolderPropertyDef, &inDefaultFolder, aIsAdd ); + } + else + { + TBool inDefaultFolder( EFalse ); + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iDefaultFolderPropertyDef, &inDefaultFolder, aIsAdd ); + } } // Item Type diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/WMVPlugin/group/harvesterwmvplugin.mmp --- a/harvester/harvesterplugins/WMVPlugin/group/harvesterwmvplugin.mmp Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/WMVPlugin/group/harvesterwmvplugin.mmp Thu May 27 13:18:43 2010 +0300 @@ -52,6 +52,7 @@ LIBRARY harvesterplugininterface.lib LIBRARY mdeclient.lib LIBRARY harvesterdata.lib +LIBRARY platformenv.lib PAGED BYTEPAIRCOMPRESSTARGET diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/WMVPlugin/inc/harvesterwmvplugin.h --- a/harvester/harvesterplugins/WMVPlugin/inc/harvesterwmvplugin.h Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/WMVPlugin/inc/harvesterwmvplugin.h Thu May 27 13:18:43 2010 +0300 @@ -47,6 +47,7 @@ CMdEPropertyDef* iDescriptionPropertyDef; CMdEPropertyDef* iAuthorPropertyDef; CMdEPropertyDef* iGenrePropertyDef; + CMdEPropertyDef* iDefaultFolderPropertyDef; private: CHarvesterWmvPluginPropertyDefs(); @@ -184,6 +185,9 @@ CHarvesterWmvPluginPropertyDefs* iPropDefs; TInt iMaxTextLength; + + HBufC* iPhoneVideosPath; + HBufC* iMmcVideosPath; }; #endif // C_HARVESTERWMVPLUGIN_H diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/harvesterplugins/WMVPlugin/src/harvesterwmvplugin.cpp --- a/harvester/harvesterplugins/WMVPlugin/src/harvesterwmvplugin.cpp Fri May 14 16:17:23 2010 +0300 +++ b/harvester/harvesterplugins/WMVPlugin/src/harvesterwmvplugin.cpp Thu May 27 13:18:43 2010 +0300 @@ -17,6 +17,7 @@ #include #include +#include #include "mdsutils.h" #include "harvesterdata.h" @@ -45,6 +46,7 @@ iSizePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KSizeProperty ); iItemTypePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KItemTypeProperty ); iTitlePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KTitleProperty ); + iDefaultFolderPropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KInDefaultFolder ); CMdEObjectDef& mediaDef = nsDef.GetObjectDefL( MdeConstants::MediaObject::KMediaObject ); iDrmPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KDRMProperty ); @@ -87,6 +89,9 @@ { WRITELOG( "CHarvesterWMVPlugin::~CHarvesterWMVPlugin()" ); delete iPropDefs; + + delete iPhoneVideosPath; + delete iMmcVideosPath; } // --------------------------------------------------------------------------- @@ -164,6 +169,17 @@ void CHarvesterWMVPlugin::ConstructL() { WRITELOG( "CHarvesterWMVPlugin::ConstructL()" ); + + TFileName videos = PathInfo::VideosPath(); + + TFileName phonePath = PathInfo::PhoneMemoryRootPath(); + phonePath.Append( videos ); + iPhoneVideosPath = phonePath.AllocL(); + + TFileName mmcPath = PathInfo::MemoryCardRootPath(); + mmcPath.Append( videos ); + iMmcVideosPath = mmcPath.Right( mmcPath.Length() - 1 ).AllocL(); + SetPriority( KHarvesterPriorityHarvestingPlugin - 1 ); } @@ -302,6 +318,20 @@ // Mime Type CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iItemTypePropertyDef, &aClipDetails.iMimeType, aIsAdd ); + + const TDesC& uri = mdeObject.Uri(); + if( uri.FindF( iMmcVideosPath->Des()) != KErrNotFound || + uri.FindF( iPhoneVideosPath->Des()) != KErrNotFound || + uri.FindF( KDCIMFolder ) != KErrNotFound ) + { + TBool inDefaultFolder( ETrue ); + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iDefaultFolderPropertyDef, &inDefaultFolder, aIsAdd ); + } + else + { + TBool inDefaultFolder( EFalse ); + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iDefaultFolderPropertyDef, &inDefaultFolder, aIsAdd ); + } } // DRM protection diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/monitorplugins/mdsfileserverplugin/inc/mdsfileserverplugin.h --- a/harvester/monitorplugins/mdsfileserverplugin/inc/mdsfileserverplugin.h Fri May 14 16:17:23 2010 +0300 +++ b/harvester/monitorplugins/mdsfileserverplugin/inc/mdsfileserverplugin.h Thu May 27 13:18:43 2010 +0300 @@ -111,10 +111,15 @@ * * @param aFilename Filename to check. * @param aIsDirectory ETrue if filename points to directory. + * @param aFsPlugin Reference to Fileserver Plugin. + * @param aDelete Indicates if file deletion is in question. * * @return EFalse, if path or file has a hidden or system attribute set. */ - TBool CheckAttribs( const TDesC& aFilename, TBool& aIsDirectory ) const; + TBool CheckAttribs( const TDesC& aFilename, + TBool& aIsDirectory, + RFsPlugin& aFsPlugin, + TBool aDelete) const; /** * Check if directory is named correctly and ends with backslash. @@ -127,6 +132,19 @@ * Check if harvester (main observer) is alive */ TBool CheckHarvesterStatus(); + + /** + * Checks file entry path and attributes for validity + * + * @param aFilename Filename to check. + * @param aIsDirectory ETrue if filename points to directory. + * @param aRequest Reference to request from file server. + * @param aDelete Indicates if file deletion is in question. + * + * @return EFalse if file is not to be handled + */ + TBool CheckIfValidFile( const TDesC& aFilename, + TBool& aIsDirectory, TFsPluginRequest& aRequest, TBool aDelete ); #ifdef _DEBUG_EVENTS void RegisterDebugEventsL(); @@ -151,12 +169,7 @@ RPointerArray iQueue; RPointerArray iIgnorePaths; - - /** - * File system client session. - */ - RFs iFsSession; - + RPointerArray iCreatedFiles; RPointerArray iModifiedFiles; diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/monitorplugins/mdsfileserverplugin/src/mdsfileserverplugin.cpp --- a/harvester/monitorplugins/mdsfileserverplugin/src/mdsfileserverplugin.cpp Fri May 14 16:17:23 2010 +0300 +++ b/harvester/monitorplugins/mdsfileserverplugin/src/mdsfileserverplugin.cpp Thu May 27 13:18:43 2010 +0300 @@ -21,6 +21,8 @@ #include "mdsutils.h" _LIT( KMdsFileServerPlugin, "MdsFileServerPlugin" ); +_LIT( KExludedThumbPath, "\\_PAlbTN\\"); +_LIT( KExludedMediaArtPath, "\\.mediaartlocal\\"); /* Server name */ _LIT( KHarvesterServerName, "HarvesterServer" ); @@ -45,8 +47,13 @@ { WRITELOG( "CMdsFileServerPlugin::~CMdsFileServerPlugin()" ); - TRAP_IGNORE( DisableL() ); - iFsSession.Close(); +#ifdef _DEBUG + TRAPD( error, DisableL() ); + _LIT( KPanicCategory,"CMdsFileServerPlugin" ); + __ASSERT_DEBUG( error == KErrNone, User::Panic( KPanicCategory, error ) ); +#else + TRAP_IGNORE( DisableL() ); +#endif iCreatedFiles.ResetAndDestroy(); iCreatedFiles.Close(); @@ -81,7 +88,6 @@ void CMdsFileServerPlugin::InitialiseL() { WRITELOG( "CMdsFileServerPlugin::InitializeL()" ); - User::LeaveIfError( iFsSession.Connect() ); } //----------------------------------------------------------------------------- @@ -174,7 +180,7 @@ // TInt CMdsFileServerPlugin::DoRequestL( TFsPluginRequest& aRequest ) { - // ignore event if there is no any client listening + // ignore event if there are not any clients listening if( iConnectionCount <= 0 ) { WRITELOG( "CMdsFileServerPlugin::DoRequestL() - no clients -> ignore event" ); @@ -183,9 +189,6 @@ TInt function = aRequest.Function(); - iFileName.Zero(); - iNewFileName.Zero(); - #ifdef _DEBUG_EVENTS PrintDebugEvents( function ); #endif @@ -201,7 +204,7 @@ return KErrNone; } - const TBool formatFunction = function == EFsFormatOpen || function == EFsFormatSubClose; + const TBool formatFunction( function == EFsFormatOpen || function == EFsFormatSubClose ); WRITELOG1( "----- CMdsFileServerPlugin::DoRequestL() - plugin function: %d -----", function ); @@ -218,9 +221,7 @@ } // get process id - TUid processId = { 0 }; - - processId = aRequest.Message().SecureId(); + TUid processId = aRequest.Message().SecureId(); TBool isDirectory = EFalse; @@ -235,6 +236,7 @@ return KErrNone; } WRITELOG2( "CMdsFileServerPlugin::DoRequestL() - newFileName: '%S' %d", &iNewFileName, newNameErr ); + TBool setToBeDeleted( EFalse ); if ( newNameErr == KErrNone ) { if ( !CheckPath(iNewFileName) ) @@ -248,47 +250,43 @@ } // file moved to ignored path, delete from db function = EFsDelete; + setToBeDeleted = ETrue; } - if ( !CheckAttribs( iNewFileName, isDirectory ) ) + if( !setToBeDeleted ) { - WRITELOG( "CMdsFileServerPlugin::DoRequestL() - new path attribute check failed" ); - if( !CheckAttribs(iFileName, isDirectory) ) + RFsPlugin fsPlugin( aRequest ); + const TInt rfsPluginErr = fsPlugin.Connect(); + + if ( ( rfsPluginErr == KErrNone ) && !CheckAttribs( iNewFileName, isDirectory, fsPlugin, EFalse ) ) { - WRITELOG( "CMdsFileServerPlugin::DoRequestL() - old path attribute check failed" ); - WRITELOG( "CMdsFileServerPlugin::DoRequestL() - ignore file" ); - return KErrNone; + WRITELOG( "CMdsFileServerPlugin::DoRequestL() - new path attribute check failed" ); + if( !CheckAttribs(iFileName, isDirectory, fsPlugin, EFalse) ) + { + WRITELOG( "CMdsFileServerPlugin::DoRequestL() - old path attribute check failed" ); + WRITELOG( "CMdsFileServerPlugin::DoRequestL() - ignore file" ); + fsPlugin.Close(); + return KErrNone; + } + // file set to hidden, delete from db + function = EFsDelete; } - // file set to hidden, delete from db - function = EFsDelete; + fsPlugin.Close(); } } else { - if ( !CheckPath(iFileName) ) + if( !CheckIfValidFile(iFileName, isDirectory, aRequest, EFalse) ) { - WRITELOG( "CMdsFileServerPlugin::DoRequestL() - path not supported" ); - return KErrNone; - } - - if ( !CheckAttribs(iFileName, isDirectory) ) - { - WRITELOG( "CMdsFileServerPlugin::DoRequestL() - attribute check failed" ); return KErrNone; } } } else if ( !formatFunction ) { - if ( !CheckPath(iFileName) ) + const TBool deleteFunction( function == EFsDelete ); + if( !CheckIfValidFile(iFileName, isDirectory, aRequest, deleteFunction) ) { - WRITELOG( "CMdsFileServerPlugin::DoRequestL() - path not supported" ); - return KErrNone; - } - - if ( !CheckAttribs( iFileName, isDirectory ) ) - { - WRITELOG( "CMdsFileServerPlugin::DoRequestL() - attribute check failed" ); return KErrNone; } } @@ -306,14 +304,23 @@ case EFsFileCreate: { #ifdef _DEBUG - if (function == EFsFileCreate) + if (function == EFsFileCreate) + { WRITELOG( "CMdsFileServerPlugin::DoRequestL() - EFsFileCreate" ); - if (function == EFsFileReplace) - WRITELOG( "CMdsFileServerPlugin::DoRequestL() - EFsFileReplace" ); + } #endif - iCreatedFiles.Append( iFileName.AllocL() ); - User::LeaveIfError( UnregisterIntercept(EFsFileSetModified, EPostIntercept) ); + HBufC* createdFileName = iFileName.Alloc(); + if( createdFileName ) + { + // Ownership transferred if succeeded + const TInt appendError( iCreatedFiles.Append( createdFileName ) ); + if( appendError != KErrNone ) + { + delete createdFileName; + createdFileName = NULL; + } + } return KErrNone; } @@ -331,13 +338,18 @@ delete iCreatedFiles[i]; iCreatedFiles.Remove( i ); - //Have to check whether file has been hidden - if ( CheckAttribs( iFileName, isDirectory ) ) - { - found = ETrue; - } - - User::LeaveIfError( RegisterIntercept(EFsFileSetModified, EPostIntercept) ); + //Have to check whether file has been hidden + RFsPlugin fsPlugin( aRequest ); + const TInt rfsPluginError( fsPlugin.Connect() ); + if( (rfsPluginError == KErrNone) && CheckAttribs( iFileName, isDirectory, fsPlugin, EFalse ) ) + { + found = ETrue; + } + else if( rfsPluginError != KErrNone ) + { + found = ETrue; + } + fsPlugin.Close(); } } @@ -377,10 +389,34 @@ break; case EFsFileSetModified: - + { WRITELOG( "CMdsFileServerPlugin::DoRequestL() - EFsFileSetModified" ); - iModifiedFiles.Append( iFileName.AllocL() ); + + for ( TInt i = iCreatedFiles.Count(); --i >= 0; ) + { + // If file has been created but not closed, do not handle modified events + // for that file before the application that has created the file is done with writing + // it to the disk. + if ( MdsUtils::Compare( iFileName, *(iCreatedFiles[i]) ) == 0 ) + { + return KErrNone; + } + } + + HBufC* modifiedFileName = iFileName.Alloc(); + if( modifiedFileName ) + { + // Ownership transferred if succeeded + const TInt appendError( iModifiedFiles.Append( modifiedFileName ) ); + if( appendError != KErrNone ) + { + delete modifiedFileName; + modifiedFileName = NULL; + } + } + fileEventType = EMdsFileModified; + } break; case EFsSetEntry: @@ -428,17 +464,13 @@ { WRITELOG( "CMdsFileServerPlugin::DoRequestL() - EFsFormatOpen" ); // get the drive letter - RFsPlugin fsplugin( aRequest ); - const TInt rfsPluginError( fsplugin.Connect() ); - if( rfsPluginError == KErrNone ) + RFsPlugin fsPlugin( aRequest ); + err = fsPlugin.Connect(); + if( err == KErrNone ) { - err = fsplugin.Volume( volInfo, drvNumber ); + err = fsPlugin.Volume( volInfo, drvNumber ); } - else - { - err = iFsSession.Volume( volInfo, drvNumber ); - } - fsplugin.Close(); + fsPlugin.Close(); if( KErrNone == err ) { @@ -525,6 +557,9 @@ } } + iFileName.Zero(); + iNewFileName.Zero(); + WRITELOG( "CMdsFileServerPlugin::DoRequestL() - return" ); return err; } @@ -780,7 +815,12 @@ HBufC* fn = status.iFileName.Alloc(); if ( fn ) { - iPaths.InsertInOrder(fn, TLinearOrder(CMdsFileServerPlugin::Compare)); + const TInt insertError( iPaths.InsertInOrder(fn, TLinearOrder(CMdsFileServerPlugin::Compare))); + if( insertError != KErrNone ) + { + delete fn; + fn = NULL; + } } else { @@ -870,7 +910,12 @@ HBufC* fn = status.iFileName.Alloc(); if ( fn ) { - iIgnorePaths.InsertInOrder(fn, TLinearOrder(CMdsFileServerPlugin::Compare)); + const TInt insertError( iIgnorePaths.InsertInOrder(fn, TLinearOrder(CMdsFileServerPlugin::Compare))); + if( insertError != KErrNone ) + { + delete fn; + fn = NULL; + } } else { @@ -947,6 +992,14 @@ { return EFalse; } + else if( MdsUtils::Find( aFilename, KExludedThumbPath ) != KErrNotFound ) + { + return EFalse; + } + else if( MdsUtils::Find( aFilename, KExludedMediaArtPath ) != KErrNotFound ) + { + return EFalse; + } } // check if notification path @@ -981,7 +1034,7 @@ //----------------------------------------------------------------------------- // TBool CMdsFileServerPlugin::CheckAttribs( const TDesC& aFilename, - TBool& aIsDirectory ) const + TBool& aIsDirectory, RFsPlugin& aFsPlugin, TBool aDelete ) const { // find last backslash from filename and // take drive and path from filename including last backslash @@ -993,29 +1046,31 @@ } TPtrC path( aFilename.Left( pos + 1 ) ); - TUint att = 0; + TEntry entry; - // check if path is hidden or system path - TInt err = iFsSession.Att( path, att ); + // check if path is hidden + TInt err = aFsPlugin.Entry( path, entry ); if ( err == KErrNone ) - { - if ( att & KEntryAttHidden || att & KEntryAttSystem ) + { + if ( entry.iAtt & KEntryAttHidden ) { return EFalse; } } - // or is the file hidden or system file - att = 0; - err = iFsSession.Att( aFilename, att ); - if ( err == KErrNone ) + if( !aDelete ) { - if ( att & KEntryAttHidden || att & KEntryAttSystem ) + // check if the file hidden or system file + err = aFsPlugin.Entry( aFilename, entry ); + if ( err == KErrNone ) { - return EFalse; - } + if ( entry.iAtt & KEntryAttHidden || entry.iAtt & KEntryAttSystem ) + { + return EFalse; + } - aIsDirectory = att & KEntryAttDir ? ETrue : EFalse; + aIsDirectory = entry.iAtt & KEntryAttDir ? ETrue : EFalse; + } } return ETrue; @@ -1074,6 +1129,35 @@ } //----------------------------------------------------------------------------- +// CheckIfValidFile +//----------------------------------------------------------------------------- +// +TBool CMdsFileServerPlugin::CheckIfValidFile( const TDesC& aFilename, + TBool& aIsDirectory, TFsPluginRequest& aRequest, TBool aDelete ) + { + if ( !CheckPath(aFilename) ) + { + WRITELOG( "CMdsFileServerPlugin::CheckIfValidFile() - path not supported" ); + return EFalse; + } + + RFsPlugin fsPlugin( aRequest ); + const TInt rfsPluginErr = fsPlugin.Connect(); + + if( rfsPluginErr == KErrNone ) + { + if ( !CheckAttribs(aFilename, aIsDirectory, fsPlugin, aDelete) ) + { + WRITELOG( "CMdsFileServerPlugin::CheckIfValidFile() - attribute check failed" ); + return EFalse; + } + } + fsPlugin.Close(); + + return ETrue; + } + +//----------------------------------------------------------------------------- // CMdsFileServerPluginFactory implementation //----------------------------------------------------------------------------- // diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/monitorplugins/mmcplugin/src/mmcfilelist.cpp --- a/harvester/monitorplugins/mmcplugin/src/mmcfilelist.cpp Fri May 14 16:17:23 2010 +0300 +++ b/harvester/monitorplugins/mmcplugin/src/mmcfilelist.cpp Thu May 27 13:18:43 2010 +0300 @@ -27,6 +27,7 @@ #include "fsutil.h" #include "harvestercenreputil.h" #include "harvestereventmanager.h" +#include "harvestercommon.h" #include #include #include "harvesterpluginfactory.h" @@ -135,7 +136,16 @@ } else { - name.Append( entry.iName ); + // If thumbnail folder is detected, skip it + if( entry.iName.Compare( KExludedThumbPath ) != 0 && + entry.iName.Compare( KExludedMediaArtPath ) != 0 ) + { + name.Append( entry.iName ); + } + else + { + continue; + } } if ( entry.IsDir() ) @@ -157,33 +167,11 @@ { continue; } - - // check if folder is hidden or system folder - TUint att = 0; - TInt attErr = aFs.Att( name, att ); - if ( attErr == KErrNone ) - { - if ( att & KEntryAttHidden || att & KEntryAttSystem ) - { - continue; - } - } path->AppendL( name ); } else - { - // check if file is hidden or system file - TUint att = 0; - TInt attErr = aFs.Att( name, att ); - if ( attErr == KErrNone ) - { - if ( att & KEntryAttHidden || att & KEntryAttSystem ) - { - continue; - } - } - + { CPlaceholderData* phData = CPlaceholderData::NewL(); CleanupStack::PushL( phData ); phData->SetUri( name ); diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/monitorplugins/mmcplugin/src/mmcmonitorplugin.cpp --- a/harvester/monitorplugins/mmcplugin/src/mmcmonitorplugin.cpp Fri May 14 16:17:23 2010 +0300 +++ b/harvester/monitorplugins/mmcplugin/src/mmcmonitorplugin.cpp Thu May 27 13:18:43 2010 +0300 @@ -113,8 +113,7 @@ TUint32 hdMediaId( 0 ); hdMediaId = iMountTask->GetInternalDriveMediaId(); - const TInt count( medias.Count() ); - for ( TInt i = 0; i < count; i++ ) + for( TInt i = medias.Count() - 1; i >=0; i-- ) { TRAP_IGNORE( iMdEClient->GetMediaL( medias[i].iMediaId, driveLetter, presentState ) ); @@ -349,9 +348,11 @@ } iFs.Drive( driveInfo, i ); - if ( ((driveInfo.iDriveAtt & KDriveAttRemovable) || (driveInfo.iDriveAtt & KDriveAttLogicallyRemovable) || - (driveInfo.iType == EMediaHardDisk && driveStatus & DriveInfo::EDriveInternal) ) && - (driveInfo.iType != EMediaNotPresent) ) + if( ( (driveStatus & DriveInfo::EDriveRemovable) || + (driveInfo.iType == EMediaHardDisk && driveStatus & DriveInfo::EDriveInternal) || + (driveInfo.iDriveAtt & KDriveAttLogicallyRemovable) || + (driveInfo.iDriveAtt & KDriveAttRemovable) ) && + (driveInfo.iType != EMediaNotPresent) ) { count++; // DEBUG INFO diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/server/inc/harvesterao.h --- a/harvester/server/inc/harvesterao.h Fri May 14 16:17:23 2010 +0300 +++ b/harvester/server/inc/harvesterao.h Thu May 27 13:18:43 2010 +0300 @@ -63,6 +63,7 @@ CMdEPropertyDef* iOriginPropertyDef; CMdEPropertyDef* iItemTypePropertyDef; CMdEPropertyDef* iTitlePropertyDef; + CMdEPropertyDef* iDefaultFolderPropertyDef; // Media property definitions CMdEPropertyDef* iPreinstalledPropertyDef; @@ -306,6 +307,8 @@ TBool CheckForCameraItem( CHarvesterData* aHd, TDes& aObjectDef ); + void AddDefaultFolderDataL( CMdEObject* aObject ); + private: struct THarvestFileRequest @@ -568,6 +571,15 @@ TBool iFastHarvestNeeded; TBool iHarvestingPlaceholders; + + HBufC* iPhoneImagesPath; + HBufC* iMmcImagesPath; + + HBufC* iPhoneVideosPath; + HBufC* iMmcVideosPath; + + HBufC* iPhoneSoundsPath; + HBufC* iMmcSoundsPath; }; #endif //__CHARVESTERAO_H__ diff -r 8e4539ab1889 -r c461c7fa72c2 harvester/server/src/harvesterao.cpp --- a/harvester/server/src/harvesterao.cpp Fri May 14 16:17:23 2010 +0300 +++ b/harvester/server/src/harvesterao.cpp Thu May 27 13:18:43 2010 +0300 @@ -22,6 +22,7 @@ #include #include #include +#include using namespace ContentAccess; @@ -34,6 +35,7 @@ #include "harvesterdata.h" #include "ondemandao.h" #include "harvestercommon.h" +#include "mdscommoninternal.h" #include "processoriginmapperinterface.h" #include "mdeobjecthandler.h" #include "harvestereventmanager.h" @@ -79,6 +81,7 @@ iOriginPropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KOriginProperty ); iItemTypePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KItemTypeProperty ); iTitlePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KTitleProperty ); + iDefaultFolderPropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KInDefaultFolder ); CMdEObjectDef& mediaDef = nsDef.GetObjectDefL( MdeConstants::MediaObject::KMediaObject ); iPreinstalledPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KPreinstalledProperty ); @@ -216,6 +219,15 @@ delete iPropDefs; delete iCameraExtensionArray; + delete iPhoneImagesPath; + delete iMmcImagesPath; + + delete iPhoneVideosPath; + delete iMmcVideosPath; + + delete iPhoneSoundsPath; + delete iMmcSoundsPath; + RMediaIdUtil::ReleaseInstance(); REComSession::FinalClose(); @@ -272,7 +284,40 @@ iCameraExtensionArray->InsertIsqL( KExtension3gp ); iCameraExtensionArray->InsertIsqL( KExtension3gpp ); iCameraExtensionArray->InsertIsqL( KExtension3g2 ); - + + TFileName phoneRoot = PathInfo::PhoneMemoryRootPath(); + TFileName mmcRoot = PathInfo::MemoryCardRootPath(); + + TFileName images = PathInfo::ImagesPath(); + + TFileName phoneImagePath( phoneRoot ); + phoneImagePath.Append( images ); + iPhoneImagesPath = phoneImagePath.AllocL(); + + TFileName mmcImagePath( mmcRoot ); + mmcImagePath.Append( images ); + iMmcImagesPath = mmcImagePath.Right( mmcImagePath.Length() - 1 ).AllocL(); + + TFileName videos = PathInfo::VideosPath(); + + TFileName phoneVideoPath( phoneRoot ); + phoneVideoPath.Append( videos ); + iPhoneVideosPath = phoneVideoPath.AllocL(); + + TFileName mmcVideoPath( mmcRoot ); + mmcVideoPath.Append( videos ); + iMmcVideosPath = mmcVideoPath.Right( mmcVideoPath.Length() - 1 ).AllocL(); + + TFileName sounds = PathInfo::SoundsPath(); + + TFileName phoneSoundPath( phoneRoot ); + phoneSoundPath.Append( sounds ); + iPhoneSoundsPath = phoneSoundPath.AllocL(); + + TFileName mmcSoundPath( mmcRoot ); + mmcSoundPath.Append( sounds ); + iMmcSoundsPath = mmcSoundPath.Right( mmcSoundPath.Length() - 1 ).AllocL(); + WRITELOG( "CHarvesterAO::ConstructL() - end" ); } @@ -912,6 +957,16 @@ mdeObject->AddTextPropertyL( *iPropDefs->iItemTypePropertyDef, KUndefinedMime ); } + if( hd->Origin() == MdeConstants::Object::ECamera ) + { + TBool inDefaultFolder( ETrue ); + mdeObject->AddBoolPropertyL( *iPropDefs->iDefaultFolderPropertyDef, inDefaultFolder ); + } + else + { + AddDefaultFolderDataL( mdeObject ); + } + TPtrC name; TBool nameFound = MdsUtils::GetName( hd->Uri(), name ); @@ -2414,6 +2469,10 @@ WRITELOG("CHarvesterAO::HarvestingCompleted() NOT COMPLETING AS msg->iMessage->IsNull returns ETrue"); } iHarvestFileMessages.Remove( i ); + if( iHarvestFileMessages.Count() == 0 ) + { + iHarvestFileMessages.Compress(); + } } } } @@ -2832,3 +2891,60 @@ } } +void CHarvesterAO::AddDefaultFolderDataL( CMdEObject* aObject ) + { + TPtrC objectDefName( aObject->Def().Name() ); + if( objectDefName == MdeConstants::Image::KImageObject ) + { + const TDesC& uri = aObject->Uri(); + if( uri.FindF( iMmcImagesPath->Des()) != KErrNotFound || + uri.FindF( iPhoneImagesPath->Des()) != KErrNotFound || + uri.FindF( KDCIMFolder ) != KErrNotFound ) + { + TBool inDefaultFolder( ETrue ); + aObject->AddBoolPropertyL( *iPropDefs->iDefaultFolderPropertyDef, inDefaultFolder ); + } + else + { + TBool inDefaultFolder( EFalse ); + aObject->AddBoolPropertyL( *iPropDefs->iDefaultFolderPropertyDef, inDefaultFolder ); + } + } + else if( objectDefName == MdeConstants::Video::KVideoObject ) + { + const TDesC& uri = aObject->Uri(); + if( uri.FindF( iMmcVideosPath->Des()) != KErrNotFound || + uri.FindF( iPhoneVideosPath->Des()) != KErrNotFound || + uri.FindF( KDCIMFolder ) != KErrNotFound ) + { + TBool inDefaultFolder( ETrue ); + aObject->AddBoolPropertyL( *iPropDefs->iDefaultFolderPropertyDef, inDefaultFolder ); + } + else + { + TBool inDefaultFolder( EFalse ); + aObject->AddBoolPropertyL( *iPropDefs->iDefaultFolderPropertyDef, inDefaultFolder ); + } + } + else if( objectDefName == MdeConstants::Audio::KAudioObject ) + { + const TDesC& uri = aObject->Uri(); + if( uri.FindF( iMmcSoundsPath->Des()) != KErrNotFound || + uri.FindF( iPhoneSoundsPath->Des()) != KErrNotFound ) + { + TBool inDefaultFolder( ETrue ); + aObject->AddBoolPropertyL( *iPropDefs->iDefaultFolderPropertyDef, inDefaultFolder ); + } + else + { + TBool inDefaultFolder( EFalse ); + aObject->AddBoolPropertyL( *iPropDefs->iDefaultFolderPropertyDef, inDefaultFolder ); + } + } + else + { + // Other objects are set to be in default location by default + TBool inDefaultFolder( ETrue ); + aObject->AddBoolPropertyL( *iPropDefs->iDefaultFolderPropertyDef, inDefaultFolder ); + } + } diff -r 8e4539ab1889 -r c461c7fa72c2 iadstoprestart/group/iadstop.mmp --- a/iadstoprestart/group/iadstop.mmp Fri May 14 16:17:23 2010 +0300 +++ b/iadstoprestart/group/iadstop.mmp Thu May 27 13:18:43 2010 +0300 @@ -24,8 +24,7 @@ UID 0x100039ce 0x20022E94 VENDORID VID_DEFAULT -//CAPABILITY ALL -TCB -CAPABILITY CAP_GENERAL_DLL +CAPABILITY ALL -TCB SOURCEPATH ../src SOURCE iadstop.cpp diff -r 8e4539ab1889 -r c461c7fa72c2 inc/mdcserializationtype.h --- a/inc/mdcserializationtype.h Fri May 14 16:17:23 2010 +0300 +++ b/inc/mdcserializationtype.h Thu May 27 13:18:43 2010 +0300 @@ -15,13 +15,12 @@ * */ +#ifndef __MDCSERIALIZATIONTYPE_H__ +#define __MDCSERIALIZATIONTYPE_H__ + #include "mdscommoninternal.h" #include "mdcserializationbuffer.h" - -#ifndef __MDCSERIALIZATIONTYPE_H__ -#define __MDCSERIALIZATIONTYPE_H__ - NONSHARABLE_CLASS(TMdCSerializationType) { protected: diff -r 8e4539ab1889 -r c461c7fa72c2 inc/mdscommoninternal.h --- a/inc/mdscommoninternal.h Fri May 14 16:17:23 2010 +0300 +++ b/inc/mdscommoninternal.h Thu May 27 13:18:43 2010 +0300 @@ -31,6 +31,9 @@ _LIT( KMdsDefaultImportFile, "C:\\private\\200009f3\\defaultimportfile.mde" ); _LIT( KMdsDefaultRomImportFile, "Z:\\private\\200009f3\\defaultimportfile.mde" ); +// Universal image folder +_LIT( KDCIMFolder, ":\\DCIM"); + // schema file version const TInt KSchemaFileMajorVersion = 2; const TInt KSchemaFileMinorVersion = 0; @@ -48,6 +51,8 @@ const TInt KMaxTitleFieldLength = 255; +const TInt KTriggerDbMaintenanceTreasholdValue( 2500 ); + _LIT( KMdSServerName,"!MdSServer" ); // Server name _LIT( KMdSServerProcessString,"!MdSServer*" ); _LIT( KSchemaChunkName, "MdSSchema" ); diff -r 8e4539ab1889 -r c461c7fa72c2 inc/mdssqliteconnection.h --- a/inc/mdssqliteconnection.h Fri May 14 16:17:23 2010 +0300 +++ b/inc/mdssqliteconnection.h Thu May 27 13:18:43 2010 +0300 @@ -175,6 +175,8 @@ void EnableTransaction( TBool aEnable, RMdsStatement& aQuery ); + void DoAnalyzeL(); + protected: // Personal methods /** diff -r 8e4539ab1889 -r c461c7fa72c2 mds_plat/content_listing_framework_collection_manager_api/tsrc/src/CollectionManagerTestBlocks.cpp --- a/mds_plat/content_listing_framework_collection_manager_api/tsrc/src/CollectionManagerTestBlocks.cpp Fri May 14 16:17:23 2010 +0300 +++ b/mds_plat/content_listing_framework_collection_manager_api/tsrc/src/CollectionManagerTestBlocks.cpp Thu May 27 13:18:43 2010 +0300 @@ -471,6 +471,7 @@ const TInt itemCount( 500 ); CDesCArray* removeItemArray = new (ELeave) CDesCArrayFlat( itemCount ); + CleanupStack::PushL( removeItemArray ); for( TInt i = 0 ; i < itemCount ; ++i ) { @@ -484,12 +485,12 @@ TRAP( error, iCollectionManager->RemoveFromAllCollectionsL( *removeItemArray ) ); if( error != KErrNotSupported && error != KErrNone ) { - delete removeItemArray; + CleanupStack::PopAndDestroy( removeItemArray ); removeItemArray = NULL; return error; } - delete removeItemArray; + CleanupStack::PopAndDestroy( removeItemArray ); removeItemArray = NULL; _LIT( KMsg2, "Exit RemoveFromAllCollectionsL" ); diff -r 8e4539ab1889 -r c461c7fa72c2 mds_plat/harvester_framework_api/inc/harvesterclient.h --- a/mds_plat/harvester_framework_api/inc/harvesterclient.h Fri May 14 16:17:23 2010 +0300 +++ b/mds_plat/harvester_framework_api/inc/harvesterclient.h Thu May 27 13:18:43 2010 +0300 @@ -32,6 +32,8 @@ class MHarvesterEventObserver; class CHarvesterRequestActive; class CHarvesterRequestQueue; +class MHarvesterSessionObserver; +class CHarvesterSessionWatcher; // default event interval for MHarvesterEventObserver const TInt KHarvesterEventInterval = 20; @@ -171,6 +173,20 @@ TInt aItemsLeft ) = 0; }; +class MHarvesterSessionObserver + { +public: + + /** + * Called to notify the observer that harvester server has been terminated, + * thus harvester server sessions created are now invalid and new connection + * needs to be established + * NOTE! Cliens still have to call Close() on the session to release client side + * resources. + */ + virtual void HarvesterServerTerminated() = 0; + }; + /** * Harvester client session class which provides also means to: * - Pause/resume the Harvesting framework @@ -284,7 +300,20 @@ RArray &aAlbumIds, TBool aAddLocation, TUid aUid ); - + + /** + * Public method to set observer for notifications about harvester server termination. + * Only one observer at a time is currently supported. + * + * @param aObserver Pointer to the observer + */ + IMPORT_C void AddSessionObserverL( MHarvesterSessionObserver& aObserver ); + + /** + * Public method to remove harvester session observer + */ + IMPORT_C void RemoveSessionObserver(); + /** * Requests a harvest complete event from harvester server. * On return, aURI is the URI of the harvested file. @@ -346,6 +375,11 @@ * Request queue processor. */ CHarvesterRequestQueue* iRequestQueue; + + /** + * Harvester session observer AO. + */ + CHarvesterSessionWatcher* iSessionWatcher; }; #endif // __HARVESTER_CLIENT_H__ diff -r 8e4539ab1889 -r c461c7fa72c2 mds_plat/harvester_framework_api/inc/monitorplugin.h --- a/mds_plat/harvester_framework_api/inc/monitorplugin.h Fri May 14 16:17:23 2010 +0300 +++ b/mds_plat/harvester_framework_api/inc/monitorplugin.h Thu May 27 13:18:43 2010 +0300 @@ -114,8 +114,8 @@ * { * // Our CMyActiveObjectNotifier notifies us about new file and we notify the Harvester server about it. * // Before this CMyActiveObjectNotifier has filled the need data to aHarvesterData like: - * // aHarvesterData->SetEventType( EHarvesterAdd ); - * // aHarvesterData->SetOrigin( aOrigin ); + * aHarvesterData->SetEventType( EHarvesterAdd ); + * aHarvesterData->SetOrigin( aOrigin ); * iObserver->MonitorEvent( aHarvesterData ); * } */ diff -r 8e4539ab1889 -r c461c7fa72c2 mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/conf/HarvesterClientTestScripter.cfg --- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/conf/HarvesterClientTestScripter.cfg Fri May 14 16:17:23 2010 +0300 +++ b/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/conf/HarvesterClientTestScripter.cfg Thu May 27 13:18:43 2010 +0300 @@ -410,3 +410,15 @@ delete test [Endtest] +[Test] +title Harvester Blacklist Test +timeout 180000 +create HarvesterClientTestScripter test +test SetUpBlacklist +test AddFileToBlacklist e:\testing\data\corrupt.jpg +test CheckBlacklist e:\testing\data\corrupt.jpg +test RemoveFileFromBlacklist e:\testing\data\corrupt.jpg +test TearDownBlacklist +delete test +[Endtest] + diff -r 8e4539ab1889 -r c461c7fa72c2 mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/HarvesterClientTestScripter.mmp --- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/HarvesterClientTestScripter.mmp Fri May 14 16:17:23 2010 +0300 +++ b/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/HarvesterClientTestScripter.mmp Thu May 27 13:18:43 2010 +0300 @@ -34,6 +34,8 @@ USERINCLUDE ../inc USERINCLUDE ../../../../../inc +USERINCLUDE ../../../../../harvester/common/inc/ +USERINCLUDE ../../../../../harvester/blacklistclient/inc/ MW_LAYER_SYSTEMINCLUDE @@ -42,4 +44,7 @@ LIBRARY mdeclient.lib LIBRARY stiftestinterface.lib LIBRARY stiftestengine.lib +LIBRARY harvestercommon.lib +LIBRARY blacklistclient.lib +LIBRARY efsrv.lib diff -r 8e4539ab1889 -r c461c7fa72c2 mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/HarvesterClientTestScripter.pkg --- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/HarvesterClientTestScripter.pkg Fri May 14 16:17:23 2010 +0300 +++ b/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/HarvesterClientTestScripter.pkg Thu May 27 13:18:43 2010 +0300 @@ -53,4 +53,5 @@ "..\..\data\mmc\HarvesterTest\MPEG4.3gp" -"E:\testing\data\MPEG4.3gp" "..\..\data\mmc\HarvesterTest\MPEG4.mp4" -"E:\testing\data\MPEG4.mp4" "..\..\data\mmc\HarvesterTest\00001.mp3" -"E:\testing\data\00001.mp3" +"..\..\data\mmc\HarvesterTest\corrupt.jpg" -"E:\testing\data\corrupt.jpg" diff -r 8e4539ab1889 -r c461c7fa72c2 mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/bld.inf --- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/bld.inf Fri May 14 16:17:23 2010 +0300 +++ b/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/bld.inf Thu May 27 13:18:43 2010 +0300 @@ -51,3 +51,4 @@ ../../data/mmc/HarvesterTest/Temp2.jpg /epoc32/WINSCW/C/Data/Temp2.jpg ../../data/mmc/HarvesterTest/Temp3.jpg /epoc32/WINSCW/C/Data/Temp3.jpg ../../data/mmc/HarvesterTest/00001.mp3 /epoc32/WINSCW/C/Data/00001.mp3 +../../data/mmc/HarvesterTest/corrupt.jpg /epoc32/WINSCW/C/Data/corrupt.jpg diff -r 8e4539ab1889 -r c461c7fa72c2 mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/inc/HarvesterClientTestScripter.h --- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/inc/HarvesterClientTestScripter.h Fri May 14 16:17:23 2010 +0300 +++ b/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/inc/HarvesterClientTestScripter.h Thu May 27 13:18:43 2010 +0300 @@ -27,6 +27,8 @@ #include "mdccommon.h" #include "mdesession.h" #include "mdequery.h" +#include "harvestermediaidutil.h" +#include "blacklistclient.h" // CONSTANTS @@ -142,6 +144,11 @@ virtual TInt Results( CStifItemParser& aItem ); virtual TInt AddHarvesterEventObserverL( CStifItemParser& aItem ); virtual TInt RemoveHarvesterEventObserverL( CStifItemParser& aItem ); + virtual TInt SetUpBlacklistL( CStifItemParser& aItem ); + virtual TInt TearDownBlacklistL( CStifItemParser& aItem ); + virtual TInt AddFileToBlacklistL( CStifItemParser& aItem ); + virtual TInt CheckBlacklistL( CStifItemParser& aItem ); + virtual TInt RemoveFileFromBlacklistL( CStifItemParser& aItem ); private: // Data // Status booleans @@ -162,6 +169,10 @@ RArray iObjectIdArray; TFileName iUri; + + RBlacklistClient iBlacklistClient; + CHarvesterMediaIdUtil* iMediaIdUtil; + RFs iFs; }; #endif // HARVESTERCLIENTTESTSCRIPTER_H diff -r 8e4539ab1889 -r c461c7fa72c2 mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/src/HarvesterClientTestScripterBlocks.cpp --- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/src/HarvesterClientTestScripterBlocks.cpp Fri May 14 16:17:23 2010 +0300 +++ b/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/src/HarvesterClientTestScripterBlocks.cpp Thu May 27 13:18:43 2010 +0300 @@ -77,6 +77,11 @@ ENTRY( "Results", CHarvesterClientTestScripter::Results ), ENTRY( "AddHarvesterEventObserver", CHarvesterClientTestScripter::AddHarvesterEventObserverL ), ENTRY( "RemoveHarvesterEventObserver", CHarvesterClientTestScripter::RemoveHarvesterEventObserverL ), + ENTRY( "SetUpBlacklist", CHarvesterClientTestScripter::SetUpBlacklistL ), + ENTRY( "TearDownBlacklist", CHarvesterClientTestScripter::TearDownBlacklistL ), + ENTRY( "AddFileToBlacklist", CHarvesterClientTestScripter::AddFileToBlacklistL ), + ENTRY( "CheckBlacklist", CHarvesterClientTestScripter::CheckBlacklistL ), + ENTRY( "RemoveFileFromBlacklist", CHarvesterClientTestScripter::RemoveFileFromBlacklistL ), }; const TInt count = sizeof( KFunctions ) / sizeof( TStifFunctionInfo ); @@ -489,6 +494,139 @@ } // ----------------------------------------------------------------------------- +// CHarvesterClientTest::SetUpBlacklistL +// ----------------------------------------------------------------------------- +// +TInt CHarvesterClientTestScripter::SetUpBlacklistL( CStifItemParser& /*aItem*/ ) + { + _LIT( KMsg1, "Enter SetUpBlacklistL" ); + iLog->Log( KMsg1 ); + RDebug::Print( KMsg1 ); + + User::LeaveIfError( iBlacklistClient.Connect() ); + iBlacklistClient.LoadBlacklistL(); + iMediaIdUtil = &RMediaIdUtil::GetInstanceL(); + User::LeaveIfError( iFs.Connect() ); + + _LIT( KMsg2, "Exit SetUpBlacklistL" ); + iLog->Log( KMsg2 ); + RDebug::Print( KMsg2 ); + + return KErrNone; + } + +// ----------------------------------------------------------------------------- +// CHarvesterClientTest::TearDownBlacklistL +// ----------------------------------------------------------------------------- +// +TInt CHarvesterClientTestScripter::TearDownBlacklistL( CStifItemParser& /*aItem*/ ) + { + _LIT( KMsg1, "Enter TearDownBlacklistL" ); + iLog->Log( KMsg1 ); + RDebug::Print( KMsg1 ); + + iBlacklistClient.CloseDBL(); + iBlacklistClient.Close(); + RMediaIdUtil::ReleaseInstance(); + iMediaIdUtil = NULL; + iFs.Close(); + + _LIT( KMsg2, "Exit TearDownBlacklistL" ); + iLog->Log( KMsg2 ); + RDebug::Print( KMsg2 ); + + return KErrNone; + } + +// ----------------------------------------------------------------------------- +// CHarvesterClientTest::AddFileToBlacklistL +// ----------------------------------------------------------------------------- +// +TInt CHarvesterClientTestScripter::AddFileToBlacklistL( CStifItemParser& aItem ) + { + _LIT( KMsg1, "Enter AddFileToBlacklistL" ); + iLog->Log( KMsg1 ); + RDebug::Print( KMsg1 ); + + TPtrC inputFile; + User::LeaveIfError( aItem.GetNextString( inputFile )); + + TUint32 mediaId( 0 ); + TTime modified ( 0 ); + + TRAPD( err, iBlacklistClient.AddL( inputFile, mediaId, modified ) ); + if( err != KErrNone ) + { + return err; + } + + _LIT( KMsg2, "Exit AddFileToBlacklistL" ); + iLog->Log( KMsg2 ); + RDebug::Print( KMsg2 ); + + return KErrNone; + } + +// ----------------------------------------------------------------------------- +// CHarvesterClientTest::CheckBlacklistL +// ----------------------------------------------------------------------------- +// +TInt CHarvesterClientTestScripter::CheckBlacklistL( CStifItemParser& aItem ) + { + _LIT( KMsg1, "Enter CheckBlacklistL" ); + iLog->Log( KMsg1 ); + RDebug::Print( KMsg1 ); + + TPtrC inputFile; + User::LeaveIfError( aItem.GetNextString( inputFile )); + + TUint32 mediaId( 0 ); + TTime modified ( 0 ); + + TBool isBlacklisted( EFalse ); + TRAP_IGNORE( isBlacklisted = iBlacklistClient.IsBlacklistedL( inputFile, mediaId, modified ) ); + if( !isBlacklisted ) + { + return KErrNotFound; + } + + _LIT( KMsg2, "Exit CheckBlacklistL" ); + iLog->Log( KMsg2 ); + RDebug::Print( KMsg2 ); + + return KErrNone; + } + +// ----------------------------------------------------------------------------- +// CHarvesterClientTest::RemoveFileFromBlacklistL +// ----------------------------------------------------------------------------- +// +TInt CHarvesterClientTestScripter::RemoveFileFromBlacklistL( CStifItemParser& aItem ) + { + _LIT( KMsg1, "Enter CheckBlacklistL" ); + iLog->Log( KMsg1 ); + RDebug::Print( KMsg1 ); + + TPtrC inputFile; + User::LeaveIfError( aItem.GetNextString( inputFile )); + + TUint32 mediaId( 0 ); + TTime modified ( 0 ); + + TRAPD( err, iBlacklistClient.RemoveL( inputFile, mediaId ) ); + if( err != KErrNone ) + { + return err; + } + + _LIT( KMsg2, "Exit CheckBlacklistL" ); + iLog->Log( KMsg2 ); + RDebug::Print( KMsg2 ); + + return KErrNone; + } + +// ----------------------------------------------------------------------------- // CHarvesterClientTest::HarvestingUpdated // ----------------------------------------------------------------------------- // diff -r 8e4539ab1889 -r c461c7fa72c2 mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/conf/MonitorPluginTest.cfg --- a/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/conf/MonitorPluginTest.cfg Fri May 14 16:17:23 2010 +0300 +++ b/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/conf/MonitorPluginTest.cfg Thu May 27 13:18:43 2010 +0300 @@ -53,6 +53,8 @@ test StartMonitoring request Monitor test CreateEvents +wait Monitor +request Monitor test CreateEventsDelete wait Monitor test StopMonitoring diff -r 8e4539ab1889 -r c461c7fa72c2 mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/corrupt.jpg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/corrupt.jpg Thu May 27 13:18:43 2010 +0300 @@ -0,0 +1,94 @@ +ZZZZ$Z$$$ZZ$$$$$77$777777777777777777777I77II7I?III?IIII???????+++????????++++++=++++++++++++++++++=++======+======+++++ +ZZZZZZZZ$$ZZ$77777777777III777777I7777IIIIIIIII??IIIIII???????++++???????++++++++++++?????++++++++++========+===~+=+++++ +ZZZZZZ$$$$$$77777$$77I77777777III77IIIIII7IIIII????II????I7$ZZZ$$7I???????++?+++++++++++++++++++++++==+=============++++ +$ZZ77$7$$$$$777777777777I7777IIII77I777III?III??????IDNNMNNNNNDDDNNNDDO7????+++++=++=++++++++=++++====+========~~===++++ +ZZ$$$7777$$$$$777777777777IIIIIIII7IIIIIIIIII?I??+IZNND8NNNMMMMNNNDDDNND8?+??+?++++++++++++++==+=+===++=======~~~====+++ +$$$$$$$$Z$$$$7777777777I7I?II??IIIIII?III???????$DMNN8O8NNNNNNNNMMMMND8DNMD$+++?++==++++++++=======~===========~~======+ +$$$$Z$$$$$$$7777I777IIIIII?IIIIIIIII?????+????ZNND8DDZZDDDDDDDNNNNNNMMMMNNNNNZ?++=====+++++++=====~~==~===~==~=~=~====== +$$$7$$$7$777III777IIIIIIIIIII??III??III???++?$MNNDDD8$O88DDDNMNNNNNNMMMMMMDNMMN7+=====+++++==========~~~~~~~~~~=~======+ +77777777777777IIIII7IIIII????????II?????++++$DN8Z7?+++=++???I$ODNNNMMMMMNNNNNMMM+=+===~==========~==~~~~~~~~~~~~=~====== +$$77777777777I77IIIIIIII????II?III?????++++I8N$I?+======++???I$O8DDNNNMMNNNMNMNMZ+=+==~===~~====~==~~~~~~~~~~~~~~~====== +$$77777777III77IIIIIIII??????I?I????+++++?I8NOI?=~~~~~~~~~==+?I7$ZDNNNNMMMMNNNMNMO+===~~===~~~~~~~~~~~~~~~~~~::~~======= +$$$$$$77II77IIIIIIIIIII?????????????+++++7NM87+=~:~~:~~~~~~==++I7$8DNNNMNMMMMMNMNMO=~=======~~~~~~~:~~~~~~:::::::~~===== +77777$$7IIII?II??II??????????++++??++===$NMNZI+=~~~~~~~~~~~==+?I7$OO8DNMNNNMNNMMNMM$==+++===~===~~~~~~~~:::::::::~~~==== +7II?I7I77III???+????++???????++????+==~+$DMD$I+=======~=====+???I7$ZO8DDNNMMNNMMMMMD???+++++++==~=~~~~=~~~~~:::::~~~==+= +777I777$7II???????++++??????+++???++==+IONM8$I+============+++??II7$ZZODNNNMMMMMMMMM7?I??????+=====~~~~~~~~~~::::~~~===+ +$7777$$ZZ7I7I??++?I?++?++???+++++++===7$DNNO7I++===~~=======++++++?I7$Z8NNNNNMNMNMMM8I7IIII7I+=====~+=~~::::~~~::~~~===+ +ZZZOOZ8OO$7III?II77I?+++++++++=====+=?78DMMZI?=+===~=~=~==++=+++???II7Z8NMMMMMMMNMNMD7$$$I77I????+++?=~~~~~~~::::::~==++ +O8888ZZZ88Z$$$$7777$7?I7?++=+=++====+7$8NMMOI?????+=+===?7$7IIIII77$ZZODNNMMMMMMNNMNN$OZ$7IIII?I??++?+?+=~~:~~:::::===++ +O8DD8OOOOOOOZ$$$$$Z$$$Z$7I++++++====?$Z8MMM87?I77$I++++?$ZOZZZZOZ$OOOOO8NNMMMMMMNNNMMOZ$ZZ$$777I??+??+?+=~~:~~~::::~==== +DDDD88OOOZZZZOOOZZOOOOZ$ZZ7+?+=++=++IOO8DNMDDDI777$ZI+?ZDDZ7$OOO8DMNO$ZODMMMNNNNMMMNMDOZZZZZ$III?I7$7I??=~~~~~~~:~==++++ +888888888OOOO8OZO8OOOZO$7$Z+?+=+++??IZDNNMMOZDIZNDO7I=I8O$I?IOZZZZ???I7O8MMNNMMMMMMMMNOOZZZZZ7$$$77$77I++~:::::~:~====+? +DD8D8O8OOO888OOOZ8D8O88ZZ8+???IZO$???ONNMMMZIIII$Z7?+=7ZZ7??I77$7I++?I7ODMMMMMMMMNNNMMO8OOOZ$7$$$77$777I?=~~~~~~~===+++? +8D88OO88OOO8888OODD888OOO8OZ7$OO$8Z7ZO8NMMN7?+=====+?+I77I?=~~~~~=??I7Z8DMMMMNMMMMMNNMZZZZZ$$777$$$Z$$$7I+==~==~=====++? +8DDDO88888888DDD8DD88DD8O888OZOZ$DO$OO8NMMM$?+====++++?II?+==~~~==?I7$Z8NMMMMNMMMMNNNMZZZZZZ$$Z$$$$ZZZ$7I?==========++?? +DD888D8OO8DDD8ODNDD88DDD8D8D8O8OODOO88DNNMM8I+=~==+++=?II?++====++I7$ZODNMMMNMMNMMNNNM77777I??I???????????++++++???????I +NMMNNNNNDDDND8D88DD8DDDDDD8DD8D8D8DNNNNNNMMD7+++==++++II7I?++==++?7$ZO8NNMMMNNNMMMMMNN88OOOOO$$$$$$$7I??I???++??III7$$7I +NMMNDDNNNDDDD88O88888D8DN8DDDDDDNNNMMNNNMMMMZ7++??I?=?777ZI++=+??I$ZOODNNMMMMMMMMMMMMNDD8O8OOOZZZZZZZ$ZZ$7I7777I7I7$$ZZZ +NNNNNDDNNDDDNDNDD888DD88DDDDDDDDDNNNNNMMMMMMD$II?++?$8NMND7++??II7ZO88DNMMMMMMMMMMMMMMNDDD888OOOOOO8OZ$Z$$$ZZZ$$$$$$$$ZZ +MMNMNDDNNNDDNDDDNDD8DD888D88DDDDNNNMNNNMMMMMNZ7II?==?NNN8ZI??III7$$ZO8DNMMMMMMMMMMMMMMN8OOOOOOOOZOOOZOZZZZOZZZZ$$$$$$ZZ$ +NNNMMNNDDNDDNDDDNND8DDDDDD88DDDDDNDNMMMMNMMMMO7I77?++I7$$77Z7IIII7ZZO8DNNMMMMMMMMMMMMNND888ZOOOZZZOOOOZZZZ$$77777$$ZZOO8 +MNNMNDDDNNNNNDDDDDD8DDNDDDDDDNNDNDDDNMMMNNMMMN7II7I?77$ZOOZ7I??II7ZO8DNNNMMMNNMMMMMMMNNN8OOZOZZZZZZZZZZZZ$$$$$$$$$$ZOOOO +NMMNDNNNNNDDDDDDDNNNNNMNDDDNDNNDD88DNNNNMMMMMMO7I?++IZZZZZ$77II7$$O8DDNNMMMMMMMMMMMMMNND8OOOOZZZOOZZZZZZZZZZZZZOOOZZZZZO +NMMNDNNNNNNDNDDDDNDNNNNNNNNDDDDDD88DNNMMMMMMMMNO$II??$$Z$77$777$ZZ8DDDNNMMMMMMMMMMMMMMDD8ZOO8OZZZ$ZZOOOOZZZZOOOOOOZOOZ$Z +NMMNNNNNNNNNNNNNDNNDDDDDD8D88D8D88O8NDDNMMMMMMMMNO7?+===?I777$ZO88DDDNMMMMMMMMMMMMMMMMND8O$ZZZ$$$$$ZOZOOZZZ$$$Z$$ZZ$ZOZZ +MNNMNNMNNNNNNNNNNNNNNNDDD888888888O8NNNMNNNMMNMMMMNOI++?I77$O88DDDDNNMMMMMMMMMMMMMMMMNNNDOZZZZ$$$$$$ZZZZOZ$$ZZOOO$$ZOZZO +NNMMMNMMMDDNNNNNNNNNDNNDDDDD88O8OOZ$8NNNMMMMMMMMMMMMNZZOO88DDDDDDNMMMNNNMMMNMMMMMMMMNMNNDZOZO8ZOOZZZOOZO8O8OOOOO8OZZZZ$$ +MMMNNNMMNNNDNDNNNNNNNDNNDDDDDD88OZZ$OMNMMMMMMMMMMMMMMMMMMMNNNMMMMMNNNNNNNNNMMMMMMMMMMNNNND88O8OOOOOZOOOO8OZO888888OZZZO8 +NMNNNMNMMMNDNNNNNNNND88DOO8OOZOOZZZ$ZDNMMMMMMMMMMMMMMMMNNMMMMMMNNNNNNDNDDNNMMMNMMMMMMNMMND88OOZZZZZ$OOO88OO8888O8O888OOO +MMMMMMMNMNNNNDDDDDDD8888D8OZZZZZZOZZO8NMMMMMMMMMMMMMMMN$ZO88DNNNDDD88OOO8DNNMMNMMMMNNNNNN8O8O8OOOO8OOOO8OZZZO88OOZOZZZO8 +MMMMMMMMMMNDNNNDD888OOO8OZ8OOOZOZZZZOOONMMNNMMMMMMMMMMMZI7$$OOO888OOZZZZZ8DNMNNNMMMMNNNMMDD8Z$77II7$77$$$$$$$77$7I??7$ZZ +NNMMMMMMMNDDND88D888O8OO8O88OOOOOOOO888NMMMNMMMMMMMMMMMD7II77$ZZZZZZ$$77$Z8NNDNMNNMNDNNMMMN8DD8O8O8OZZ7I77Z$77777$$ZOZ7$ +NNNNNNNNNNNND88DNNDDNNNNNOOOOOOOZOZONDDMMMMMMMMMMMMMMMN8$7III777$$777I7I7$Z8NNNNNNNN88MMMMMNMND888DNZOO8DNZ77II777ZZ$7$O +NNNNNNDNDDD88888D8DNNNNNMDD8O8DD8DNDNNMMMMMMMMMMMMMMMDOZ$7II?I7777IIIII?7$$ODNDDDDDN88MNNMMNNND8OO8NODD8DN8O7II77$Z$$7$O +NNNNNNNNDDDDD888D8NDDDO8NMNMNNNMNNMMNNNMMMMMMMMMMMNDO7I?I????????I?++????I7Z8DDNN88N8DMNMNNMNDDNNNND88ZZOOZZ7II?IZ$ZZ7$$ +NNNNNNNNNDDDD8DDNNDDDND8NMMMMMMNMNNMMMMMMMMNMMMNNZ$$7???++?+????+++++++++?I$O8NDDZ8D8DNNNNMMNDD8OZZZ7III???III7ZZ$ZOZZZ8 +MMNDDNMMNNND8DNDNNNDD8DDNMNDNMMMMNMMMMMMMMMMMM8$7I???=++=++++++++==+==+++I7ZDDDDOZ8D8NNNNNNNNMND8888O7+?I?7$$77$$$$ZOOOO +NMMNNNNMNNNDDDNDDDD8888NMMNDNMMMMMMMMMMMMMMMMMZIII++++++==+=+++++==+++????7Z888DOZ8DDNNNNNNNNMNND88D8$?IIII777$$Z$$$Z$$$ +NNNNNNMNNDDDNDDD8O8O8DDNMNNNNMMMMNNNMMMMMMMNNN7I?+++========++========++??I$8OO88O8DNMNNNNMDDNNMNDDDOO$I$7I??II??I777777 +NNNMNNNND8DDD8DDO8D8DNDNDDNNDDNMNNNMMMMMMMNNNOI+++++=~~=====+====~=====+?I$$8DO88O8NNMNNNDD88DDDNNNN8OO8Z$77Z7?7O777$O$$ +NDNNNDNNND8888O8OO8O8DDDNNDDDNNDNNMMMMMMNDDDO$?+==============~====+++++?I$8O888888MMMNN8ZZZ88DDNMMNND8Z$$IIIIII?IIII??? +NNNMNDMMNM8Z8$ZOOO8OODDDDD888DNNMMMMMMMM8OZZO7++======~~~=======~~==++?+?I$ZOO8D88DND888OZOZ7ZZZO8DNMMMND88888Z77777I?I? +NNNNNDMMNMDDN$ZOZZOOZO88DN888DMMMMMMMMMMOZZ$$?=+===========~=====~===+++?I$ZOO8DDD8OOZ$$$7$$$8DDDDNMNNMMMD8O88OZ$$$OO77$ +NNNNNNMMNNNDNMN8OZZO88O8D88DNMMMMMMMMMMNZ7II?+==========~======~=~===++??7ZOO888O$7$$$$I?IIII$O8DNMMMMMMMMNDD8ODD88888DO +DDNNDDNDDNNNNNNDNDOOOOOOO88MMMMMMMMMMMN8$III+===~=========~~=~~~==~==++?I$$ZZZZOOOZ7I?7$O888DNNNNNNMMMMMMMMNNDD88DNNDO$I +NNNNDDDNNNDNNNNNN88DDD8OZ$MMMMMMMMMMMMND7?++=======+===~~~~~~~~=~~~~~=+??7$$ZOO$7$ZO8DDNNNMMMMMMMMMMMMMMMMMMMD88DDD8888D +DNNNNNNNDDDDDNDDDDD888OZ$8MMMMMMMMMMMNDD87?++=~~=++++=~~~~~~~:~~~~~~===+?7ZZ$ZZODNNMNNDDNNNNMMMMMMMMMMMMMMMMMNMD8888DND8 +DNNNNNNNNND88D8888OZ$ZZZ8NMMMMMMMMMMNNDDDO$I?+===+?++==~~~~~~~~~~~~====?7$ZOO8DDNNNNDDMMMMMMMMMMMMMMMMMMMMMNNNMN888888D8 +NNDDND888OOO888OOOOO88DMMMMMMMMMMMMMNDD8DOOOD87I?I?+=~~~~~~=~~~~~===+I$ZOO8DNNMNNNNMMMMMMMMNMMMMMMMMMMMMMMMNMNMNDOOZOZO8 +NDND888O8888DO888DDDDMMMMMMMMMMMMMMNND88D8DD8888DDD8O7III?++=+==++I$$Z88ODMMNNNMMMMNNMNDNNNNMMMMMMMMMNMMMMMMMNNMMOOOZZ88 +NDDD8D8O8DDDD88888D8MMMMMMMMMMMMMMNDDDDDNNNDD8D8888OOOOOOOOO8OO8OZO8OODMD8NMMMMMMMMNNN8NNNNNMMMMMMMMMMMMMMMMMMMNMDDNDNDD +NNDDDDDD8888OOZOOZZZMMMMMMMMMMMMMNDNDNNDMMD8DD8O8OO8D888888D888888ODMMNDNMNMMMMMMNNNN8NMNNNNMMMMMMMMMMMMMMMMMMMMNNDDDDD8 +MMNDDD888888O8OOOZ$$MMMMMMMMMMMMMNDDNNNDMMDDDNDD8OOO88888D8DDD8DD8DNNNNMMMMMMMMMNNNMD8NMDNNNMMNNDNNNMMMMMMMMMMMMNM8O88D8 +MMMNNNDDD8888888DDDDMMMMMMMMMMMMMNNNMNDNMNNMNMD8D88DDD88DND8NNNDDNDNMMMMMMMMMMMMNNNNDNNDDNN8OODNDDNDNNMMNMMMMNNNMMNOOO88 +MMMNNNNNNDNDDDDDD8DDMMMMMMMMMMMMMNNMMNMMMNMMMNDDDD8DD88NNMNMD8NNDNMMMMMMMMMMMMNNNMNNNMNND88O888NNNNNDNNMMMMMMMNMNNMDOZZZ +MMMMMNNNNNNNNDDDDDDDMMMMMMMMMMMMMMMMMMMMNMMMMMNNNNNMNNNNMMMNNMNNMMMMMMMMMMMMMMMMMMMMMMDNND8O8D8N88DNNMMMMMMMNNNMMMMMNNND +MMMMNNNDDNDNNDDDNNNMMMMMMMMMMMMMMMMMMMMMNMMMMNNNMNNMNNNNMNNNNNMNNMMMMMMMMMMMMMMMMMMMMNNNDDO888O888DNMMMMMMMMNNNNNMNMMMNN +MMMNDD8D8888OOOO8DNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMNMMMMMNNNMNNNMMMMNMMMMMMMMMMMMMMMMNDND888888DNDNMMMNMMMMMMMNNNNNNMMD88 +MMD8888OOOO88OO88DNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNNNMMMMMMMMMMMMMMMMMMMMMMNDDDDD8ODDDNMMMMMMMMMMMMMNNNDNMMMMN88 +MD8D888888OOOOOO8NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNMMMMMMMMMMMMMMMMMMMMMMNNNDNND888DMMMNMMMMMMMMMMMMNNNNNNNNMDO +88DDD88888OOO888MMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMNNMMMMMMMMMMMMMMMMMMMMNMNNNNDDNNDNNNMMNMMMMMMMMMMMMMMNNNNNMNNMN8 +DDDDDDDDDD888DDNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMMMMMMMMMMMMNNNNDNNNNNMMMMMMMMMMMMMMMMMMMNNNNNNNMMNN +NMMMMMMNNNNNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMMNMMMMMMMMMMMMNNNNMMMNNNN +MMMNNMNNNNNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNMMNMMMMMMMMMMMMMMMMMMMMMMMNNNMMMMMMN +NMMMMMNNNNMMMMMMMMMMMMMMMNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNMNNMMMMMMMMMMMMMMMMMMMMMMMMNNNNNNMMMN +NMMMNNMMMMMMMMMMMMMMMMMMMNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMNNNMNNNMMMNNNM +NNMMMMMMMMMMMMMMMMMMMMNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMMMMNMMMMMMMMMMMMMMMNNMMNNMMMNNNN +NMMMMMMMMMMMMMMMMMMMMMMMNNNMMMMMMMMMMMMMMMMMMMMMMMMMMNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMMMMMNMMMMMMNNN +NMMMMMMMMMMMMMMMMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNMMMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMNMMNMMMMNN +NMMNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNMMMMMMMMMMMMMMMNNMNN +NMMMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNMMMMMMMMMMMMMMMMMMMNN +NMMMMMMMMMMMMMMNNMMMNDDDNMMMMMMMMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNMMNMNNMNM +MMMMMMMMMMMMMNNND88NMMMMNDDMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNNNNMMMMNN +NMMMMMMMMMMNNNNNDDMMDDDNNNNNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNMMMMMMMMMNMMNNNMNNNNNNNNN +MMMMMMMMMMMMMMNNNMNODNND88NODD8DMNMND8OODDNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNNNNNNMNNN +NMMMMMMMMMMMMMDDNDOOMMND8N8DDODMN8O$III77$Z8DMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNMNNNNNNMM +NMMMMMMMMMMMMN8NDNNNNDONMNNO8MDZ8IIIIIII77$$$7ZODNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNMNNMNNN +MMMMMMMMMMMMMNMDDMNMODMM8DNMMNOD$777IIII777777$$$$77$DMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNNMMNNMNN +NMMMMMMMMMMMMNDNMNN8MMMNMNMNMD88$$777777777777777$$77$$8NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNNMMMNNNNN +NMMMMMMMMMMMMMMMMMDNNMMNMDMNMNNDZ$$$$$$$$7777777777$$$$$ZZZZNMMMMMMNNMMMMMMMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMMMMMNNNMNNNNNNN +NMMMMMMMMMMMMMMMMNNNMMNNNDMMNNM8ZZZZZ$$Z$$777777$$77$$$$77$$Z8NMMMMMNMMMMMMMMMMMMMMMMMMMMMMNMMNMMMMMMMMNMMMMNNNNNNNNMMNN +NNNMMMMMMMMMMMMMMMMMMMNMMMMMNNMND8888OOZZ$$$$$$7777777777777$$ZO88MNMNMMMMMMMMNNNDD8O8NNMMNNNMMMNMMMMMMNNMNNMNNNNNNNNNNN +NMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMMMDDNDD88ZZZ$$$$$7$$$$77$ZZ$7III$8NDNNMN8ZO8O88NMND888NNND8O88NNMMMMMMMMNMMNNNNNNNNNNNNNN +NNNNMMMMMMMMMMMMMMMMMMMMMMNMMMMMMMMMMNN8ZZZZZ$$$$Z$$$$$ZODD8777$7$D88D8OZZO8DD8O88DND88DNNNNNNNMMMMMMMMMMMNMMNMNNNMMMNNN +NMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMD888OOZZZZZ$$ZZZZ$$ZZ8NNOZ$$$$DDDDDNDOODDDDDDDDDDD8DNNDNNNNNMMMMMMMMMMMMMNNNNNNNMMNN \ No newline at end of file diff -r 8e4539ab1889 -r c461c7fa72c2 mds_plat/location_manager_api/tsrc/conf/LocationManagerTestScripter.cfg --- a/mds_plat/location_manager_api/tsrc/conf/LocationManagerTestScripter.cfg Fri May 14 16:17:23 2010 +0300 +++ b/mds_plat/location_manager_api/tsrc/conf/LocationManagerTestScripter.cfg Thu May 27 13:18:43 2010 +0300 @@ -190,22 +190,8 @@ [Endtest] [Test] -title Tracklog Observer test -timeout 60000 -create LocationManagerTestScripter test -test SetupTrackLog -test AddObserver -test AddObserver -test AddObserver -test RemoveObserver -test RemoveObserver -test TearDownTrackLog -delete test -[Endtest] - -[Test] title Start Stop Tracklog Recording -timeout 60000 +timeout 80000 create LocationManagerTestScripter test test SetupTrackLog test AddObserver @@ -223,8 +209,22 @@ [Endtest] [Test] +title Tracklog Observer test +timeout 60000 +create LocationManagerTestScripter test +test SetupTrackLog +test AddObserver +test AddObserver +test AddObserver +test RemoveObserver +test RemoveObserver +test TearDownTrackLog +delete test +[Endtest] + +[Test] title Start Stop Tracklog Recording 2 -timeout 60000 +timeout 240000 create LocationManagerTestScripter test test SetupTrackLog test AddObserver diff -r 8e4539ab1889 -r c461c7fa72c2 mds_plat/metadata_engine_api/inc/mdeconstants.h --- a/mds_plat/metadata_engine_api/inc/mdeconstants.h Fri May 14 16:17:23 2010 +0300 +++ b/mds_plat/metadata_engine_api/inc/mdeconstants.h Thu May 27 13:18:43 2010 +0300 @@ -35,6 +35,7 @@ _LIT( KItemTypeProperty, "ItemType" ); _LIT( KTitleProperty, "Title" ); _LIT( KTimeOffsetProperty, "TimeOffset" ); + _LIT( KInDefaultFolder, "InDefaultFolder" ); enum TOrigin { diff -r 8e4539ab1889 -r c461c7fa72c2 metadataengine/client/src/mdeobject.cpp --- a/metadataengine/client/src/mdeobject.cpp Fri May 14 16:17:23 2010 +0300 +++ b/metadataengine/client/src/mdeobject.cpp Thu May 27 13:18:43 2010 +0300 @@ -276,6 +276,7 @@ } iUri = HBufC::NewL( aUri.Length() ); + // Note: CopyLC doesn't push anything to cleanup stack iUri->Des().CopyLC( aUri ); iFlags |= EMdEObjectFlagModObject; } diff -r 8e4539ab1889 -r c461c7fa72c2 metadataengine/client/src/mdesessionimpl.cpp --- a/metadataengine/client/src/mdesessionimpl.cpp Fri May 14 16:17:23 2010 +0300 +++ b/metadataengine/client/src/mdesessionimpl.cpp Thu May 27 13:18:43 2010 +0300 @@ -1338,6 +1338,7 @@ { const TDesC& uri = *((*aObjects)[i]); HBufC* lcUri = HBufC::NewLC( uri.Length() ); + // Note: CopyLC doesn't push anything to cleanup stack lcUri->Des().CopyLC( uri ); buffer->InsertL( *lcUri ); CleanupStack::PopAndDestroy( lcUri ); diff -r 8e4539ab1889 -r c461c7fa72c2 metadataengine/server/inc/mdslogger.h --- a/metadataengine/server/inc/mdslogger.h Fri May 14 16:17:23 2010 +0300 +++ b/metadataengine/server/inc/mdslogger.h Thu May 27 13:18:43 2010 +0300 @@ -57,6 +57,10 @@ _LIT(KFilename, "server.txt"); _LIT(KAltFilename, "server2.txt"); +#ifdef LOG_QUERY +#define MDE_FILE_LOGGING +#endif + // CLASS DECLARATION /** * CMdSLogger. diff -r 8e4539ab1889 -r c461c7fa72c2 metadataengine/server/inc/mdsmanipulationengine.h --- a/metadataengine/server/inc/mdsmanipulationengine.h Fri May 14 16:17:23 2010 +0300 +++ b/metadataengine/server/inc/mdsmanipulationengine.h Thu May 27 13:18:43 2010 +0300 @@ -32,7 +32,7 @@ class CMdSSqlObjectManipulate; // CONSTANT DECLARATION -const TInt KGarbageCollectionDelay = 60; // 1 minute +const TInt KGarbageCollectionDelay = 90; // 1,5 minutes // CLASS DECLARATION @@ -342,6 +342,10 @@ CMdSGarbageCollector* iGarbageCollector; CMdSObjectLockList& iLockList; + + //For DB maintenance + TInt iAddedObjectsCount; + TInt iModifiedObjectsCount; }; #endif //__MDSMANIPULATIONENGINE_H__ diff -r 8e4539ab1889 -r c461c7fa72c2 metadataengine/server/inc/mdsserversession.h --- a/metadataengine/server/inc/mdsserversession.h Fri May 14 16:17:23 2010 +0300 +++ b/metadataengine/server/inc/mdsserversession.h Thu May 27 13:18:43 2010 +0300 @@ -394,6 +394,9 @@ CMdCSerializationBuffer* CombineBuffersL( CMdCSerializationBuffer& aLeftBuffer, CMdCSerializationBuffer& aRightBuffer ); + + CMdCSerializationBuffer* CombineUriNotificationsBuffersL( + CMdCSerializationBuffer& aLeftBuffer, CMdCSerializationBuffer& aRightBuffer ); CMdCSerializationBuffer* CombineItemBuffersL( CMdCSerializationBuffer& aLeftBuffer, CMdCSerializationBuffer& aRightBuffer ); diff -r 8e4539ab1889 -r c461c7fa72c2 metadataengine/server/inc/mdssqlobjectmanipulate.h --- a/metadataengine/server/inc/mdssqlobjectmanipulate.h Fri May 14 16:17:23 2010 +0300 +++ b/metadataengine/server/inc/mdssqlobjectmanipulate.h Thu May 27 13:18:43 2010 +0300 @@ -483,6 +483,11 @@ RArray& aObjectIds); void CheckMassStorageMediaIdL( const TUint32 aMediaId ); + + /** + * Analyze the database after enough items have been added or modified + */ + void AnalyzeL(); protected: // personal methods @@ -579,6 +584,8 @@ TBuf<256> iLastAddedObjName; + TBool iDictionaryToBeCleaned; + private: class RClauseBuffer { diff -r 8e4539ab1889 -r c461c7fa72c2 metadataengine/server/src/mdsgarbagecollector.cpp --- a/metadataengine/server/src/mdsgarbagecollector.cpp Fri May 14 16:17:23 2010 +0300 +++ b/metadataengine/server/src/mdsgarbagecollector.cpp Thu May 27 13:18:43 2010 +0300 @@ -99,14 +99,12 @@ if ( startAgain ) { - iTimer.After( iStatus, iDelay ); // start timer - SetActive(); - } - else if ( iNewDelay.Int() > 0 ) - { - iDelay = iNewDelay; - iNewDelay = 0; - iTimer.After( iStatus, iDelay ); // start timer + if( iNewDelay.Int() > 0 ) + { + iDelay = iNewDelay; + iNewDelay = 0; + } + iTimer.After( iStatus, iDelay ); // start timer SetActive(); } } diff -r 8e4539ab1889 -r c461c7fa72c2 metadataengine/server/src/mdsmanipulationengine.cpp --- a/metadataengine/server/src/mdsmanipulationengine.cpp Fri May 14 16:17:23 2010 +0300 +++ b/metadataengine/server/src/mdsmanipulationengine.cpp Thu May 27 13:18:43 2010 +0300 @@ -31,6 +31,7 @@ #include "mdcserializationbuffer.h" #include "mdeinternalerror.h" #include "mdeerror.h" +#include "mdscommoninternal.h" // for CleanupResetAndDestroyPushL #include @@ -168,6 +169,7 @@ if (err == KErrNone) { aResultBuffer.InsertL( id ); + iAddedObjectsCount++; } else { @@ -295,6 +297,28 @@ iManipulate->SetNamespace( NULL ); iNotifier.NotifyAddedL( aBuffer, aResultBuffer ); + + if( iAddedObjectsCount > KTriggerDbMaintenanceTreasholdValue ) + { + RMdSTransaction transaction( connection ); + CleanupClosePushL(transaction); + const TInt beginError( transaction.Error() ); + + if( beginError != KErrNone ) + { + CleanupStack::PopAndDestroy( &transaction ); + } + + iManipulate->AnalyzeL(); + + if( beginError == KErrNone ) + { + transaction.CommitL(); + CleanupStack::PopAndDestroy( &transaction ); + } + + iAddedObjectsCount = 0; + } } // --------------------------------------------------------------------------- @@ -605,6 +629,7 @@ if (err == KErrNone) { aResultBuffer.InsertL( id ); + iModifiedObjectsCount++; } else { @@ -689,6 +714,28 @@ resultIds.SerializeL( aResultBuffer ); iNotifier.NotifyModifiedL( aBuffer, aResultBuffer ); + + if( iModifiedObjectsCount > KTriggerDbMaintenanceTreasholdValue ) + { + RMdSTransaction transaction( connection ); + CleanupClosePushL(transaction); + const TInt beginError( transaction.Error() ); + + if( beginError != KErrNone ) + { + CleanupStack::PopAndDestroy( &transaction ); + } + + iManipulate->AnalyzeL(); + + if( beginError == KErrNone ) + { + transaction.CommitL(); + CleanupStack::PopAndDestroy( &transaction ); + } + + iModifiedObjectsCount = 0; + } } CMdCSerializationBuffer* CMdSManipulationEngine::CheckObjectL( diff -r 8e4539ab1889 -r c461c7fa72c2 metadataengine/server/src/mdsschema.cpp --- a/metadataengine/server/src/mdsschema.cpp Fri May 14 16:17:23 2010 +0300 +++ b/metadataengine/server/src/mdsschema.cpp Thu May 27 13:18:43 2010 +0300 @@ -100,6 +100,7 @@ iBaseObject->AddPropertyL( MdeConstants::Object::KLastModifiedDateProperty, EPropertyTime, KMinTInt64, KMaxTInt64, EFalse, ETrue, EFalse ); iBaseObject->AddPropertyL( MdeConstants::Object::KItemTypeProperty, EPropertyText, TInt32(0), TInt32(255), EFalse, EFalse, EFalse ); iBaseObject->AddPropertyL( MdeConstants::Object::KTitleProperty, EPropertyText, TInt32(0), TInt32(255), EFalse, EFalse, EFalse ); + iBaseObject->AddPropertyL( MdeConstants::Object::KInDefaultFolder, EPropertyBool, TInt32(0), TInt32(1), EFalse, EFalse, EFalse ); TInt propcount = iBaseObject->GetPropertiesCount(); iBaseObject->iCol2Prop.Reset(); @@ -203,7 +204,7 @@ void CMdsSchema::CreateObjectTablesL() { - _LIT( KBaseObjectDefinition, "CREATE TABLE IF NOT EXISTS %S%u(ObjectId INTEGER PRIMARY KEY AUTOINCREMENT,ObjectDefId INTEGER NOT NULL,Flags INTEGER,MediaId LARGEINT,UsageCount LARGEINT DEFAULT 0,GuidHigh LARGEINT,GuidLow LARGEINT,URI TEXT NOT NULL COLLATE NOCASE,Origin INTEGER,Size LARGEINT,TimeOffset INTEGER,CreationDate LARGEINT,LastModifiedDate LARGEINT,ItemType TEXT,Title TEXT,UNIQUE(GuidHigh,GuidLow),UNIQUE(URI,MediaId));" ); + _LIT( KBaseObjectDefinition, "CREATE TABLE IF NOT EXISTS %S%u(ObjectId INTEGER PRIMARY KEY AUTOINCREMENT,ObjectDefId INTEGER NOT NULL,Flags INTEGER,MediaId LARGEINT,UsageCount LARGEINT DEFAULT 0,GuidHigh LARGEINT,GuidLow LARGEINT,URI TEXT NOT NULL COLLATE NOCASE,Origin INTEGER,Size LARGEINT,TimeOffset INTEGER,CreationDate LARGEINT,LastModifiedDate LARGEINT,ItemType TEXT,Title TEXT,InDefaultFolder INTEGER,UNIQUE(GuidHigh,GuidLow),UNIQUE(URI,MediaId));" ); _LIT( KCreateRelationsTable, "CREATE TABLE IF NOT EXISTS Relations%u(RelationId INTEGER PRIMARY KEY AUTOINCREMENT,Flags INTEGER,RelationDefId INTEGER NOT NULL,LeftObjectId INTEGER NOT NULL,RightObjectId INTEGER NOT NULL,Parameter INTEGER,GuidHigh LARGEINT,GuidLow LARGEINT,LastModifiedDate LARGEINT);" ); _LIT( KCreateEventsTable, "CREATE TABLE IF NOT EXISTS Event%u(EventId INTEGER PRIMARY KEY AUTOINCREMENT,ObjectId INTEGER NOT NULL, EventDefId INTEGER NOT NULL, Timestamp INTEGER NOT NULL, Source TEXT, Participant TEXT);" ); _LIT( KCreateTxtSrchTable, "CREATE TABLE IF NOT EXISTS TextSearch%u(WordId INTEGER NOT NULL,ObjectId INTEGER NOT NULL,Position INTEGER);" ); diff -r 8e4539ab1889 -r c461c7fa72c2 metadataengine/server/src/mdsserver.cpp --- a/metadataengine/server/src/mdsserver.cpp Fri May 14 16:17:23 2010 +0300 +++ b/metadataengine/server/src/mdsserver.cpp Thu May 27 13:18:43 2010 +0300 @@ -365,10 +365,10 @@ CMdSSqLiteConnection* conn = CMdSSqLiteConnection::NewLC(); iDefaultDBConnection = conn; MMdSDbConnectionPool::SetDefaultDB( conn ); - - CMdSMaintenanceEngine::InitConnectionL(); CleanupStack::Pop( conn ); + CMdSMaintenanceEngine::InitConnectionL(); + iNotifier = CMdSNotifier::NewL(); InitializeL(); diff -r 8e4539ab1889 -r c461c7fa72c2 metadataengine/server/src/mdsserversession.cpp --- a/metadataengine/server/src/mdsserversession.cpp Fri May 14 16:17:23 2010 +0300 +++ b/metadataengine/server/src/mdsserversession.cpp Thu May 27 13:18:43 2010 +0300 @@ -866,6 +866,7 @@ delete findEngine; iFindEngines.Remove( findEngineIndex ); + iFindEngines.Compress(); } } break; @@ -984,6 +985,7 @@ // The cache holds a new notification for this notifier, trigger it CNotificationCacheItem* item = iNotificationCache[mid]; iNotificationCache.Remove(mid); + iNotificationCache.Compress(); CleanupStack::PushL( item ); @@ -1023,6 +1025,7 @@ delete iNotificationCache[i]->iData; iNotificationCache[i]->iData = NULL; iNotificationCache.Remove(i); + iNotificationCache.Compress(); } } } @@ -1089,6 +1092,95 @@ return buffer; } +// --------------------------------------------------------------------------- +// CacheNotificationL caches a notifier event +// --------------------------------------------------------------------------- +// + +CMdCSerializationBuffer* CMdSServerSession::CombineUriNotificationsBuffersL(CMdCSerializationBuffer& aLeftBuffer, + CMdCSerializationBuffer& aRightBuffer ) + { + // IDs are always stored in object IDs, + // even if those are actually relation or event IDs + + aLeftBuffer.PositionL( KNoOffset ); + aRightBuffer.PositionL( KNoOffset ); + + const TMdCItemIds& leftItemIds = TMdCItemIds::GetFromBufferL( aLeftBuffer ); + const TMdCItemIds& rightItemIds = TMdCItemIds::GetFromBufferL( aRightBuffer ); + + // check that namespaces match + if ( leftItemIds.iNamespaceDefId != rightItemIds.iNamespaceDefId ) + { + return NULL; + } + + // create new buffer, which will contain combined results + const TInt leftBufferSize = aLeftBuffer.Size(); + const TInt rightBufferSize = aRightBuffer.Size(); + CMdCSerializationBuffer* buffer = CMdCSerializationBuffer::NewLC( + leftBufferSize + rightBufferSize ); + + TMdCItemIds combinedItemIds; + + // use left buffer's data as base line + Mem::Copy( &combinedItemIds, &leftItemIds, sizeof( TMdCItemIds ) ); + + // and add right buffer's count + combinedItemIds.iObjectIds.iPtr.iCount += rightItemIds.iObjectIds.iPtr.iCount; + + combinedItemIds.SerializeL( *buffer ); + + // move left and right buffer to begin of items + aLeftBuffer.PositionL( leftItemIds.iObjectIds.iPtr.iOffset ); + aRightBuffer.PositionL( rightItemIds.iObjectIds.iPtr.iOffset ); + + // copy IDs from left and right buffers to combined buffer + for (TInt i = 0; i < leftItemIds.iObjectIds.iPtr.iCount; ++i) + { + TItemId id; + aLeftBuffer.ReceiveL( id ); + buffer->InsertL( id ); + } + + for (TInt i = 0; i < rightItemIds.iObjectIds.iPtr.iCount; ++i) + { + TItemId id; + aRightBuffer.ReceiveL( id ); + buffer->InsertL( id ); + } + + //Add combined URI count + TUint32 leftUriCount ( 0 ); + aLeftBuffer.ReceiveL( leftUriCount ); + TUint32 rightUriCount ( 0 ); + aRightBuffer.ReceiveL( rightUriCount ); + buffer->InsertL( TUint32( leftUriCount + rightUriCount) ); + + //Add uris + HBufC* uri = NULL; + for( TInt i( 0 ); i < leftUriCount; i++ ) + { + //Get uri + uri = aLeftBuffer.ReceiveDes16L(); + CleanupStack::PushL( uri ); + buffer->InsertL( *uri ); + CleanupStack::Pop( uri ); + } + + for( TInt i( 0 ); i < rightUriCount; i++ ) + { + //Get uri + uri = aRightBuffer.ReceiveDes16L(); + CleanupStack::PushL( uri ); + buffer->InsertL( *uri ); + CleanupStack::Pop( uri ); + } + + CleanupStack::Pop( buffer ); + return buffer; + } + CMdCSerializationBuffer* CMdSServerSession::CombineItemBuffersL( CMdCSerializationBuffer& aLeftBuffer, CMdCSerializationBuffer& aRightBuffer ) { @@ -1176,7 +1268,13 @@ { CMdCSerializationBuffer* data = NULL; // combine buffers - if ( notificationItem.iCode != ERelationItemNotifyRemove ) + if( notificationItem.iCode == EObjectNotifyAddWithUri || + notificationItem.iCode == EObjectNotifyModifyWithUri || + notificationItem.iCode == EObjectNotifyRemoveWithUri ) + { + data = CombineUriNotificationsBuffersL( *notificationItem.iData, *aData ); + } + else if ( notificationItem.iCode != ERelationItemNotifyRemove ) { data = CombineBuffersL( *notificationItem.iData, *aData ); } diff -r 8e4539ab1889 -r c461c7fa72c2 metadataengine/server/src/mdssqliteconnection.cpp --- a/metadataengine/server/src/mdssqliteconnection.cpp Fri May 14 16:17:23 2010 +0300 +++ b/metadataengine/server/src/mdssqliteconnection.cpp Thu May 27 13:18:43 2010 +0300 @@ -75,8 +75,8 @@ void CMdSSqLiteConnection::OpenDbL( const TDesC& aDbFileName ) { - _LIT8( KMdsSqlDbaConfig, "cache_size=8000; page_size=2048; encoding=\"UTF-16\";"); - _LIT8( KBlacklistSqlDbaConfig, "cache_size=4000; page_size=1024; encoding=\"UTF-16\";"); + _LIT8( KMdsSqlDbaConfig, "cache_size=2000; page_size=2048; encoding=\"UTF-16\";"); + _LIT8( KBlacklistSqlDbaConfig, "cache_size=1500; page_size=1024; encoding=\"UTF-16\";"); delete iDbFileName; iDbFileName = NULL; // in case AllocL leaves @@ -639,6 +639,15 @@ } } +void CMdSSqLiteConnection::DoAnalyzeL() + { + _LIT( KAnalyze, "ANALYZE;"); + + RRowData emptyRow; + CleanupClosePushL( emptyRow ); + ExecuteL(KAnalyze, emptyRow); + CleanupStack::PopAndDestroy( &emptyRow ); + } TInt CMdSSqLiteConnection::DeleteAndReCreateDB( const HBufC* aDbFileName, const RSqlSecurityPolicy& asqlSecurityPolicy, diff -r 8e4539ab1889 -r c461c7fa72c2 metadataengine/server/src/mdssqlobjectmanipulate.cpp --- a/metadataengine/server/src/mdssqlobjectmanipulate.cpp Fri May 14 16:17:23 2010 +0300 +++ b/metadataengine/server/src/mdssqlobjectmanipulate.cpp Thu May 27 13:18:43 2010 +0300 @@ -3309,14 +3309,13 @@ TBool CMdSSqlObjectManipulate::DoGarbageCollectionL() { - _LIT( KDeleteObject, "DELETE FROM Object%u WHERE Flags&?;" ); + _LIT( KDeleteObject, "DELETE FROM Object%u WHERE ObjectId IN (SELECT ObjectId FROM Object%u WHERE Flags&? LIMIT 100);" ); _LIT( KUpdateDeleteObject, "UPDATE Object%u SET Flags=Flags|? WHERE Flags&?;" ); _LIT( KDeleteRelations, "DELETE FROM Relations%u WHERE Flags&?;" ); _LIT( KUpdateDeleteRelations, "UPDATE Relations%u SET Flags=Flags|? WHERE Flags&?;" ); _LIT( KUpdateDeleteContextObjects, "UPDATE Object%u SET Flags=Flags|? WHERE ObjectId IN ( SELECT ObjectId FROM Object%u AS O WHERE Flags&? AND UsageCount=0 AND ( SELECT count(*) FROM Relations%u WHERE NOT Flags&? AND ( LeftObjectId = O.ObjectId OR RightObjectId = O.ObjectId ) )= 0 );" ); _LIT( KDeleteWordFromTextSearchDict, "DELETE FROM TextSearchDictionary%u WHERE NOT EXISTS(SELECT WordId FROM TextSearch%u WHERE WordId = TextSearchDictionary%u.WordId);"); - RClauseBuffer commonClauseOne(*this, KUpdateDeleteContextObjects().Length() + 3 * KMaxUintValueLength); CleanupClosePushL( commonClauseOne ); CMdsClauseBuffer& buffer = commonClauseOne.BufferL(); @@ -3325,34 +3324,11 @@ CleanupClosePushL( rowDataDel ); rowDataDel.AppendL( TColumn( EMdEObjectFlagGarbage ) ); - RRowData rowDataUpd; - CleanupClosePushL( rowDataUpd ); - rowDataUpd.AppendL( TColumn( EMdEObjectFlagGarbage ) ); - rowDataUpd.AppendL( TColumn( EMdEObjectFlagRemoved ) ); - - RRowData rowDataDelRel; - CleanupClosePushL( rowDataDelRel ); - rowDataDelRel.AppendL( TColumn( EMdERelationFlagGarbageDeleted ) ); - - RRowData rowDataUpdRel; - CleanupClosePushL( rowDataUpdRel ); - rowDataUpdRel.AppendL( TColumn( EMdERelationFlagGarbageDeleted ) ); - rowDataUpdRel.AppendL( TColumn( EMdERelationFlagDeleted ) ); - - RRowData rowDataDelContext; - CleanupClosePushL( rowDataDelContext ); - rowDataDelContext.AppendL( TColumn( EMdEObjectFlagRemoved ) ); - rowDataDelContext.AppendL( TColumn( EMdEObjectFlagContext ) ); - rowDataDelContext.AppendL( TColumn( EMdERelationFlagDeleted ) ); - - RRowData emptyRow; - CleanupClosePushL( emptyRow ); - const RPointerArray& namespaceDefs = iSchema.NamespaceDefs(); CMdSSqLiteConnection& connection = MMdSDbConnectionPool::GetDefaultDBL(); - TInt deleteObjectResult; + TInt deleteObjectResult = 0; TInt updateResult = 0; const TInt count = namespaceDefs.Count(); @@ -3362,14 +3338,43 @@ const TDefId nmspId = namespaceDefs[i]->GetId(); // deleting objects - buffer.BufferL().Format( KDeleteObject, nmspId ); + buffer.BufferL().Format( KDeleteObject, nmspId, nmspId ); User::LeaveIfError( deleteObjectResult = connection.ExecuteL( buffer.ConstBufferL(), rowDataDel ) ); - + + if( deleteObjectResult > 0 ) + { + // If objects were deleted, continue garbage collection + iDictionaryToBeCleaned = ETrue; + CleanupStack::PopAndDestroy( 2, &commonClauseOne ); + return ETrue; + } + + RRowData rowDataUpd; + CleanupClosePushL( rowDataUpd ); + rowDataUpd.AppendL( TColumn( EMdEObjectFlagGarbage ) ); + rowDataUpd.AppendL( TColumn( EMdEObjectFlagRemoved ) ); + buffer.BufferL().Format( KUpdateDeleteObject, nmspId ); User::LeaveIfError( updateResult += connection.ExecuteL( buffer.ConstBufferL(), rowDataUpd ) ); + if( updateResult > 0 ) + { + // If objects were modified, continue garbage collection + CleanupStack::PopAndDestroy( 3, &commonClauseOne ); + return ETrue; + } + + RRowData rowDataDelRel; + CleanupClosePushL( rowDataDelRel ); + rowDataDelRel.AppendL( TColumn( EMdERelationFlagGarbageDeleted ) ); + + RRowData rowDataUpdRel; + CleanupClosePushL( rowDataUpdRel ); + rowDataUpdRel.AppendL( TColumn( EMdERelationFlagGarbageDeleted ) ); + rowDataUpdRel.AppendL( TColumn( EMdERelationFlagDeleted ) ); + // deleting relations buffer.BufferL().Format( KDeleteRelations, nmspId ); User::LeaveIfError( connection.ExecuteL( @@ -3378,19 +3383,43 @@ buffer.BufferL().Format( KUpdateDeleteRelations, nmspId ); User::LeaveIfError( updateResult += connection.ExecuteL( buffer.ConstBufferL(), rowDataUpdRel ) ); - + + if( updateResult > 0 ) + { + // If objects were modified, continue garbage collection + CleanupStack::PopAndDestroy( 5, &commonClauseOne ); + return ETrue; + } + + RRowData rowDataDelContext; + CleanupClosePushL( rowDataDelContext ); + rowDataDelContext.AppendL( TColumn( EMdEObjectFlagRemoved ) ); + rowDataDelContext.AppendL( TColumn( EMdEObjectFlagContext ) ); + rowDataDelContext.AppendL( TColumn( EMdERelationFlagDeleted ) ); + // deleting context objects buffer.BufferL().Format( KUpdateDeleteContextObjects, nmspId, nmspId, nmspId ); User::LeaveIfError( updateResult += connection.ExecuteL( buffer.ConstBufferL(), rowDataDelContext ) ); - + + if( updateResult > 0 ) + { + // If objects were modified, continue garbage collection + CleanupStack::PopAndDestroy( 6, &commonClauseOne ); + return ETrue; + } + + RRowData emptyRow; + CleanupClosePushL( emptyRow ); + // deleting words from text search dictionary - if ( deleteObjectResult > 0 ) + if ( iDictionaryToBeCleaned ) { buffer.BufferL().Format( KDeleteWordFromTextSearchDict, nmspId, nmspId, nmspId ); User::LeaveIfError( connection.ExecuteL( buffer.ConstBufferL(), emptyRow ) ); + iDictionaryToBeCleaned = EFalse; } } @@ -3405,9 +3434,15 @@ } #endif - return updateResult != 0; + return EFalse; } +void CMdSSqlObjectManipulate::AnalyzeL() + { + CMdSSqLiteConnection& db = MMdSDbConnectionPool::GetDefaultDBL(); + db.DoAnalyzeL(); + } + #ifdef MDS_PLAYLIST_HARVESTING_ENABLED TInt CMdSSqlObjectManipulate::CleanPlaylistsL() { diff -r 8e4539ab1889 -r c461c7fa72c2 watchdog/src/watchdog.cpp --- a/watchdog/src/watchdog.cpp Fri May 14 16:17:23 2010 +0300 +++ b/watchdog/src/watchdog.cpp Thu May 27 13:18:43 2010 +0300 @@ -51,7 +51,7 @@ // --------------------------------------------------------------------------- // CWatchdog::CWatchdog() : - CActive( CActive::EPriorityLow ), iState(EIdle) + CActive( CActive::EPriorityStandard ), iState(EIdle) { // Add to active scheduler. CActiveScheduler::Add( this );