mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csendobject.cpp
changeset 35 2ee890d2f7e7
parent 32 edd273b3192a
child 48 b7b49303d0c0
child 51 e61a04404bdf
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csendobject.cpp	Thu May 27 13:19:19 2010 +0300
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csendobject.cpp	Fri Jun 11 14:04:53 2010 +0300
@@ -129,7 +129,6 @@
 
     PRINT1( _L( "MM MTP <> CSendObject::ConstructL DataProviderId = 0x%x" ), iFramework.DataProviderId());
 
-  
     PRINT( _L( "MM MTP <= CSendObject::ConstructL" ) );
     }
 
@@ -1035,6 +1034,7 @@
 
     TBool result( EFalse );
 
+    TParsePtrC parser( aFileName );
     if ( aFileName.Length() > 0 )
         {
         iFullPath.Zero();
@@ -1044,7 +1044,6 @@
         // Only add extension for alb to pass winlogo test cases
         TInt length = iFullPath.Length() + aFileName.Length();
 
-        TParsePtrC parser( aFileName );
         TBool isAlbWithoutExt =
             ( ( iObjectFormat == EMTPFormatCodeAbstractAudioAlbum ) && ( !parser.ExtPresent() ) );
         if ( isAlbWithoutExt )
@@ -1062,8 +1061,7 @@
 
     if ( result && ( iObjectFormat != MmMtpDpUtility::FormatFromFilename( iFullPath ) ) )
         {
-        TParsePtrC file( aFileName );
-        if ( ( iObjectFormat == EMTPFormatCode3GPContainer ) && (file.Ext().CompareF( KTxtExtensionODF ) == 0))
+        if ( ( iObjectFormat == EMTPFormatCode3GPContainer ) && ( parser.Ext().CompareF( KTxtExtensionODF ) == 0))
             {
             PRINT( _L( "MM MTP <> might happen if function is called before physical file arrives" ) );
             // might happen if function is called before physical file arrives
@@ -1267,6 +1265,11 @@
         iDpConfig.GetWrapperL().AddDummyFileL( iFullPath );
         }
 
+    // Set subformat code to avoid MPX query for the first time to GetObjectReference,
+    // in which case references has been kept in fw.
+    if ( MmMtpDpUtility::HasReference( iObjectFormat ) )
+        iReceivedObjectInfo->SetUint( CMTPObjectMetaData::EFormatSubCode, EMTPSubFormatCodeUndefined );
+
     // add playlist to MPX DB
     TRAPD( err, AddMediaToStoreL() );