mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectpropvalue.cpp
branchRCL_3
changeset 23 e42293e811d8
parent 18 e257e2b6459d
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectpropvalue.cpp	Thu Jul 15 19:11:42 2010 +0300
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectpropvalue.cpp	Thu Aug 19 10:24:28 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;