mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/csendobject.cpp
changeset 51 e61a04404bdf
parent 35 2ee890d2f7e7
child 64 92dbd2a406d9
equal deleted inserted replaced
44:d141fc1ad77b 51:e61a04404bdf
   196         {
   196         {
   197         if ( iOperationCode == EMTPOpCodeSendObjectInfo )
   197         if ( iOperationCode == EMTPOpCodeSendObjectInfo )
   198             {
   198             {
   199             delete iObjectInfo;
   199             delete iObjectInfo;
   200             iObjectInfo = NULL;
   200             iObjectInfo = NULL;
       
   201             Rollback();
   201             iProgress = EObjectNone;
   202             iProgress = EObjectNone;
   202             }
   203             }
   203         else if ( iOperationCode == EMTPOpCodeSendObjectPropList )
   204         else if ( iOperationCode == EMTPOpCodeSendObjectPropList )
   204             {
   205             {
   205             delete iObjectPropList;
   206             delete iObjectPropList;
   206             iObjectPropList = NULL;
   207             iObjectPropList = NULL;
       
   208             Rollback();
   207             iProgress = EObjectNone;
   209             iProgress = EObjectNone;
   208             }
   210             }
   209         }
   211         }
   210     else
   212     else
   211         {
   213         {
   326     
   328     
   327     MmMtpDpUtility::SetPSStatus(EMtpPSStatusActive);
   329     MmMtpDpUtility::SetPSStatus(EMtpPSStatusActive);
   328 
   330 
   329     if ( iProgress == EObjectNone )
   331     if ( iProgress == EObjectNone )
   330         {
   332         {
       
   333         // iCancelled could have been set after the last transaction
       
   334         // reset the flag here
       
   335         iCancelled = EFalse;
       
   336         
   331         if ( iOperationCode == EMTPOpCodeSendObjectInfo )
   337         if ( iOperationCode == EMTPOpCodeSendObjectInfo )
   332             {
   338             {
   333             ServiceInfoL();
   339             ServiceInfoL();
   334             }
   340             }
   335         else
   341         else
   604         iFramework.RouteRequestUnregisterL( iExpectedSendObjectRequest,
   610         iFramework.RouteRequestUnregisterL( iExpectedSendObjectRequest,
   605             iConnection );
   611             iConnection );
   606 
   612 
   607         SendResponseL( EMTPRespCodeOK );
   613         SendResponseL( EMTPRespCodeOK );
   608         }
   614         }
       
   615 
       
   616     iCancelled = EFalse;
   609 
   617 
   610     PRINT1( _L( "MM MTP <= CSendObject::DoHandleResponsePhaseObjectL result = %d" ), result );
   618     PRINT1( _L( "MM MTP <= CSendObject::DoHandleResponsePhaseObjectL result = %d" ), result );
   611 
   619 
   612     return result;
   620     return result;
   613     }
   621     }
  1065             {
  1073             {
  1066             PRINT( _L( "MM MTP <> might happen if function is called before physical file arrives" ) );
  1074             PRINT( _L( "MM MTP <> might happen if function is called before physical file arrives" ) );
  1067             // might happen if function is called before physical file arrives
  1075             // might happen if function is called before physical file arrives
  1068             // do nothing
  1076             // do nothing
  1069             }
  1077             }
       
  1078         else if ( iObjectFormat == EMTPFormatCodeASF )
       
  1079             {
       
  1080             // happens on some buggy PC implementation, default formatcode to WMA or WMV if extension matches
       
  1081             PRINT( _L( "MM MTP <> happens on some buggy PC implementation, default formatcode to WMA or WMV if extension matches" ) );
       
  1082             if ( parser.Ext().CompareF( KTxtExtensionWMA ) == 0 )
       
  1083                 iObjectFormat = EMTPFormatCodeWMA;
       
  1084             else if ( parser.Ext().CompareF( KTxtExtensionWMV ) == 0 )
       
  1085                 iObjectFormat = EMTPFormatCodeWMV;
       
  1086             else
       
  1087                 result = EFalse;
       
  1088             }
  1070         else
  1089         else
  1071             {
  1090             {
  1072             PRINT2( _L( "MM MTP <> %S does not match 0x%x" ), &iFullPath, iObjectFormat );
  1091             PRINT2( _L( "MM MTP <> %S does not match 0x%x" ), &iFullPath, iObjectFormat );
  1073             result = EFalse;
  1092             result = EFalse;
  1074             }
  1093             }