mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectpropvalue.cpp
changeset 51 e61a04404bdf
parent 35 2ee890d2f7e7
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectpropvalue.cpp	Tue Jul 06 14:48:59 2010 +0300
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectpropvalue.cpp	Wed Aug 18 10:16:02 2010 +0300
@@ -205,8 +205,15 @@
         // Parent
         case EMTPObjectPropCodeParentObject:
             {
-            iMTPTypeUint32.Set( 0 );
-            iMTPTypeUint32 = iObjectInfo->Uint( CMTPObjectMetaData::EParentHandle );
+            iMTPTypeUint32.Set( KMTPHandleNone );
+
+            TUint32 parentHandle = iObjectInfo->Uint( CMTPObjectMetaData::EParentHandle );
+            // refer to 5.3.1.9 of MTP Spec 1.0
+            if ( parentHandle != KMTPHandleNoParent )
+                {
+                iMTPTypeUint32.Set( parentHandle );
+                }
+
             SendDataL( iMTPTypeUint32 );
             }
             break;