mtpfws/mtpfw/dataproviders/dputility/src/cmtpsetobjectpropvalue.cpp
branchRCL_3
changeset 48 debf68073f2f
parent 19 ef55b168cedb
child 58 142dacf7b30e
--- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpsetobjectpropvalue.cpp	Tue Sep 14 22:52:29 2010 +0300
+++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpsetobjectpropvalue.cpp	Wed Sep 15 13:07:27 2010 +0300
@@ -192,6 +192,7 @@
 			ReceiveDataL(iMTPTypeUint8);
 			break;
 		case EMTPObjectPropCodeAssociationType:
+		case EMTPObjectPropCodeHidden:
 			{
 			ReceiveDataL(iMTPTypeUint16);
 			}
@@ -245,7 +246,37 @@
 				}
 			}
 			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:
 			{