Skip to content

Commit

Permalink
refactored PlayListPlayerPlaySongId to return a bool instead of take …
Browse files Browse the repository at this point in the history
…a bool as a parameter, thanks jmarshall

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@33879 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information
malard committed Sep 16, 2010
1 parent 772d686 commit 43b976b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion xbmc/ApplicationMessenger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -793,11 +793,13 @@ void CApplicationMessenger::PlayListPlayerPlay(int iSong)
SendMessage(tMsg, true);
}

void CApplicationMessenger::PlayListPlayerPlaySongId(int songId, bool &returnState)
bool CApplicationMessenger::PlayListPlayerPlaySongId(int songId)
{
bool returnState;
ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_PLAY_SONG_ID, songId};
tMsg.lpVoid = (void *)&returnState;
SendMessage(tMsg, true);
return returnState;
}

void CApplicationMessenger::PlayListPlayerNext()
Expand Down
2 changes: 1 addition & 1 deletion xbmc/ApplicationMessenger.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class CApplicationMessenger

void PlayListPlayerPlay();
void PlayListPlayerPlay(int iSong);
void PlayListPlayerPlaySongId(int songId, bool &returnState);
bool PlayListPlayerPlaySongId(int songId);
void PlayListPlayerNext();
void PlayListPlayerPrevious();
void PlayListPlayerAdd(int playlist, const CFileItem &item);
Expand Down
2 changes: 1 addition & 1 deletion xbmc/lib/libjsonrpc/AVPlaylistOperations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ JSON_STATUS CAVPlaylistOperations::Play(const CStdString &method, ITransportLaye
{
int songId = (parameterObject.isMember("songid") && parameterObject["songid"].isInt()) ? parameterObject["songid"].asInt() : 0;
if (songId > 0)
g_application.getApplicationMessenger().PlayListPlayerPlaySongId(songId, status);
status = g_application.getApplicationMessenger().PlayListPlayerPlaySongId(songId);
else
g_application.getApplicationMessenger().PlayListPlayerPlay();
}
Expand Down

0 comments on commit 43b976b

Please sign in to comment.