mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectinfo.cpp
branchRCL_3
changeset 23 e42293e811d8
parent 17 6f9f6e99a23e
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectinfo.cpp	Thu Jul 15 19:11:42 2010 +0300
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobjectinfo.cpp	Thu Aug 19 10:24:28 2010 +0300
@@ -95,7 +95,6 @@
 //
 EXPORT_C void CGetObjectInfo::ConstructL()
     {
-    CActiveScheduler::Add( this );
     }
 
 // -----------------------------------------------------------------------------
@@ -106,7 +105,7 @@
 void CGetObjectInfo::ServiceL()
     {
     PRINT( _L( "MM MTP => CGetObjectInfo::ServiceL" ) );
-    
+
     MmMtpDpUtility::SetPSStatus(EMtpPSStatusActive);
 
     delete iObjectInfo;
@@ -174,8 +173,13 @@
     // Image Bit Depth
     iObjectInfo->SetUint32L( CMTPTypeObjectInfo::EImageBitDepth, 0 );
     // Parent Object
-    iObjectInfo->SetUint32L( CMTPTypeObjectInfo::EParentObject,
-        object->Uint( CMTPObjectMetaData::EParentHandle ) );
+    TUint32 parentHandle = object->Uint( CMTPObjectMetaData::EParentHandle );
+    // refer to 5.3.1.9 of MTP Spec 1.0
+    if ( parentHandle == KMTPHandleNoParent )
+        {
+        parentHandle = KMTPHandleNone;
+        }
+    iObjectInfo->SetUint32L( CMTPTypeObjectInfo::EParentObject, parentHandle );
     // Association Type
     iObjectInfo->SetUint16L( CMTPTypeObjectInfo::EAssociationType, 0 );
     // Association Description