--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpcopyobject.cpp Fri Feb 19 23:40:44 2010 +0200
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpcopyobject.cpp Fri Mar 12 15:46:41 2010 +0200
@@ -85,6 +85,7 @@
*/
CMTPImageDpCopyObject::CMTPImageDpCopyObject(MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection,CMTPImageDataProvider& aDataProvider) :
CMTPRequestProcessor(aFramework, aConnection, sizeof(KMTPCopyObjectPolicy)/sizeof(TMTPRequestElementInfo), KMTPCopyObjectPolicy),
+ iFramework(aFramework),
iDataProvider(aDataProvider)
{
__FLOG_OPEN(KMTPSubsystem, KComponent);
@@ -193,6 +194,13 @@
SetPreviousPropertiesL(aNewFileName);
iFramework.ObjectMgr().InsertObjectL(*iTargetObjectInfo);
+ //check object whether it is a new image object
+ if (MTPImageDpUtilits::IsNewPicture(*iTargetObjectInfo))
+ {
+ //increate new pictures count
+ iDataProvider.IncreaseNewPictures(1);
+ }
+
__FLOG(_L8("<< CMTPImageDpCopyObject::CopyFileL"));
CleanupStack::Pop(this);
return iTargetObjectInfo->Uint(CMTPObjectMetaData::EHandle);
@@ -261,7 +269,7 @@
TVolumeInfo volumeInfo;
User::LeaveIfError(iFramework.Fs().Volume(volumeInfo, drive));
- if(volumeInfo.iFree < fileEntry.iSize)
+ if(volumeInfo.iFree < fileEntry.FileSize())
{
result = EMTPRespCodeStoreFull;
}
@@ -295,6 +303,7 @@
iTargetObjectInfo = CMTPObjectMetaData::NewL();
iTargetObjectInfo->SetUint(CMTPObjectMetaData::EDataProviderId, iSrcObjectInfo->Uint(CMTPObjectMetaData::EDataProviderId));
iTargetObjectInfo->SetUint(CMTPObjectMetaData::EFormatCode, iSrcObjectInfo->Uint(CMTPObjectMetaData::EFormatCode));
+ iTargetObjectInfo->SetUint(CMTPObjectMetaData::EFormatSubCode, iSrcObjectInfo->Uint(CMTPObjectMetaData::EFormatSubCode));
iTargetObjectInfo->SetDesCL(CMTPObjectMetaData::EName, iSrcObjectInfo->DesC(CMTPObjectMetaData::EName));
iTargetObjectInfo->SetUint(CMTPObjectMetaData::ENonConsumable, iSrcObjectInfo->Uint(CMTPObjectMetaData::ENonConsumable));
iTargetObjectInfo->SetUint(CMTPObjectMetaData::EParentHandle, iNewParentHandle);