mtpfws/mtpfw/dataproviders/dputility/src/cmtpsetobjectproplist.cpp
branchRCL_3
changeset 48 debf68073f2f
parent 0 d0791faffa3f
child 58 142dacf7b30e
--- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpsetobjectproplist.cpp	Tue Sep 14 22:52:29 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpsetobjectproplist.cpp	Wed Sep 15 13:07:27 2010 +0300
@@ -128,7 +128,35 @@
 						}
     				}			
     				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);
@@ -211,6 +239,7 @@
 				}
 			break;
 		case EMTPObjectPropCodeAssociationType:
+		case EMTPObjectPropCodeHidden:
 			if (aDataType != EMTPTypeUINT16)
 				{
 				responseCode = EMTPRespCodeInvalidObjectPropFormat;