312 // insert all abstract medias into handle db of framework |
312 // insert all abstract medias into handle db of framework |
313 CMPXMedia* media = ( *iAbstractMedias )[iCurrentIndex]; |
313 CMPXMedia* media = ( *iAbstractMedias )[iCurrentIndex]; |
314 |
314 |
315 // Increase the index first in case of leave |
315 // Increase the index first in case of leave |
316 iCurrentIndex++; |
316 iCurrentIndex++; |
317 |
317 |
318 HBufC* abstractMedia = iDataProvider.GetWrapperL().GetAbstractMediaNameL( media, EMPXPlaylist ); |
318 HBufC* abstractMedia = iDataProvider.GetWrapperL().GetAbstractMediaNameL( media, EMPXPlaylist ); |
319 CleanupStack::PushL( abstractMedia ); // + abstractMedia |
319 CleanupStack::PushL( abstractMedia ); // + abstractMedia |
320 AddEntryL( *abstractMedia ); |
320 AddEntryL( *abstractMedia ); |
321 |
321 |
322 // find all reference of each abstract media |
322 // find all reference of each abstract media |
425 |
425 |
426 TInt removeCount = 0; |
426 TInt removeCount = 0; |
427 for ( TInt i = 0; i < count; i++ ) |
427 for ( TInt i = 0; i < count; i++ ) |
428 { |
428 { |
429 TInt index = i - removeCount; |
429 TInt index = i - removeCount; |
430 PRINT2( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::AddReferencesL ref[%d]'s name = %S" ), index, &( aReferences[index] ) ); |
430 TPtrC temp( aReferences[index] ); |
|
431 PRINT2( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::AddReferencesL ref[%d]'s name = %S" ), index, &temp ); |
431 PERFLOGSTART( KObjectManagerHandle ); |
432 PERFLOGSTART( KObjectManagerHandle ); |
432 TUint32 handle = iFramework.ObjectMgr().HandleL( aReferences[index] ); |
433 TUint32 handle = iFramework.ObjectMgr().HandleL( temp ); |
433 PERFLOGSTOP( KObjectManagerHandle ); |
434 PERFLOGSTOP( KObjectManagerHandle ); |
434 if ( handle == KMTPHandleNone ) // object doesn't exist |
435 if ( handle == KMTPHandleNone ) // object doesn't exist |
435 { |
436 { |
436 TPtrC temp( aReferences[index] ); |
|
437 PRINT1( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::AddReferencesL, [%S] doesn't existed in handle db, remove this from reference array" ), &temp ); |
437 PRINT1( _L( "MM MTP <> CAbstractMediaMtpDataProviderEnumerator::AddReferencesL, [%S] doesn't existed in handle db, remove this from reference array" ), &temp ); |
438 |
438 |
439 // if handle is invalid, remove from reference array |
439 // if handle is invalid, remove from reference array |
440 aReferences.Delete( index, 1 ); |
440 aReferences.Delete( index, 1 ); |
441 removeCount++; |
441 removeCount++; |