diff -r d45095c2f4f3 -r bee149131e4b mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cdeleteobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cdeleteobject.cpp Tue Feb 02 00:27:58 2010 +0200 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cdeleteobject.cpp Fri Feb 19 23:18:32 2010 +0200 @@ -18,12 +18,14 @@ #include #include +#include #include #include "cdeleteobject.h" #include "mmmtpdplogger.h" #include "mmmtpdpconfig.h" #include "cmmmtpdpmetadataaccesswrapper.h" +#include "mmmtpdputility.h" // static const TInt KMTPDriveGranularity = 5; @@ -91,7 +93,7 @@ KMTPDeleteObjectPolicy ), iObjectMgr( aFramework.ObjectMgr() ), iFs( aFramework.Fs() ), - iObjectsToDelete( KMmMtpRArrayGranularity ), + iObjectsToDelete( KMmMtpRArrayGranularity ), iDeleteError( KErrNone ), iDpConfig( aDpConfig ) { @@ -264,6 +266,10 @@ // 3. Delete object from framework db iObjectMgr.RemoveObjectL( aObjectInfo.Uint( CMTPObjectMetaData::EHandle ) ); + // 4. If the object has references, Delete references from reference manager + if ( MmMtpDpUtility::HasReference( aObjectInfo.Uint( CMTPObjectMetaData::EFormatCode ) ) ) + iFramework.ReferenceMgr().RemoveReferencesL( aObjectInfo.DesC( CMTPObjectMetaData::ESuid ) ); + PRINT( _L( "MM MTP <= CDeleteObject::DeleteObjectL" ) ); }