--- a/clfwrapper/BWINS/CONTENTLISTINGFRAMEWORKU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-EXPORTS
- ?NewContentListingEngineLC@ContentListingFactory@@SAPAVMCLFContentListingEngine@@XZ @ 1 NONAME ; public: static class MCLFContentListingEngine * __cdecl ContentListingFactory::NewContentListingEngineLC(void)
- ?NewModifiableItemLC@ContentListingFactory@@SAPAVMCLFModifiableItem@@XZ @ 2 NONAME ; public: static class MCLFModifiableItem * __cdecl ContentListingFactory::NewModifiableItemLC(void)
- ?NewSortingStyleLC@ContentListingFactory@@SAPAVMCLFSortingStyle@@AAVTResourceReader@@@Z @ 3 NONAME ; public: static class MCLFSortingStyle * __cdecl ContentListingFactory::NewSortingStyleLC(class TResourceReader &)
- ?NewSortingStyleLC@ContentListingFactory@@SAPAVMCLFSortingStyle@@XZ @ 4 NONAME ; public: static class MCLFSortingStyle * __cdecl ContentListingFactory::NewSortingStyleLC(void)
-
--- a/clfwrapper/BWINS/MediaCollectionManagerU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?CreateCollectionManagerL@MediaCollectionManagerFactory@@SAPAVMMediaCollectionManager@@XZ @ 1 NONAME ; class MMediaCollectionManager * MediaCollectionManagerFactory::CreateCollectionManagerL(void)
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/clfwrapper/BWINS/MediaCollectionManageru.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?CreateCollectionManagerL@MediaCollectionManagerFactory@@SAPAVMMediaCollectionManager@@XZ @ 1 NONAME ; class MMediaCollectionManager * MediaCollectionManagerFactory::CreateCollectionManagerL(void)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/clfwrapper/BWINS/contentlistingframeworku.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,6 @@
+EXPORTS
+ ?NewContentListingEngineLC@ContentListingFactory@@SAPAVMCLFContentListingEngine@@XZ @ 1 NONAME ; public: static class MCLFContentListingEngine * __cdecl ContentListingFactory::NewContentListingEngineLC(void)
+ ?NewModifiableItemLC@ContentListingFactory@@SAPAVMCLFModifiableItem@@XZ @ 2 NONAME ; public: static class MCLFModifiableItem * __cdecl ContentListingFactory::NewModifiableItemLC(void)
+ ?NewSortingStyleLC@ContentListingFactory@@SAPAVMCLFSortingStyle@@AAVTResourceReader@@@Z @ 3 NONAME ; public: static class MCLFSortingStyle * __cdecl ContentListingFactory::NewSortingStyleLC(class TResourceReader &)
+ ?NewSortingStyleLC@ContentListingFactory@@SAPAVMCLFSortingStyle@@XZ @ 4 NONAME ; public: static class MCLFSortingStyle * __cdecl ContentListingFactory::NewSortingStyleLC(void)
+
--- a/clfwrapper/CommonInc/CLFConsts.h Mon May 03 12:55:01 2010 +0300
+++ b/clfwrapper/CommonInc/CLFConsts.h Fri May 14 16:38:28 2010 +0300
@@ -30,8 +30,6 @@
const TInt KCLFServerCollectionManagerMajor( 2 );
const TInt KCLFServerMinor( 1 );
const TInt KCLFServerBuild( 1 );
-_LIT( KCLFServerName, "ContentListingFrameworkServer" );
-_LIT( KCLFServerExe, "ContentListingServer.exe" );
// Message slots
// RCLFDatabase::PrepareItemIds
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/clfwrapper/eabi/ContentListingFrameworku.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,6 @@
+EXPORTS
+ _ZN21ContentListingFactory17NewSortingStyleLCER15TResourceReader @ 1 NONAME
+ _ZN21ContentListingFactory17NewSortingStyleLCEv @ 2 NONAME
+ _ZN21ContentListingFactory19NewModifiableItemLCEv @ 3 NONAME
+ _ZN21ContentListingFactory25NewContentListingEngineLCEv @ 4 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/clfwrapper/eabi/MediaCollectionManageru.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ _ZN29MediaCollectionManagerFactory24CreateCollectionManagerLEv @ 1 NONAME
+
--- a/clfwrapper/group/contentlistingframework.mmp Mon May 03 12:55:01 2010 +0300
+++ b/clfwrapper/group/contentlistingframework.mmp Fri May 14 16:38:28 2010 +0300
@@ -58,6 +58,7 @@
PAGED
BYTEPAIRCOMPRESSTARGET
OPTION ARMCC -O3 -OTime
+OPTION GCC -w
// End of File
--- a/harvester/blacklistclient/src/blacklistclient.cpp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/blacklistclient/src/blacklistclient.cpp Fri May 14 16:38:28 2010 +0300
@@ -419,7 +419,7 @@
}
else
{
- Send( EBlacklistCloseDB );
+ SendReceive( EBlacklistCloseDB );
}
WRITELOG( "RBlacklistClient::CloseDBL - end" );
--- a/harvester/blacklistserver/group/blacklistserver.mmp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/blacklistserver/group/blacklistserver.mmp Fri May 14 16:38:28 2010 +0300
@@ -16,13 +16,13 @@
#include <platform_paths.hrh>
VERSION 10.0
-TARGET blacklistserver.exe
+TARGET !blacklistserver.exe
TARGETTYPE exe
UID 0x0 0x2001B2EB
VENDORID VID_DEFAULT
-CAPABILITY CAP_SERVER
+CAPABILITY CAP_SERVER ProtServ
MW_LAYER_SYSTEMINCLUDE
SYSTEMINCLUDE /epoc32/include/connect
--- a/harvester/blacklistserver/inc/blacklistcommon.h Mon May 03 12:55:01 2010 +0300
+++ b/harvester/blacklistserver/inc/blacklistcommon.h Fri May 14 16:38:28 2010 +0300
@@ -19,8 +19,8 @@
#include <e32base.h>
-_LIT( KBlacklistServerName, "BlacklistServer" );
-_LIT( KBlacklistServerExe, "BlacklistServer.exe" ); // 0x0 2001B2EB = server uid
+_LIT( KBlacklistServerName, "!BlacklistServer" );
+_LIT( KBlacklistServerExe, "!BlacklistServer.exe" ); // 0x0 2001B2EB = server uid
_LIT( KBlacklistChunkName, "BlacklistServerChunk" );
const TUid KUidKBlacklistServer = { 0x2001B2EB };
--- a/harvester/blacklistserver/src/blacklistserver.cpp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/blacklistserver/src/blacklistserver.cpp Fri May 14 16:38:28 2010 +0300
@@ -290,16 +290,16 @@
iDatabaseOpen = ETrue;
CleanupStack::PopAndDestroy( databasePath );
+ if ( !TableExistsL() )
+ {
+ CreateBlacklistTableL();
+ }
+
// Add or remove operations when DB connection was off
if ( iDBUpdateNeeded )
{
CommitBufferedItemsL();
}
-
- if ( !TableExistsL() )
- {
- CreateBlacklistTableL();
- }
LoadDatabaseToMemoryL();
--- a/harvester/client/bwincw/harvesterclientwinscw.def Mon May 03 12:55:01 2010 +0300
+++ b/harvester/client/bwincw/harvesterclientwinscw.def Fri May 14 16:38:28 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<unsigned long> &, int)
?HarvestFileWithUID@RHarvesterClient@@QAEXABVTDesC16@@AAV?$RArray@K@@HVTUid@@@Z @ 13 NONAME ; void RHarvesterClient::HarvestFileWithUID(class TDesC16 const &, class RArray<unsigned long> &, int, class TUid)
+ ?AddSessionObserverL@RHarvesterClient@@QAEXAAVMHarvesterSessionObserver@@@Z @ 14 NONAME ; void RHarvesterClient::AddSessionObserverL(class MHarvesterSessionObserver &)
+ ?RemoveSessionObserver@RHarvesterClient@@QAEXXZ @ 15 NONAME ; void RHarvesterClient::RemoveSessionObserver(void)
--- a/harvester/client/eabi/harvesterclientarm.def Mon May 03 12:55:01 2010 +0300
+++ b/harvester/client/eabi/harvesterclientarm.def Fri May 14 16:38:28 2010 +0300
@@ -18,4 +18,6 @@
_ZN16RHarvesterClient18HarvestFileWithUIDERK7TDesC16R6RArrayImEi4TUid @ 17 NONAME
_ZTI22CHarvesterRequestQueue @ 18 NONAME ; #<TI>#
_ZTV22CHarvesterRequestQueue @ 19 NONAME ; #<VT>#
+ _ZN16RHarvesterClient19AddSessionObserverLER25MHarvesterSessionObserver @ 20 NONAME
+ _ZN16RHarvesterClient21RemoveSessionObserverEv @ 21 NONAME
--- a/harvester/client/group/harvesterclient.mmp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/client/group/harvesterclient.mmp Fri May 14 16:38:28 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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/harvester/client/inc/harvestersessionwatcher.h Fri May 14 16:38:28 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 <e32base.h>
+#include <harvesterclient.h>
+
+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
--- a/harvester/client/src/harvesterclient.cpp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/client/src/harvesterclient.cpp Fri May 14 16:38:28 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
// ----------------------------------------------------------------------------------------
//
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/harvester/client/src/harvestersessionwatcher.cpp Fri May 14 16:38:28 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;
+ }
+
Binary file harvester/common/data/200009FE.txt has changed
--- a/harvester/common/inc/harvestercommon.h Mon May 03 12:55:01 2010 +0300
+++ b/harvester/common/inc/harvestercommon.h Fri May 14 16:38:28 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;
Binary file harvester/conf/harvester.confml has changed
Binary file harvester/conf/harvester_200009FE.crml has changed
--- a/harvester/data/default_origin_mappings.db Mon May 03 12:55:01 2010 +0300
+++ b/harvester/data/default_origin_mappings.db Fri May 14 16:38:28 2010 +0300
@@ -1,39 +1,39 @@
-Process UID / Origin -mapping table
-
-UID Origin
-200009EE 0
-101FFA91 0
-10208A29 0
-101FD659 1
-101FFA86 1
-2000D16B 1
-10208A6D 1
-101f857a 1
-10003a3f 2
-101f4d90 2
-1028242D 2
-1028242E 2
-101FFB51 2
-101F8839 2
-101FFAAB 2
-200071D8 2
-10008D60 2
-10008d39 2
-1028190b 2
-10008D5F 2
-10008D60 2
-10008D61 2
-100058CA 4
-1028290B 4
-10281FA8 4
-10281FA7 4
-10281FA5 4
-10281FA6 4
-101FFA91 254
-20026F35 254
-20026F2F 254
-200009F5 255
-2000A7AE 255
-200071BE 255
-101f7771 255
-1020e519 255
+Process UID / Origin -mapping table
+
+UID Origin
+200009EE 0
+101FFA91 0
+10208A29 0
+101FD659 1
+101FFA86 1
+2000D16B 1
+10208A6D 1
+101f857a 1
+10003a3f 2
+101f4d90 2
+1028242D 2
+1028242E 2
+101FFB51 2
+101F8839 2
+101FFAAB 2
+200071D8 2
+10008D60 2
+10008d39 2
+1028190b 2
+10008D5F 2
+10008D60 2
+10008D61 2
+100058CA 4
+1028290B 4
+10281FA8 4
+10281FA7 4
+10281FA5 4
+10281FA6 4
+101FFA91 254
+20026F35 254
+20026F2F 254
+200009F5 255
+2000A7AE 255
+200071BE 255
+101f7771 255
+1020e519 255
--- a/harvester/harvesterplugins/AudioPlugin/group/harvesteraudioplugin.mmp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/AudioPlugin/group/harvesteraudioplugin.mmp Fri May 14 16:38:28 2010 +0300
@@ -60,6 +60,7 @@
LIBRARY centralrepository.lib
LIBRARY caf.lib
LIBRARY cafutils.lib
+LIBRARY platformenv.lib
PAGED
BYTEPAIRCOMPRESSTARGET
--- a/harvester/harvesterplugins/AudioPlugin/inc/harvesteraudioplugin.h Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/AudioPlugin/inc/harvesteraudioplugin.h Fri May 14 16:38:28 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;
};
--- a/harvester/harvesterplugins/AudioPlugin/inc/harvesteraudiopluginutils.h Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/AudioPlugin/inc/harvesteraudiopluginutils.h Fri May 14 16:38:28 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,
--- a/harvester/harvesterplugins/AudioPlugin/src/harvesteraudioplugin.cpp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/AudioPlugin/src/harvesteraudioplugin.cpp Fri May 14 16:38:28 2010 +0300
@@ -23,10 +23,12 @@
#include <mdeobject.h>
#include <centralrepository.h>
#include <caf/caf.h>
+#include <pathinfo.h>
#include "harvesteraudioplugin.h"
#include "harvesteraudiopluginutils.h"
#include "mdsutils.h"
+#include "mdscommoninternal.h"
#include "harvesterlog.h"
@@ -34,8 +36,6 @@
const TUid KHarvesterRepoUid = { 0x200009FE };
const TUint32 KEnableAlbumArtHarvest = 0x00090001;
-_LIT( KExtensionWma, "wma" );
-
CHarvesterAudioPluginPropertyDefs::CHarvesterAudioPluginPropertyDefs() : CBase()
{
}
@@ -52,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 );
@@ -119,6 +120,9 @@
delete iAudioParser;
delete iPropDefs;
delete iTNM;
+
+ delete iPhoneSoundsPath;
+ delete iMmcSoundsPath;
}
// ---------------------------------------------------------------------------
@@ -140,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();
}
// ---------------------------------------------------------------------------
@@ -244,7 +259,7 @@
// get properties for file types supported by CMetaDataUtility.
if( mapping->iHandler == EMetaDataUtilityHandling )
{
- GetMusicPropertiesL( aHD, aIsAdd );
+ GetMusicPropertiesL( aHD, aIsAdd, mapping->iMimeType );
}
}
}
@@ -327,7 +342,7 @@
// ---------------------------------------------------------------------------
//
void CHarvesterAudioPlugin::GetMusicPropertiesL( CHarvesterData* aHD,
- TBool aIsAdd )
+ TBool aIsAdd, TPtrC aMimeType )
{
#ifdef _DEBUG
TTime dStart, dStop;
@@ -346,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 );
@@ -365,7 +385,7 @@
}
CleanupStack::PopAndDestroy( 2 ); // content, data
}
-
+
TBool parsed( EFalse );
TRAPD( parseError, parsed = iAudioParser->ParseL( uri ) );
@@ -394,9 +414,24 @@
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() < iMaxTextLength )
+ && song.Length() < KMaxTitleFieldLength )
{
CMdeObjectWrapper::HandleObjectPropertyL( mdeObject,
*iPropDefs->iTitlePropertyDef, &song, EFalse );
--- a/harvester/harvesterplugins/AudioPlugin/src/harvesteraudiopluginutils.cpp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/AudioPlugin/src/harvesteraudiopluginutils.cpp Fri May 14 16:38:28 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" );
--- a/harvester/harvesterplugins/ImagePlugin/group/harvesterimageplugin.mmp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/ImagePlugin/group/harvesterimageplugin.mmp Fri May 14 16:38:28 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
--- a/harvester/harvesterplugins/ImagePlugin/inc/harvesterimageplugin.h Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/ImagePlugin/inc/harvesterimageplugin.h Fri May 14 16:38:28 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
--- a/harvester/harvesterplugins/ImagePlugin/src/harvesterimageplugin.cpp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/ImagePlugin/src/harvesterimageplugin.cpp Fri May 14 16:38:28 2010 +0300
@@ -20,12 +20,14 @@
#include <e32math.h>
#include <locationdatatype.h>
#include <harvesterdata.h>
+#include <pathinfo.h>
#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<TImageMetadataHandling>(
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
--- a/harvester/harvesterplugins/OMADRMPlugin/group/harvesteromadrmplugin.mmp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/OMADRMPlugin/group/harvesteromadrmplugin.mmp Fri May 14 16:38:28 2010 +0300
@@ -53,6 +53,7 @@
LIBRARY mdeclient.lib
LIBRARY harvesterdata.lib
LIBRARY harvestercommon.lib
+LIBRARY platformenv.lib
PAGED
BYTEPAIRCOMPRESSTARGET
--- a/harvester/harvesterplugins/OMADRMPlugin/inc/harvesteromadrmplugin.h Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/OMADRMPlugin/inc/harvesteromadrmplugin.h Fri May 14 16:38:28 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__
--- a/harvester/harvesterplugins/OMADRMPlugin/src/harvesteromadrmplugin.cpp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/OMADRMPlugin/src/harvesteromadrmplugin.cpp Fri May 14 16:38:28 2010 +0300
@@ -17,11 +17,14 @@
#include <e32base.h>
#include <caf/caf.h>
+#include <pathinfo.h>
#include "mdsutils.h"
#include "harvesteromadrmplugin.h"
#include "harvesterlog.h"
+#include "harvestercommon.h"
#include "mdeobjectwrapper.h"
+#include "mdscommoninternal.h"
#include <harvesterdata.h>
#include <mdenamespacedef.h>
@@ -37,6 +40,9 @@
_LIT(KRmMimetype, "realmedia");
_LIT( KSvgMime, "image/svg+xml" );
+_LIT( KRingingToneMime, "application/vnd.nokia.ringing-tone" );
+
+_LIT(KInUse, "InUse");
CHarvesterOmaDrmPluginPropertyDefs::CHarvesterOmaDrmPluginPropertyDefs() : CBase()
{
@@ -53,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 );
@@ -101,6 +108,15 @@
{
WRITELOG("CHarvesterOMADRMPlugin::~CHarvesterOMADRMPlugin()");
+ delete iPhoneImagesPath;
+ delete iMmcImagesPath;
+
+ delete iPhoneVideosPath;
+ delete iMmcVideosPath;
+
+ delete iPhoneSoundsPath;
+ delete iMmcSoundsPath;
+
delete iPropDefs;
}
@@ -110,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 )
@@ -247,7 +296,7 @@
}
// ---------------------------------------------------------------------------
-// HandleNewObjectL
+// HandleObjectPropertiesL
// ---------------------------------------------------------------------------
//
void CHarvesterOMADRMPlugin::HandleObjectPropertiesL(
@@ -280,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)
{
@@ -301,7 +399,7 @@
*iPropDefs->iDrmPropertyDef, &aVHD.iDrmProtected, aIsAdd );
// Title (is set from URI by default)
- if( aVHD.iTitle.Length() > 0 && aVHD.iTitle.Length() < iMaxTextLength )
+ if( aVHD.iTitle.Length() > 0 && aVHD.iTitle.Length() < KMaxTitleFieldLength )
{
CMdeObjectWrapper::HandleObjectPropertyL(mdeObject,
*iPropDefs->iTitlePropertyDef, &aVHD.iTitle, EFalse );
@@ -341,6 +439,56 @@
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 )
+ {
+ aObjectType.Copy( KInUse() );
+ return;
+ }
if( mime == KSvgMime )
{
@@ -382,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 );
--- a/harvester/harvesterplugins/RTPPlugin/inc/harvesterrtpplugin.h Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/RTPPlugin/inc/harvesterrtpplugin.h Fri May 14 16:38:28 2010 +0300
@@ -43,6 +43,7 @@
CMdEPropertyDef* iSizePropertyDef;
CMdEPropertyDef* iItemTypePropertyDef;
CMdEPropertyDef* iTitlePropertyDef;
+ CMdEPropertyDef* iDefaultFolderPropertyDef;
// Media property definitions
CMdEPropertyDef* iCaptureDatePropertyDef;
--- a/harvester/harvesterplugins/RTPPlugin/src/harvesterrtpplugin.cpp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/RTPPlugin/src/harvesterrtpplugin.cpp Fri May 14 16:38:28 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)
--- a/harvester/harvesterplugins/VideoPlugin/group/harvestervideoplugin.mmp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/VideoPlugin/group/harvestervideoplugin.mmp Fri May 14 16:38:28 2010 +0300
@@ -54,6 +54,7 @@
LIBRARY harvestercommon.lib
LIBRARY caf.lib
LIBRARY cafutils.lib
+LIBRARY platformenv.lib
STATICLIBRARY hxmetadatautil.lib
--- a/harvester/harvesterplugins/VideoPlugin/inc/harvestervideoplugin.h Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/VideoPlugin/inc/harvestervideoplugin.h Fri May 14 16:38:28 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__
--- a/harvester/harvesterplugins/VideoPlugin/src/harvestervideoplugin.cpp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/VideoPlugin/src/harvestervideoplugin.cpp Fri May 14 16:38:28 2010 +0300
@@ -21,12 +21,14 @@
#include <hxmetadatautil.h>
#include <hxmetadatakeys.h>
#include <caf/caf.h>
+#include <pathinfo.h>
#include "mdsutils.h"
#include "harvestervideoplugin.h"
#include "harvesterlog.h"
#include "harvesterblacklist.h"
#include "mdeobjectwrapper.h"
+#include "mdscommoninternal.h"
#include <mdenamespacedef.h>
#include <mdeobjectdef.h>
@@ -97,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 );
@@ -163,6 +166,9 @@
iMimeTypeMappings.Close();
RMediaIdUtil::ReleaseInstance();
+ delete iPhoneVideosPath;
+ delete iMmcVideosPath;
+
WRITELOG("CHarvesterVideoPlugin::CHarvesterVideoPlugin()");
}
@@ -268,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();
}
@@ -398,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 );
@@ -433,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 );
@@ -758,7 +780,6 @@
aVHD.iMimeBuf = mime.Alloc();
}
- helixMetadata->ResetL();
CleanupStack::PopAndDestroy( helixMetadata );
// don't destory mime type pointers just clean array
@@ -932,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" );
}
@@ -969,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
@@ -1089,7 +1130,7 @@
}
// Title
- if( aVHD.iTitle && aVHD.iTitle->Length() < iMaxTextLength )
+ if( aVHD.iTitle && aVHD.iTitle->Length() < KMaxTitleFieldLength )
{
CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iTitlePropertyDef, aVHD.iTitle, EFalse );
}
--- a/harvester/harvesterplugins/WMVPlugin/group/harvesterwmvplugin.mmp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/WMVPlugin/group/harvesterwmvplugin.mmp Fri May 14 16:38:28 2010 +0300
@@ -52,6 +52,7 @@
LIBRARY harvesterplugininterface.lib
LIBRARY mdeclient.lib
LIBRARY harvesterdata.lib
+LIBRARY platformenv.lib
PAGED
BYTEPAIRCOMPRESSTARGET
--- a/harvester/harvesterplugins/WMVPlugin/inc/harvesterwmvplugin.h Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/WMVPlugin/inc/harvesterwmvplugin.h Fri May 14 16:38:28 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
--- a/harvester/harvesterplugins/WMVPlugin/src/harvesterwmvplugin.cpp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/harvesterplugins/WMVPlugin/src/harvesterwmvplugin.cpp Fri May 14 16:38:28 2010 +0300
@@ -17,12 +17,14 @@
#include <e32std.h>
#include <caf/caf.h>
+#include <pathinfo.h>
#include "mdsutils.h"
#include "harvesterdata.h"
#include "harvesterlog.h"
#include "harvestercommon.h"
#include "harvesterwmvplugin.h"
+#include "mdscommoninternal.h"
#include <mdenamespacedef.h>
#include <mdeobjectdef.h>
#include "mdeobject.h"
@@ -44,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 );
@@ -86,6 +89,9 @@
{
WRITELOG( "CHarvesterWMVPlugin::~CHarvesterWMVPlugin()" );
delete iPropDefs;
+
+ delete iPhoneVideosPath;
+ delete iMmcVideosPath;
}
// ---------------------------------------------------------------------------
@@ -163,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 );
}
@@ -301,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
@@ -310,7 +341,7 @@
*iPropDefs->iDrmPropertyDef, &aClipDetails.iDrmProtected, aIsAdd );
}
// Title (is set from URI by default)
- if( aClipDetails.iTitle.Length() > 0 && aClipDetails.iTitle.Length() < iMaxTextLength )
+ if( aClipDetails.iTitle.Length() > 0 && aClipDetails.iTitle.Length() < KMaxTitleFieldLength )
{
CMdeObjectWrapper::HandleObjectPropertyL(mdeObject,
*iPropDefs->iTitlePropertyDef, &aClipDetails.iTitle, EFalse );
--- a/harvester/monitorplugins/fileplugin/src/fileeventhandlerao.cpp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/monitorplugins/fileplugin/src/fileeventhandlerao.cpp Fri May 14 16:38:28 2010 +0300
@@ -561,16 +561,34 @@
// check if not in mde, harvest
if ( !oldObject && !newObject )
{
- HBufC* fn = NULL;
+ HBufC* fn = NULL;
+
+ // ignore created file event if extension is not supported by any harverter plugin
+ if( aNewUrl.Length() > 0 )
+ {
+ if( iHarvesterPluginFactory->IsSupportedFileExtension( aNewUrl ) )
+ {
+ fn = aNewUrl.AllocLC();
+ }
+ else
+ {
+ WRITELOG1( "CFileEventHandlerAO::ReplaceL - file extension not supported: %S", &aNewUrl );
+ return;
+ }
+ }
+ else
+ {
+ if( iHarvesterPluginFactory->IsSupportedFileExtension( aOldUrl ) )
+ {
+ fn = aOldUrl.AllocLC();
+ }
+ else
+ {
+ WRITELOG1( "CFileEventHandlerAO::ReplaceL - file extension not supported: %S", &aOldUrl );
+ return;
+ }
+ }
- if (aNewUrl.Length() > 0)
- {
- fn = aNewUrl.AllocLC();
- }
- else
- {
- fn = aOldUrl.AllocLC();
- }
CHarvesterData* hd = CHarvesterData::NewL( fn );
CleanupStack::Pop( fn );
hd->SetEventType( EHarvesterAdd );
--- a/harvester/monitorplugins/mdsfileserverplugin/inc/mdsfileserverplugin.h Mon May 03 12:55:01 2010 +0300
+++ b/harvester/monitorplugins/mdsfileserverplugin/inc/mdsfileserverplugin.h Fri May 14 16:38:28 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<CMdsFSPQueueItem> iQueue;
RPointerArray<TDesC> iIgnorePaths;
-
- /**
- * File system client session.
- */
- RFs iFsSession;
-
+
RPointerArray<TDesC> iCreatedFiles;
RPointerArray<TDesC> iModifiedFiles;
--- a/harvester/monitorplugins/mdsfileserverplugin/src/mdsfileserverplugin.cpp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/monitorplugins/mdsfileserverplugin/src/mdsfileserverplugin.cpp Fri May 14 16:38:28 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<TDesC>(CMdsFileServerPlugin::Compare));
+ const TInt insertError( iPaths.InsertInOrder(fn, TLinearOrder<TDesC>(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<TDesC>(CMdsFileServerPlugin::Compare));
+ const TInt insertError( iIgnorePaths.InsertInOrder(fn, TLinearOrder<TDesC>(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
//-----------------------------------------------------------------------------
//
--- a/harvester/monitorplugins/mmcplugin/src/mmcfilelist.cpp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/monitorplugins/mmcplugin/src/mmcfilelist.cpp Fri May 14 16:38:28 2010 +0300
@@ -27,6 +27,7 @@
#include "fsutil.h"
#include "harvestercenreputil.h"
#include "harvestereventmanager.h"
+#include "harvestercommon.h"
#include <placeholderdata.h>
#include <harvesterdata.h>
#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() )
@@ -161,7 +171,7 @@
path->AppendL( name );
}
else
- {
+ {
CPlaceholderData* phData = CPlaceholderData::NewL();
CleanupStack::PushL( phData );
phData->SetUri( name );
--- a/harvester/monitorplugins/mmcplugin/src/mmcmonitorplugin.cpp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/monitorplugins/mmcplugin/src/mmcmonitorplugin.cpp Fri May 14 16:38:28 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 ) );
@@ -265,6 +264,11 @@
mountData->iMountType = TMountData::EUnmount;
iMountTask->StartUnmount( *mountData );
}
+ else
+ {
+ delete mountData;
+ mountData = NULL;
+ }
}
break;
@@ -344,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
--- a/harvester/server/inc/harvesterao.h Mon May 03 12:55:01 2010 +0300
+++ b/harvester/server/inc/harvesterao.h Fri May 14 16:38:28 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__
--- a/harvester/server/src/harvesterao.cpp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/server/src/harvesterao.cpp Fri May 14 16:38:28 2010 +0300
@@ -22,6 +22,7 @@
#include <rlocationobjectmanipulator.h>
#include <placeholderdata.h>
#include <harvesterclientdata.h>
+#include <pathinfo.h>
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" );
}
@@ -780,8 +825,6 @@
TTimeIntervalSeconds timeOffsetSeconds = User::UTCOffset();
- TInt fastHarvestPlaceholderCount = 0;
-
TInt endindex( iPHArray.Count() );
for( TInt i = 0; i < endindex; i++ )
{
@@ -846,6 +889,7 @@
iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeMMC, 1 );
CleanupStack::PopAndDestroy( entry );
CleanupStack::PopAndDestroy( phData );
+ CleanupStack::PopAndDestroy( mdeObject );
continue;
}
phData->SetUri( uri );
@@ -872,6 +916,7 @@
i--;
endindex--;
iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeMMC, 1 );
+ CleanupStack::PopAndDestroy( mdeObject );
continue;
}
CleanupStack::PushL( phData );
@@ -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 );
@@ -946,7 +1001,6 @@
// skip
if( hd->TakeSnapshot() )
{
- fastHarvestPlaceholderCount++;
hd->SetObjectType( EFastHarvest );
}
else
@@ -983,15 +1037,10 @@
iMdESession->AddObjectsL( mdeObjectArray );
}
- const TInt eventObjectCount = objectCount - fastHarvestPlaceholderCount;
-
- if( eventObjectCount > 0 )
- {
- iHarvesterEventManager->IncreaseItemCount( EHEObserverTypePlaceholder,
- eventObjectCount );
- iHarvesterEventManager->SendEventL( EHEObserverTypePlaceholder, EHEStateStarted,
- iHarvesterEventManager->ItemCount( EHEObserverTypePlaceholder ) );
- }
+ iHarvesterEventManager->IncreaseItemCount( EHEObserverTypePlaceholder,
+ objectCount );
+ iHarvesterEventManager->SendEventL( EHEObserverTypePlaceholder, EHEStateStarted,
+ iHarvesterEventManager->ItemCount( EHEObserverTypePlaceholder ) );
#ifdef _DEBUG
for (TInt i = 0; i < objectCount; ++i)
@@ -2420,6 +2469,10 @@
WRITELOG("CHarvesterAO::HarvestingCompleted() NOT COMPLETING AS msg->iMessage->IsNull returns ETrue");
}
iHarvestFileMessages.Remove( i );
+ if( iHarvestFileMessages.Count() == 0 )
+ {
+ iHarvestFileMessages.Compress();
+ }
}
}
}
@@ -2457,7 +2510,7 @@
// check if partial restore was done before last boot
TBool partialRestore = iRestoreWatcher->Register();
-#ifdef __WINSCW__
+#if defined(__WINSCW__) || defined(FF_PLATFORM_SIMULATOR)
partialRestore = ETrue;
#endif
@@ -2838,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 );
+ }
+ }
--- a/harvester/server/src/harvesterqueue.cpp Mon May 03 12:55:01 2010 +0300
+++ b/harvester/server/src/harvesterqueue.cpp Fri May 14 16:38:28 2010 +0300
@@ -154,7 +154,10 @@
aItem->Uri(), mediaId, time ) )
{
WRITELOG( "CHarvesterQueue::Append() - found a blacklisted file" );
- TRAP_IGNORE( iHEM->DecreaseItemCountL( EHEObserverTypePlaceholder ) );
+ if( aItem->ObjectType() == EPlaceholder )
+ {
+ TRAP_IGNORE( iHEM->DecreaseItemCountL( EHEObserverTypePlaceholder ) );
+ }
TRAP_IGNORE( iHEM->DecreaseItemCountL( EHEObserverTypeMMC ) );
if( aItem->EventType() == EHarvesterEdit )
{
--- a/harvester/sis/blacklistserver/package.pkg Mon May 03 12:55:01 2010 +0300
+++ b/harvester/sis/blacklistserver/package.pkg Fri May 14 16:38:28 2010 +0300
@@ -26,6 +26,6 @@
:"Nokia"
;Files
-"\EPOC32\RELEASE\ARMV5\UREL\blacklistserver.exe" -"c:\sys\bin\blacklistserver.exe"
+"\EPOC32\RELEASE\ARMV5\UREL\!blacklistserver.exe" -"c:\sys\bin\!blacklistserver.exe"
"\EPOC32\RELEASE\ARMV5\UREL\blacklistclient.dll" -"c:\sys\bin\blacklistclient.dll"
--- a/iadstoprestart/group/iadstop.mmp Mon May 03 12:55:01 2010 +0300
+++ b/iadstoprestart/group/iadstop.mmp Fri May 14 16:38:28 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
--- a/iadstoprestart/inc/iadstop.h Mon May 03 12:55:01 2010 +0300
+++ b/iadstoprestart/inc/iadstop.h Fri May 14 16:38:28 2010 +0300
@@ -25,8 +25,8 @@
_LIT( KHarvesterServerProcess, "*HarvesterServer*");
_LIT( KHarvesterServerExe, "harvesterserver.exe" );
-_LIT( KMdsServerName, "MdSServer" );
-_LIT( KMdSServerProcess, "*mdsserver*");
+_LIT( KMdsServerName, "!MdSServer" );
+_LIT( KMdSServerProcess, "*!mdsserver*");
_LIT( KTAGDaemonName, "ThumbAGDaemon" );
_LIT( KTAGDaemonProcess, "*ThumbAGDaemon*" );
--- a/inc/mdcserializationtype.h Mon May 03 12:55:01 2010 +0300
+++ b/inc/mdcserializationtype.h Fri May 14 16:38:28 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:
--- a/inc/mdscommoninternal.h Mon May 03 12:55:01 2010 +0300
+++ b/inc/mdscommoninternal.h Fri May 14 16:38:28 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;
@@ -46,8 +49,12 @@
const TInt KMaxUintValueLength = 10;
const TInt KMaxUint64ValueLength = 20;
-_LIT( KMdSServerName,"MdSServer" ); // Server name
-_LIT( KMdSServerProcessString,"MdSServer*" );
+const TInt KMaxTitleFieldLength = 255;
+
+const TInt KTriggerDbMaintenanceTreasholdValue( 2500 );
+
+_LIT( KMdSServerName,"!MdSServer" ); // Server name
+_LIT( KMdSServerProcessString,"!MdSServer*" );
_LIT( KSchemaChunkName, "MdSSchema" );
_LIT( KCMediaIdKey, "CDriveMediaId" );
--- a/inc/mdssqlconnection.inl Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2002-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: Abstract SQL connection class*
-*/
-
-// -----------------------------------
-// RMdsStatement
-// -----------------------------------
-
-inline RMdsStatement::RMdsStatement( )
- : iPrepared( EFalse )
- {
- }
-
-inline void RMdsStatement::Close()
- {
- iStatement.Close();
- }
-
--- a/inc/mdssqliteconnection.h Mon May 03 12:55:01 2010 +0300
+++ b/inc/mdssqliteconnection.h Fri May 14 16:38:28 2010 +0300
@@ -175,6 +175,8 @@
void EnableTransaction( TBool aEnable, RMdsStatement& aQuery );
+ void DoAnalyzeL();
+
protected: // Personal methods
/**
--- a/locationmanager/locationtrail/bwincw/locationtrailwinscw.def Mon May 03 12:55:01 2010 +0300
+++ b/locationmanager/locationtrail/bwincw/locationtrailwinscw.def Fri May 14 16:38:28 2010 +0300
@@ -31,4 +31,5 @@
?SetStateToStopping@CLocationRecord@@QAEXXZ @ 30 NONAME ; void CLocationRecord::SetStateToStopping(void)
?LocationSnapshotL@CLocationRecord@@QAEXABI@Z @ 31 NONAME ; void CLocationRecord::LocationSnapshotL(unsigned int const &)
?RemappingNeeded@CLocationRecord@@QAEHXZ @ 32 NONAME ; int CLocationRecord::RemappingNeeded(void)
+ ?IsLowBattery@CLocationRecord@@QAEHXZ @ 33 NONAME ; int CLocationRecord::IsLowBattery(void)
--- a/locationmanager/locationtrail/eabi/locationtrailarm.def Mon May 03 12:55:01 2010 +0300
+++ b/locationmanager/locationtrail/eabi/locationtrailarm.def Fri May 14 16:38:28 2010 +0300
@@ -53,4 +53,5 @@
_ZN9CTrackLogD0Ev @ 52 NONAME
_ZN9CTrackLogD1Ev @ 53 NONAME
_ZN9CTrackLogD2Ev @ 54 NONAME
+ _ZN15CLocationRecord12IsLowBatteryEv @ 55 NONAME
--- a/locationmanager/locationtrail/inc/cgpxconverterao.h Mon May 03 12:55:01 2010 +0300
+++ b/locationmanager/locationtrail/inc/cgpxconverterao.h Fri May 14 16:38:28 2010 +0300
@@ -162,7 +162,7 @@
RPointerArray<TFileName> iFileQueue;
RPointerArray<TBoundaries> iBoundQueue;
- TFileName iTempFile;
+ TFileName* iTempFile;
TBoundaries* iBoundaries;
TCoordinate* iLastCoords;
TFileName iGpxFileName;
--- a/locationmanager/locationtrail/inc/clocationrecord.h Mon May 03 12:55:01 2010 +0300
+++ b/locationmanager/locationtrail/inc/clocationrecord.h Fri May 14 16:38:28 2010 +0300
@@ -216,6 +216,8 @@
TTime GetMdeObjectTimeL( TItemId aObjectId );
IMPORT_C TBool RemappingNeeded();
+
+ IMPORT_C TBool IsLowBattery();
public: // from MNetworkInfoObserver.
/**
--- a/locationmanager/locationtrail/src/cgpxconverterao.cpp Mon May 03 12:55:01 2010 +0300
+++ b/locationmanager/locationtrail/src/cgpxconverterao.cpp Fri May 14 16:38:28 2010 +0300
@@ -25,7 +25,9 @@
// Default constructor.
// ---------------------------------------------------------------------------
//
-CGpxConverterAO::CGpxConverterAO() : CActive( CActive::EPriorityStandard )
+CGpxConverterAO::CGpxConverterAO() : CActive( CActive::EPriorityStandard ),
+ iTempFile(NULL),
+ iBoundaries(NULL)
{
}
@@ -75,7 +77,10 @@
iBoundQueue.ResetAndDestroy();
iBoundQueue.Close();
-
+
+ delete iTempFile;
+ delete iBoundaries;
+
delete iWriteBuf;
delete iFormatBuf;
}
@@ -158,10 +163,12 @@
{
TInt err;
iFixLost = ETrue;
+ delete iTempFile;
+ delete iBoundaries;
// get next temp-file from queue
- iTempFile = *iFileQueue[0];
+ iTempFile = iFileQueue[0];
iBoundaries = iBoundQueue[0];
- err = iReader.Open( iFs, iTempFile, EFileRead );
+ err = iReader.Open( iFs, *iTempFile, EFileRead );
// remove from queue
iFileQueue.Remove( 0 );
iBoundQueue.Remove( 0 );
@@ -201,7 +208,7 @@
{
TInt err;
iReader.Close();
- err = iReader.Open( iFs, iTempFile, EFileRead );
+ err = iReader.Open( iFs, *iTempFile, EFileRead );
if( err != KErrNone )
{
SetState( ENextFile );
@@ -216,7 +223,7 @@
{
LOG("CGpxConverterAO::RunL - EStartFile");
_LIT( KExtGPX, ".gpx" );
- TParsePtrC parse( iTempFile );
+ TParsePtrC parse( *iTempFile );
TRAPD(err, GetTrackLogPathL( iGpxPath ));
@@ -288,8 +295,15 @@
iObservers[i]->GpxFileCreated( iGpxPath, iTagId, distance, iStartTime, iEndTime );
}
+
+ iFs.Delete( *iTempFile );
+
+ delete iTempFile;
+ iTempFile = NULL;
+
delete iBoundaries;
- iFs.Delete( iTempFile );
+ iBoundaries = NULL;
+
SetState( ENextFile );
break;
}
--- a/locationmanager/locationtrail/src/clocationrecord.cpp Mon May 03 12:55:01 2010 +0300
+++ b/locationmanager/locationtrail/src/clocationrecord.cpp Fri May 14 16:38:28 2010 +0300
@@ -27,6 +27,7 @@
#include "locationtrailpskeys.h"
#include "mdeconstants.h"
#include <centralrepository.h>
+#include <hwrmpowerstatesdkpskeys.h>
using namespace MdeConstants;
@@ -1118,4 +1119,23 @@
return iRemapper->ItemsInQueue();
}
+EXPORT_C TBool CLocationRecord::IsLowBattery()
+ {
+ LOG("CLocationRecord::IsLowBattery()");
+ RProperty batteryProperty;
+ TInt batteryStatus;
+
+ TInt error = batteryProperty.Get(KPSUidHWRMPowerState, KHWRMBatteryStatus, batteryStatus);
+ LOG1("CLocationRecord::IsLowBattery() - battery status %d", batteryStatus );
+ if( error != KErrNone || batteryStatus == EBatteryStatusOk )
+ {
+ return EFalse;
+ }
+ else
+ {
+ return ETrue;
+ }
+
+ }
+
// End of file
--- a/locationmanager/server/src/clocationmanagerserver.cpp Mon May 03 12:55:01 2010 +0300
+++ b/locationmanager/server/src/clocationmanagerserver.cpp Fri May 14 16:38:28 2010 +0300
@@ -420,7 +420,7 @@
self->iTimer->Cancel();
- if ( self->iLocationRecord->RemappingNeeded() )
+ if ( self->iLocationRecord->RemappingNeeded() && !self->iLocationRecord->IsLowBattery())
{
self->iTimer->Start( self->iLocManStopRemapDelay * 1000000, 0, TCallBack( PositioningStopTimeout, self ) );
self->iWaitForPositioningStopTimeout = ETrue;
--- a/locationmanager/server/src/clocationmanagersession.cpp Mon May 03 12:55:01 2010 +0300
+++ b/locationmanager/server/src/clocationmanagersession.cpp Fri May 14 16:38:28 2010 +0300
@@ -280,11 +280,11 @@
//
void CLocationManagerSession::CurrentLocationL( const RMessage2& aMessage )
{
- LOG ("CLocationManagerSession::StartLocationTrailL begin");
+ LOG ("CLocationManagerSession::CurrentLocationL begin");
iLocationHandle = aMessage.Handle();
// server creates completion after it has received current location data
Server().RequestCurrentLocationL( aMessage );
- LOG ("CLocationManagerSession::StartLocationTrailL end");
+ LOG ("CLocationManagerSession::CurrentLocationL end");
}
// --------------------------------------------------------------------------
--- a/mds_plat/content_listing_framework_collection_manager_api/tsrc/Bmarm/CollectionMangerTestU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-EXPORTS
- LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/content_listing_framework_collection_manager_api/tsrc/Bmarm/CollectionMangerTestu.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,2 @@
+EXPORTS
+ LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
\ No newline at end of file
--- a/mds_plat/content_listing_framework_collection_manager_api/tsrc/Bwins/CollectionManagerTestU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/content_listing_framework_collection_manager_api/tsrc/Bwins/CollectionManagerTestu.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,2 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
--- a/mds_plat/content_listing_framework_collection_manager_api/tsrc/src/CollectionManagerTestBlocks.cpp Mon May 03 12:55:01 2010 +0300
+++ b/mds_plat/content_listing_framework_collection_manager_api/tsrc/src/CollectionManagerTestBlocks.cpp Fri May 14 16:38:28 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" );
--- a/mds_plat/context_engine_plugin_api/tsrc/Bmarm/ContextEnginePluginTestU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/context_engine_plugin_api/tsrc/Bmarm/ContextEnginePluginTestu.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
+
--- a/mds_plat/context_engine_plugin_api/tsrc/Bwins/ContextEnginePluginTestU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/context_engine_plugin_api/tsrc/Bwins/ContextEnginePluginTestu.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/context_engine_plugin_api/tsrc/eabi/ContextEnginePluginTestu.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+
--- a/mds_plat/harvester_framework_api/inc/harvesterclient.h Mon May 03 12:55:01 2010 +0300
+++ b/mds_plat/harvester_framework_api/inc/harvesterclient.h Fri May 14 16:38:28 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<TItemId> &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__
--- a/mds_plat/harvester_framework_api/inc/monitorplugin.h Mon May 03 12:55:01 2010 +0300
+++ b/mds_plat/harvester_framework_api/inc/monitorplugin.h Fri May 14 16:38:28 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 );
* }
*/
--- a/mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/Bmarm/ComposerPluginTestU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/Bmarm/ComposerPluginTestu.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
+
--- a/mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/Bwins/ComposerPluginTestU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/Bwins/ComposerPluginTestu.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/eabi/ComposerPluginTestu.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/Bmarm/HarvesterClientTestScripterU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/Bmarm/HarvesterClientTestScripteru.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
+
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/Bwins/HarvesterClientTestScripterU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/Bwins/HarvesterClientTestScripteru.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
+
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/conf/HarvesterClientTestScripter.cfg Mon May 03 12:55:01 2010 +0300
+++ b/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/conf/HarvesterClientTestScripter.cfg Fri May 14 16:38:28 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]
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/eabi/HarvesterClientTestScripteru.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/HarvesterClientTestScripter.mmp Mon May 03 12:55:01 2010 +0300
+++ b/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/HarvesterClientTestScripter.mmp Fri May 14 16:38:28 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
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/HarvesterClientTestScripter.pkg Mon May 03 12:55:01 2010 +0300
+++ b/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/HarvesterClientTestScripter.pkg Fri May 14 16:38:28 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"
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/bld.inf Mon May 03 12:55:01 2010 +0300
+++ b/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/group/bld.inf Fri May 14 16:38:28 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
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/inc/HarvesterClientTestScripter.h Mon May 03 12:55:01 2010 +0300
+++ b/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/inc/HarvesterClientTestScripter.h Fri May 14 16:38:28 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<TItemId> iObjectIdArray;
TFileName iUri;
+
+ RBlacklistClient iBlacklistClient;
+ CHarvesterMediaIdUtil* iMediaIdUtil;
+ RFs iFs;
};
#endif // HARVESTERCLIENTTESTSCRIPTER_H
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/src/HarvesterClientTestScripterBlocks.cpp Mon May 03 12:55:01 2010 +0300
+++ b/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/src/HarvesterClientTestScripterBlocks.cpp Fri May 14 16:38:28 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
// -----------------------------------------------------------------------------
//
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/Bmarm/HarvesterDataTestU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/Bmarm/HarvesterDataTestu.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
+
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/Bwins/HarvesterDataTestU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/Bwins/HarvesterDataTestu.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/harvester_framework_api/tsrc/HarvesterDataTest/eabi/HarvesterDataTestu.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/Bmarm/HarvesterPluginTestU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/Bmarm/HarvesterPluginTestu.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
+
--- a/mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/Bwins/HarvesterPluginTestU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/Bwins/HarvesterPluginTestu.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/harvester_framework_api/tsrc/HarvesterPluginTest/eabi/HarvesterPluginTestu.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,5 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+ _ZTI17CMdeObjectHandler @ 2 NONAME ; #<TI>#
+ _ZTV17CMdeObjectHandler @ 3 NONAME ; #<VT>#
+
--- a/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/Bmarm/MonitorPluginTestU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/Bmarm/MonitorPluginTestu.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
+
--- a/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/Bwins/MonitorPluginTestU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/Bwins/MonitorPluginTestu.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
+
--- a/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/conf/MonitorPluginTest.cfg Mon May 03 12:55:01 2010 +0300
+++ b/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/conf/MonitorPluginTest.cfg Fri May 14 16:38:28 2010 +0300
@@ -53,6 +53,8 @@
test StartMonitoring
request Monitor
test CreateEvents
+wait Monitor
+request Monitor
test CreateEventsDelete
wait Monitor
test StopMonitoring
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/harvester_framework_api/tsrc/MonitorPluginTest/eabi/MonitorPluginTestu.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/harvester_framework_api/tsrc/data/mmc/HarvesterTest/corrupt.jpg Fri May 14 16:38:28 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
--- a/mds_plat/location_manager_api/tsrc/Bmarm/LocationManagerTestScripterU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/location_manager_api/tsrc/Bmarm/LocationManagerTestScripteru.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
+
--- a/mds_plat/location_manager_api/tsrc/Bwins/LocationManagerTestScripterU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/location_manager_api/tsrc/Bwins/LocationManagerTestScripteru.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
+
--- a/mds_plat/location_manager_api/tsrc/conf/LocationManagerTestScripter.cfg Mon May 03 12:55:01 2010 +0300
+++ b/mds_plat/location_manager_api/tsrc/conf/LocationManagerTestScripter.cfg Fri May 14 16:38:28 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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/location_manager_api/tsrc/eabi/LocationManagerTestScripteru.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+
--- a/mds_plat/metadata_engine_api/inc/mdccommon.h Mon May 03 12:55:01 2010 +0300
+++ b/mds_plat/metadata_engine_api/inc/mdccommon.h Fri May 14 16:38:28 2010 +0300
@@ -274,6 +274,9 @@
/** Usage count */
EObjectConditionCompareUsageCount,
+
+ /** Object URIcontains specified string. */
+ EObjectConditionCompareUriContains,
EObjectConditionCompareLast
};
--- a/mds_plat/metadata_engine_api/inc/mdeconstants.h Mon May 03 12:55:01 2010 +0300
+++ b/mds_plat/metadata_engine_api/inc/mdeconstants.h Fri May 14 16:38:28 2010 +0300
@@ -35,6 +35,7 @@
_LIT( KItemTypeProperty, "ItemType" );
_LIT( KTitleProperty, "Title" );
_LIT( KTimeOffsetProperty, "TimeOffset" );
+ _LIT( KInDefaultFolder, "InDefaultFolder" );
enum TOrigin
{
--- a/mds_plat/metadata_engine_api/inc/mdequery.h Mon May 03 12:55:01 2010 +0300
+++ b/mds_plat/metadata_engine_api/inc/mdequery.h Fri May 14 16:38:28 2010 +0300
@@ -284,17 +284,12 @@
* Starts a query operation and returns immediately. The observers of
* the query instance will be notified when the query is completed, or
* if it fails. The query parameters (order rules, search conditions,
- * property filters) must be configured before FindL() is called. FindL()
- * may be called several times, but the query parameters that were in
- * effect for the first FindL() are used for all subsequent calls. Any
- * previously fetched query results remain in the query instance's
- * list of result items; any new result items are appended to the end of
- * the list.
+ * property filters) must be configured before FindL() is called.
*
* The caller can perform a find operation in several steps by using a
- * sufficiently small maximum number of result items. Subsequent calls to
- * FindL() work incrementally, continuing the previously started find
- * operation.
+ * sufficiently small maximum number of result items. Notifications
+ * about progress of query is returned is steps, continuing the previously
+ * started find operation.
*
* @param aMaxCount Maximum number of result items. Defaults to
* unlimited.
--- a/mds_plat/metadata_engine_api/tsrc/Bmarm/MdETestScripterU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/metadata_engine_api/tsrc/Bmarm/MdETestScripteru.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
+
--- a/mds_plat/metadata_engine_api/tsrc/Bwins/MdETestScripterU.DEF Mon May 03 12:55:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/metadata_engine_api/tsrc/Bwins/MdETestScripteru.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- a/mds_plat/metadata_engine_api/tsrc/conf/MdETestScripter.cfg Mon May 03 12:55:01 2010 +0300
+++ b/mds_plat/metadata_engine_api/tsrc/conf/MdETestScripter.cfg Fri May 14 16:38:28 2010 +0300
@@ -1917,24 +1917,24 @@
test SetGuidL EObject obj3 000007 000004
// Test objects' SetUri & Uri
-//test SetUriL obj0 e:\testing\data\TestVideo1.3gp
-//test UriL obj0 e:\testing\data\testvideo1.3gp
-//test SetUriL obj1 e:\testing\data\TestVideo2.mp4
-//test UriL obj1 e:\testing\data\testvideo2.mp4
+test SetUriL obj0 e:\testing\data\TestVideo1.3gp
+test UriL obj0 e:\testing\data\testvideo1.3gp
+test SetUriL obj1 e:\testing\data\TestVideo2.mp4
+test UriL obj1 e:\testing\data\testvideo2.mp4
// Add the objects to the database, observe the additions and verify the observed results.
-test AddObjectObserverWithUriL
+test AddObjectObserverL
test AddObjectL obj0
waittestclass test
test VerifyObserverNotificationTypeL ENotifyAdd
test AddObjectsL obj1 3
waittestclass test
test VerifyObserverNotificationTypeL ENotifyAdd
-test RemoveObjectObserverWithUriL
+test RemoveObjectObserverL
test VerifyTItemIdsL EObject 0 4
// Remove the objects, observe the removals and verify the observed results.
-test AddObjectObserverWithUriL
+test AddObjectObserverL
test RemoveObjectL obj0 KById
waittestclass test
test VerifyObserverNotificationTypeL ENotifyRemove
@@ -1947,7 +1947,7 @@
test RemoveObjectL obj3 KById
waittestclass test
test VerifyObserverNotificationTypeL ENotifyRemove
-test RemoveObjectObserverWithUriL
+test RemoveObjectObserverL
test VerifyTItemIdsL EObject 0 4
// Final cleanup.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mds_plat/metadata_engine_api/tsrc/eabi/MdETestScripteru.def Fri May 14 16:38:28 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+
--- a/mds_plat/metadata_engine_api/tsrc/src/MdETestScripter.cpp Mon May 03 12:55:01 2010 +0300
+++ b/mds_plat/metadata_engine_api/tsrc/src/MdETestScripter.cpp Fri May 14 16:38:28 2010 +0300
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description: ?Description
+* Description:
*
*/
--- a/metadataengine/client/src/mdeobject.cpp Mon May 03 12:55:01 2010 +0300
+++ b/metadataengine/client/src/mdeobject.cpp Fri May 14 16:38:28 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;
}
--- a/metadataengine/client/src/mdeobjectcondition.cpp Mon May 03 12:55:01 2010 +0300
+++ b/metadataengine/client/src/mdeobjectcondition.cpp Fri May 14 16:38:28 2010 +0300
@@ -309,6 +309,7 @@
case EObjectConditionCompareUri:
case EObjectConditionCompareUriBeginsWith:
+ case EObjectConditionCompareUriContains:
case EObjectConditionCompareFreeText:
case EObjectConditionCompareFreeTextContains:
case EObjectConditionCompareFreeTextBeginsWith:
@@ -410,6 +411,7 @@
case EObjectConditionCompareUri:
case EObjectConditionCompareUriBeginsWith:
+ case EObjectConditionCompareUriContains:
case EObjectConditionCompareFreeText:
case EObjectConditionCompareFreeTextContains:
case EObjectConditionCompareFreeTextBeginsWith:
--- a/metadataengine/client/src/mdesessionimpl.cpp Mon May 03 12:55:01 2010 +0300
+++ b/metadataengine/client/src/mdesessionimpl.cpp Fri May 14 16:38:28 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 );
--- a/metadataengine/data/MetadataEngine_Stub.pkg Mon May 03 12:55:01 2010 +0300
+++ b/metadataengine/data/MetadataEngine_Stub.pkg Fri May 14 16:38:28 2010 +0300
@@ -28,4 +28,4 @@
;Files
""-"z:\sys\bin\mdeclient.dll"
""-"z:\sys\bin\mdccommon.dll"
-""-"z:\sys\bin\mdsserver.exe"
\ No newline at end of file
+""-"z:\sys\bin\!mdsserver.exe"
\ No newline at end of file
--- a/metadataengine/data/metadataengine.pkg Mon May 03 12:55:01 2010 +0300
+++ b/metadataengine/data/metadataengine.pkg Fri May 14 16:38:28 2010 +0300
@@ -28,4 +28,4 @@
;Files
"\EPOC32\RELEASE\ARMV5\UREL\mdeclient.dll" -"!:\sys\bin\mdeclient.dll"
"\EPOC32\RELEASE\ARMV5\UREL\mdccommon.dll" -"!:\sys\bin\mdccommon.dll"
-"\EPOC32\RELEASE\ARMV5\UREL\mdsserver.exe" -"!:\sys\bin\mdsserver.exe"
\ No newline at end of file
+"\EPOC32\RELEASE\ARMV5\UREL\!mdsserver.exe" -"!:\sys\bin\!mdsserver.exe"
\ No newline at end of file
--- a/metadataengine/server/group/mdsserver.mmp Mon May 03 12:55:01 2010 +0300
+++ b/metadataengine/server/group/mdsserver.mmp Fri May 14 16:38:28 2010 +0300
@@ -19,7 +19,7 @@
#include <data_caging_paths.hrh>
VERSION 10.0
-TARGET mdsserver.exe
+TARGET !mdsserver.exe
TARGETTYPE exe
UID 0x0 0x200009F3
TARGETPATH SHARED_LIB_DIR
@@ -31,13 +31,13 @@
EPOCHEAPSIZE 0x8000 0x400000
#endif
-CAPABILITY CAP_SERVER AllFiles
+CAPABILITY CAP_SERVER ProtServ
VENDORID VID_DEFAULT
MACRO LOG_MASTER_FLAG
//MACRO LOG_QUERY
-MACRO LOG_DB
-// MACRO LOG_MUTEX
+//MACRO LOG_DB
+//MACRO LOG_MUTEX
MACRO LOG_SERVER
SYSTEMINCLUDE /epoc32/include/ecom
--- a/metadataengine/server/inc/mdsmanipulationengine.h Mon May 03 12:55:01 2010 +0300
+++ b/metadataengine/server/inc/mdsmanipulationengine.h Fri May 14 16:38:28 2010 +0300
@@ -32,7 +32,7 @@
class CMdSSqlObjectManipulate;
// CONSTANT DECLARATION
-const TInt KGarbageCollectionDelay = 60; // test 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__
--- a/metadataengine/server/inc/mdsserversession.h Mon May 03 12:55:01 2010 +0300
+++ b/metadataengine/server/inc/mdsserversession.h Fri May 14 16:38:28 2010 +0300
@@ -394,6 +394,9 @@
CMdCSerializationBuffer* CombineBuffersL(
CMdCSerializationBuffer& aLeftBuffer, CMdCSerializationBuffer& aRightBuffer );
+
+ CMdCSerializationBuffer* CombineUriNotificationsBuffersL(
+ CMdCSerializationBuffer& aLeftBuffer, CMdCSerializationBuffer& aRightBuffer );
CMdCSerializationBuffer* CombineItemBuffersL(
CMdCSerializationBuffer& aLeftBuffer, CMdCSerializationBuffer& aRightBuffer );
--- a/metadataengine/server/inc/mdssqlobjectmanipulate.h Mon May 03 12:55:01 2010 +0300
+++ b/metadataengine/server/inc/mdssqlobjectmanipulate.h Fri May 14 16:38:28 2010 +0300
@@ -483,6 +483,11 @@
RArray<TItemId>& 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
{
--- a/metadataengine/server/src/mdsfindsqlclause.cpp Mon May 03 12:55:01 2010 +0300
+++ b/metadataengine/server/src/mdsfindsqlclause.cpp Fri May 14 16:38:28 2010 +0300
@@ -659,7 +659,7 @@
iQueryBuf->AppendL( KAsBaseObject );
// if object definitions is BaseObject
- if( KBaseObjectDefId != iSourceObjectDef->GetId() )
+ if( iSourceObjectDef && KBaseObjectDefId != iSourceObjectDef->GetId() )
{
// "," + object def's table + namespace def id + " AS O ON BO.ObjectId=O.ObjectId "
iQueryBuf->AppendL( KComma );
@@ -1314,6 +1314,26 @@
iQueryBuf->AppendL( KObjectUriBeginsWith );
}
break;
+ case EObjectConditionCompareUriContains:
+ {
+ TPtrC16 uriPtr = iSerializedBuffer->ReceivePtr16L();
+
+ HBufC16* pattern = HBufC16::NewLC( uriPtr.Length() + 2 ); // prepare for %uri%
+
+ TPtr16 modPattern = pattern->Des();
+
+ // add wildcard before and after URI "%uri%"
+ modPattern.Append( KWildcard );
+ modPattern.Append( uriPtr );
+ modPattern.Append( KWildcard );
+
+ iVariables.AppendL( TColumn( pattern ) );
+
+ CleanupStack::Pop( pattern );
+
+ iQueryBuf->AppendL( KObjectUriBeginsWith );
+ }
+ break;
case EObjectConditionCompareFreeText:
{
TPtrC16 freetextPtr = iSerializedBuffer->ReceivePtr16L();
@@ -1538,7 +1558,7 @@
// (not multi object query or (multi object query and WHERE to search from
// doesn't match with WHAT to search))
if( KBaseObjectDefId != objectDefId && ( !iSourceObjectDefs ||
- ( iSourceObjectDefs && iObjectDef != iSourceObjectDef ) ) )
+ ( iSourceObjectDefs && iSourceObjectDef && iObjectDef != iSourceObjectDef ) ) )
{
objectDefId = iSourceObjectDef->GetId();
}
@@ -1576,7 +1596,7 @@
TDefId CMdSFindSqlClause::ObjectDefForPropertyCondition(TDefId aObjectDefId)
{
// if object def is not base object def
- if( KBaseObjectDefId != aObjectDefId )
+ if( iSourceObjectDef && KBaseObjectDefId != aObjectDefId )
{
const CMdsObjectDef* parent = iSourceObjectDef->GetParent();
--- a/metadataengine/server/src/mdsgarbagecollector.cpp Mon May 03 12:55:01 2010 +0300
+++ b/metadataengine/server/src/mdsgarbagecollector.cpp Fri May 14 16:38:28 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();
}
}
--- a/metadataengine/server/src/mdsmanipulationengine.cpp Mon May 03 12:55:01 2010 +0300
+++ b/metadataengine/server/src/mdsmanipulationengine.cpp Fri May 14 16:38:28 2010 +0300
@@ -31,6 +31,7 @@
#include "mdcserializationbuffer.h"
#include "mdeinternalerror.h"
#include "mdeerror.h"
+#include "mdscommoninternal.h"
// for CleanupResetAndDestroyPushL
#include <mmf/common/mmfcontrollerpluginresolver.h>
@@ -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(
--- a/metadataengine/server/src/mdsschema.cpp Mon May 03 12:55:01 2010 +0300
+++ b/metadataengine/server/src/mdsschema.cpp Fri May 14 16:38:28 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);" );
--- a/metadataengine/server/src/mdsserver.cpp Mon May 03 12:55:01 2010 +0300
+++ b/metadataengine/server/src/mdsserver.cpp Fri May 14 16:38:28 2010 +0300
@@ -354,6 +354,10 @@
__INIT_LOGGER;
StartL( KMdSServerName );
__LOGLB( ELogAlways, "Server start" );
+
+ RProcess process;
+ process.SetPriority( EPriorityBackground );
+ process.Close();
CheckInitSriptL();
@@ -361,10 +365,10 @@
CMdSSqLiteConnection* conn = CMdSSqLiteConnection::NewLC();
iDefaultDBConnection = conn;
MMdSDbConnectionPool::SetDefaultDB( conn );
-
- CMdSMaintenanceEngine::InitConnectionL();
CleanupStack::Pop( conn );
+ CMdSMaintenanceEngine::InitConnectionL();
+
iNotifier = CMdSNotifier::NewL();
InitializeL();
--- a/metadataengine/server/src/mdsserversession.cpp Mon May 03 12:55:01 2010 +0300
+++ b/metadataengine/server/src/mdsserversession.cpp Fri May 14 16:38:28 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 );
}
--- a/metadataengine/server/src/mdssqliteconnection.cpp Mon May 03 12:55:01 2010 +0300
+++ b/metadataengine/server/src/mdssqliteconnection.cpp Fri May 14 16:38:28 2010 +0300
@@ -75,14 +75,22 @@
void CMdSSqLiteConnection::OpenDbL( const TDesC& aDbFileName )
{
- _LIT8( KMdsSqlDbaConfig, "cache_size=10000; page_size=4096; encoding=\"UTF-16\";");
-
- TInt err = KErrNone;
+ _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
iDbFileName = aDbFileName.AllocL();
+ TBool setupForMdsServer( EFalse );
+ // Check if it is MDS server DB that is accessed, otherwise setup will be for Blacklist Server
+ if( iDbFileName->Des().FindF( KMdsSqlDbDefaultName ) != KErrNotFound )
+ {
+ setupForMdsServer = ETrue;
+ }
+
+ TInt err = KErrNone;
+
// we need to set up policy, because we use secure database
TSecurityPolicy defaultPolicy(TSecurityPolicy::EAlwaysPass);
RSqlSecurityPolicy sqlSecurityPolicy;
@@ -99,7 +107,14 @@
* First we try to open db. If this fails because db not creater yer, then
* try to create it. Otherwise we cannot open it and we leave
*/
- err = iMdeSqlDb.Open( *iDbFileName, &KMdsSqlDbaConfig );
+ if( setupForMdsServer )
+ {
+ err = iMdeSqlDb.Open( *iDbFileName, &KMdsSqlDbaConfig );
+ }
+ else
+ {
+ err = iMdeSqlDb.Open( *iDbFileName, &KBlacklistSqlDbaConfig );
+ }
if ( err != KErrNone )
{
__LOG1( ELogDb, "Cannot open database %d", err );
@@ -107,7 +122,14 @@
if( err == KErrNotFound )
{
__LOG1( ELogDb, "Cannot find database %d", err );
- err = iMdeSqlDb.Create( *iDbFileName, sqlSecurityPolicy, &KMdsSqlDbaConfig );
+ if( setupForMdsServer )
+ {
+ err = iMdeSqlDb.Create( *iDbFileName, sqlSecurityPolicy, &KMdsSqlDbaConfig );
+ }
+ else
+ {
+ err = iMdeSqlDb.Create( *iDbFileName, sqlSecurityPolicy, &KBlacklistSqlDbaConfig );
+ }
if( err != KErrNone )
{
__LOG1( ELogDb, "Unknown error while creating %d", err );
@@ -118,11 +140,25 @@
err == KSqlErrCorrupt )
{
__LOGLB( ELogDb, "Warning: Database is corrupted, will delete and re-create it." );
- err = DeleteAndReCreateDB( iDbFileName, sqlSecurityPolicy, &KMdsSqlDbaConfig );
+ if( setupForMdsServer )
+ {
+ err = DeleteAndReCreateDB( iDbFileName, sqlSecurityPolicy, &KMdsSqlDbaConfig );
+ }
+ else
+ {
+ err = DeleteAndReCreateDB( iDbFileName, sqlSecurityPolicy, &KBlacklistSqlDbaConfig );
+ }
if ( KErrNone == err )
{
- err = iMdeSqlDb.Open( *iDbFileName, &KMdsSqlDbaConfig );
+ if( setupForMdsServer )
+ {
+ err = iMdeSqlDb.Open( *iDbFileName, &KMdsSqlDbaConfig );
+ }
+ else
+ {
+ err = iMdeSqlDb.Open( *iDbFileName, &KBlacklistSqlDbaConfig );
+ }
if ( err != KErrNone )
{
__LOG1( ELogDb, "Cannot open database again after delete and re-create %d", err );
@@ -603,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,
--- a/metadataengine/server/src/mdssqlobjectmanipulate.cpp Mon May 03 12:55:01 2010 +0300
+++ b/metadataengine/server/src/mdssqlobjectmanipulate.cpp Fri May 14 16:38:28 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<CMdsNamespaceDef>& 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()
{
--- a/metadataengine/sis/package.pkg Mon May 03 12:55:01 2010 +0300
+++ b/metadataengine/sis/package.pkg Fri May 14 16:38:28 2010 +0300
@@ -28,4 +28,4 @@
;Files
"\EPOC32\RELEASE\ARMV5\UREL\mdeclient.dll" -"c:\sys\bin\mdeclient.dll"
"\EPOC32\RELEASE\ARMV5\UREL\mdccommon.dll" -"c:\sys\bin\mdccommon.dll"
-"\EPOC32\RELEASE\ARMV5\UREL\mdsserver.exe" -"c:\sys\bin\mdsserver.exe"
\ No newline at end of file
+"\EPOC32\RELEASE\ARMV5\UREL\!mdsserver.exe" -"c:\sys\bin\!mdsserver.exe"
\ No newline at end of file
--- a/rom/mds.iby Mon May 03 12:55:01 2010 +0300
+++ b/rom/mds.iby Fri May 14 16:38:28 2010 +0300
@@ -27,7 +27,7 @@
rem - MdE binaries
file=ABI_DIR\BUILD_DIR\mdeclient.dll SHARED_LIB_DIR\mdeclient.dll
file=ABI_DIR\BUILD_DIR\mdccommon.dll SHARED_LIB_DIR\mdccommon.dll
-file=ABI_DIR\BUILD_DIR\mdsserver.exe PROGRAMS_DIR\mdsserver.exe
+file=ABI_DIR\BUILD_DIR\!mdsserver.exe PROGRAMS_DIR\!mdsserver.exe
rem - MdE data files
data=EPOCROOT##epoc32\data\z\Private\200009F3\schema.mde PRIVATE\200009F3\schema.mde
@@ -45,20 +45,20 @@
file=ABI_DIR\BUILD_DIR\mdsfileserverplugin.pxt SHARED_LIB_DIR\mdsfileserverplugin.pxt
ECOM_PLUGIN(HarvesterImagePlugin.dll,HarvesterImagePlugin.rsc)
ECOM_PLUGIN(HarvesterVideoPlugin.dll,HarvesterVideoPlugin.rsc)
-//ECOM_PLUGIN(HarvesterMessagePlugin.dll,HarvesterMessagePlugin.rsc)
+ECOM_PLUGIN(HarvesterMessagePlugin.dll,HarvesterMessagePlugin.rsc)
ECOM_PLUGIN(harvesteromadrmplugin.dll,harvesteromadrmplugin.rsc)
ECOM_PLUGIN(harvesterwmvplugin.dll,harvesterwmvplugin.rsc)
ECOM_PLUGIN(harvesterrtpplugin.dll,harvesterrtpplugin.rsc)
ECOM_PLUGIN(harvesteraudioplugin.dll,harvesteraudioplugin.rsc)
rem - Blacklist server binaries
-file=ABI_DIR\BUILD_DIR\blacklistserver.exe PROGRAMS_DIR\blacklistserver.exe
+file=ABI_DIR\BUILD_DIR\!blacklistserver.exe PROGRAMS_DIR\!blacklistserver.exe
file=ABI_DIR\BUILD_DIR\blacklistclient.dll SHARED_LIB_DIR\blacklistclient.dll
file=ABI_DIR\BUILD_DIR\MonitorPluginInterface.dll SHARED_LIB_DIR\MonitorPluginInterface.dll
ECOM_PLUGIN(MMCMonitorPlugin.dll,MMCMonitorPlugin.rsc)
ECOM_PLUGIN(FileMonitorPlugin.dll,FileMonitorPlugin.rsc)
-//ECOM_PLUGIN(MessageMonitorPlugin.dll,MessageMonitorPlugin.rsc)
+ECOM_PLUGIN(MessageMonitorPlugin.dll,MessageMonitorPlugin.rsc)
ECOM_PLUGIN(mdsoomplugin.dll,mdsoomplugin.rsc)
file=ABI_DIR\BUILD_DIR\ContextPluginInterface.dll SHARED_LIB_DIR\ContextPluginInterface.dll
Binary file sis/mds/mds_stub.sis has changed
--- a/sis/mds/package.pkg Mon May 03 12:55:01 2010 +0300
+++ b/sis/mds/package.pkg Fri May 14 16:38:28 2010 +0300
@@ -17,7 +17,7 @@
&EN
;packet-header (name, uid, major, minor, build, type)
-#{"Metadata System Upgrade"},(0x200009F5), 10, 10, 6, TYPE=SA, RU
+#{"Metadata System Upgrade"},(0x200009F5), 10, 10, 7, TYPE=SA, RU
; Localised vendor name
%{"Nokia"}
@@ -31,7 +31,7 @@
; CenRep
"..\..\clfwrapper\conf\102828AC.txt"-"c:\private\10202be9\102828AC.txt"
"..\..\harvester\common\data\200009FE.txt"-"c:\private\10202be9\200009FE.txt"
-"..\..\locationmanager\conf\200071BE.txt"-"c:\private\10202be9\200071BE.txt"
+"..\..\locationmanager\data\200071BE.txt"-"c:\private\10202be9\200071BE.txt"
; contextengine
"\EPOC32\RELEASE\ARMV5\UREL\contextengine.dll" -"c:\sys\bin\contextengine.dll"
@@ -46,7 +46,7 @@
"\EPOC32\RELEASE\ARMV5\UREL\ContentListingFramework.dll" -"c:\sys\bin\ContentListingFramework.dll"
; blacklist
-"\EPOC32\RELEASE\ARMV5\UREL\blacklistserver.exe" -"c:\sys\bin\blacklistserver.exe"
+"\EPOC32\RELEASE\ARMV5\UREL\!blacklistserver.exe" -"c:\sys\bin\!blacklistserver.exe"
"\EPOC32\RELEASE\ARMV5\UREL\blacklistclient.dll" -"c:\sys\bin\blacklistclient.dll"
; composer plugins
@@ -97,7 +97,7 @@
; metadata engine
"\EPOC32\RELEASE\ARMV5\UREL\mdeclient.dll" -"c:\sys\bin\mdeclient.dll"
"\EPOC32\RELEASE\ARMV5\UREL\mdccommon.dll" -"c:\sys\bin\mdccommon.dll"
-"\EPOC32\RELEASE\ARMV5\UREL\mdsserver.exe" -"c:\sys\bin\mdsserver.exe"
+"\EPOC32\RELEASE\ARMV5\UREL\!mdsserver.exe" -"c:\sys\bin\!mdsserver.exe"
"\epoc32\release\armv5\udeb\mdswatchdog.exe"-"c:\sys\bin\mdswatchdog.exe"
--- a/sis/mds/package_separate.pkg Mon May 03 12:55:01 2010 +0300
+++ b/sis/mds/package_separate.pkg Fri May 14 16:38:28 2010 +0300
@@ -17,7 +17,7 @@
&EN
;packet-header (name, uid, major, minor, build, type)
-#{"Metadata System Upgrade"},(0x200009F5), 10, 10, 6, TYPE=SA, RU
+#{"Metadata System Upgrade"},(0x200009F5), 10, 10, 7, TYPE=SA, RU
; Localised vendor name
%{"Nokia"}
--- a/sis/mds/stub.pkg Mon May 03 12:55:01 2010 +0300
+++ b/sis/mds/stub.pkg Fri May 14 16:38:28 2010 +0300
@@ -17,7 +17,7 @@
&EN
; Header
-#{"Metadata System"}, (0x200009F5), 10, 10, 6, TYPE=SA
+#{"Metadata System"}, (0x200009F5), 10, 10, 7, TYPE=SA
; Localised Vendor name
%{"Nokia"}
--- a/watchdog/src/watchdog.cpp Mon May 03 12:55:01 2010 +0300
+++ b/watchdog/src/watchdog.cpp Fri May 14 16:38:28 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 );