Reverted to version 1.6.
This commit is contained in:
parent
7a6592edbf
commit
f2f7914896
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.7 $
|
||||
Version : $Revision: 1.8 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/AddAudioClipToPlaylistMethod.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -112,7 +112,7 @@ AddAudioClipToPlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter,
|
|||
sessionId = XmlRpcTools::extractSessionId(parameters);
|
||||
}
|
||||
catch (std::invalid_argument &e) {
|
||||
XmlRpcTools::markError(errorId+20,
|
||||
XmlRpcTools::markError(errorId+22,
|
||||
"missing session ID argument",
|
||||
returnValue);
|
||||
return;
|
||||
|
@ -158,10 +158,15 @@ AddAudioClipToPlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter,
|
|||
playlist = storage->getPlaylist(sessionId, playlistId);
|
||||
}
|
||||
catch (std::invalid_argument &e) {
|
||||
std::string eMsg = "AddAudioClipToPlaylistlaylist: ";
|
||||
eMsg += "storage.getPlaylist() error:\n";
|
||||
eMsg += e.what();
|
||||
XmlRpcTools::markError(errorId+5, eMsg, returnValue);
|
||||
XmlRpcTools::markError(errorId+5, "playlist not found",
|
||||
returnValue);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!playlist->canBeEdited()) {
|
||||
XmlRpcTools::markError(errorId+6,
|
||||
"playlist has not been opened for editing",
|
||||
returnValue);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -170,32 +175,18 @@ AddAudioClipToPlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter,
|
|||
audioClip = storage->getAudioClip(sessionId, audioClipId);
|
||||
}
|
||||
catch (std::invalid_argument &e) {
|
||||
std::string eMsg = "AddAudioClipToPlaylistlaylist: ";
|
||||
eMsg += "storage.getAudioClip() error:\n";
|
||||
eMsg += e.what();
|
||||
XmlRpcTools::markError(errorId+7, eMsg, returnValue);
|
||||
XmlRpcTools::markError(errorId+7, "audio clip does not exist",
|
||||
returnValue);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
try { // and finally, the beef
|
||||
playlist->addAudioClip(audioClip, relativeOffset);
|
||||
}
|
||||
catch(std::invalid_argument &e) {
|
||||
std::string eMsg = "AddAudioClipToPlaylistlaylist: ";
|
||||
eMsg += "playlist.addAudioClip() error:\n";
|
||||
eMsg += e.what();
|
||||
XmlRpcTools::markError(errorId+8, eMsg, returnValue);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
storage->savePlaylist(sessionId, playlist);
|
||||
}
|
||||
catch (std::invalid_argument &e) {
|
||||
std::string eMsg = "AddAudioClipToPlaylistlaylist: ";
|
||||
eMsg += "storage.savePlaylist() error:\n";
|
||||
eMsg += e.what();
|
||||
XmlRpcTools::markError(errorId+10, eMsg, returnValue);
|
||||
XmlRpcTools::markError(errorId+8,
|
||||
"two audio clips at the same relative offset",
|
||||
returnValue);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.7 $
|
||||
Version : $Revision: 1.8 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/AddAudioClipToPlaylistMethod.h,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -94,15 +94,15 @@ using namespace LiveSupport::Core;
|
|||
* <li>302 - missing playlist ID argument </li>
|
||||
* <li>303 - missing audio clip ID argument </li>
|
||||
* <li>304 - missing relative offset argument </li>
|
||||
* <li>305 - storage.getPlaylist() returned error message </li>
|
||||
* <li>307 - storage.getAudioClip() returned error message </li>
|
||||
* <li>308 - playlist.addAudioClip() returned error message </li>
|
||||
* <li>310 - storage.savePlaylist() returned error message </li>
|
||||
* <li>320 - missing session ID argument </li>
|
||||
* <li>305 - playlist not found </li>
|
||||
* <li>306 - playlist has not been opened for editing </li>
|
||||
* <li>307 - audio clip does not exist </li>
|
||||
* <li>308 - two audio clips at the same relative offset</li>
|
||||
* <li>322 - missing session ID argument </li>
|
||||
* </ul>
|
||||
*
|
||||
* @author $Author: fgerlits $
|
||||
* @version $Revision: 1.7 $
|
||||
* @version $Revision: 1.8 $
|
||||
*/
|
||||
class AddAudioClipToPlaylistMethod : public XmlRpc::XmlRpcServerMethod
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue