# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1286972942 -10800 # Node ID 142dacf7b30e0d73133e176d15e1ae69d451ae1a # Parent debf68073f2f0d52309ee61c69b4b2c4cd273665 Revision: 201035 Kit: 201041 diff -r debf68073f2f -r 142dacf7b30e backupandrestore/backupengine/src/sbecompressionandencryption.cpp --- a/backupandrestore/backupengine/src/sbecompressionandencryption.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/backupandrestore/backupengine/src/sbecompressionandencryption.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -709,7 +709,7 @@ iEncryptionHeader.iEncrypted, iEncryptionHeader.iBufferSize, iEncryptionHeader.iTotalSize); // Check we have a sensible encryption header - if ((iEncryptionHeader.iBufferSize < 0) || (iEncryptionHeader.iBufferSize >= KMaxTInt/2) || + if ((iEncryptionHeader.iBufferSize < 0) || (iEncryptionHeader.iTotalSize < 0)) { __LOG("CSBEDecompressAndEncrypt::CreateCipherL() - Corrupt data"); diff -r debf68073f2f -r 142dacf7b30e backupandrestore/backuptest/ABTester/group/bld.inf --- a/backupandrestore/backuptest/ABTester/group/bld.inf Wed Sep 15 13:07:27 2010 +0300 +++ b/backupandrestore/backuptest/ABTester/group/bld.inf Wed Oct 13 15:29:02 2010 +0300 @@ -33,10 +33,10 @@ ./abtester.oby /epoc32/rom/include/abtester.oby ./abtester.iby /epoc32/rom/include/abtester.iby - ../data/incremental_active_backup_registration.xml z:/private/0ab7e57c/backup_registration.xml - ../data/proxy_active_backup_registration.xml z:/private/0ab7e57d/backup_registration.xml - ../data/base_active_backup_registration.xml z:/private/0ab7e57e/backup_registration.xml - ../data/base_active_backup_registration2.xml z:/private/0ab7e58a/backup_registration.xml - ../data/base_active_backup_registration3.xml z:/private/0ab7e58b/backup_registration.xml - ../data/passive_backup_registration.xml z:/private/0ab7e58c/backup_registration.xml - ../data/backup_public_files_registration.xml z:/private/0fa00001/backup_registration.xml + ../data/incremental_active_backup_registration.xml z:/private/0AB7E57C/backup_registration.xml + ../data/proxy_active_backup_registration.xml z:/private/0AB7E57D/backup_registration.xml + ../data/base_active_backup_registration.xml z:/private/0AB7E57E/backup_registration.xml + ../data/base_active_backup_registration2.xml z:/private/0AB7E58A/backup_registration.xml + ../data/base_active_backup_registration3.xml z:/private/0AB7E58B/backup_registration.xml + ../data/passive_backup_registration.xml z:/private/0AB7E58C/backup_registration.xml + ../data/backup_public_files_registration.xml z:/private/0FA00001/backup_registration.xml diff -r debf68073f2f -r 142dacf7b30e connectivitymodules/SeCon/servers/pcconn/inc/sconbtengine.h --- a/connectivitymodules/SeCon/servers/pcconn/inc/sconbtengine.h Wed Sep 15 13:07:27 2010 +0300 +++ b/connectivitymodules/SeCon/servers/pcconn/inc/sconbtengine.h Wed Oct 13 15:29:02 2010 +0300 @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include const TInt KCenRepAddrBufSize = 2 * KBTDevAddrSize; diff -r debf68073f2f -r 142dacf7b30e connectivitymodules/SeCon/servers/pcconn/inc/sconimsireader.h --- a/connectivitymodules/SeCon/servers/pcconn/inc/sconimsireader.h Wed Sep 15 13:07:27 2010 +0300 +++ b/connectivitymodules/SeCon/servers/pcconn/inc/sconimsireader.h Wed Oct 13 15:29:02 2010 +0300 @@ -20,7 +20,7 @@ #define __SCONIMSIREADER_H__ #include -#include +#include enum TImsiReaderStatus { diff -r debf68073f2f -r 142dacf7b30e connectivitymodules/SeCon/servers/pcconn/src/sconpcconnserver.cpp --- a/connectivitymodules/SeCon/servers/pcconn/src/sconpcconnserver.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/connectivitymodules/SeCon/servers/pcconn/src/sconpcconnserver.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -18,7 +18,7 @@ #include // For RMemReadStream #include -#include +#include #include #include "sconpcconnclientserver.h" diff -r debf68073f2f -r 142dacf7b30e connectivitymodules/SeCon/services/pcd/src/sconsynchandler.cpp --- a/connectivitymodules/SeCon/services/pcd/src/sconsynchandler.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/connectivitymodules/SeCon/services/pcd/src/sconsynchandler.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -18,8 +18,8 @@ #include "sconsynchandler.h" #include -#include -#include +#include +#include #include #include #include diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpfileandfolderdp/inc/mtpfiledpconst.h --- a/mtpdataproviders/mtpfileandfolderdp/inc/mtpfiledpconst.h Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpfileandfolderdp/inc/mtpfiledpconst.h Wed Oct 13 15:29:02 2010 +0300 @@ -75,8 +75,7 @@ EMTPObjectPropCodeParentObject, EMTPObjectPropCodePersistentUniqueObjectIdentifier, EMTPObjectPropCodeName, - EMTPObjectPropCodeNonConsumable, - EMTPObjectPropCodeHidden + EMTPObjectPropCodeNonConsumable }; /** diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/inc/cmtpimagedp.h --- a/mtpdataproviders/mtpimagedp/inc/cmtpimagedp.h Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/inc/cmtpimagedp.h Wed Oct 13 15:29:02 2010 +0300 @@ -58,7 +58,7 @@ public: CMTPImageDpObjectPropertyMgr& PropertyMgr()const; - CMTPImageDpThumbnailCreator* ThumbnailManager(); + CMTPImageDpThumbnailCreator& ThumbnailManager() const; CRepository& Repository() const; TMTPFormatCode FindFormat(const TDesC& aExtension); @@ -67,7 +67,6 @@ void HandleDeleteObjectsArray(); void IncreaseNewPictures(TInt aCount); void DecreaseNewPictures(TInt aCount); - void ResetNewPictures(); void HandleMdeSessionCompleteL(TInt aError); public: // From CMTPDataProviderPlugin @@ -130,7 +129,6 @@ TBool iEnumerationNotified; RPointerArray iDeleteObjectsArray; - RArray iNewPicHandles; }; #endif // CMTPIMAGEDP_H diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/inc/cmtpimagedpgetformatcapabilities.h --- a/mtpdataproviders/mtpimagedp/inc/cmtpimagedpgetformatcapabilities.h Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/inc/cmtpimagedpgetformatcapabilities.h Wed Oct 13 15:29:02 2010 +0300 @@ -51,7 +51,6 @@ void ServiceOneFormatCapabilitiesL(TUint aFormatCode); CMTPTypeObjectPropDesc* ServiceProtectionStatusL(); CMTPTypeObjectPropDesc* ServiceNonConsumableL(); - CMTPTypeObjectPropDesc* ServiceHiddenL(); TUint16 GetPropertyGroupNumber(const TUint16 aPropCode) const; diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/inc/cmtpimagedpgetobjectpropdesc.h --- a/mtpdataproviders/mtpimagedp/inc/cmtpimagedpgetobjectpropdesc.h Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/inc/cmtpimagedpgetobjectpropdesc.h Wed Oct 13 15:29:02 2010 +0300 @@ -70,7 +70,6 @@ void ServiceRepresentativeSampleWidthL(); void ServiceRepresentativeSampleDataL(); void ServiceNonConsumableL(); - void ServiceHiddenL(); TUint16 GetPropertyGroupNumber(const TUint16 aPropCode) const; private: diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/inc/cmtpimagedpgetobjectpropvalue.h --- a/mtpdataproviders/mtpimagedp/inc/cmtpimagedpgetobjectpropvalue.h Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/inc/cmtpimagedpgetobjectpropvalue.h Wed Oct 13 15:29:02 2010 +0300 @@ -73,7 +73,6 @@ void ServiceRepresentativeSampleWidthL(); void ServiceRepresentativeSampleDataL(); void ServiceNonConsumableL(); - void ServiceHiddenL(); private: CMTPImageDpObjectPropertyMgr& iObjectPropertyMgr; diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/inc/cmtpimagedpsendobjectinfo.h --- a/mtpdataproviders/mtpimagedp/inc/cmtpimagedpsendobjectinfo.h Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/inc/cmtpimagedpsendobjectinfo.h Wed Oct 13 15:29:02 2010 +0300 @@ -175,7 +175,6 @@ CMTPObjectMetaData* iReceivedObject; TMTPTypeRequest iExpectedSendObjectRequest; TUint16 iProtectionStatus; - TUint16 iHiddenStatus; TUint16 iFormatCode; TUint32 iPreviousTransactionID; CMTPImageDpObjectPropertyMgr& iObjectPropertyMgr; diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/inc/mtpimagedpconst.h --- a/mtpdataproviders/mtpimagedp/inc/mtpimagedpconst.h Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/inc/mtpimagedpconst.h Wed Oct 13 15:29:02 2010 +0300 @@ -98,8 +98,7 @@ EMTPObjectPropCodeRepresentativeSampleHeight, EMTPObjectPropCodeRepresentativeSampleWidth, EMTPObjectPropCodeRepresentativeSampleData, - EMTPObjectPropCodeNonConsumable, - EMTPObjectPropCodeHidden + EMTPObjectPropCodeNonConsumable }; /** @@ -135,10 +134,7 @@ EMTPObjectPropCodeRepresentativeSampleSize, EMTPObjectPropCodeRepresentativeSampleHeight, EMTPObjectPropCodeRepresentativeSampleWidth, - EMTPObjectPropCodeRepresentativeSampleData, - - //From file system - EMTPObjectPropCodeHidden + EMTPObjectPropCodeRepresentativeSampleData }; /** diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp --- a/mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -96,6 +96,8 @@ { __FLOG_OPEN(KMTPSubsystem, KComponent); __FLOG(_L8(">> CMTPImageDataProvider::ConstructL")); + + iThumbnailManager = CMTPImageDpThumbnailCreator::NewL(*this); iNewPicNotifier = CMTPImageDpNewPicturesNotifier::NewL(); //Setup central repository connection @@ -118,10 +120,8 @@ } //Define RProperty of new pictures for status data provider - RProcess process; - TUid tSid = process.SecureId(); _LIT_SECURITY_POLICY_PASS(KAllowReadAll); - TInt error = RProperty::Define(tSid, KMTPNewPicKey, RProperty::EInt, KAllowReadAll, KAllowReadAll); + TInt error = RProperty::Define(TUid::Uid(KMTPServerUID), KMTPNewPicKey, RProperty::EInt, KAllowReadAll, KAllowReadAll); if (error != KErrNone && error != KErrAlreadyExists) { __FLOG_1(_L8("CMTPImageDataProvider::ConstructL - RProperty define error:%d"), error); @@ -165,7 +165,6 @@ //Try to delete objects in array HandleDeleteObjectsArray(); iDeleteObjectsArray.ResetAndDestroy(); - iNewPicHandles.Reset(); __FLOG(_L8("<< ~CMTPImageDataProvider")); __FLOG_CLOSE; @@ -452,14 +451,11 @@ __FLOG(_L8("<< NotifyStorageEnumerationCompleteL")); } -CMTPImageDpThumbnailCreator* CMTPImageDataProvider::ThumbnailManager() - { - if(NULL == iThumbnailManager) - { - TRAP_IGNORE(iThumbnailManager = CMTPImageDpThumbnailCreator::NewL(*this)); - } - return iThumbnailManager; - } +CMTPImageDpThumbnailCreator& CMTPImageDataProvider::ThumbnailManager() const + { + __ASSERT_DEBUG(iThumbnailManager, User::Invariant()); + return *iThumbnailManager; + } CMTPImageDpObjectPropertyMgr& CMTPImageDataProvider::PropertyMgr()const { @@ -614,7 +610,8 @@ /** * Get image object count from framework and calculate the new pictures */ - TUint newPictures = QueryImageObjectCountL(); + TUint newPictures = QueryImageObjectCountL(); + RProperty::Set(TUid::Uid(KMTPServerUID), KMTPNewPicKey, newPictures); iNewPicNotifier->SetNewPictures(newPictures); __FLOG_1(_L16("CMTPImageDpEnumerator::CompleteEnumeration - New Pics: %d"), newPictures); iEnumerated = EFalse; @@ -696,8 +693,6 @@ CleanupClosePushL(context); CleanupClosePushL(handles); - iNewPicHandles.Reset(); - do { /* @@ -717,7 +712,6 @@ if (MTPImageDpUtilits::IsNewPicture(*objMetadata)) { ++newPictures; - iNewPicHandles.Append(handles[i]); } } @@ -771,32 +765,6 @@ __FLOG(_L8("<< DecreaseNewPictures ")); } -void CMTPImageDataProvider::ResetNewPictures() - { - __FLOG(_L8(">> ResetNewPictures ")); - - iNewPicNotifier->SetNewPictures(0); - - TInt count = iNewPicHandles.Count(); - if (!count) - { - return; - } - - CMTPObjectMetaData* objMetadata = CMTPObjectMetaData::NewLC(); - - for (TInt i(0); i> HandleMdeSessionComplete")); diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/src/cmtpimagedpcopyobject.cpp --- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpcopyobject.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpcopyobject.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -45,7 +45,7 @@ const TMTPRequestElementInfo KMTPCopyObjectPolicy[] = { {TMTPTypeRequest::ERequestParameter2, EMTPElementTypeStorageId, EMTPElementAttrWrite, 0, 0, 0}, - {TMTPTypeRequest::ERequestParameter3, EMTPElementTypeObjectHandle, EMTPElementAttrDir, 1, 0, 0} + {TMTPTypeRequest::ERequestParameter3, EMTPElementTypeObjectHandle, EMTPElementAttrDir | EMTPElementAttrWrite, 1, 0, 0} }; /** diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobject.cpp --- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobject.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobject.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -155,7 +155,7 @@ { //update new picture status MTPImageDpUtilits::UpdateObjectStatusToOldL(iFramework, *objectInfo); - iDataProvider.ResetNewPictures(); + iDataProvider.DecreaseNewPictures(1); } } diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobjectpropdesc.cpp --- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobjectpropdesc.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobjectpropdesc.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -175,10 +175,7 @@ break; case EMTPObjectPropCodeNonConsumable: ServiceNonConsumableL(); - break; - case EMTPObjectPropCodeHidden: - ServiceHiddenL(); - break; + break; default: { //Leave @@ -437,21 +434,6 @@ iObjectProperty = CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeNonConsumable, *expectedForm); CleanupStack::PopAndDestroy(expectedForm); } - -void CMTPImageDpGetObjectPropDesc::ServiceHiddenL() - { - CMTPTypeObjectPropDescEnumerationForm* expectedForm = CMTPTypeObjectPropDescEnumerationForm::NewL(EMTPTypeUINT16); - CleanupStack::PushL(expectedForm); - TUint16 values[] = {EMTPVisible,EMTPHidden}; - TUint numValues((sizeof(values) / sizeof(values[0]))); - for (TUint i = 0; i < numValues; i++) - { - TMTPTypeUint16 data(values[i]); - expectedForm->AppendSupportedValueL(data); - } - iObjectProperty = CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeHidden, *expectedForm); - CleanupStack::PopAndDestroy(expectedForm); - } TUint16 CMTPImageDpGetObjectPropDesc::GetPropertyGroupNumber(const TUint16 aPropCode) const { diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobjectproplist.cpp --- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobjectproplist.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobjectproplist.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -424,24 +424,7 @@ propElem.SetUint8L(CMTPTypeObjectPropListElement::EValue, value); iPropertyList->CommitPropElemL(propElem); } - break; - case EMTPObjectPropCodeHidden: - { - TEntry FileEntry; - User::LeaveIfError(iFramework.Fs().Entry(iObjectMeta->DesC(CMTPObjectMetaData::ESuid), FileEntry)); - CMTPTypeObjectPropListElement& propElem = iPropertyList->ReservePropElemL(aHandle, aPropCode); - TBool isHidden = FileEntry.IsHidden(); - if ( isHidden ) - { - propElem.SetUint16L(CMTPTypeObjectPropListElement::EValue,EMTPHidden ); - } - else - { - propElem.SetUint16L(CMTPTypeObjectPropListElement::EValue,EMTPVisible ); - } - iPropertyList->CommitPropElemL(propElem); - } - break; + break; default: //Leave { diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobjectpropvalue.cpp --- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobjectpropvalue.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobjectpropvalue.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -189,10 +189,7 @@ break; case EMTPObjectPropCodeNonConsumable: ServiceNonConsumableL(); - break; - case EMTPObjectPropCodeHidden: - ServiceHiddenL(); - break; + break; default: User::Leave(KErrGeneral); } @@ -356,11 +353,3 @@ iMTPTypeUint8.Set(nonConsumable); SendDataL(iMTPTypeUint8); } - -void CMTPImageDpGetObjectPropValue::ServiceHiddenL() - { - TUint16 hiddenStatus; - iObjectPropertyMgr.GetPropertyL(EMTPObjectPropCodeHidden, hiddenStatus); - iMTPTypeUint16.Set(hiddenStatus); - SendDataL(iMTPTypeUint16); - } diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/src/cmtpimagedpgetthumb.cpp --- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpgetthumb.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpgetthumb.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -111,26 +111,21 @@ TEntry fileEntry; User::LeaveIfError(iFramework.Fs().Entry(iObjectMeta->DesC(CMTPObjectMetaData::ESuid), fileEntry)); - - CMTPImageDpThumbnailCreator* tnc = imgDp.ThumbnailManager(); - if(tnc != NULL) + imgDp.ThumbnailManager().GetThumbMgr()->SetFlagsL(CThumbnailManager::EDefaultFlags); + if(fileEntry.FileSize() > KFileSizeMax) { - tnc->GetThumbMgr()->SetFlagsL(CThumbnailManager::EDefaultFlags); - if(fileEntry.FileSize() > KFileSizeMax) - { - __FLOG(_L8(">> CMTPImageDpGetThumb::ServiceL, fileEntry.FileSize() > KFileSizeMax")); - tnc->GetThumbMgr()->SetFlagsL(CThumbnailManager::EDoNotCreate); - } - - tnc->GetThumbnailL(iObjectMeta->DesC(CMTPObjectMetaData::ESuid), thumbnailData, err); - imgDp.PropertyMgr().StoreThunmnail(iObjectMeta->Uint(CMTPObjectMetaData::EHandle), thumbnailData); + __FLOG(_L8(">> CMTPImageDpGetThumb::ServiceL, fileEntry.FileSize() > KFileSizeMax")); + imgDp.ThumbnailManager().GetThumbMgr()->SetFlagsL(CThumbnailManager::EDoNotCreate); } - //Transfer ownership of thumbnailData to Property Manager + + imgDp.ThumbnailManager().GetThumbnailL(iObjectMeta->DesC(CMTPObjectMetaData::ESuid), thumbnailData, err); + User::LeaveIfError(err); + User::LeaveIfNull(thumbnailData); + + //Transfer ownership of thumbnailData to Property Manager + imgDp.PropertyMgr().StoreThunmnail(iObjectMeta->Uint(CMTPObjectMetaData::EHandle), thumbnailData); } - if(thumbnailData != NULL) - { - iThumb->Write(*thumbnailData); - } + iThumb->Write(*thumbnailData); SendDataL(*iThumb); __FLOG(_L8("<< CMTPImageDpGetThumb::ServiceL")); } diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/src/cmtpimagedpnewpicturesnotifier.cpp --- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpnewpicturesnotifier.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpnewpicturesnotifier.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -44,7 +44,6 @@ void CMTPImageDpNewPicturesNotifier::SetNewPictures(TInt aValue) { iNewPictures = aValue; - RProperty::Set(TUid::Uid(KMTPServerUID), KMTPNewPicKey, iNewPictures); } void CMTPImageDpNewPicturesNotifier::IncreaseCount(TInt aValue) diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp --- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -68,9 +68,7 @@ CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache* CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::NewL() { CMTPImagePropertiesCache* self = new(ELeave) CMTPImagePropertiesCache(KElements, ENumProperties); - CleanupStack::PushL(self); self->ConstructL(); - CleanupStack::Pop(self); return self; } @@ -277,24 +275,6 @@ case EMTPObjectPropCodeProtectionStatus://this property does not supported by image dp //nothing to do break; - case EMTPObjectPropCodeHidden: - { - __ASSERT_ALWAYS(( EMTPHidden == aValue )||( EMTPVisible == aValue ), User::Leave(KErrArgument)); - TEntry entry; - User::LeaveIfError(iFramework.Fs().Entry(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), entry)); - if (( EMTPHidden == aValue ) && ( !entry.IsHidden())) - { - entry.iAtt &= ~KEntryAttHidden; - entry.iAtt |= KEntryAttHidden; - User::LeaveIfError(iFramework.Fs().SetAtt(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), entry.iAtt, ~entry.iAtt)); - } - else if (( EMTPVisible == aValue )&&( entry.IsHidden())) - { - entry.iAtt &= ~KEntryAttHidden; - User::LeaveIfError(iFramework.Fs().SetAtt(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), entry.iAtt, ~entry.iAtt)); - } - } - break; default: //nothing to do break; @@ -438,20 +418,7 @@ aValue = EMTPProtectionNoProtection; } } - break; - case EMTPObjectPropCodeHidden: - { - TInt err = iFs.Entry(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), entry); - if ( err == KErrNone && entry.IsHidden()) - { - aValue = EMTPHidden; - } - else - { - aValue = EMTPVisible; - } - } - break; + break; default: aValue = 0;//initialization //ingore the failure if we can't get properties form MdS @@ -485,23 +452,21 @@ */ TEntry fileEntry; TInt err = iFs.Entry(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), fileEntry); - CMTPImageDpThumbnailCreator* tnc = iDataProvider.ThumbnailManager(); - if (err == KErrNone && tnc != NULL) + if (err == KErrNone) { - if(fileEntry.FileSize() > KFileSizeMax || !alwaysCreate) { - tnc->GetThumbMgr()->SetFlagsL(CThumbnailManager::EDoNotCreate); + iDataProvider.ThumbnailManager().GetThumbMgr()->SetFlagsL(CThumbnailManager::EDoNotCreate); } else { - tnc->GetThumbMgr()->SetFlagsL(CThumbnailManager::EDefaultFlags); + iDataProvider.ThumbnailManager().GetThumbMgr()->SetFlagsL(CThumbnailManager::EDefaultFlags); } /** * trap the leave to avoid return general error when PC get object property list */ - TRAP(err, tnc->GetThumbnailL(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), iThumbnailCache.iThumbnailData, err)); + TRAP(err, iDataProvider.ThumbnailManager().GetThumbnailL(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), iThumbnailCache.iThumbnailData, err)); if (err == KErrNone) { iThumbnailCache.iObjectHandle = iObjectInfo->Uint(CMTPObjectMetaData::EHandle); @@ -517,10 +482,6 @@ } } } - else - { - aValue = KThumbCompressedSize; - } } break; @@ -636,23 +597,22 @@ */ TEntry fileEntry; TInt err = iFs.Entry(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), fileEntry); - CMTPImageDpThumbnailCreator* tnc = iDataProvider.ThumbnailManager(); - if (err == KErrNone && tnc != NULL) + if (err == KErrNone) { if(fileEntry.FileSize() > KFileSizeMax || !alwaysCreate) { - tnc->GetThumbMgr()->SetFlagsL(CThumbnailManager::EDoNotCreate); + iDataProvider.ThumbnailManager().GetThumbMgr()->SetFlagsL(CThumbnailManager::EDoNotCreate); } else { - tnc->GetThumbMgr()->SetFlagsL(CThumbnailManager::EDefaultFlags); + iDataProvider.ThumbnailManager().GetThumbMgr()->SetFlagsL(CThumbnailManager::EDefaultFlags); } /** * trap the leave to avoid return general error when PC get object property list */ - TRAP(err, tnc->GetThumbnailL(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), iThumbnailCache.iThumbnailData, err)); + TRAP(err, iDataProvider.ThumbnailManager().GetThumbnailL(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), iThumbnailCache.iThumbnailData, err)); if (err == KErrNone) { iThumbnailCache.iObjectHandle = iObjectInfo->Uint(CMTPObjectMetaData::EHandle); diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/src/cmtpimagedpsendobjectinfo.cpp --- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpsendobjectinfo.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpsendobjectinfo.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -98,7 +98,6 @@ CMTPImageDpSendObjectInfo::CMTPImageDpSendObjectInfo(MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection, CMTPImageDataProvider& aDataProvider) : CMTPRequestProcessor(aFramework, aConnection, 0, NULL), iDataProvider(aDataProvider), - iHiddenStatus( EMTPVisible ), iObjectPropertyMgr(aDataProvider.PropertyMgr()) { @@ -786,12 +785,12 @@ SendResponseL(EMTPRespCodeTransactionCancelled); } else if (result && !iCancelled) - { - TUint attValue = 0; - User::LeaveIfError(iFileReceived->File().Att(attValue)); + { if (iProtectionStatus == EMTPProtectionNoProtection || iProtectionStatus == EMTPProtectionReadOnly) { + TUint attValue = 0; + User::LeaveIfError(iFileReceived->File().Att(attValue)); attValue &= ~(KEntryAttNormal | KEntryAttReadOnly); if (iProtectionStatus == EMTPProtectionNoProtection) @@ -804,12 +803,6 @@ } User::LeaveIfError(iFileReceived->File().SetAtt(attValue, ~attValue)); } - if ( iHiddenStatus == EMTPHidden ) - { - attValue &= ~KEntryAttHidden; - attValue |= KEntryAttHidden; - User::LeaveIfError(iFileReceived->File().SetAtt(attValue, ~attValue)); - } TTime modifiedTime; //update datemodified property. if(iDateMod != NULL && iDateMod->Length()) @@ -1069,9 +1062,7 @@ case EMTPObjectPropCodeNonConsumable: iNonConsumable = aElement.Uint8L(CMTPTypeObjectPropListElement::EValue); break; - case EMTPObjectPropCodeHidden: - iHiddenStatus = aElement.Uint16L(CMTPTypeObjectPropListElement::EValue); - break; + default: break; } @@ -1142,7 +1133,6 @@ case EMTPObjectPropCodeRepresentativeSampleFormat: case EMTPObjectPropCodeProtectionStatus: - case EMTPObjectPropCodeHidden: if (aElement.Uint16L(CMTPTypeObjectPropListElement::EDatatype) != EMTPTypeUINT16) { responseCode = EMTPRespCodeInvalidObjectPropFormat; diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/src/cmtpimagedpsetobjectproplist.cpp --- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpsetobjectproplist.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpsetobjectproplist.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -116,10 +116,7 @@ case EMTPObjectPropCodeNonConsumable: iPropertyMgr.SetPropertyL(TMTPObjectPropertyCode(propertyCode), element.Uint8L(CMTPTypeObjectPropListElement::EValue)); objects.ModifyObjectL(*iObjectMeta); - break; - case EMTPObjectPropCodeHidden: - iPropertyMgr.SetPropertyL(TMTPObjectPropertyCode(propertyCode), element.Uint16L(CMTPTypeObjectPropListElement::EValue)); - break; + break; default: responseCode = EMTPRespCodeInvalidObjectPropCode; break; @@ -183,13 +180,7 @@ { responseCode = EMTPRespCodeInvalidObjectPropFormat; } - break; - case EMTPObjectPropCodeHidden: - if (aDataType != EMTPTypeUINT16) - { - responseCode = EMTPRespCodeInvalidObjectPropFormat; - } - break; + break; default: responseCode = EMTPRespCodeInvalidObjectPropCode; } diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/src/cmtpimagedpsetobjectpropvalue.cpp --- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpsetobjectpropvalue.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpsetobjectpropvalue.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -168,10 +168,7 @@ break; case EMTPObjectPropCodeNonConsumable: ReceiveDataL(iMTPTypeUint8); - break; - case EMTPObjectPropCodeHidden: - ReceiveDataL(iMTPTypeUint16); - break; + break; default: User::Leave(KErrGeneral); } @@ -236,13 +233,7 @@ iFramework.ObjectMgr().ModifyObjectL(*iObjectMeta); responseCode = EMTPRespCodeOK; } - break; - case EMTPObjectPropCodeHidden: - { - iObjectPropertyMgr.SetPropertyL(TMTPObjectPropertyCode(propCode), iMTPTypeUint16.Value()); - responseCode = EMTPRespCodeOK; - } - break; + break; default: responseCode = EMTPRespCodeInvalidObjectPropFormat; //Panic(EMTPImageDpUnsupportedProperty); diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/src/cmtpimagedpthumbnailcreator.cpp --- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpthumbnailcreator.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpthumbnailcreator.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -68,7 +68,7 @@ delete iBitmap; delete iObjectSource; delete iThumbMgr; - if(iActiveSchedulerWait != NULL && iActiveSchedulerWait->IsStarted()) + if(iActiveSchedulerWait->IsStarted()) { *iCreationErr = KErrNotReady; iActiveSchedulerWait->AsyncStop(); diff -r debf68073f2f -r 142dacf7b30e mtpdataproviders/mtpimagedp/src/mtpimagedpgetformatcapabilities.cpp --- a/mtpdataproviders/mtpimagedp/src/mtpimagedpgetformatcapabilities.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/src/mtpimagedpgetformatcapabilities.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -132,8 +132,7 @@ //EMTPObjectPropCodeNonConsumable frmCap->AppendL(ServiceNonConsumableL() ); - //EMTPObjectPropCodeHidden - frmCap->AppendL( ServiceHiddenL() ); + CMTPTypeObjectPropDesc::TPropertyInfo info; info.iDataType = EMTPTypeString; @@ -295,22 +294,6 @@ __FLOG(_L8("<< CMTPPictureDpGetFormatCapabilities::ConstructL")); } -CMTPTypeObjectPropDesc* CMTPImageDpGetFormatCapabilities::ServiceHiddenL() - { - CMTPTypeObjectPropDescEnumerationForm* expectedForm = CMTPTypeObjectPropDescEnumerationForm::NewL(EMTPTypeUINT16); - CleanupStack::PushL(expectedForm); - TUint16 values[] = {EMTPVisible, EMTPHidden}; - TUint numValues((sizeof(values) / sizeof(values[0]))); - for (TUint i = 0; i < numValues; i++) - { - TMTPTypeUint16 data(values[i]); - expectedForm->AppendSupportedValueL(data); - } - CMTPTypeObjectPropDesc* ret = CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeHidden, *expectedForm); - CleanupStack::PopAndDestroy(expectedForm); - return ret; - } - TUint16 CMTPImageDpGetFormatCapabilities::GetPropertyGroupNumber(const TUint16 aPropCode) const { for( TInt propCodeIndex = 0 ; propCodeIndex < KMTPImageDpGroupOneSize ; propCodeIndex++) diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/devdp/inc/mtpdevicedpconst.h --- a/mtpfws/mtpfw/dataproviders/devdp/inc/mtpdevicedpconst.h Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/devdp/inc/mtpdevicedpconst.h Wed Oct 13 15:29:02 2010 +0300 @@ -110,8 +110,7 @@ EMTPObjectPropCodeParentObject, EMTPObjectPropCodePersistentUniqueObjectIdentifier, EMTPObjectPropCodeName, - EMTPObjectPropCodeNonConsumable, - EMTPObjectPropCodeHidden + EMTPObjectPropCodeNonConsumable }; static const TUint16 KMTPDeviceDpSupportedEvents[] = diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedp.cpp --- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedp.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedp.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -388,9 +388,7 @@ if(extnpluginMap ) { - CleanupStack::PushL(extnpluginMap); iExtnPluginMapArray.AppendL(extnpluginMap); - CleanupStack::Pop(extnpluginMap); } } @@ -416,14 +414,7 @@ TInt lengthOfRight( folderRight.Length()); TFileName folderLeft; - // get root path of storage - TInt driveNumber; - User::LeaveIfError(Framework().Fs().CharToDrive(folderRight[0], driveNumber)); - RBuf rootDirPath; - rootDirPath.CreateL(KMaxFileName); - rootDirPath.CleanupClosePushL(); - iDevDpSingletons.ConfigMgr().GetRootDirPathL(driveNumber, rootDirPath); - rootDirPath.Insert(0, folderRight.Mid(0, 2));// get drive: + _LIT( KRootFolder, "?:\\"); /* Go through from beginning. @@ -441,7 +432,7 @@ lengthOfRight = folderRight.Length()-pos -1; folderRight.Set( folderRight.Right( lengthOfRight )); - if ( rootDirPath.FindF(folderLeft) != KErrNotFound) + if ( KErrNotFound != folderLeft.Match( KRootFolder )) { //first time, root folder //continue @@ -451,7 +442,7 @@ handle = Framework().ObjectMgr().HandleL( folderLeft ); } while( KMTPHandleNone != handle ); - CleanupStack::PopAndDestroy(&rootDirPath); + if ( KMTPHandleNone == handle ) { diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/devdp/src/cmtptypedeviceinfo.cpp --- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtptypedeviceinfo.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtptypedeviceinfo.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -130,9 +130,7 @@ } __ASSERT_DEBUG(chunk, User::Invariant()); - CleanupStack::PushL(chunk); ChunkAppendL(*chunk); - CleanupStack::Pop(chunk); } } } diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/dputility/inc/cmtpcopyobject.h --- a/mtpfws/mtpfw/dataproviders/dputility/inc/cmtpcopyobject.h Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/dputility/inc/cmtpcopyobject.h Wed Oct 13 15:29:02 2010 +0300 @@ -84,7 +84,6 @@ TUint32 iNewParentHandle; TUint32 iStorageId; TTime iPreviousModifiedTime; - TBool iIsHidden; RMTPFramework iSingletons; RMTPDpSingletons iDpSingletons; CPeriodic* iTimer; diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/dputility/inc/cmtpgetformatcapabilities.h --- a/mtpfws/mtpfw/dataproviders/dputility/inc/cmtpgetformatcapabilities.h Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/dputility/inc/cmtpgetformatcapabilities.h Wed Oct 13 15:29:02 2010 +0300 @@ -52,7 +52,6 @@ CMTPTypeObjectPropDesc* ServiceProtectionStatusL(); CMTPTypeObjectPropDesc* ServiceAssociationTypeL(); CMTPTypeObjectPropDesc* ServiceNonConsumableL(); - CMTPTypeObjectPropDesc* ServiceHiddenL(); private: // Owned diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/dputility/inc/cmtpgetobjectpropdesc.h --- a/mtpfws/mtpfw/dataproviders/dputility/inc/cmtpgetobjectpropdesc.h Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/dputility/inc/cmtpgetobjectpropdesc.h Wed Oct 13 15:29:02 2010 +0300 @@ -62,7 +62,6 @@ void ServicePuidL(); void ServiceNameL(); void ServiceNonConsumableL(); - void ServiceHiddenL(); TUint16 GetPropertyGroupNumber(const TUint16 aPropCode) const; private: diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/dputility/inc/cmtpgetobjectpropvalue.h --- a/mtpfws/mtpfw/dataproviders/dputility/inc/cmtpgetobjectpropvalue.h Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/dputility/inc/cmtpgetobjectpropvalue.h Wed Oct 13 15:29:02 2010 +0300 @@ -69,8 +69,6 @@ void ServicePuidL(); void ServiceNameL(); void ServiceNonConsumableL(); - void ServiceHiddenL(); - private: TMTPTypeUint8 iMTPTypeUint8; TMTPTypeUint16 iMTPTypeUint16; diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/dputility/inc/cmtpmoveobject.h --- a/mtpfws/mtpfw/dataproviders/dputility/inc/cmtpmoveobject.h Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/dputility/inc/cmtpmoveobject.h Wed Oct 13 15:29:02 2010 +0300 @@ -85,7 +85,6 @@ CPeriodic* iTimer; HBufC* iNewFileName; TBool iIsFolder; - TBool iIsHidden; /** FLOGGER debug trace member variable. */ diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/dputility/inc/cmtpsendobjectinfo.h --- a/mtpfws/mtpfw/dataproviders/dputility/inc/cmtpsendobjectinfo.h Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/dputility/inc/cmtpsendobjectinfo.h Wed Oct 13 15:29:02 2010 +0300 @@ -123,7 +123,6 @@ TBool iIsFolder; TMTPTypeNull iNullObject; TUint16 iProtectionStatus; - TUint16 iHiddenStatus; TUint32 iPreviousTransactionID; RMTPDpSingletons iDpSingletons; TFileName iName; diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/dputility/inc/mtpdpconst.h --- a/mtpfws/mtpfw/dataproviders/dputility/inc/mtpdpconst.h Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/dputility/inc/mtpdpconst.h Wed Oct 13 15:29:02 2010 +0300 @@ -40,8 +40,7 @@ EMTPObjectPropCodeParentObject, EMTPObjectPropCodePersistentUniqueObjectIdentifier, EMTPObjectPropCodeName, - EMTPObjectPropCodeNonConsumable, - EMTPObjectPropCodeHidden + EMTPObjectPropCodeNonConsumable }; /** @@ -65,7 +64,7 @@ static const TUint16 KMTPDpPropertyGroups[KMTPDpPropertyGroupNumber+1][KMTPDpPropertyNumber] = { {}, // group 0 is not used. - // group 1 contains 11 proeprties + // group 1 contains 10 proeprties { EMTPObjectPropCodeStorageID, EMTPObjectPropCodeObjectFormat, EMTPObjectPropCodeProtectionStatus, @@ -75,8 +74,7 @@ EMTPObjectPropCodeParentObject, EMTPObjectPropCodePersistentUniqueObjectIdentifier, EMTPObjectPropCodeName, - EMTPObjectPropCodeNonConsumable, - EMTPObjectPropCodeHidden} + EMTPObjectPropCodeNonConsumable } }; diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/dputility/src/cmtpcopyobject.cpp --- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpcopyobject.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpcopyobject.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -359,12 +359,6 @@ { __FLOG(_L8("GetPreviousPropertiesL - Entry")); User::LeaveIfError(iFramework.Fs().Modified(aFileName, iPreviousModifiedTime)); - if ( iIsFolder ) - { - TEntry fileEntry; - User::LeaveIfError(iFramework.Fs().Entry( aFileName, fileEntry )); - iIsHidden = fileEntry.IsHidden(); - } __FLOG(_L8("GetPreviousPropertiesL - Exit")); } @@ -375,14 +369,6 @@ { __FLOG(_L8("SetPreviousPropertiesL - Entry")); User::LeaveIfError(iFramework.Fs().SetModified(aFileName, iPreviousModifiedTime)); - if ( iIsFolder && iIsHidden ) - { - TEntry fileEntry; - User::LeaveIfError(iFramework.Fs().Entry( aFileName, fileEntry )); - fileEntry.iAtt &= ~KEntryAttHidden; - fileEntry.iAtt |= KEntryAttHidden; - User::LeaveIfError(iFramework.Fs().SetAtt( aFileName, fileEntry.iAtt, ~fileEntry.iAtt)); - } __FLOG(_L8("SetPreviousPropertiesL - Exit")); } diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetformatcapabilities.cpp --- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetformatcapabilities.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetformatcapabilities.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -95,77 +95,44 @@ CMTPTypeFormatCapability* frmCap = CMTPTypeFormatCapability::NewLC( EMTPFormatCodeAssociation ,interDesc ); //EMTPObjectPropCodeStorageID - CMTPTypeObjectPropDesc* storageId = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeStorageID); - frmCap->AppendL(storageId); - CleanupStack::Pop(storageId); + frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeStorageID) ); //EMTPObjectPropCodeObjectFormat - CMTPTypeObjectPropDesc* objFormat = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeObjectFormat); - frmCap->AppendL(objFormat); - CleanupStack::Pop(objFormat); + frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeObjectFormat) ); //EMTPObjectPropCodeProtectionStatus - CMTPTypeObjectPropDesc* protectionStatus = ServiceProtectionStatusL(); - CleanupStack::PushL(protectionStatus); - frmCap->AppendL(protectionStatus); - CleanupStack::Pop(protectionStatus); + frmCap->AppendL( ServiceProtectionStatusL() ); //EMTPObjectPropCodeAssociationType - CMTPTypeObjectPropDesc* associationType = ServiceAssociationTypeL(); - CleanupStack::PushL(associationType); - frmCap->AppendL(associationType); - CleanupStack::Pop(associationType); + frmCap->AppendL( ServiceAssociationTypeL() ); //EMTPObjectPropCodeAssociationDesc - CMTPTypeObjectPropDesc* associationDesc = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeAssociationDesc); - frmCap->AppendL(associationDesc); - CleanupStack::Pop(associationDesc); + frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeAssociationDesc) ); //EMTPObjectPropCodeObjectSize - CMTPTypeObjectPropDesc* objSize = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeObjectSize); - frmCap->AppendL(objSize); - CleanupStack::Pop(objSize); + frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeObjectSize) ); //EMTPObjectPropCodeObjectFileName _LIT(KMtpObjDescObjFileName, "[a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~][a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~ ]{0, 7}\\.[[a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~][a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~ ]{0, 2}]?"); - CMTPTypeString* form = CMTPTypeString::NewLC( KMtpObjDescObjFileName ); - CMTPTypeObjectPropDesc* objFileName = CMTPTypeObjectPropDesc::NewLC( EMTPObjectPropCodeObjectFileName, - CMTPTypeObjectPropDesc::ERegularExpressionForm, form); - frmCap->AppendL(objFileName); - CleanupStack::Pop(objFileName); + CMTPTypeString* form = CMTPTypeString::NewLC( KMtpObjDescObjFileName ); + frmCap->AppendL(CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeObjectFileName, + CMTPTypeObjectPropDesc::ERegularExpressionForm, form)); CleanupStack::PopAndDestroy(form ); //EMTPObjectPropCodeDateModified - CMTPTypeObjectPropDesc* dateModified = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeDateModified); - frmCap->AppendL(dateModified); - CleanupStack::Pop(dateModified); + frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeDateModified) ); //EMTPObjectPropCodeParentObject - CMTPTypeObjectPropDesc* parentobj = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeParentObject); - frmCap->AppendL(parentobj); - CleanupStack::Pop(parentobj); + frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeParentObject) ); //EMTPObjectPropCodePersistentUniqueObjectIdentifier - CMTPTypeObjectPropDesc* objectIdentifier = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodePersistentUniqueObjectIdentifier); - frmCap->AppendL(objectIdentifier); - CleanupStack::Pop(objectIdentifier); + frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodePersistentUniqueObjectIdentifier) ); //EMTPObjectPropCodeName - CMTPTypeObjectPropDesc* name = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeName); - frmCap->AppendL(name); - CleanupStack::Pop(name); + frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeName)); //EMTPObjectPropCodeNonConsumable - CMTPTypeObjectPropDesc* nonConsumable = ServiceNonConsumableL(); - CleanupStack::PushL(nonConsumable); - frmCap->AppendL(nonConsumable); - CleanupStack::Pop(nonConsumable); - - //Hidden - CMTPTypeObjectPropDesc* hidden = ServiceHiddenL(); - CleanupStack::PushL( hidden ); - frmCap->AppendL( hidden ); - CleanupStack::Pop( hidden ); + frmCap->AppendL(ServiceNonConsumableL() ); iCapabilityList->AppendL(frmCap); CleanupStack::Pop(frmCap); @@ -179,65 +146,38 @@ CMTPTypeFormatCapability* frmCap = CMTPTypeFormatCapability::NewLC( aFormatCode ,interDesc ); //EMTPObjectPropCodeStorageID - CMTPTypeObjectPropDesc* storageID = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeStorageID); - frmCap->AppendL(storageID); - CleanupStack::Pop(storageID); + frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeStorageID) ); //EMTPObjectPropCodeObjectFormat - CMTPTypeObjectPropDesc* objectFormat = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeObjectFormat); - frmCap->AppendL(objectFormat); - CleanupStack::Pop(objectFormat); + frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeObjectFormat) ); //EMTPObjectPropCodeProtectionStatus - CMTPTypeObjectPropDesc* protectionStatus = ServiceProtectionStatusL(); - CleanupStack::PushL(protectionStatus); - frmCap->AppendL(protectionStatus); - CleanupStack::Pop(protectionStatus); + frmCap->AppendL( ServiceProtectionStatusL() ); //EMTPObjectPropCodeObjectSize - CMTPTypeObjectPropDesc* objSize = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeObjectSize); - frmCap->AppendL(objSize); - CleanupStack::Pop(objSize); + frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeObjectSize) ); //EMTPObjectPropCodeObjectFileName _LIT(KMtpObjDescObjFileName, "[a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~][a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~ ]{0, 7}\\.[[a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~][a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~ ]{0, 2}]?"); - CMTPTypeString* form = CMTPTypeString::NewLC( KMtpObjDescObjFileName ); - CMTPTypeObjectPropDesc* objFileName = CMTPTypeObjectPropDesc::NewLC( EMTPObjectPropCodeObjectFileName, - CMTPTypeObjectPropDesc::ERegularExpressionForm, form); - frmCap->AppendL(objFileName); - CleanupStack::Pop(objFileName); + CMTPTypeString* form = CMTPTypeString::NewLC( KMtpObjDescObjFileName ); + frmCap->AppendL(CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeObjectFileName, + CMTPTypeObjectPropDesc::ERegularExpressionForm, form)); CleanupStack::PopAndDestroy(form ); //EMTPObjectPropCodeDateModified - CMTPTypeObjectPropDesc* dateModified = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeDateModified); - frmCap->AppendL(dateModified); - CleanupStack::Pop(dateModified); + frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeDateModified) ); //EMTPObjectPropCodeParentObject - CMTPTypeObjectPropDesc* parentObject = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeParentObject); - frmCap->AppendL(parentObject); - CleanupStack::Pop(parentObject); + frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeParentObject) ); //EMTPObjectPropCodePersistentUniqueObjectIdentifier - CMTPTypeObjectPropDesc* objectIdentifier = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodePersistentUniqueObjectIdentifier); - frmCap->AppendL(objectIdentifier); - CleanupStack::Pop(objectIdentifier); + frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodePersistentUniqueObjectIdentifier) ); //EMTPObjectPropCodeName - CMTPTypeObjectPropDesc* name = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeName); - frmCap->AppendL(name); - CleanupStack::Pop(name); + frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeName)); //EMTPObjectPropCodeNonConsumable - CMTPTypeObjectPropDesc* nonConsumable = ServiceNonConsumableL(); - CleanupStack::PushL(nonConsumable); - frmCap->AppendL(nonConsumable); - CleanupStack::Pop(nonConsumable); - //Hidden - CMTPTypeObjectPropDesc* hidden = ServiceHiddenL(); - CleanupStack::PushL( hidden ); - frmCap->AppendL( hidden ); - CleanupStack::Pop( hidden ); + frmCap->AppendL(ServiceNonConsumableL() ); iCapabilityList->AppendL(frmCap); CleanupStack::Pop(frmCap); @@ -306,23 +246,6 @@ return ret; } -CMTPTypeObjectPropDesc* CMTPGetFormatCapabilities::ServiceHiddenL() - { - CMTPTypeObjectPropDescEnumerationForm* expectedForm = CMTPTypeObjectPropDescEnumerationForm::NewL(EMTPTypeUINT16); - CleanupStack::PushL(expectedForm); - TUint16 values[] = {EMTPVisible, EMTPHidden}; - TUint numValues((sizeof(values) / sizeof(values[0]))); - for (TUint i = 0; i < numValues; i++) - { - TMTPTypeUint16 data(values[i]); - expectedForm->AppendSupportedValueL(data); - } - CMTPTypeObjectPropDesc* ret = CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeHidden, *expectedForm); - CleanupStack::PopAndDestroy(expectedForm); - - return ret; - } - TMTPResponseCode CMTPGetFormatCapabilities::CheckRequestL() { TMTPResponseCode response = CMTPRequestProcessor::CheckRequestL(); diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetobjectpropdesc.cpp --- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetobjectpropdesc.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetobjectpropdesc.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -157,9 +157,6 @@ case EMTPObjectPropCodeNonConsumable: ServiceNonConsumableL(); break; - case EMTPObjectPropCodeHidden: - ServiceHiddenL(); - break; default: User::Leave( KErrNotSupported ); break; @@ -297,20 +294,7 @@ CleanupStack::PopAndDestroy(expectedForm); } -void CMTPGetObjectPropDesc::ServiceHiddenL() - { - CMTPTypeObjectPropDescEnumerationForm* expectedForm = CMTPTypeObjectPropDescEnumerationForm::NewL(EMTPTypeUINT16); - CleanupStack::PushL(expectedForm); - TUint16 values[] = {EMTPVisible,EMTPHidden}; - TUint numValues((sizeof(values) / sizeof(values[0]))); - for (TUint i = 0; i < numValues; i++) - { - TMTPTypeUint16 data(values[i]); - expectedForm->AppendSupportedValueL(data); - } - iObjectProperty = CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeHidden, *expectedForm); - CleanupStack::PopAndDestroy(expectedForm); - } + TUint16 CMTPGetObjectPropDesc::GetPropertyGroupNumber(const TUint16 aPropCode) const { diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetobjectproplist.cpp --- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetobjectproplist.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetobjectproplist.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -477,22 +477,7 @@ iPropertyList->CommitPropElemL(propElem); } } - break; - case EMTPObjectPropCodeHidden: - { - TBool isHidden = iFileEntry.IsHidden(); - CMTPTypeObjectPropListElement& propElem = iPropertyList->ReservePropElemL(aHandle, aPropCode); - if ( isHidden ) - { - propElem.SetUint16L(CMTPTypeObjectPropListElement::EValue, EMTPHidden); - } - else - { - propElem.SetUint16L(CMTPTypeObjectPropListElement::EValue, EMTPVisible); - } - iPropertyList->CommitPropElemL(propElem); - } - break; + break; default: User::Leave( KErrNotSupported ); break; diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetobjectpropvalue.cpp --- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetobjectpropvalue.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetobjectpropvalue.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -165,9 +165,6 @@ case EMTPObjectPropCodeNonConsumable: ServiceNonConsumableL(); break; - case EMTPObjectPropCodeHidden: - ServiceHiddenL(); - break; default: User::Leave( KErrNotSupported ); break; @@ -268,19 +265,6 @@ SendDataL(iMTPTypeUint8); } -void CMTPGetObjectPropValue::ServiceHiddenL() - { - TBool isHidden = iFileEntry.IsHidden(); - if ( isHidden ) - { - iMTPTypeUint16.Set(EMTPHidden); - } - else - { - iMTPTypeUint16.Set(EMTPVisible); - } - SendDataL(iMTPTypeUint16); - } diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/dputility/src/cmtpmoveobject.cpp --- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpmoveobject.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpmoveobject.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -380,12 +380,6 @@ { __FLOG(_L8("GetPreviousPropertiesL - Entry")); User::LeaveIfError(iFramework.Fs().Modified(aFileName, iPreviousModifiedTime)); - if ( iIsFolder ) - { - TEntry fileEntry; - User::LeaveIfError(iFramework.Fs().Entry( aFileName, fileEntry )); - iIsHidden = fileEntry.IsHidden(); - } __FLOG(_L8("GetPreviousPropertiesL - Exit")); } @@ -396,14 +390,6 @@ { __FLOG(_L8("SetPreviousPropertiesL - Entry")); User::LeaveIfError(iFramework.Fs().SetModified(aFileName, iPreviousModifiedTime)); - if ( iIsFolder && iIsHidden ) - { - TEntry fileEntry; - User::LeaveIfError(iFramework.Fs().Entry( aFileName, fileEntry )); - fileEntry.iAtt &= ~KEntryAttHidden; - fileEntry.iAtt |= KEntryAttHidden; - User::LeaveIfError(iFramework.Fs().SetAtt( aFileName, fileEntry.iAtt, ~fileEntry.iAtt)); - } __FLOG(_L8("SetPreviousPropertiesL - Exit")); } diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/dputility/src/cmtpsendobjectinfo.cpp --- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpsendobjectinfo.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpsendobjectinfo.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -100,8 +100,7 @@ @param aConnection The connection from which the request comes */ CMTPSendObjectInfo::CMTPSendObjectInfo(MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection) : - CMTPRequestProcessor(aFramework, aConnection, 0, NULL), - iHiddenStatus( EMTPVisible ) + CMTPRequestProcessor(aFramework, aConnection, 0, NULL) { } @@ -661,15 +660,14 @@ if (!iIsFolder) { + delete iFileReceived; + iFileReceived = NULL; TEntry fileEntry; User::LeaveIfError(iFramework.Fs().Entry(iFullPath, fileEntry)); if (fileEntry.FileSize() != iObjectSize) { - delete iFileReceived; - iFileReceived = NULL; - iFramework.RouteRequestUnregisterL(iExpectedSendObjectRequest, iConnection); iFramework.Fs().Delete(iFullPath); @@ -715,8 +713,6 @@ if(!iIsFolder) { SetPropertiesL(); - delete iFileReceived; - iFileReceived = NULL; iFramework.ObjectMgr().CommitReservedObjectHandleL(*iReceivedObject); iFullPath.LowerCase(); __FLOG_VA((_L8("File Name %S"), &iFullPath)); @@ -943,9 +939,6 @@ case EMTPObjectPropCodeName: iName = aElement.StringL(CMTPTypeObjectPropListElement::EValue); break; - case EMTPObjectPropCodeHidden: - iHiddenStatus = aElement.Uint16L(CMTPTypeObjectPropListElement::EValue); - break; default: break; } @@ -1038,7 +1031,6 @@ break; case EMTPObjectPropCodeAssociationType: - case EMTPObjectPropCodeHidden: if (aElement.Uint16L(CMTPTypeObjectPropListElement::EDatatype) != EMTPTypeUINT16) { responseCode = EMTPRespCodeInvalidObjectPropFormat; @@ -1207,7 +1199,6 @@ void CMTPSendObjectInfo::SetPropertiesL() { __FLOG(_L8("SetPropertiesL - Entry")); - TEntry entry; User::LeaveIfError(iFramework.Fs().Entry(iFullPath, entry)); @@ -1244,42 +1235,14 @@ { entry.iAtt |= KEntryAttReadOnly; } - if ( iFileReceived ) - { - User::LeaveIfError(iFileReceived->File().SetAtt(entry.iAtt, ~entry.iAtt)); - } - else - { - User::LeaveIfError(iFramework.Fs().SetAtt(iFullPath, entry.iAtt, ~entry.iAtt)); - } + User::LeaveIfError(iFramework.Fs().SetAtt(iFullPath, entry.iAtt, ~entry.iAtt)); } - - if ( EMTPHidden == iHiddenStatus ) - { - entry.iAtt &= ~KEntryAttHidden; - entry.iAtt |= KEntryAttHidden; - if ( iFileReceived ) - { - User::LeaveIfError(iFileReceived->File().SetAtt(entry.iAtt, ~entry.iAtt)); - } - else - { - User::LeaveIfError(iFramework.Fs().SetAtt(iFullPath, entry.iAtt, ~entry.iAtt)); - } - } - + if(iDateMod != NULL && iDateMod->Length()) { TTime modifiedTime; iDpSingletons.MTPUtility().MTPTimeStr2TTime(*iDateMod, modifiedTime); - if ( iFileReceived ) - { - User::LeaveIfError(iFileReceived->File().SetModified( modifiedTime )); - } - else - { - User::LeaveIfError(iFramework.Fs().SetModified(iFullPath, modifiedTime)); - } + User::LeaveIfError(iFramework.Fs().SetModified(iFullPath, modifiedTime)); } iReceivedObject->SetDesCL(CMTPObjectMetaData::EName, iName); diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/dputility/src/cmtpsetobjectproplist.cpp --- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpsetobjectproplist.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpsetobjectproplist.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -128,35 +128,7 @@ } } break; - case EMTPObjectPropCodeHidden: - { - TUint16 hiddenStatus = element.Uint16L(CMTPTypeObjectPropListElement::EValue); - TEntry entry; - if ( EMTPHidden == hiddenStatus ) - { - User::LeaveIfError(iFramework.Fs().Entry(iObjMeta->DesC(CMTPObjectMetaData::ESuid), entry)); - if ( !entry.IsHidden()) - { - entry.iAtt &= ~KEntryAttHidden; - entry.iAtt |= KEntryAttHidden; - User::LeaveIfError(iFramework.Fs().SetAtt(iObjMeta->DesC(CMTPObjectMetaData::ESuid), entry.iAtt, ~entry.iAtt)); - } - } - else if ( EMTPVisible == hiddenStatus ) - { - User::LeaveIfError(iFramework.Fs().Entry(iObjMeta->DesC(CMTPObjectMetaData::ESuid), entry)); - if ( entry.IsHidden()) - { - entry.iAtt &= ~KEntryAttHidden; - User::LeaveIfError(iFramework.Fs().SetAtt(iObjMeta->DesC(CMTPObjectMetaData::ESuid), entry.iAtt, ~entry.iAtt)); - } - } - else - { - responseCode = EMTPRespCodeInvalidObjectPropValue; - } - break; - } + case EMTPObjectPropCodeNonConsumable: iObjMeta->SetUint( CMTPObjectMetaData::ENonConsumable, element.Uint8L(CMTPTypeObjectPropListElement::EValue)); iFramework.ObjectMgr().ModifyObjectL(*iObjMeta); @@ -239,7 +211,6 @@ } break; case EMTPObjectPropCodeAssociationType: - case EMTPObjectPropCodeHidden: if (aDataType != EMTPTypeUINT16) { responseCode = EMTPRespCodeInvalidObjectPropFormat; diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/dputility/src/cmtpsetobjectpropvalue.cpp --- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpsetobjectpropvalue.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpsetobjectpropvalue.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -192,7 +192,6 @@ ReceiveDataL(iMTPTypeUint8); break; case EMTPObjectPropCodeAssociationType: - case EMTPObjectPropCodeHidden: { ReceiveDataL(iMTPTypeUint16); } @@ -246,37 +245,7 @@ } } break; - case EMTPObjectPropCodeHidden: - { - if ( EMTPHidden == iMTPTypeUint16.Value()) - { - TEntry entry; - User::LeaveIfError(iFramework.Fs().Entry(iObjMeta->DesC(CMTPObjectMetaData::ESuid), entry)); - if ( !entry.IsHidden()) - { - entry.iAtt &= ~KEntryAttHidden; - entry.iAtt |= KEntryAttHidden; - User::LeaveIfError(iFramework.Fs().SetAtt(iObjMeta->DesC(CMTPObjectMetaData::ESuid), entry.iAtt, ~entry.iAtt)); - } - responseCode = EMTPRespCodeOK; - } - else if ( EMTPVisible == iMTPTypeUint16.Value()) - { - TEntry entry; - User::LeaveIfError(iFramework.Fs().Entry(iObjMeta->DesC(CMTPObjectMetaData::ESuid), entry)); - if ( entry.IsHidden()) - { - entry.iAtt &= ~KEntryAttHidden; - User::LeaveIfError(iFramework.Fs().SetAtt(iObjMeta->DesC(CMTPObjectMetaData::ESuid), entry.iAtt, ~entry.iAtt)); - } - responseCode = EMTPRespCodeOK; - } - else - { - responseCode = EMTPRespCodeInvalidObjectPropValue; - } - } - break; + case EMTPObjectPropCodeObjectFileName: { diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/datatypes/interface/mtpprotocolconstants.h --- a/mtpfws/mtpfw/datatypes/interface/mtpprotocolconstants.h Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/datatypes/interface/mtpprotocolconstants.h Wed Oct 13 15:29:02 2010 +0300 @@ -368,7 +368,7 @@ EMTPRespCodeCaptureAlreadyTerminated = 0x2018, EMTPRespCodeDeviceBusy = 0x2019, EMTPRespCodeInvalidParentObject = 0x201A, - EMTPRespCodeInvalidDevicePropFormat = 0x201B, + EMTPRespCodeInvalidDeviEMTPRespCodecePropFormat = 0x201B, EMTPRespCodeInvalidDevicePropValue = 0x201C, EMTPRespCodeInvalidParameter = 0x201D, EMTPRespCodeSessionAlreadyOpen = 0x201E, @@ -800,12 +800,6 @@ EMTPProtectionNonTransferable = 0x8003 }; -enum TMTPHiddenStatus - { - EMTPVisible = 0x0000, - EMTPHidden = 0x0001 - }; - /** The MTP consumable status datacodes. For a description of these datacodes, please refer to the "Media Transfer Protocol Enhanced" specification. diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/datatypes/src/cmtptypeobjectinfo.cpp --- a/mtpfws/mtpfw/datatypes/src/cmtptypeobjectinfo.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/datatypes/src/cmtptypeobjectinfo.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -128,9 +128,7 @@ } __ASSERT_DEBUG(chunk, User::Invariant()); - CleanupStack::PushL(chunk); ChunkAppendL(*chunk); - CleanupStack::Pop(chunk); } } } diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/datatypes/src/cmtptypestorageinfo.cpp --- a/mtpfws/mtpfw/datatypes/src/cmtptypestorageinfo.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/datatypes/src/cmtptypestorageinfo.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -115,9 +115,7 @@ break; } __ASSERT_DEBUG(chunk, User::Invariant()); - CleanupStack::PushL(chunk); ChunkAppendL(*chunk); - CleanupStack::Pop(chunk); } } } diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/inc/cmtpconnection.h --- a/mtpfws/mtpfw/inc/cmtpconnection.h Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/inc/cmtpconnection.h Wed Oct 13 15:29:02 2010 +0300 @@ -147,7 +147,6 @@ void EnqueueEvent(CMTPEventLink* aLink); void DequeueEvent(CMTPEventLink* aLink); - void DequeueAllEvents(); /** * This method define and attach the property for publishing connection state diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/src/cmtpconnection.cpp --- a/mtpfws/mtpfw/src/cmtpconnection.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/src/cmtpconnection.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -82,9 +82,17 @@ __FLOG(_L8("~CMTPConnection - Entry")); CloseAllSessions(); - //remove all events - DequeueAllEvents(); - + // Remove any events not associated + // with a session + TSglQueIter iter(iEventQ); + iter.SetToFirst(); + CMTPEventLink* link = NULL; + + while ((link = iter++) != NULL) + { + delete link; + } + iSessions.ResetAndDestroy(); if (iTransportConnection != NULL) @@ -659,16 +667,9 @@ DequeueEvent(iEventQ.First()); if (iPendingEventCount > 0) { - if (NULL != iTransportConnection) - { - // Forward the event to the transport connection layer. - __FLOG(_L8("Sending queued event")); - iTransportConnection->SendEventL(iEventQ.First()->iEvent); - } - else - { - DequeueAllEvents(); - } + // Forward the event to the transport connection layer. + __FLOG(_L8("Sending queued event")); + iTransportConnection->SendEventL(iEventQ.First()->iEvent); } __FLOG(_L8("SendEventCompleteL - Exit")); @@ -1045,19 +1046,6 @@ __FLOG(_L8("RemoveEventsForSession - Exit")); } -void CMTPConnection::DequeueAllEvents() - { - TSglQueIter iter(iEventQ); - iter.SetToFirst(); - CMTPEventLink* link = NULL; - - while ((link = iter++) != NULL) - { - delete link; - } - iPendingEventCount = 0; - } - void CMTPConnection::DequeueEvent(CMTPEventLink* aLink) { iEventQ.Remove(*aLink); diff -r debf68073f2f -r 142dacf7b30e mtptransports/mtpcontroller/src/cmtpbearermonitor.cpp --- a/mtptransports/mtpcontroller/src/cmtpbearermonitor.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtptransports/mtpcontroller/src/cmtpbearermonitor.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -80,9 +80,7 @@ __FLOG( _L8("+ConstructL") ); CMTPBluetoothController* btController = CMTPBluetoothController::NewL( *this ); - CleanupStack::PushL(btController); iMTPControllers.AppendL( btController ); - CleanupStack::Pop(btController); __FLOG( _L8("-ConstructL") ); } diff -r debf68073f2f -r 142dacf7b30e mtptransports/mtpcontroller/src/cmtpcontrollertimer.cpp --- a/mtptransports/mtpcontroller/src/cmtpcontrollertimer.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtptransports/mtpcontroller/src/cmtpcontrollertimer.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -89,7 +89,7 @@ { __FLOG( _L8("Start transport to launch mtp server") ); - User::LeaveIfError(iMTPClient.Connect()); + iMTPClient.Connect(); iMTPClient.StartTransport(KMTPBtTransportUid); iStopTransport = EFalse; iMTPOperator->SubscribeConnState(); diff -r debf68073f2f -r 142dacf7b30e mtptransports/mtpusbtransport/usbsic_imp/src/cmtpusbconnection.cpp --- a/mtptransports/mtpusbtransport/usbsic_imp/src/cmtpusbconnection.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtptransports/mtpusbtransport/usbsic_imp/src/cmtpusbconnection.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -1684,7 +1684,6 @@ SetBulkTransactionState(EUndefined); SetConnectionState(EIdle); SetSuspendState(ENotSuspended); - iMTPSessionId = KMTPSessionNone; } __FLOG(_L8("StopConnection - Exit"));