--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp Tue Sep 14 22:52:29 2010 +0300
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp Wed Sep 15 13:07:27 2010 +0300
@@ -277,6 +277,24 @@
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;
@@ -420,7 +438,20 @@
aValue = EMTPProtectionNoProtection;
}
}
- break;
+ break;
+ case EMTPObjectPropCodeHidden:
+ {
+ TInt err = iFs.Entry(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), entry);
+ if ( err == KErrNone && entry.IsHidden())
+ {
+ aValue = EMTPHidden;
+ }
+ else
+ {
+ aValue = EMTPVisible;
+ }
+ }
+ break;
default:
aValue = 0;//initialization
//ingore the failure if we can't get properties form MdS