diff -r 5529f24b6aaf -r da1f3efa404b mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cdeleteobject.cpp --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cdeleteobject.cpp Mon Mar 08 21:44:04 2010 +0000 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cdeleteobject.cpp Sun Mar 14 13:11:48 2010 +0000 @@ -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" ) ); }