fixed bug in TestStorageClient reset() [did not reset list of working
copies of edited playlists]; some corrections in documentation
This commit is contained in:
parent
82e09c51b3
commit
d78879f893
livesupport/modules/storage
include/LiveSupport/Storage
src
|
@ -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/include/LiveSupport/Storage/Attic/SearchCriteria.h,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -116,6 +116,7 @@ class SearchCriteria
|
|||
*/
|
||||
typedef std::vector<SearchConditionType>
|
||||
SearchConditionListType;
|
||||
|
||||
/**
|
||||
* The vector of search conditions.
|
||||
*/
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.9 $
|
||||
Version : $Revision: 1.10 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientInterface.h,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -67,7 +67,7 @@ using namespace Core;
|
|||
* An interface for storage clients.
|
||||
*
|
||||
* @author $Author: fgerlits $
|
||||
* @version $Revision: 1.9 $
|
||||
* @version $Revision: 1.10 $
|
||||
*/
|
||||
class StorageClientInterface
|
||||
{
|
||||
|
@ -105,7 +105,12 @@ class StorageClientInterface
|
|||
|
||||
/**
|
||||
* Return a playlist with the specified id to be displayed.
|
||||
* If the playlist is being edited, its last saved state is returned.
|
||||
* If the playlist is being edited, and this method is called
|
||||
* by the same user who is editing the playlist,
|
||||
* (i.e., the method is called with the same sessionId and playlistId
|
||||
* that editPlaylist() was), then the working copy of the playlist
|
||||
* is returned.
|
||||
* Any other user gets the old (pre-editPlaylist()) copy from storage.
|
||||
*
|
||||
* @param sessionId the session ID from the authentication client
|
||||
* @param id the id of the playlist to return.
|
||||
|
@ -125,6 +130,10 @@ class StorageClientInterface
|
|||
* This puts a lock on the playlist, and nobody else can edit it
|
||||
* until we release it using savePlaylist().
|
||||
*
|
||||
* This method creates a working copy of the playlist, which will
|
||||
* be returned by getPlaylist() if it is called with the same
|
||||
* sessionId and playlistId, until we call savePlaylist().
|
||||
*
|
||||
* @param sessionId the session ID from the authentication client
|
||||
* @param id the id of the playlist to return.
|
||||
* @return the requested playlist.
|
||||
|
@ -143,6 +152,8 @@ class StorageClientInterface
|
|||
* Can only be called after we obtained a lock on the playlist using
|
||||
* editPlaylist(); this method releases the lock.
|
||||
*
|
||||
* This method destroys the working copy created by editPlaylist().
|
||||
*
|
||||
* @param sessionId the session ID from the authentication client
|
||||
* @param playlist the playlist to save.
|
||||
* @exception XmlRpcException if there is a problem with the XML-RPC
|
||||
|
@ -359,8 +370,8 @@ class StorageClientInterface
|
|||
/**
|
||||
* Return the list of audio clip IDs found by the search method.
|
||||
*
|
||||
* (Or the list of audio clip IDs returned by the reset() method
|
||||
* in WebStorageClient -- used for testing.)
|
||||
* (Or the list of audio clip IDs returned by reset()
|
||||
* -- used for testing.)
|
||||
*
|
||||
* @return a vector of UniqueId objects.
|
||||
*/
|
||||
|
@ -371,8 +382,8 @@ class StorageClientInterface
|
|||
/**
|
||||
* Return the list of playlist IDs found by the search method.
|
||||
*
|
||||
* (Or the list of playlist IDs returned by the reset() method
|
||||
* in WebStorageClient -- used for testing.)
|
||||
* (Or the list of playlist IDs returned by reset()
|
||||
* -- used for testing.)
|
||||
*
|
||||
* @return a vector of UniqueId objects.
|
||||
*/
|
||||
|
|
|
@ -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/Attic/SearchCriteria.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -95,13 +95,16 @@ SearchCriteria :: operator XmlRpc::XmlRpcValue() const
|
|||
XmlRpc::XmlRpcValue returnValue;
|
||||
|
||||
returnValue["filetype"] = type;
|
||||
returnValue["operator"] = logicalOperator;
|
||||
if (searchConditions.size() != 1) {
|
||||
returnValue["operator"] = logicalOperator;
|
||||
}
|
||||
|
||||
XmlRpc::XmlRpcValue conditionList;
|
||||
conditionList.setSize(searchConditions.size());
|
||||
SearchConditionListType::const_iterator
|
||||
it = searchConditions.begin();
|
||||
for (int i = 0; it != searchConditions.end(); ++i, ++it) {
|
||||
SearchConditionListType::const_iterator it, end;
|
||||
it = searchConditions.begin();
|
||||
end = searchConditions.end();
|
||||
for (int i = 0; it != end; ++i, ++it) {
|
||||
XmlRpc::XmlRpcValue condition;
|
||||
condition["cat"] = it->key;
|
||||
condition["op"] = it->comparisonOperator;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.35 $
|
||||
Version : $Revision: 1.36 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -185,6 +185,7 @@ TestStorageClient :: reset(void)
|
|||
xmlpp::Node::NodeList::iterator it
|
||||
= nodes.begin();
|
||||
playlistMap.clear();
|
||||
editedPlaylists.clear();
|
||||
playlistIds.reset(new std::vector<Ptr<UniqueId>::Ref>);
|
||||
|
||||
while (it != nodes.end()) {
|
||||
|
@ -201,6 +202,7 @@ TestStorageClient :: reset(void)
|
|||
nodes = element->get_children(AudioClip::getConfigElementName());
|
||||
it = nodes.begin();
|
||||
audioClipMap.clear();
|
||||
audioClipUris.clear();
|
||||
audioClipIds.reset(new std::vector<Ptr<UniqueId>::Ref>);
|
||||
|
||||
while (it != nodes.end()) {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.29 $
|
||||
Version : $Revision: 1.30 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.h,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -86,7 +86,7 @@ using namespace LiveSupport::Core;
|
|||
* </code></pre>
|
||||
*
|
||||
* @author $Author: fgerlits $
|
||||
* @version $Revision: 1.29 $
|
||||
* @version $Revision: 1.30 $
|
||||
*/
|
||||
class TestStorageClient :
|
||||
virtual public Configurable,
|
||||
|
@ -512,7 +512,7 @@ class TestStorageClient :
|
|||
/**
|
||||
* Return the list of audio clip IDs found by the search method.
|
||||
*
|
||||
* (Or the list of audio clip IDs returned by the reset() method
|
||||
* (Or the list of audio clip IDs returned by reset()
|
||||
* -- used for testing.)
|
||||
*
|
||||
* @return a vector of UniqueId objects.
|
||||
|
@ -527,7 +527,7 @@ class TestStorageClient :
|
|||
/**
|
||||
* Return the list of playlist IDs found by the search method.
|
||||
*
|
||||
* (Or the list of playlist IDs returned by the reset() method
|
||||
* (Or the list of playlist IDs returned by reset()
|
||||
* -- used for testing.)
|
||||
*
|
||||
* @return a vector of UniqueId objects.
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.23 $
|
||||
Version : $Revision: 1.24 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClient.h,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -96,7 +96,7 @@ using namespace LiveSupport::Core;
|
|||
* </code></pre>
|
||||
*
|
||||
* @author $Author: fgerlits $
|
||||
* @version $Revision: 1.23 $
|
||||
* @version $Revision: 1.24 $
|
||||
*/
|
||||
class WebStorageClient :
|
||||
virtual public Configurable,
|
||||
|
@ -513,7 +513,7 @@ class WebStorageClient :
|
|||
/**
|
||||
* Return the list of playlist IDs found by the search method.
|
||||
*
|
||||
* (Or the list of playlist IDs returned by the reset() method
|
||||
* (Or the list of playlist IDs returned by reset()
|
||||
* -- used for testing.)
|
||||
*
|
||||
* @return a vector of UniqueId objects.
|
||||
|
@ -528,7 +528,7 @@ class WebStorageClient :
|
|||
/**
|
||||
* Return the list of audio clip IDs found by the search method.
|
||||
*
|
||||
* (Or the list of audio clip IDs returned by the reset() method
|
||||
* (Or the list of audio clip IDs returned by reset()
|
||||
* -- used for testing.)
|
||||
*
|
||||
* @return a vector of UniqueId objects.
|
||||
|
|
Loading…
Reference in New Issue