# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1272377123 -10800 # Node ID ab88d4a85041feef8fd87179969c669bd7058bbd # Parent 82c0024438c83c0da73878507e9f92c28d4ca0a0 Revision: 201015 Kit: 201017 diff -r 82c0024438c8 -r ab88d4a85041 clfwrapper/ClientSrc/CCLFDefaultOperation.cpp --- a/clfwrapper/ClientSrc/CCLFDefaultOperation.cpp Wed Apr 14 16:24:03 2010 +0300 +++ b/clfwrapper/ClientSrc/CCLFDefaultOperation.cpp Tue Apr 27 17:05:23 2010 +0300 @@ -26,6 +26,9 @@ #include #include "MGDebugPrint.h" +// for CleanupResetAndDestroyPushL +#include + // CONSTANTS const TInt KCLFGroupedItemArrayGranularity( 4 ); const TInt KCLFSortingStyleArrayGranularity( 3 ); @@ -475,6 +478,8 @@ const TArray& aSourceList, RPointerArray& aGroupedList ) { + CleanupResetAndDestroyPushL( aGroupedList ); + CDesCArray* tempAlbumNameArray = new (ELeave) CDesCArraySeg( KCLFGroupedItemArrayGranularity ); CleanupStack::PushL( tempAlbumNameArray ); @@ -511,6 +516,8 @@ } } CleanupStack::PopAndDestroy( tempAlbumNameArray ); + + CleanupStack::Pop( &aGroupedList ); } // End of File diff -r 82c0024438c8 -r ab88d4a85041 clfwrapper/ClientSrc/CCLFItemListModelImpl.cpp --- a/clfwrapper/ClientSrc/CCLFItemListModelImpl.cpp Wed Apr 14 16:24:03 2010 +0300 +++ b/clfwrapper/ClientSrc/CCLFItemListModelImpl.cpp Tue Apr 27 17:05:23 2010 +0300 @@ -29,6 +29,9 @@ #include #include "MGDebugPrint.h" +// for CleanupResetAndDestroyPushL +#include + // CONSTANTS const TInt KCLFResourceVersionNumber( 1 ); const TInt KCLFEmptyArrayGranularity( 1 ); @@ -443,10 +446,12 @@ void CCLFItemListModelImpl::CopyArrayL( const TArray& aSource, RPointerArray& aDest ) { + CleanupResetAndDestroyPushL( aDest ); for( TInt i = aSource.Count() - 1; i >=0; i--) { aDest.AppendL( aSource[i] ); } + CleanupStack::Pop( &aDest ); } // ----------------------------------------------------------------------------- diff -r 82c0024438c8 -r ab88d4a85041 harvester/blacklistclient/group/blacklistclient.mmp --- a/harvester/blacklistclient/group/blacklistclient.mmp Wed Apr 14 16:24:03 2010 +0300 +++ b/harvester/blacklistclient/group/blacklistclient.mmp Tue Apr 27 17:05:23 2010 +0300 @@ -37,6 +37,7 @@ LIBRARY euser.lib LIBRARY mdccommon.lib +LIBRARY efsrv.lib #if defined(WINSCW) deffile ../bwincw/blacklistclientwinscw.def diff -r 82c0024438c8 -r ab88d4a85041 harvester/blacklistclient/inc/blacklistclient.h --- a/harvester/blacklistclient/inc/blacklistclient.h Wed Apr 14 16:24:03 2010 +0300 +++ b/harvester/blacklistclient/inc/blacklistclient.h Tue Apr 27 17:05:23 2010 +0300 @@ -147,6 +147,11 @@ private: // private data + /** + * Handle to File server session. + */ + RFs iFs; + /*! @var iSessionOk flag to indicate if session is ok or not.*/ TBool iSessionOk; diff -r 82c0024438c8 -r ab88d4a85041 harvester/blacklistclient/src/blacklistclient.cpp --- a/harvester/blacklistclient/src/blacklistclient.cpp Wed Apr 14 16:24:03 2010 +0300 +++ b/harvester/blacklistclient/src/blacklistclient.cpp Tue Apr 27 17:05:23 2010 +0300 @@ -43,6 +43,7 @@ iBlacklistMemoryTable.ResetAndDestroy(); iBlacklistMemoryTable.Close(); iBlacklistChunk.Close(); + iFs.Close(); WRITELOG( "RBlacklistClient::~RBlacklistClient - end" ); } @@ -56,8 +57,15 @@ WRITELOG( "RBlacklistClient::Connect - begin" ); iSessionOk = EFalse; + + TInt error = iFs.Connect(); + + if( error != KErrNone ) + { + return error; + } - TInt error = StartServer(); + error = StartServer(); if ( error == KErrNone || error == KErrAlreadyExists ) { @@ -69,6 +77,10 @@ { iSessionOk = ETrue; } + else + { + iFs.Close(); + } WRITELOG( "RBlacklistClient::Connect - end" ); @@ -273,19 +285,35 @@ // RBlacklistClient::IsBlacklistedL() // --------------------------------------------------------------------------- // -EXPORT_C TBool RBlacklistClient::IsBlacklistedL( const TDesC& aUri, TUint32 aMediaId, TTime aLastModifiedTime ) +EXPORT_C TBool RBlacklistClient::IsBlacklistedL( const TDesC& aUri, TUint32 aMediaId, TTime /*aLastModifiedTime*/ ) { WRITELOG( "RBlacklistClient::IsBlacklistedL - begin" ); + if ( !iSessionOk ) + { + return EFalse; + } + const TInt index = GetListIndex( aUri, aMediaId ); if ( index >= 0 ) { + TEntry entry; + const TInt errorcode = iFs.Entry( aUri, entry ); + + if ( errorcode != KErrNone ) + { + return EFalse; + } + + TTime fileLastModified( 0 ); + fileLastModified = entry.iModified; + TInt64 modified( 0 ); modified = iBlacklistMemoryTable[index]->Modified(); if( modified > 0 ) { - if ( modified == aLastModifiedTime.Int64() ) + if ( modified == fileLastModified.Int64() ) { WRITELOG( "RBlacklistClient::IsBlacklistedL - file is blacklisted, modification time is the same" ); return ETrue; diff -r 82c0024438c8 -r ab88d4a85041 harvester/common/src/harvesterplugin.cpp --- a/harvester/common/src/harvesterplugin.cpp Wed Apr 14 16:24:03 2010 +0300 +++ b/harvester/common/src/harvesterplugin.cpp Tue Apr 27 17:05:23 2010 +0300 @@ -220,6 +220,7 @@ // EXPORT_C void CHarvesterPlugin::DoCancel() { + iState = EHarvesterIdle; } // --------------------------------------------------------------------------- diff -r 82c0024438c8 -r ab88d4a85041 harvester/common/src/harvesterpluginfactory.cpp --- a/harvester/common/src/harvesterpluginfactory.cpp Wed Apr 14 16:24:03 2010 +0300 +++ b/harvester/common/src/harvesterpluginfactory.cpp Tue Apr 27 17:05:23 2010 +0300 @@ -28,6 +28,9 @@ #include "mdsutils.h" #include "harvesterlog.h" +// for CleanupResetAndDestroyPushL +#include + const TInt KCacheItemCountForEventCaching = 1; // --------------------------------------------------------------------------- @@ -36,7 +39,7 @@ // CHarvesterPluginFactory::CHarvesterPluginFactory() : iBlacklist( NULL ), - iHarvesting( NULL ), + iHarvesting( EFalse ), iHarvesterEventManager( NULL ) { WRITELOG( "CHarvesterPluginFactory::CHarvesterPluginFactory()" ); @@ -338,6 +341,8 @@ void CHarvesterPluginFactory::GetSupportedPluginsL( RPointerArray& aSupportedPlugins, const TDesC& aExt ) { + CleanupResetAndDestroyPushL( aSupportedPlugins ); + const TInt pluginInfoCount = iHarvesterPluginInfoArray.Count(); TInt extCount = 0; for ( TInt i = pluginInfoCount; --i >= 0; ) @@ -358,6 +363,8 @@ } } } + + CleanupStack::Pop( &aSupportedPlugins ); } EXPORT_C TBool CHarvesterPluginFactory::IsSupportedFileExtension( const TDesC& aFileName ) diff -r 82c0024438c8 -r ab88d4a85041 harvester/harvesterplugins/VideoPlugin/src/harvestervideoplugin.cpp --- a/harvester/harvesterplugins/VideoPlugin/src/harvestervideoplugin.cpp Wed Apr 14 16:24:03 2010 +0300 +++ b/harvester/harvesterplugins/VideoPlugin/src/harvestervideoplugin.cpp Tue Apr 27 17:05:23 2010 +0300 @@ -178,44 +178,44 @@ // MPEG4 User::LeaveIfError( iMimeTypeMappings.InsertInOrder( THarvestingHandling( KExtensionMp4(), KNullDesC(), - TVideoMetadataHandling( TVideoMetadataHandling::EMp4LibHandling, KNullDesC(), + TVideoMetadataHandling( TVideoMetadataHandling::EHexilMetadataHandling, KNullDesC(), KMimeTypeVideoMp4(), KMimeTypeAudioMp4() ) ), cmp ) ); User::LeaveIfError( iMimeTypeMappings.InsertInOrder( THarvestingHandling( KExtensionMpg4(), KNullDesC(), - TVideoMetadataHandling( TVideoMetadataHandling::EMp4LibHandling, KNullDesC(), + TVideoMetadataHandling( TVideoMetadataHandling::EHexilMetadataHandling, KNullDesC(), KMimeTypeVideoMp4(), KMimeTypeAudioMp4() ) ), cmp ) ); User::LeaveIfError( iMimeTypeMappings.InsertInOrder( THarvestingHandling( KExtensionMpeg4(), KNullDesC(), - TVideoMetadataHandling( TVideoMetadataHandling::EMp4LibHandling, KNullDesC(), + TVideoMetadataHandling( TVideoMetadataHandling::EHexilMetadataHandling, KNullDesC(), KMimeTypeVideoMp4(), KMimeTypeAudioMp4() ) ), cmp ) ); User::LeaveIfError( iMimeTypeMappings.InsertInOrder( THarvestingHandling( KExtensionM4v(), KMimeTypeVideoMp4(), - TVideoMetadataHandling( TVideoMetadataHandling::EMp4LibHandling, KVideo(), + TVideoMetadataHandling( TVideoMetadataHandling::EHexilMetadataHandling, KVideo(), KMimeTypeVideoMp4(), KMimeTypeAudioMp4() ) ), cmp ) ); User::LeaveIfError( iMimeTypeMappings.InsertInOrder( THarvestingHandling( KExtensionM4a(), KMimeTypeAudioMp4(), - TVideoMetadataHandling( TVideoMetadataHandling::EMp4LibHandling, KAudio(), + TVideoMetadataHandling( TVideoMetadataHandling::EHexilMetadataHandling, KAudio(), KMimeTypeVideoMp4(), KMimeTypeAudioMp4() ) ), cmp ) ); // 3GP User::LeaveIfError( iMimeTypeMappings.InsertInOrder( THarvestingHandling( KExtension3gp(), KNullDesC(), - TVideoMetadataHandling( TVideoMetadataHandling::EMp4LibHandling, KNullDesC(), + TVideoMetadataHandling( TVideoMetadataHandling::EHexilMetadataHandling, KNullDesC(), KMimeTypeVideo3gpp(), KMimeTypeAudio3gpp() ) ), cmp ) ); User::LeaveIfError( iMimeTypeMappings.InsertInOrder( THarvestingHandling( KExtension3gpp(), KNullDesC(), - TVideoMetadataHandling( TVideoMetadataHandling::EMp4LibHandling, KNullDesC(), + TVideoMetadataHandling( TVideoMetadataHandling::EHexilMetadataHandling, KNullDesC(), KMimeTypeVideo3gpp(), KMimeTypeAudio3gpp() ) ), cmp ) ); User::LeaveIfError( iMimeTypeMappings.InsertInOrder( THarvestingHandling( KExtension3g2(), KNullDesC(), - TVideoMetadataHandling( TVideoMetadataHandling::EMp4LibHandling, KNullDesC(), + TVideoMetadataHandling( TVideoMetadataHandling::EHexilMetadataHandling, KNullDesC(), KMimeTypeVideo3gpp(), KMimeTypeAudio3gpp() ) ), cmp ) ); @@ -837,6 +837,7 @@ } else if( mapping->iHandler.iLibrary == TVideoMetadataHandling::EMp4LibHandling ) { +#ifdef MDS_MP4LIB_USAGE MP4Handle handle( 0 ); MP4Err mp4err = MP4_OK; @@ -926,6 +927,7 @@ { WRITELOG( "CHarvesterVideoPlugin - Error closing file handle" ); } +#endif } WRITELOG( "CHarvesterVideoPlugin - Closing file" ); CleanupStack::PopAndDestroy( &file ); @@ -1049,7 +1051,7 @@ } } } - + // Copyright if( aVHD.iCopyright && aVHD.iCopyright->Length() < iMaxTextLength ) { @@ -1099,8 +1101,9 @@ } } +#ifdef MDS_MP4LIB_USAGE void CHarvesterVideoPlugin::GetMp4Type( RFile64& aFile, TDes& aType ) - { + { WRITELOG( "CHarvesterVideoPlugin::GetMp4Mime - MP4ParseOpenFileHandle - start" ); MP4Handle handle; @@ -1139,6 +1142,11 @@ MP4ParseClose( handle ); } +#else +void CHarvesterVideoPlugin::GetMp4Type( RFile64& /*aFile*/, TDes& /*aType*/ ) + { + } +#endif void CHarvesterVideoPlugin::GetRmTypeL( RFile64& aFile, TDes& aType ) { diff -r 82c0024438c8 -r ab88d4a85041 harvester/monitorplugins/mmcplugin/src/mmcfilelist.cpp --- a/harvester/monitorplugins/mmcplugin/src/mmcfilelist.cpp Wed Apr 14 16:24:03 2010 +0300 +++ b/harvester/monitorplugins/mmcplugin/src/mmcfilelist.cpp Tue Apr 27 17:05:23 2010 +0300 @@ -31,6 +31,9 @@ #include #include "harvesterpluginfactory.h" +// for CleanupResetAndDestroyPushL +#include + _LIT( KBackslash, "\\"); const TInt KEntryBufferSize = 100; @@ -87,6 +90,9 @@ RPointerArray& aEntryArray ) { WRITELOG( "CMmcFileList::BuildFileListL - start" ); + + CleanupResetAndDestroyPushL( aEntryArray ); + CDesCArrayFlat* path = new(ELeave) CDesCArrayFlat( 10 ); CleanupStack::PushL( path ); TFileName firstPath; @@ -180,6 +186,8 @@ CleanupStack::PopAndDestroy( path ); + CleanupStack::Pop( &aEntryArray ); + WRITELOG( "CMmcFileList::BuildFileListL - end" ); } diff -r 82c0024438c8 -r ab88d4a85041 harvester/server/inc/harvesterqueue.h --- a/harvester/server/inc/harvesterqueue.h Wed Apr 14 16:24:03 2010 +0300 +++ b/harvester/server/inc/harvesterqueue.h Tue Apr 27 17:05:23 2010 +0300 @@ -19,6 +19,7 @@ #include #include "harvestermediaidutil.h" +#include "harvestereventmanager.h" // FORWARD DECLARATION class CHarvesterAO; @@ -118,6 +119,8 @@ // not own CHarvesterMediaIdUtil* iMediaIdUtil; + + CHarvesterEventManager* iHEM; }; #endif diff -r 82c0024438c8 -r ab88d4a85041 harvester/server/src/harvesterao.cpp --- a/harvester/server/src/harvesterao.cpp Wed Apr 14 16:24:03 2010 +0300 +++ b/harvester/server/src/harvesterao.cpp Tue Apr 27 17:05:23 2010 +0300 @@ -262,6 +262,9 @@ iHarvesterPluginFactory = CHarvesterPluginFactory::NewL(); iHarvesterPluginFactory->SetBlacklist( *iBlacklist ); + // Reset harvesting status for clients in case blacklisted file was handled + iHarvesterPluginFactory->SendHarvestingStatusEventL( EFalse ); + iCameraExtensionArray = new ( ELeave ) CDesCArraySeg( 6 ); iCameraExtensionArray->InsertIsqL( KExtensionMp4 ); iCameraExtensionArray->InsertIsqL( KExtensionMpg4 ); @@ -523,8 +526,6 @@ TRAP_IGNORE( iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeMMC, removed ) ); } - iMediaIdUtil->RemoveMediaId( aMediaId ); - removed = 0; RPointerArray& hpiArray = iHarvesterPluginFactory->GetPluginInfos(); @@ -570,6 +571,8 @@ } } + iMediaIdUtil->RemoveMediaId( aMediaId ); + // resume harvesting from last state if( !iRamFull && !iDiskFull ) { @@ -818,6 +821,7 @@ CMdEObjectDef& mdeObjectDef = defNS.GetObjectDefL( objDefStr ); CMdEObject* mdeObject = iMdESession->NewObjectL( mdeObjectDef, hd->Uri() ); + CleanupStack::PushL( mdeObject ); CPlaceholderData* phData = NULL; @@ -953,9 +957,12 @@ hd->SetMdeObject( mdeObject ); - mdeObjectArray.Append( mdeObject ); + // Ownership of mdeObject transferred to the array + mdeObjectArray.AppendL( mdeObject ); CleanupStack::PopAndDestroy( phData ); + + CleanupStack::Pop( mdeObject ); iReadyPHArray.Append( hd ); iPHArray.Remove( i ); diff -r 82c0024438c8 -r ab88d4a85041 harvester/server/src/harvesterqueue.cpp --- a/harvester/server/src/harvesterqueue.cpp Wed Apr 14 16:24:03 2010 +0300 +++ b/harvester/server/src/harvesterqueue.cpp Tue Apr 27 17:05:23 2010 +0300 @@ -75,6 +75,11 @@ iItemQueue.Close(); iFs.Close(); RMediaIdUtil::ReleaseInstance(); + + if (iHEM) + { + iHEM->ReleaseInstance(); + } } // --------------------------------------------------------------------------- @@ -86,6 +91,7 @@ WRITELOG( "CHarvesterQueue::ConstructL()" ); User::LeaveIfError( iFs.Connect() ); iMediaIdUtil = &RMediaIdUtil::GetInstanceL(); + iHEM = CHarvesterEventManager::GetInstanceL(); } // --------------------------------------------------------------------------- @@ -148,6 +154,8 @@ aItem->Uri(), mediaId, time ) ) { WRITELOG( "CHarvesterQueue::Append() - found a blacklisted file" ); + TRAP_IGNORE( iHEM->DecreaseItemCountL( EHEObserverTypePlaceholder ) ); + TRAP_IGNORE( iHEM->DecreaseItemCountL( EHEObserverTypeMMC ) ); if( aItem->EventType() == EHarvesterEdit ) { // Remove possible placeholder items from DB if file was blacklisted during harvesting diff -r 82c0024438c8 -r ab88d4a85041 mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/conf/HarvesterClientTestScripter.cfg --- a/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/conf/HarvesterClientTestScripter.cfg Wed Apr 14 16:24:03 2010 +0300 +++ b/mds_plat/harvester_framework_api/tsrc/HarvesterClientTest/conf/HarvesterClientTestScripter.cfg Tue Apr 27 17:05:23 2010 +0300 @@ -93,7 +93,7 @@ [Test] title HarvestFile 1 -timeout 180000 +timeout 500000 create HarvesterClientTestScripter test request Session test SetUp @@ -151,7 +151,7 @@ [Test] title HarvestFile 3 -timeout 180000 +timeout 500000 create HarvesterClientTestScripter test request Session test SetUp @@ -180,7 +180,7 @@ [Test] title HarvestFile 4 -timeout 200000 +timeout 500000 create HarvesterClientTestScripter test request Session test SetUp @@ -210,7 +210,7 @@ [Test] title HarvestFile 5 -timeout 180000 +timeout 500000 create HarvesterClientTestScripter test request Session test SetUp @@ -239,7 +239,7 @@ [Test] title HarvestFile 6 -timeout 180000 +timeout 500000 create HarvesterClientTestScripter test request Session test SetUp @@ -268,7 +268,7 @@ [Test] title HarvestFileWithUID 1 -timeout 180000 +timeout 500000 create HarvesterClientTestScripter test request Session test SetUp @@ -298,7 +298,7 @@ [Test] title HarvestFileWithUID 2 -timeout 180000 +timeout 500000 create HarvesterClientTestScripter test request Session test SetUp diff -r 82c0024438c8 -r ab88d4a85041 mds_plat/metadata_engine_api/tsrc/conf/MdETestScripter.cfg --- a/mds_plat/metadata_engine_api/tsrc/conf/MdETestScripter.cfg Wed Apr 14 16:24:03 2010 +0300 +++ b/mds_plat/metadata_engine_api/tsrc/conf/MdETestScripter.cfg Tue Apr 27 17:05:23 2010 +0300 @@ -1917,10 +1917,10 @@ 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 diff -r 82c0024438c8 -r ab88d4a85041 mds_pub/content_listing_framework_api/tsrc/conf/ContentListingFrameworkTest.cfg --- a/mds_pub/content_listing_framework_api/tsrc/conf/ContentListingFrameworkTest.cfg Wed Apr 14 16:24:03 2010 +0300 +++ b/mds_pub/content_listing_framework_api/tsrc/conf/ContentListingFrameworkTest.cfg Tue Apr 27 17:05:23 2010 +0300 @@ -82,14 +82,14 @@ delete test [Endtest] -[Test] -title Engine update test -create ContentListingFrameworkTest test -test EngineTestSetup -test UpdateItemsTest -test Teardown -delete test -[Endtest] +#[Test] +#title Engine update test +#create ContentListingFrameworkTest test +#test EngineTestSetup +#test UpdateItemsTest +#test Teardown +#delete test +#[Endtest] #[Test] #title Engine update test diff -r 82c0024438c8 -r ab88d4a85041 mds_pub/content_listing_framework_api/tsrc/src/ContentListingFrameworkTestBlocks.cpp --- a/mds_pub/content_listing_framework_api/tsrc/src/ContentListingFrameworkTestBlocks.cpp Wed Apr 14 16:24:03 2010 +0300 +++ b/mds_pub/content_listing_framework_api/tsrc/src/ContentListingFrameworkTestBlocks.cpp Tue Apr 27 17:05:23 2010 +0300 @@ -1497,7 +1497,7 @@ CreateNewFileL( 5, iFileName ); // update server -// to aTInt incorrect test result +// to avoid incorrect test result CreateNewFileL( 0, iFileName ); iEngine->UpdateItemsL(); diff -r 82c0024438c8 -r ab88d4a85041 metadataengine/client/src/mdesessionimpl.cpp --- a/metadataengine/client/src/mdesessionimpl.cpp Wed Apr 14 16:24:03 2010 +0300 +++ b/metadataengine/client/src/mdesessionimpl.cpp Tue Apr 27 17:05:23 2010 +0300 @@ -42,6 +42,9 @@ #include "mdeobjectcondition.h" #include "mdscommoninternal.h" +// for CleanupResetAndDestroyPushL +#include + RMdESessionAsyncRequest::RMdESessionAsyncRequest( TRequestType aRequestType, CMdCSerializationBuffer* aBuffer, CMdCSerializationBuffer& aResultBuffer, TRequestStatus& aRequestStatus) : @@ -1840,6 +1843,8 @@ CMdCSerializationBuffer& aBuffer, RPointerArray& aItems ) { + CleanupResetAndDestroyPushL( aItems ); + const TMdCItems& items = TMdCItems::GetFromBufferL( aBuffer ); CMdENamespaceDef& namespaceDef = GetNamespaceDefL( items.iNamespaceDefId ); @@ -1881,6 +1886,8 @@ CleanupStack::Pop( relation ); } } + + CleanupStack::Pop( &aItems ); } TItemId CMdESessionImpl::AddObjectL( CMdEObject& aObject ) @@ -2527,7 +2534,6 @@ &aObserver, *namespaceDef ); if ( index != KErrNotFound ) { - iNotifiers[index]->Cancel(); delete iNotifiers[index]; iNotifiers[index] = NULL; iNotifiers.Remove( index ); @@ -2549,7 +2555,6 @@ &aObserver, namespaceDef ); if ( index != KErrNotFound ) { - iNotifiers[index]->Cancel(); delete iNotifiers[index]; iNotifiers[index] = NULL; iNotifiers.Remove( index ); @@ -2580,7 +2585,6 @@ &aObserver, *namespaceDef ); if ( index != KErrNotFound ) { - iNotifiers[index]->Cancel(); delete iNotifiers[index]; iNotifiers[index] = NULL; iNotifiers.Remove( index ); @@ -2612,7 +2616,6 @@ &aObserver, *namespaceDef ); if ( index != KErrNotFound ) { - iNotifiers[index]->Cancel(); delete iNotifiers[index]; iNotifiers[index] = NULL; iNotifiers.Remove( index ); @@ -2634,7 +2637,6 @@ &aObserver, namespaceDef ); if ( index != KErrNotFound ) { - iNotifiers[index]->Cancel(); delete iNotifiers[index]; iNotifiers[index] = NULL; iNotifiers.Remove( index ); @@ -2664,7 +2666,6 @@ &aObserver, *namespaceDef ); if ( index != KErrNotFound ) { - iNotifiers[index]->Cancel(); delete iNotifiers[index]; iNotifiers[index] = NULL; iNotifiers.Remove( index ); @@ -2891,6 +2892,8 @@ void CMdESessionImpl::GetItemIdL( CMdCSerializationBuffer* aBuffer, RArray& aIdArray ) { + CleanupClosePushL( aIdArray ); + const TMdCItemIds& itemIds = TMdCItemIds::GetFromBufferL( *aBuffer ); if( itemIds.iObjectIds.iPtr.iCount > 0 ) @@ -2917,6 +2920,8 @@ aBuffer->ReceiveL( id ); aIdArray.AppendL( id ); } + + CleanupStack::Pop( &aIdArray ); } void CMdESessionImpl::GetDistinctValuesL( CMdCSerializationBuffer& aBuffer, @@ -3021,7 +3026,6 @@ &aObserver, *namespaceDef ); if ( index != KErrNotFound ) { - iNotifiers[index]->Cancel(); delete iNotifiers[index]; iNotifiers[index] = NULL; iNotifiers.Remove( index ); diff -r 82c0024438c8 -r ab88d4a85041 metadataengine/server/src/mdsfindsqlclause.cpp --- a/metadataengine/server/src/mdsfindsqlclause.cpp Wed Apr 14 16:24:03 2010 +0300 +++ b/metadataengine/server/src/mdsfindsqlclause.cpp Tue Apr 27 17:05:23 2010 +0300 @@ -15,6 +15,7 @@ */ // INCLUDE FILES +#include #include "mdsfindsqlclause.h" #include "mdsfindsqlclausedef.h" #include "mdsclausebuffer.h" @@ -2642,10 +2643,13 @@ { case EQueryResultModeItem: case EQueryResultModeId: + { + // "GROUP BY BO.ObjectId " + iQueryBuf->AppendL( KGroupByObjectId ); + } + break; case EQueryResultModeCount: { - // "GROUP BY BO.ObjectId " - iQueryBuf->AppendL( KGroupByObjectId ); } break; @@ -2664,6 +2668,12 @@ // void CMdSFindSqlClause::AppendOrderByL() { + if( iSearchCriteria->iQueryResultType == EQueryResultModeCount ) + { + // No need to sort or group if only one count is returned + return; + } + if( iSearchCriteria->iOrderRules.iPtr.iCount > 0 ) { iQueryBuf->AppendL( KOrderBy ); @@ -2828,7 +2838,7 @@ iQueryBuf->AppendL( KComma ); iQueryBuf->BufferL().AppendNum( iSearchCriteria->iOffset ); } - else if ( iSearchCriteria->iLimit != KMaxTUint32 ) + else if ( iSearchCriteria->iLimit != KMdEQueryDefaultMaxCount ) { // 10 is maximum length of text format TUint32 iQueryBuf->ReserveSpaceL( iQueryBuf->ConstBufferL().Length() + diff -r 82c0024438c8 -r ab88d4a85041 sis/mds/mds_stub.sis Binary file sis/mds/mds_stub.sis has changed diff -r 82c0024438c8 -r ab88d4a85041 sis/mds/package.pkg --- a/sis/mds/package.pkg Wed Apr 14 16:24:03 2010 +0300 +++ b/sis/mds/package.pkg Tue Apr 27 17:05:23 2010 +0300 @@ -17,7 +17,7 @@ &EN ;packet-header (name, uid, major, minor, build, type) -#{"Metadata System Upgrade"},(0x200009F5), 9, 20, 11, TYPE=SA, RU +#{"Metadata System Upgrade"},(0x200009F5), 9, 20, 13, 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" diff -r 82c0024438c8 -r ab88d4a85041 sis/mds/package_separate.pkg --- a/sis/mds/package_separate.pkg Wed Apr 14 16:24:03 2010 +0300 +++ b/sis/mds/package_separate.pkg Tue Apr 27 17:05:23 2010 +0300 @@ -17,7 +17,7 @@ &EN ;packet-header (name, uid, major, minor, build, type) -#{"Metadata System Upgrade"},(0x200009F5), 9, 20, 11, TYPE=SA, RU +#{"Metadata System Upgrade"},(0x200009F5), 9, 20, 13, TYPE=SA, RU ; Localised vendor name %{"Nokia"} diff -r 82c0024438c8 -r ab88d4a85041 sis/mds/stub.pkg --- a/sis/mds/stub.pkg Wed Apr 14 16:24:03 2010 +0300 +++ b/sis/mds/stub.pkg Tue Apr 27 17:05:23 2010 +0300 @@ -17,7 +17,7 @@ &EN ; Header -#{"Metadata System"}, (0x200009F5), 9, 20, 11, TYPE=SA +#{"Metadata System"}, (0x200009F5), 9, 20, 13, TYPE=SA ; Localised Vendor name %{"Nokia"}