--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpdeleteobject.cpp Tue Feb 02 01:11:40 2010 +0200
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpdeleteobject.cpp Fri Mar 19 09:40:39 2010 +0200
@@ -238,8 +238,13 @@
iDataProvider.AppendDeleteObjectsArrayL(iObjectMeta->DesC(CMTPObjectMetaData::ESuid));
case KErrNone:
//add for test
- __FLOG(_L8("KErrNone"));
- iFramework.ObjectMgr().RemoveObjectL( iObjectMeta->Uint(CMTPObjectMetaData::EHandle ));
+ __FLOG(_L8("KErrNone"));
+ //if the image object is new, we should update new picture count
+ if (MTPImageDpUtilits::IsNewPicture(*iObjectMeta))
+ {
+ iDataProvider.DecreaseNewPictures(1);
+ }
+ iFramework.ObjectMgr().RemoveObjectL( iObjectMeta->Uint(CMTPObjectMetaData::EHandle ));
iObjectsNotDelete--;
iResponseCode = EMTPRespCodePartialDeletion;
break;
@@ -261,6 +266,15 @@
{
__FLOG(_L8(">> CMTPImageDpDeleteObject::StartL"));
+ if(iCancelled)
+ {
+ __FLOG(_L8("Cancell the delete"));
+ CMTPRequestProcessor::SendResponseL(EMTPRespCodeTransactionCancelled);
+ iObjectsToDelete.Reset();
+ iCancelled = EFalse;
+ return;
+ }
+
TInt numObjectsToDelete = iObjectsToDelete.Count();
if ( numObjectsToDelete > 0 )