mpdata/src/mpmpxcollectiondata_p.cpp
changeset 48 af3740e3753f
parent 42 79c49924ae23
child 51 560ce2306a17
equal deleted inserted replaced
42:79c49924ae23 48:af3740e3753f
   620 int MpMpxCollectionDataPrivate::DoGetContainerIdL()
   620 int MpMpxCollectionDataPrivate::DoGetContainerIdL()
   621 {
   621 {
   622     if ( !iContainerMedia->IsSupported( KMPXMediaGeneralId ) ) {
   622     if ( !iContainerMedia->IsSupported( KMPXMediaGeneralId ) ) {
   623         User::Leave(KErrNotFound);
   623         User::Leave(KErrNotFound);
   624     }
   624     }
   625     return iContainerMedia->ValueTObjectL<TInt>( KMPXMediaGeneralId );
   625     return iContainerMedia->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId );
   626 }
   626 }
   627 
   627 
   628 /*!
   628 /*!
   629  \internal
   629  \internal
   630  */
   630  */
   632 {
   632 {
   633     CMPXMedia* currentMedia( iMediaArray->AtL( index ) );
   633     CMPXMedia* currentMedia( iMediaArray->AtL( index ) );
   634     if ( !currentMedia->IsSupported( KMPXMediaGeneralId ) ) {
   634     if ( !currentMedia->IsSupported( KMPXMediaGeneralId ) ) {
   635         User::Leave(KErrNotFound);
   635         User::Leave(KErrNotFound);
   636     }
   636     }
   637     return currentMedia->ValueTObjectL<TInt>( KMPXMediaGeneralId );
   637     return currentMedia->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId );
   638 }
   638 }
   639 
   639 
   640 /*!
   640 /*!
   641  \internal
   641  \internal
   642  */
   642  */
   647     User::LeaveIfNull(const_cast<CMPXMediaArray*>(songs));
   647     User::LeaveIfNull(const_cast<CMPXMediaArray*>(songs));
   648     CMPXMedia* song = songs->AtL(index);
   648     CMPXMedia* song = songs->AtL(index);
   649     if ( !song->IsSupported( KMPXMediaGeneralId ) ) {
   649     if ( !song->IsSupported( KMPXMediaGeneralId ) ) {
   650         User::Leave(KErrNotFound);
   650         User::Leave(KErrNotFound);
   651     }
   651     }
   652     return song->ValueTObjectL<TInt>( KMPXMediaGeneralId );
   652     return song->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId );
   653 }
   653 }
   654 
   654 
   655 /*!
   655 /*!
   656  \internal
   656  \internal
   657  */
   657  */
   669 bool MpMpxCollectionDataPrivate::DoTestCachedItemL( int itemId )
   669 bool MpMpxCollectionDataPrivate::DoTestCachedItemL( int itemId )
   670 {
   670 {
   671     if ( !iCachedRemovedItem || !iCachedRemovedItem->IsSupported( KMPXMediaGeneralId ) ) {
   671     if ( !iCachedRemovedItem || !iCachedRemovedItem->IsSupported( KMPXMediaGeneralId ) ) {
   672         User::Leave(KErrNotFound);
   672         User::Leave(KErrNotFound);
   673     }
   673     }
   674     return ( itemId == iCachedRemovedItem->ValueTObjectL<TInt>( KMPXMediaGeneralId ) );
   674     return ( itemId == TInt( iCachedRemovedItem->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ) ) );
   675 }
   675 }
   676 
   676 
   677 /*!
   677 /*!
   678  \internal
   678  \internal
   679  */
   679  */