The revertEditedPlaylist method added in XMLRPC interface.
This commit is contained in:
parent
2d9bb23bbe
commit
da017f9200
3 changed files with 53 additions and 3 deletions
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
Author : $Author: tomas $
|
||||
Version : $Revision: 1.21 $
|
||||
Version : $Revision: 1.22 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/XR_LocStor.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -849,6 +849,53 @@ class XR_LocStor extends LocStor{
|
|||
return new XML_RPC_Response(XML_RPC_encode(array('plid'=>$res)));
|
||||
}
|
||||
|
||||
/**
|
||||
* RollBack playlist changes to the locked state
|
||||
*
|
||||
* The XML-RPC name of this method is "locstor.revertEditedPlaylist".
|
||||
*
|
||||
* The input parameters are an XML-RPC struct with the following
|
||||
* fields:
|
||||
* <ul>
|
||||
* <li> sessid : string - session id </li>
|
||||
* <li> token : string - playlist token
|
||||
* returned by locstor.editPlaylist</li>
|
||||
* </ul>
|
||||
*
|
||||
* On success, returns a XML-RPC struct with single field:
|
||||
* <ul>
|
||||
* <li> plid : string - playlistId</li>
|
||||
* </ul>
|
||||
*
|
||||
* On errors, returns an XML-RPC error response.
|
||||
* The possible error codes and error message are:
|
||||
* <ul>
|
||||
* <li> 3 - Incorrect parameters passed to method:
|
||||
* Wanted ... , got ... at param </li>
|
||||
* <li> 801 - wrong 1st parameter, struct expected.</li>
|
||||
* <li> 805 - xr_revertEditedPlaylist:
|
||||
* <message from lower layer> </li>
|
||||
* </ul>
|
||||
*
|
||||
* @param input XMLRPC struct
|
||||
* @return XMLRPC struct
|
||||
* @see LocStor::revertEditedPlaylist
|
||||
*/
|
||||
function xr_revertEditedPlaylist($input)
|
||||
{
|
||||
list($ok, $r) = $this->_xr_getPars($input);
|
||||
if(!$ok) return $r;
|
||||
$res = $this->revertEditedPlaylist(
|
||||
$r['token'], $r['sessid']);
|
||||
if(PEAR::isError($res)){
|
||||
return new XML_RPC_Response(0, 805,
|
||||
"xr_revertEditedPlaylist: ".$res->getMessage().
|
||||
" ".$res->getUserInfo()
|
||||
);
|
||||
}
|
||||
return new XML_RPC_Response(XML_RPC_encode(array('plid'=>$res)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a Playlist metafile - DISABLED now!
|
||||
*
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
Author : $Author: tomas $
|
||||
Version : $Revision: 1.25 $
|
||||
Version : $Revision: 1.26 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/xrLocStor.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -111,6 +111,7 @@ $methods = array(
|
|||
'createPlaylist' => 'Create a new Playlist metafile.',
|
||||
'editPlaylist' => 'Open a Playlist metafile for editing.',
|
||||
'savePlaylist' => 'Save a Playlist metafile.',
|
||||
'revertEditedPlaylist' => 'RollBack playlist changes to the locked state.',
|
||||
'deletePlaylist' => 'Delete a Playlist metafile.',
|
||||
'accessPlaylist' => 'Open readable URL to a Playlist metafile.',
|
||||
'releasePlaylist' => 'Release readable URL from accessPlaylist.',
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
Author : $Author: tomas $
|
||||
Version : $Revision: 1.9 $
|
||||
Version : $Revision: 1.10 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/xmlrpc/xr_cli_test.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -117,6 +117,8 @@ $infos = array(
|
|||
'p'=>array('sessid', 'plid'), 'r'=>array('url', 'token')),
|
||||
"savePlaylist" => array('m'=>"locstor.savePlaylist",
|
||||
'p'=>array('sessid', 'token', 'newPlaylist'), 'r'=>'plid'),
|
||||
"revertEditedPlaylist" => array('m'=>"locstor.revertEditedPlaylist",
|
||||
'p'=>array('sessid', 'token'), 'r'=>'plid'),
|
||||
"deletePlaylist" => array('m'=>"locstor.deletePlaylist",
|
||||
'p'=>array('sessid', 'plid'), 'r'=>'status'),
|
||||
"accessPlaylist" => array('m'=>"locstor.accessPlaylist",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue