mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbplaylistsongs.cpp
branchRCL_3
changeset 9 13afc0e517bd
parent 0 ff3acec5bc43
child 11 943ff5625028
equal deleted inserted replaced
5:2a40e88564c8 9:13afc0e517bd
   118     TUint32 aPlaylistId,
   118     TUint32 aPlaylistId,
   119     const CMPXMedia& aMedia,
   119     const CMPXMedia& aMedia,
   120     TInt aDriveId)
   120     TInt aDriveId)
   121     {
   121     {
   122     MPX_FUNC("CMPXDbPlaylistSongs::AddSongL");
   122     MPX_FUNC("CMPXDbPlaylistSongs::AddSongL");
   123     return AddSongL(aPlaylistId, CountL(aPlaylistId), aMedia, aDriveId);
   123     TInt count(0);
       
   124     if (aDriveId >= 0)
       
   125     	{
       
   126     	count = CountL(aPlaylistId, aDriveId);
       
   127     	}
       
   128     return AddSongL(aPlaylistId, count, aMedia, aDriveId);
   124     }
   129     }
   125 
   130 
   126 // ----------------------------------------------------------------------------
   131 // ----------------------------------------------------------------------------
   127 // CMPXDbPlaylistSongs::AddSongL
   132 // CMPXDbPlaylistSongs::AddSongL
   128 // ----------------------------------------------------------------------------
   133 // ----------------------------------------------------------------------------
   629 // ----------------------------------------------------------------------------
   634 // ----------------------------------------------------------------------------
   630 // CMPXDbPlaylistSongs::CountL
   635 // CMPXDbPlaylistSongs::CountL
   631 // ----------------------------------------------------------------------------
   636 // ----------------------------------------------------------------------------
   632 //
   637 //
   633 TInt CMPXDbPlaylistSongs::CountL(
   638 TInt CMPXDbPlaylistSongs::CountL(
   634     TUint32 aPlaylistId)
   639     TUint32 aPlaylistId,
       
   640     TInt aDriveId)
   635     {
   641     {
   636     MPX_FUNC("CMPXDbPlaylist::CountL");
   642     MPX_FUNC("CMPXDbPlaylist::CountL");
   637     return ExecuteSumQueryL(KQueryPlaylistSongsCount, aPlaylistId);
   643     return ExecuteSumExQueryL(KQueryPlaylistSongsCount, aPlaylistId, aDriveId);
   638     }
   644     }
   639 
   645 
   640 // ----------------------------------------------------------------------------
   646 // ----------------------------------------------------------------------------
   641 // CMPXDbPlaylistSongs::UpdateMediaL
   647 // CMPXDbPlaylistSongs::UpdateMediaL
   642 // ----------------------------------------------------------------------------
   648 // ----------------------------------------------------------------------------