equal
deleted
inserted
replaced
547 } |
547 } |
548 } |
548 } |
549 |
549 |
550 CMPXMedia* foundMedia(NULL); |
550 CMPXMedia* foundMedia(NULL); |
551 |
551 |
552 switch ( ary && ary->Count() ) //lint !e961 |
552 if ( ary && ary->Count() ) |
553 { |
553 { |
554 case 0: |
554 foundMedia = CMPXMedia::NewL(*ary->AtL(0)); |
555 User::Leave(KErrNotFound); |
555 CleanupStack::PushL(foundMedia); |
556 case 1: |
556 foundMedia->SetTObjectValueL<TUid>( KMPXMediaGeneralCollectionId, TUid::Uid(col) ); |
557 { |
557 CleanupStack::Pop(foundMedia); |
558 foundMedia = CMPXMedia::NewL(*ary->AtL(0)); |
558 } |
559 CleanupStack::PushL(foundMedia); |
559 else |
560 foundMedia->SetTObjectValueL<TUid>( |
560 { |
561 KMPXMediaGeneralCollectionId, TUid::Uid(col) ); |
561 User::Leave(KErrNotFound); |
562 CleanupStack::Pop(foundMedia); |
562 } |
563 break; |
563 |
564 } |
|
565 default: |
|
566 User::Leave(KErrCorrupt); |
|
567 } |
|
568 |
|
569 CleanupStack::PopAndDestroy(result); |
564 CleanupStack::PopAndDestroy(result); |
570 |
|
571 return foundMedia; |
565 return foundMedia; |
572 } |
566 } |
573 |
567 |
574 // --------------------------------------------------------------------------- |
568 // --------------------------------------------------------------------------- |
575 // Gets the attributes of some media object |
569 // Gets the attributes of some media object |