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