wrote specifications for the playlist methods in the storage server
started adding a savePlaylist() call to the xml-rpc functions which call the storage server (I should have done this earlier but didn't)
This commit is contained in:
parent
41f6befa43
commit
7a6592edbf
8 changed files with 346 additions and 75 deletions
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.18 $
|
||||
Version : $Revision: 1.19 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -191,7 +191,7 @@ TestStorageClient :: existsPlaylist(Ptr<SessionId>::Ref sessionId,
|
|||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Return a playlist.
|
||||
* Return a playlist to be displayed.
|
||||
*----------------------------------------------------------------------------*/
|
||||
Ptr<Playlist>::Ref
|
||||
TestStorageClient :: getPlaylist(Ptr<SessionId>::Ref sessionId,
|
||||
|
@ -208,6 +208,35 @@ TestStorageClient :: getPlaylist(Ptr<SessionId>::Ref sessionId,
|
|||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Return a playlist to be edited.
|
||||
*----------------------------------------------------------------------------*/
|
||||
Ptr<Playlist>::Ref
|
||||
TestStorageClient :: editPlaylist(Ptr<SessionId>::Ref sessionId,
|
||||
Ptr<UniqueId>::Ref id) const
|
||||
throw (std::invalid_argument)
|
||||
{
|
||||
PlaylistMap::const_iterator it = playlistMap.find(id->getId());
|
||||
|
||||
if (it == playlistMap.end()) {
|
||||
throw std::invalid_argument("no such playlist");
|
||||
}
|
||||
|
||||
return it->second;
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Save a playlist after editing.
|
||||
*----------------------------------------------------------------------------*/
|
||||
void
|
||||
TestStorageClient :: savePlaylist(Ptr<SessionId>::Ref sessionId,
|
||||
Ptr<Playlist>::Ref playlist) const
|
||||
throw (std::logic_error)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Acquire resources for a playlist.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.16 $
|
||||
Version : $Revision: 1.17 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.h,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -90,7 +90,7 @@ using namespace LiveSupport::Core;
|
|||
* </code></pre>
|
||||
*
|
||||
* @author $Author: fgerlits $
|
||||
* @version $Revision: 1.16 $
|
||||
* @version $Revision: 1.17 $
|
||||
*/
|
||||
class TestStorageClient :
|
||||
virtual public Configurable,
|
||||
|
@ -179,7 +179,7 @@ class TestStorageClient :
|
|||
throw ();
|
||||
|
||||
/**
|
||||
* Return a playlist with the specified id.
|
||||
* Return a playlist with the specified id, to be displayed.
|
||||
*
|
||||
* @param sessionId the session ID from the authentication client
|
||||
* @param id the id of the playlist to return.
|
||||
|
@ -192,6 +192,33 @@ class TestStorageClient :
|
|||
Ptr<UniqueId>::Ref id) const
|
||||
throw (std::invalid_argument);
|
||||
|
||||
/**
|
||||
* Return a playlist with the specified id, to be edited.
|
||||
*
|
||||
* @param sessionId the session ID from the authentication client
|
||||
* @param id the id of the playlist to return.
|
||||
* @return the requested playlist.
|
||||
* @exception std::invalid_argument if no playlist with the specified
|
||||
* id exists.
|
||||
*/
|
||||
virtual Ptr<Playlist>::Ref
|
||||
editPlaylist(Ptr<SessionId>::Ref sessionId,
|
||||
Ptr<UniqueId>::Ref id) const
|
||||
throw (std::invalid_argument);
|
||||
|
||||
/**
|
||||
* Save the playlist after editing.
|
||||
*
|
||||
* @param sessionId the session ID from the authentication client
|
||||
* @param playlist the playlist to save.
|
||||
* @exception std::logic_error if the playlist has not been previously
|
||||
* opened by getPlaylist()
|
||||
*/
|
||||
virtual void
|
||||
savePlaylist(Ptr<SessionId>::Ref sessionId,
|
||||
Ptr<Playlist>::Ref playlist) const
|
||||
throw (std::logic_error);
|
||||
|
||||
/**
|
||||
* Acquire the resources for the playlist.
|
||||
*
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.3 $
|
||||
Version : $Revision: 1.4 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClient.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -288,7 +288,7 @@ WebStorageClient :: existsPlaylist(Ptr<SessionId>::Ref sessionId,
|
|||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Return a playlist.
|
||||
* Return a playlist to be displayed.
|
||||
*----------------------------------------------------------------------------*/
|
||||
Ptr<Playlist>::Ref
|
||||
WebStorageClient :: getPlaylist(Ptr<SessionId>::Ref sessionId,
|
||||
|
@ -300,6 +300,30 @@ WebStorageClient :: getPlaylist(Ptr<SessionId>::Ref sessionId,
|
|||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Return a playlist to be edited.
|
||||
*----------------------------------------------------------------------------*/
|
||||
Ptr<Playlist>::Ref
|
||||
WebStorageClient :: editPlaylist(Ptr<SessionId>::Ref sessionId,
|
||||
Ptr<UniqueId>::Ref id) const
|
||||
throw (std::logic_error)
|
||||
{
|
||||
Ptr<Playlist>::Ref playlist(new Playlist);
|
||||
return playlist;
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Save a playlist after editing.
|
||||
*----------------------------------------------------------------------------*/
|
||||
void
|
||||
WebStorageClient :: savePlaylist(Ptr<SessionId>::Ref sessionId,
|
||||
Ptr<Playlist>::Ref playlist) const
|
||||
throw (std::logic_error)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Acquire resources for a playlist.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.4 $
|
||||
Version : $Revision: 1.5 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClient.h,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -99,7 +99,7 @@ using namespace LiveSupport::Core;
|
|||
* </code></pre>
|
||||
*
|
||||
* @author $Author: fgerlits $
|
||||
* @version $Revision: 1.4 $
|
||||
* @version $Revision: 1.5 $
|
||||
*/
|
||||
class WebStorageClient :
|
||||
virtual public Configurable,
|
||||
|
@ -201,7 +201,7 @@ class WebStorageClient :
|
|||
throw (std::logic_error);
|
||||
|
||||
/**
|
||||
* Return a playlist with the specified id.
|
||||
* Return a playlist with the specified id, to be displayed.
|
||||
*
|
||||
* @param sessionId the session ID from the authentication client
|
||||
* @param id the id of the playlist to return.
|
||||
|
@ -215,6 +215,34 @@ class WebStorageClient :
|
|||
Ptr<UniqueId>::Ref id) const
|
||||
throw (std::logic_error);
|
||||
|
||||
/**
|
||||
* Return a playlist with the specified id, to be edited.
|
||||
*
|
||||
* @param sessionId the session ID from the authentication client
|
||||
* @param id the id of the playlist to return.
|
||||
* @return the requested playlist.
|
||||
* @exception std::logic_error if no playlist with the specified
|
||||
* id exists.
|
||||
* @exception std::logic_error if we have not logged in yet.
|
||||
*/
|
||||
virtual Ptr<Playlist>::Ref
|
||||
editPlaylist(Ptr<SessionId>::Ref sessionId,
|
||||
Ptr<UniqueId>::Ref id) const
|
||||
throw (std::logic_error);
|
||||
|
||||
/**
|
||||
* Save the playlist after editing.
|
||||
*
|
||||
* @param sessionId the session ID from the authentication client
|
||||
* @param playlist the playlist to save.
|
||||
* @exception std::logic_error if the playlist has not been previously
|
||||
* opened by getPlaylist()
|
||||
*/
|
||||
virtual void
|
||||
savePlaylist(Ptr<SessionId>::Ref sessionId,
|
||||
Ptr<Playlist>::Ref playlist) const
|
||||
throw (std::logic_error);
|
||||
|
||||
/**
|
||||
* Acquire the resources for the playlist.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue