equal
deleted
inserted
replaced
308 // Only leave when getting proplist element from data received by fw. |
308 // Only leave when getting proplist element from data received by fw. |
309 // It should not happen after ReceiveDataL in which construction of proplist already succeed. |
309 // It should not happen after ReceiveDataL in which construction of proplist already succeed. |
310 SetPreviousPropertiesL(); |
310 SetPreviousPropertiesL(); |
311 |
311 |
312 CFileMan* fileMan = CFileMan::NewL( iFramework.Fs() ); |
312 CFileMan* fileMan = CFileMan::NewL( iFramework.Fs() ); |
313 CleanupStack::PushL( fileMan ); // + fileMan |
|
314 User::LeaveIfError( fileMan->Copy( oldFileName, aNewFileName ) ); |
313 User::LeaveIfError( fileMan->Copy( oldFileName, aNewFileName ) ); |
315 CleanupStack::PopAndDestroy( fileMan ); // - fileMan |
314 delete fileMan; |
|
315 fileMan = NULL; |
316 |
316 |
317 PRINT( _L( "MM MTP <= CCopyObject::CopyFileL" ) ); |
317 PRINT( _L( "MM MTP <= CCopyObject::CopyFileL" ) ); |
318 return handle; |
318 return handle; |
319 } |
319 } |
320 |
320 |
414 // ----------------------------------------------------------------------------- |
414 // ----------------------------------------------------------------------------- |
415 // |
415 // |
416 void CCopyObject::SetPreviousPropertiesL() |
416 void CCopyObject::SetPreviousPropertiesL() |
417 { |
417 { |
418 PRINT( _L( "MM MTP => CCopyObject::SetPreviousPropertiesL" ) ); |
418 PRINT( _L( "MM MTP => CCopyObject::SetPreviousPropertiesL" ) ); |
|
419 |
|
420 TMTPResponseCode respcode = EMTPRespCodeOK; |
419 |
421 |
420 iPropertyList->ResetCursor(); |
422 iPropertyList->ResetCursor(); |
421 const TInt count = iPropertyList->NumberOfElements(); |
423 const TInt count = iPropertyList->NumberOfElements(); |
422 for ( TInt i = 0; i < count; i++ ) |
424 for ( TInt i = 0; i < count; i++ ) |
423 { |
425 { |
456 case EMTPObjectPropCodeName: |
458 case EMTPObjectPropCodeName: |
457 case EMTPObjectPropCodeAlbumArtist: |
459 case EMTPObjectPropCodeAlbumArtist: |
458 { |
460 { |
459 CMTPTypeString *stringData = CMTPTypeString::NewLC( element.StringL( CMTPTypeObjectPropListElement::EValue ) ); // + stringData |
461 CMTPTypeString *stringData = CMTPTypeString::NewLC( element.StringL( CMTPTypeObjectPropListElement::EValue ) ); // + stringData |
460 |
462 |
461 iDpConfig.PropSettingUtility()->SetMetaDataToWrapper( iDpConfig, |
463 respcode = iDpConfig.PropSettingUtility()->SetMetaDataToWrapper( iDpConfig, |
462 propertyCode, |
464 propertyCode, |
463 *stringData, |
465 *stringData, |
464 *iTargetObject ); |
466 *iTargetObject ); |
465 |
467 |
466 CleanupStack::PopAndDestroy( stringData ); // - stringData |
468 CleanupStack::PopAndDestroy( stringData ); // - stringData |
467 } |
469 } |
468 break; |
470 break; |
469 |
471 |
470 default: |
472 default: |
471 { |
473 { |
472 iDpConfig.PropSettingUtility()->SetSpecificObjectPropertyL( iDpConfig, |
474 respcode = iDpConfig.PropSettingUtility()->SetSpecificObjectPropertyL( iDpConfig, |
473 propertyCode, |
475 propertyCode, |
474 *iTargetObject, |
476 *iTargetObject, |
475 element ); |
477 element ); |
476 } |
478 } |
477 break; |
479 break; |
478 } |
480 } |
479 } // end of for loop |
481 } // end of for loop |
480 |
482 |
481 PRINT( _L( "MM MTP <= CCopyObject::SetPreviousPropertiesL" ) ); |
483 // ignore errors |
|
484 if ( respcode == EMTPRespCodeOK ) |
|
485 { |
|
486 // do nothing, just to get rid of build warning |
|
487 } |
|
488 |
|
489 PRINT1( _L( "MM MTP <= CCopyObject::SetPreviousPropertiesL respcode = 0x%x" ), respcode ); |
482 } |
490 } |
483 |
491 |
484 // ----------------------------------------------------------------------------- |
492 // ----------------------------------------------------------------------------- |
485 // CCopyObject::UpdateObjectInfoL |
493 // CCopyObject::UpdateObjectInfoL |
486 // Update object info in the database |
494 // Update object info in the database |