Removed references to the delete methods (audio clip and playlist),
fixing bug #1169.
This commit is contained in:
parent
914d12032a
commit
c8159a7323
27 changed files with 31 additions and 1368 deletions
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.15 $
|
Version : $Revision: 1.16 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientInterface.h,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientInterface.h,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -66,7 +66,7 @@ using namespace Core;
|
||||||
* An interface for storage clients.
|
* An interface for storage clients.
|
||||||
*
|
*
|
||||||
* @author $Author: fgerlits $
|
* @author $Author: fgerlits $
|
||||||
* @version $Revision: 1.15 $
|
* @version $Revision: 1.16 $
|
||||||
*/
|
*/
|
||||||
class StorageClientInterface
|
class StorageClientInterface
|
||||||
{
|
{
|
||||||
|
@ -220,23 +220,6 @@ class StorageClientInterface
|
||||||
releasePlaylist(Ptr<Playlist>::Ref playlist) const
|
releasePlaylist(Ptr<Playlist>::Ref playlist) const
|
||||||
throw (XmlRpcException)
|
throw (XmlRpcException)
|
||||||
= 0;
|
= 0;
|
||||||
/**
|
|
||||||
* Delete a playlist with the specified id.
|
|
||||||
* Will refuse to delete the playlist if it is being edited (i.e.,
|
|
||||||
* has been opened with editPlaylist() but has not yet been released
|
|
||||||
* with savePlaylist()).
|
|
||||||
*
|
|
||||||
* @param sessionId the session ID from the authentication client
|
|
||||||
* @param id the id of the playlist to be deleted.
|
|
||||||
* @exception XmlRpcException if there is a problem with the XML-RPC
|
|
||||||
* call or no playlist with the specified
|
|
||||||
* id exists.
|
|
||||||
*/
|
|
||||||
virtual void
|
|
||||||
deletePlaylist(Ptr<SessionId>::Ref sessionId,
|
|
||||||
Ptr<UniqueId>::Ref id)
|
|
||||||
throw (XmlRpcException)
|
|
||||||
= 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tell if an audio clip with a given id exists.
|
* Tell if an audio clip with a given id exists.
|
||||||
|
@ -340,21 +323,6 @@ class StorageClientInterface
|
||||||
throw (XmlRpcException)
|
throw (XmlRpcException)
|
||||||
= 0;
|
= 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* Delete an audio clip with the specified id.
|
|
||||||
*
|
|
||||||
* @param sessionId the session ID from the authentication client
|
|
||||||
* @param id the id of the audio clip to be deleted.
|
|
||||||
* @exception XmlRpcException if there is a problem with the XML-RPC
|
|
||||||
* call or no audio clip with the
|
|
||||||
* specified id exists.
|
|
||||||
*/
|
|
||||||
virtual void
|
|
||||||
deleteAudioClip(Ptr<SessionId>::Ref sessionId,
|
|
||||||
Ptr<UniqueId>::Ref id)
|
|
||||||
throw (XmlRpcException)
|
|
||||||
= 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search for audio clips or playlists. The results can be read
|
* Search for audio clips or playlists. The results can be read
|
||||||
* using getAudioClipIds() and getPlaylistIds().
|
* using getAudioClipIds() and getPlaylistIds().
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.38 $
|
Version : $Revision: 1.39 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -382,7 +382,7 @@ TestStorageClient :: savePlaylist(Ptr<SessionId>::Ref sessionId,
|
||||||
storeIt = playlistMap.find(playlist->getId()->getId());
|
storeIt = playlistMap.find(playlist->getId()->getId());
|
||||||
|
|
||||||
if (storeIt == playlistMap.end()) {
|
if (storeIt == playlistMap.end()) {
|
||||||
throw XmlRpcException("playlist deleted while it was being edited???");
|
throw XmlRpcException("playlist vanished while it was being edited???");
|
||||||
}
|
}
|
||||||
storeIt->second = playlist;
|
storeIt->second = playlist;
|
||||||
|
|
||||||
|
@ -540,29 +540,6 @@ TestStorageClient :: releasePlaylist(Ptr<Playlist>::Ref playlist) const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* Delete a playlist.
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
void
|
|
||||||
TestStorageClient :: deletePlaylist(Ptr<SessionId>::Ref sessionId,
|
|
||||||
Ptr<UniqueId>::Ref id)
|
|
||||||
throw (XmlRpcException)
|
|
||||||
{
|
|
||||||
if (!sessionId) {
|
|
||||||
throw XmlRpcException("missing session ID argument");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (editedPlaylists.find(id->getId()) != editedPlaylists.end()) {
|
|
||||||
throw XmlRpcException("playlist is being edited");
|
|
||||||
}
|
|
||||||
|
|
||||||
// erase() returns the number of entries found & erased
|
|
||||||
if (!playlistMap.erase(id->getId())) {
|
|
||||||
throw XmlRpcException("no such playlist");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Tell if an audio clip exists.
|
* Tell if an audio clip exists.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
@ -687,25 +664,6 @@ TestStorageClient :: releaseAudioClip(Ptr<AudioClip>::Ref audioClip) const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* Delete an audio clip.
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
void
|
|
||||||
TestStorageClient :: deleteAudioClip(Ptr<SessionId>::Ref sessionId,
|
|
||||||
Ptr<UniqueId>::Ref id)
|
|
||||||
throw (XmlRpcException)
|
|
||||||
{
|
|
||||||
if (!sessionId) {
|
|
||||||
throw XmlRpcException("missing session ID argument");
|
|
||||||
}
|
|
||||||
|
|
||||||
// erase() returns the number of entries found & erased
|
|
||||||
if (!audioClipMap.erase(id->getId())) {
|
|
||||||
throw XmlRpcException("no such audio clip");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Search for audio clips or playlists.
|
* Search for audio clips or playlists.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.34 $
|
Version : $Revision: 1.35 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.h,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.h,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -86,7 +86,7 @@ using namespace LiveSupport::Core;
|
||||||
* </code></pre>
|
* </code></pre>
|
||||||
*
|
*
|
||||||
* @author $Author: fgerlits $
|
* @author $Author: fgerlits $
|
||||||
* @version $Revision: 1.34 $
|
* @version $Revision: 1.35 $
|
||||||
*/
|
*/
|
||||||
class TestStorageClient :
|
class TestStorageClient :
|
||||||
virtual public Configurable,
|
virtual public Configurable,
|
||||||
|
@ -361,23 +361,6 @@ class TestStorageClient :
|
||||||
releasePlaylist(Ptr<Playlist>::Ref playlist) const
|
releasePlaylist(Ptr<Playlist>::Ref playlist) const
|
||||||
throw (XmlRpcException);
|
throw (XmlRpcException);
|
||||||
|
|
||||||
/**
|
|
||||||
* Delete a playlist with the specified id.
|
|
||||||
* Will refuse to delete the playlist if it is being edited (i.e.,
|
|
||||||
* has been opened with editPlaylist() but has not yet been released
|
|
||||||
* with savePlaylist()).
|
|
||||||
*
|
|
||||||
* @param sessionId the session ID from the authentication client
|
|
||||||
* @param id the id of the playlist to be deleted.
|
|
||||||
* @exception XmlRpcException if no playlist with the specified
|
|
||||||
* id exists.
|
|
||||||
*/
|
|
||||||
virtual void
|
|
||||||
deletePlaylist(Ptr<SessionId>::Ref sessionId,
|
|
||||||
Ptr<UniqueId>::Ref id)
|
|
||||||
throw (XmlRpcException);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tell if an audio clip with a given id exists.
|
* Tell if an audio clip with a given id exists.
|
||||||
*
|
*
|
||||||
|
@ -471,20 +454,6 @@ class TestStorageClient :
|
||||||
throw (XmlRpcException);
|
throw (XmlRpcException);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Delete an audio clip with the specified id.
|
|
||||||
*
|
|
||||||
* @param sessionId the session ID from the authentication client
|
|
||||||
* @param id the id of the audio clip to be deleted.
|
|
||||||
* @exception XmlRpcException if no audio clip with the
|
|
||||||
* specified id exists.
|
|
||||||
*/
|
|
||||||
virtual void
|
|
||||||
deleteAudioClip(Ptr<SessionId>::Ref sessionId,
|
|
||||||
Ptr<UniqueId>::Ref id)
|
|
||||||
throw (XmlRpcException);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset the storage to its initial state.
|
* Reset the storage to its initial state.
|
||||||
* Re-initializes the storage based on the xml element which was
|
* Re-initializes the storage based on the xml element which was
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.27 $
|
Version : $Revision: 1.28 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClientTest.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClientTest.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -157,36 +157,6 @@ TestStorageClientTest :: getVersionTest(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* Testing the deletePlaylist method
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
void
|
|
||||||
TestStorageClientTest :: deletePlaylistTest(void)
|
|
||||||
throw (CPPUNIT_NS::Exception)
|
|
||||||
{
|
|
||||||
Ptr<UniqueId>::Ref id1(new UniqueId(0x1));
|
|
||||||
Ptr<UniqueId>::Ref id2(new UniqueId(0x77));
|
|
||||||
|
|
||||||
try {
|
|
||||||
tsc->deletePlaylist(dummySessionId, id2);
|
|
||||||
CPPUNIT_FAIL("allowed to delete non-existent playlist");
|
|
||||||
} catch (XmlRpcException &e) {
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
tsc->deletePlaylist(dummySessionId, id1);
|
|
||||||
} catch (XmlRpcException &e) {
|
|
||||||
CPPUNIT_FAIL("cannot delete existing playlist");
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
tsc->deletePlaylist(dummySessionId, id1);
|
|
||||||
CPPUNIT_FAIL("allowed to delete non-existent playlist");
|
|
||||||
} catch (XmlRpcException &e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Testing the reset method
|
* Testing the reset method
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
@ -278,16 +248,6 @@ TestStorageClientTest :: audioClipTest(void)
|
||||||
CPPUNIT_ASSERT(audioClipIds);
|
CPPUNIT_ASSERT(audioClipIds);
|
||||||
CPPUNIT_ASSERT(audioClipIds->size() >= 3);
|
CPPUNIT_ASSERT(audioClipIds->size() >= 3);
|
||||||
|
|
||||||
Ptr<UniqueId>::Ref audioClipId = audioClipIds->at(0);
|
|
||||||
CPPUNIT_ASSERT((int) (audioClipId->getId()) == 0x10001);
|
|
||||||
|
|
||||||
try {
|
|
||||||
tsc->deleteAudioClip(dummySessionId, id02);
|
|
||||||
} catch (XmlRpcException &e) {
|
|
||||||
CPPUNIT_FAIL(e.what());
|
|
||||||
}
|
|
||||||
CPPUNIT_ASSERT(!tsc->existsAudioClip(dummySessionId, id02));
|
|
||||||
|
|
||||||
Ptr<const Glib::ustring>::Ref title(new Glib::ustring("New Title"));
|
Ptr<const Glib::ustring>::Ref title(new Glib::ustring("New Title"));
|
||||||
Ptr<time_duration>::Ref playlength(new time_duration(0,0,13,0));
|
Ptr<time_duration>::Ref playlength(new time_duration(0,0,13,0));
|
||||||
Ptr<const std::string>::Ref uri;
|
Ptr<const std::string>::Ref uri;
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: maroy $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.11 $
|
Version : $Revision: 1.12 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClientTest.h,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClientTest.h,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -57,8 +57,8 @@ namespace Storage {
|
||||||
/**
|
/**
|
||||||
* Unit test for the UploadPlaylistMetohd class.
|
* Unit test for the UploadPlaylistMetohd class.
|
||||||
*
|
*
|
||||||
* @author $Author: maroy $
|
* @author $Author: fgerlits $
|
||||||
* @version $Revision: 1.11 $
|
* @version $Revision: 1.12 $
|
||||||
* @see TestStorageClient
|
* @see TestStorageClient
|
||||||
*/
|
*/
|
||||||
class TestStorageClientTest : public CPPUNIT_NS::TestFixture
|
class TestStorageClientTest : public CPPUNIT_NS::TestFixture
|
||||||
|
@ -67,7 +67,6 @@ class TestStorageClientTest : public CPPUNIT_NS::TestFixture
|
||||||
CPPUNIT_TEST(firstTest);
|
CPPUNIT_TEST(firstTest);
|
||||||
CPPUNIT_TEST(getVersionTest);
|
CPPUNIT_TEST(getVersionTest);
|
||||||
CPPUNIT_TEST(resetTest);
|
CPPUNIT_TEST(resetTest);
|
||||||
CPPUNIT_TEST(deletePlaylistTest);
|
|
||||||
CPPUNIT_TEST(createPlaylistTest);
|
CPPUNIT_TEST(createPlaylistTest);
|
||||||
CPPUNIT_TEST(audioClipTest);
|
CPPUNIT_TEST(audioClipTest);
|
||||||
CPPUNIT_TEST(acquireAudioClipTest);
|
CPPUNIT_TEST(acquireAudioClipTest);
|
||||||
|
@ -105,14 +104,6 @@ class TestStorageClientTest : public CPPUNIT_NS::TestFixture
|
||||||
void
|
void
|
||||||
getVersionTest(void) throw (CPPUNIT_NS::Exception);
|
getVersionTest(void) throw (CPPUNIT_NS::Exception);
|
||||||
|
|
||||||
/**
|
|
||||||
* Testing deletePlaylist().
|
|
||||||
*
|
|
||||||
* @exception CPPUNIT_NS::Exception on test failures.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
deletePlaylistTest(void)
|
|
||||||
throw (CPPUNIT_NS::Exception);
|
|
||||||
/**
|
/**
|
||||||
* Testing getAllPlaylists().
|
* Testing getAllPlaylists().
|
||||||
*
|
*
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.41 $
|
Version : $Revision: 1.42 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClient.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClient.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -422,30 +422,6 @@ static const std::string savePlaylistNewPlaylistParamName = "newPlaylist";
|
||||||
static const std::string savePlaylistResultParamName = "plid";
|
static const std::string savePlaylistResultParamName = "plid";
|
||||||
|
|
||||||
|
|
||||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ storage server constants: deletePlaylist */
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* The name of the delete playlist method on the storage server
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
static const std::string deletePlaylistMethodName
|
|
||||||
= "locstor.deletePlaylist";
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* The name of the session ID parameter in the input structure
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
static const std::string deletePlaylistSessionIdParamName = "sessid";
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* The name of the playlist unique ID parameter in the input structure
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
static const std::string deletePlaylistPlaylistIdParamName = "plid";
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* The name of the result parameter returned by the method
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
static const std::string deletePlaylistResultParamName = "status";
|
|
||||||
|
|
||||||
|
|
||||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ audio clip methods */
|
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ audio clip methods */
|
||||||
|
|
||||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ storage server constants: existsAudioClip */
|
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ storage server constants: existsAudioClip */
|
||||||
|
@ -605,30 +581,6 @@ static const std::string releaseAudioClipTokenParamName = "token";
|
||||||
static const std::string releaseAudioClipResultParamName = "status";
|
static const std::string releaseAudioClipResultParamName = "status";
|
||||||
|
|
||||||
|
|
||||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ storage server constants: deleteAudioClip */
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* The name of the delete audio clip method on the storage server
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
static const std::string deleteAudioClipMethodName
|
|
||||||
= "locstor.deleteAudioClip";
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* The name of the session ID parameter in the input structure
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
static const std::string deleteAudioClipSessionIdParamName = "sessid";
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* The name of the audio clip unique ID parameter in the input structure
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
static const std::string deleteAudioClipAudioClipIdParamName = "gunid";
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* The name of the result parameter returned by the method
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
static const std::string deleteAudioClipResultParamName = "status";
|
|
||||||
|
|
||||||
|
|
||||||
/* =============================================== local function prototypes */
|
/* =============================================== local function prototypes */
|
||||||
|
|
||||||
|
|
||||||
|
@ -1334,67 +1286,6 @@ WebStorageClient :: releasePlaylist(Ptr<Playlist>::Ref playlist) const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* Delete a playlist.
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
void
|
|
||||||
WebStorageClient :: deletePlaylist(Ptr<SessionId>::Ref sessionId,
|
|
||||||
Ptr<UniqueId>::Ref id)
|
|
||||||
throw (Core::XmlRpcException)
|
|
||||||
{
|
|
||||||
XmlRpcValue parameters;
|
|
||||||
XmlRpcValue result;
|
|
||||||
|
|
||||||
XmlRpcClient xmlRpcClient(storageServerName.c_str(), storageServerPort,
|
|
||||||
storageServerPath.c_str(), false);
|
|
||||||
|
|
||||||
parameters.clear();
|
|
||||||
parameters[deletePlaylistSessionIdParamName]
|
|
||||||
= sessionId->getId();
|
|
||||||
parameters[deletePlaylistPlaylistIdParamName]
|
|
||||||
= std::string(*id);
|
|
||||||
|
|
||||||
result.clear();
|
|
||||||
if (!xmlRpcClient.execute(deletePlaylistMethodName.c_str(),
|
|
||||||
parameters, result)) {
|
|
||||||
xmlRpcClient.close();
|
|
||||||
std::string eMsg = "cannot execute XML-RPC method '";
|
|
||||||
eMsg += deletePlaylistMethodName;
|
|
||||||
eMsg += "'";
|
|
||||||
throw XmlRpcCommunicationException(eMsg);
|
|
||||||
}
|
|
||||||
xmlRpcClient.close();
|
|
||||||
|
|
||||||
if (xmlRpcClient.isFault()) {
|
|
||||||
std::stringstream eMsg;
|
|
||||||
eMsg << "XML-RPC method '"
|
|
||||||
<< deletePlaylistMethodName
|
|
||||||
<< "' returned error message:\n"
|
|
||||||
<< result;
|
|
||||||
throw Core::XmlRpcMethodFaultException(eMsg.str());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! result.hasMember(deletePlaylistResultParamName)
|
|
||||||
|| result[deletePlaylistResultParamName].getType()
|
|
||||||
!= XmlRpcValue::TypeBoolean) {
|
|
||||||
std::stringstream eMsg;
|
|
||||||
eMsg << "XML-RPC method '"
|
|
||||||
<< deletePlaylistMethodName
|
|
||||||
<< "' returned unexpected value:\n"
|
|
||||||
<< result;
|
|
||||||
throw XmlRpcMethodResponseException(eMsg.str());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! bool(result[deletePlaylistResultParamName])) {
|
|
||||||
std::stringstream eMsg;
|
|
||||||
eMsg << "XML-RPC method '"
|
|
||||||
<< deletePlaylistMethodName
|
|
||||||
<< "' returned 'false'";
|
|
||||||
throw XmlRpcMethodResponseException(eMsg.str());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Tell if an audio clip exists.
|
* Tell if an audio clip exists.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
@ -1861,67 +1752,6 @@ WebStorageClient :: releaseAudioClip(Ptr<AudioClip>::Ref audioClip) const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* Delete an audio clip.
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
void
|
|
||||||
WebStorageClient :: deleteAudioClip(Ptr<SessionId>::Ref sessionId,
|
|
||||||
Ptr<UniqueId>::Ref id)
|
|
||||||
throw (Core::XmlRpcException)
|
|
||||||
{
|
|
||||||
XmlRpcValue parameters;
|
|
||||||
XmlRpcValue result;
|
|
||||||
|
|
||||||
XmlRpcClient xmlRpcClient(storageServerName.c_str(), storageServerPort,
|
|
||||||
storageServerPath.c_str(), false);
|
|
||||||
|
|
||||||
parameters.clear();
|
|
||||||
parameters[deleteAudioClipSessionIdParamName]
|
|
||||||
= sessionId->getId();
|
|
||||||
parameters[deleteAudioClipAudioClipIdParamName]
|
|
||||||
= std::string(*id);
|
|
||||||
|
|
||||||
result.clear();
|
|
||||||
if (!xmlRpcClient.execute(deleteAudioClipMethodName.c_str(),
|
|
||||||
parameters, result)) {
|
|
||||||
xmlRpcClient.close();
|
|
||||||
std::string eMsg = "cannot execute XML-RPC method '";
|
|
||||||
eMsg += deleteAudioClipMethodName;
|
|
||||||
eMsg += "'";
|
|
||||||
throw XmlRpcCommunicationException(eMsg);
|
|
||||||
}
|
|
||||||
xmlRpcClient.close();
|
|
||||||
|
|
||||||
if (xmlRpcClient.isFault()) {
|
|
||||||
std::stringstream eMsg;
|
|
||||||
eMsg << "XML-RPC method '"
|
|
||||||
<< deleteAudioClipMethodName
|
|
||||||
<< "' returned error message:\n"
|
|
||||||
<< result;
|
|
||||||
throw Core::XmlRpcMethodFaultException(eMsg.str());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! result.hasMember(deleteAudioClipResultParamName)
|
|
||||||
|| result[deleteAudioClipResultParamName].getType()
|
|
||||||
!= XmlRpcValue::TypeBoolean) {
|
|
||||||
std::stringstream eMsg;
|
|
||||||
eMsg << "XML-RPC method '"
|
|
||||||
<< deleteAudioClipMethodName
|
|
||||||
<< "' returned unexpected value:\n"
|
|
||||||
<< result;
|
|
||||||
throw XmlRpcMethodResponseException(eMsg.str());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! bool(result[deleteAudioClipResultParamName])) {
|
|
||||||
std::stringstream eMsg;
|
|
||||||
eMsg << "XML-RPC method '"
|
|
||||||
<< deleteAudioClipMethodName
|
|
||||||
<< "' returned 'false'";
|
|
||||||
throw XmlRpcMethodResponseException(eMsg.str());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Reset the storage to its initial state.
|
* Reset the storage to its initial state.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.28 $
|
Version : $Revision: 1.29 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClient.h,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClient.h,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -96,7 +96,7 @@ using namespace LiveSupport::Core;
|
||||||
* </code></pre>
|
* </code></pre>
|
||||||
*
|
*
|
||||||
* @author $Author: fgerlits $
|
* @author $Author: fgerlits $
|
||||||
* @version $Revision: 1.28 $
|
* @version $Revision: 1.29 $
|
||||||
*/
|
*/
|
||||||
class WebStorageClient :
|
class WebStorageClient :
|
||||||
virtual public Configurable,
|
virtual public Configurable,
|
||||||
|
@ -355,23 +355,6 @@ class WebStorageClient :
|
||||||
releasePlaylist(Ptr<Playlist>::Ref playlist) const
|
releasePlaylist(Ptr<Playlist>::Ref playlist) const
|
||||||
throw (XmlRpcException);
|
throw (XmlRpcException);
|
||||||
|
|
||||||
/**
|
|
||||||
* Delete a playlist with the specified id.
|
|
||||||
* Will refuse to delete the playlist if it is being edited (i.e.,
|
|
||||||
* has been opened with editPlaylist() but has not yet been released
|
|
||||||
* with savePlaylist()).
|
|
||||||
*
|
|
||||||
* @param sessionId the session ID from the authentication client
|
|
||||||
* @param id the id of the playlist to be deleted.
|
|
||||||
* @exception XmlRpcException if there is a problem with the XML-RPC
|
|
||||||
* call or no playlist with the specified
|
|
||||||
* id exists.
|
|
||||||
*/
|
|
||||||
virtual void
|
|
||||||
deletePlaylist(Ptr<SessionId>::Ref sessionId,
|
|
||||||
Ptr<UniqueId>::Ref id)
|
|
||||||
throw (XmlRpcException);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tell if an audio clip with a given id exists.
|
* Tell if an audio clip with a given id exists.
|
||||||
*
|
*
|
||||||
|
@ -473,20 +456,6 @@ class WebStorageClient :
|
||||||
releaseAudioClip(Ptr<AudioClip>::Ref audioClip) const
|
releaseAudioClip(Ptr<AudioClip>::Ref audioClip) const
|
||||||
throw (XmlRpcException);
|
throw (XmlRpcException);
|
||||||
|
|
||||||
/**
|
|
||||||
* Delete an audio clip with the specified id.
|
|
||||||
*
|
|
||||||
* @param sessionId the session ID from the authentication client
|
|
||||||
* @param id the id of the audio clip to be deleted.
|
|
||||||
* @exception XmlRpcException if there is a problem with the XML-RPC
|
|
||||||
* call or no audio clip with the
|
|
||||||
* specified id exists.
|
|
||||||
*/
|
|
||||||
virtual void
|
|
||||||
deleteAudioClip(Ptr<SessionId>::Ref sessionId,
|
|
||||||
Ptr<UniqueId>::Ref id)
|
|
||||||
throw (XmlRpcException);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset the storage to its initial state.
|
* Reset the storage to its initial state.
|
||||||
* Calls locstor.resetStorage; the audio clip and playlist IDs
|
* Calls locstor.resetStorage; the audio clip and playlist IDs
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.43 $
|
Version : $Revision: 1.44 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClientTest.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClientTest.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -355,22 +355,6 @@ WebStorageClientTest :: playlistTest(void)
|
||||||
CPPUNIT_FAIL(e.what());
|
CPPUNIT_FAIL(e.what());
|
||||||
}
|
}
|
||||||
CPPUNIT_ASSERT(!newPlaylist->getUri());
|
CPPUNIT_ASSERT(!newPlaylist->getUri());
|
||||||
|
|
||||||
/*
|
|
||||||
// test deletePlaylist()
|
|
||||||
try {
|
|
||||||
wsc->deletePlaylist(sessionId, playlistIdxx);
|
|
||||||
} catch (XmlRpcException &e) {
|
|
||||||
CPPUNIT_FAIL(e.what());
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
exists = wsc->existsPlaylist(sessionId, playlistIdxx);
|
|
||||||
} catch (XmlRpcException &e) {
|
|
||||||
CPPUNIT_FAIL(e.what());
|
|
||||||
}
|
|
||||||
CPPUNIT_ASSERT(!exists);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -404,7 +388,7 @@ WebStorageClientTest :: audioClipTest(void)
|
||||||
CPPUNIT_ASSERT(sessionId);
|
CPPUNIT_ASSERT(sessionId);
|
||||||
|
|
||||||
|
|
||||||
// test existsAudioClip(), deleteAudioClip() and getAudioClip()
|
// test existsAudioClip() and getAudioClip()
|
||||||
bool exists = false;;
|
bool exists = false;;
|
||||||
try {
|
try {
|
||||||
exists = wsc->existsAudioClip(sessionId, id01);
|
exists = wsc->existsAudioClip(sessionId, id01);
|
||||||
|
@ -419,20 +403,7 @@ WebStorageClientTest :: audioClipTest(void)
|
||||||
} catch (XmlRpcException &e) {
|
} catch (XmlRpcException &e) {
|
||||||
CPPUNIT_FAIL(e.what());
|
CPPUNIT_FAIL(e.what());
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
try {
|
|
||||||
wsc->deleteAudioClip(sessionId, id01);
|
|
||||||
} catch (XmlRpcException &e) {
|
|
||||||
CPPUNIT_FAIL(e.what());
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
exists = wsc->existsAudioClip(sessionId, id01);
|
|
||||||
} catch (XmlRpcException &e) {
|
|
||||||
CPPUNIT_FAIL(e.what());
|
|
||||||
}
|
|
||||||
CPPUNIT_ASSERT(!exists);
|
|
||||||
*/
|
|
||||||
Ptr<UniqueId>::Ref id77(new UniqueId(10077));
|
Ptr<UniqueId>::Ref id77(new UniqueId(10077));
|
||||||
try {
|
try {
|
||||||
exists = wsc->existsAudioClip(sessionId, id77);
|
exists = wsc->existsAudioClip(sessionId, id77);
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.50 $
|
Version : $Revision: 1.51 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -739,29 +739,6 @@ GLiveSupport :: removeFromSchedule(Ptr<UniqueId>::Ref scheduleEntryId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* Delete a playable object from the storage.
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
void
|
|
||||||
LiveSupport :: GLiveSupport ::
|
|
||||||
GLiveSupport :: deletePlayable(Ptr<Playable>::Ref playable)
|
|
||||||
throw (XmlRpcException)
|
|
||||||
{
|
|
||||||
switch (playable->getType()) {
|
|
||||||
case Playable::AudioClipType:
|
|
||||||
storage->deleteAudioClip(sessionId, playable->getId());
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Playable::PlaylistType:
|
|
||||||
storage->deletePlaylist(sessionId, playable->getId());
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Play a Playable object using the output audio player.
|
* Play a Playable object using the output audio player.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.39 $
|
Version : $Revision: 1.40 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.h,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.h,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -102,7 +102,7 @@ class MasterPanelWindow;
|
||||||
* respective documentation.
|
* respective documentation.
|
||||||
*
|
*
|
||||||
* @author $Author: fgerlits $
|
* @author $Author: fgerlits $
|
||||||
* @version $Revision: 1.39 $
|
* @version $Revision: 1.40 $
|
||||||
* @see LocalizedObject#getBundle(const xmlpp::Element &)
|
* @see LocalizedObject#getBundle(const xmlpp::Element &)
|
||||||
* @see AuthenticationClientFactory
|
* @see AuthenticationClientFactory
|
||||||
* @see StorageClientFactory
|
* @see StorageClientFactory
|
||||||
|
@ -596,16 +596,6 @@ class GLiveSupport : public LocalizedConfigurable,
|
||||||
removeFromSchedule(Ptr<UniqueId>::Ref scheduleEntryId)
|
removeFromSchedule(Ptr<UniqueId>::Ref scheduleEntryId)
|
||||||
throw (XmlRpcException);
|
throw (XmlRpcException);
|
||||||
|
|
||||||
/**
|
|
||||||
* Delete a playable object from storage.
|
|
||||||
*
|
|
||||||
* @param playable the playable object to delete.
|
|
||||||
* @exception XmlRpcException in case of XML-RPC errors.
|
|
||||||
*/
|
|
||||||
virtual void
|
|
||||||
deletePlayable(Ptr<Playable>::Ref playable)
|
|
||||||
throw (XmlRpcException);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Play a Playable object using the output audio player.
|
* Play a Playable object using the output audio player.
|
||||||
*
|
*
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.22 $
|
Version : $Revision: 1.23 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -166,10 +166,6 @@ ScratchpadWindow :: ScratchpadWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||||
*getResourceUstring("removeMenuItem"),
|
*getResourceUstring("removeMenuItem"),
|
||||||
sigc::mem_fun(*this,
|
sigc::mem_fun(*this,
|
||||||
&ScratchpadWindow::onRemoveItem)));
|
&ScratchpadWindow::onRemoveItem)));
|
||||||
audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
|
||||||
*getResourceUstring("deleteMenuItem"),
|
|
||||||
sigc::mem_fun(*this,
|
|
||||||
&ScratchpadWindow::onDeleteItem)));
|
|
||||||
audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
audioClipMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
||||||
*getResourceUstring("cueMenuItem"),
|
*getResourceUstring("cueMenuItem"),
|
||||||
sigc::mem_fun(*audioButtonBox,
|
sigc::mem_fun(*audioButtonBox,
|
||||||
|
@ -211,10 +207,6 @@ ScratchpadWindow :: ScratchpadWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||||
*getResourceUstring("removeMenuItem"),
|
*getResourceUstring("removeMenuItem"),
|
||||||
sigc::mem_fun(*this,
|
sigc::mem_fun(*this,
|
||||||
&ScratchpadWindow::onRemoveItem)));
|
&ScratchpadWindow::onRemoveItem)));
|
||||||
playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
|
||||||
*getResourceUstring("deleteMenuItem"),
|
|
||||||
sigc::mem_fun(*this,
|
|
||||||
&ScratchpadWindow::onDeleteItem)));
|
|
||||||
playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
||||||
*getResourceUstring("cueMenuItem"),
|
*getResourceUstring("cueMenuItem"),
|
||||||
sigc::mem_fun(*audioButtonBox,
|
sigc::mem_fun(*audioButtonBox,
|
||||||
|
@ -472,23 +464,6 @@ ScratchpadWindow :: onDownItem(void) throw ()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* Event handler for the Delete menu item selected from the entry conext menu
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
void
|
|
||||||
ScratchpadWindow :: onDeleteItem(void) throw ()
|
|
||||||
{
|
|
||||||
Ptr<Playable>::Ref playable = currentRow[modelColumns.playableColumn];
|
|
||||||
|
|
||||||
try {
|
|
||||||
deleteItem(playable);
|
|
||||||
} catch (XmlRpcException &e) {
|
|
||||||
// TODO: signal error here
|
|
||||||
}
|
|
||||||
showContents();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Remove an item from the Scratchpad
|
* Remove an item from the Scratchpad
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
@ -515,18 +490,6 @@ ScratchpadWindow :: removeItem(Ptr<const UniqueId>::Ref id) throw ()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* Delete an item from storage, and remove it from the Scratchpad
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
void
|
|
||||||
ScratchpadWindow :: deleteItem(Ptr<Playable>::Ref playable)
|
|
||||||
throw (XmlRpcException)
|
|
||||||
{
|
|
||||||
removeItem(playable->getId());
|
|
||||||
gLiveSupport->deletePlayable(playable);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Event handler for the Add To Playlist menu item selected from the
|
* Event handler for the Add To Playlist menu item selected from the
|
||||||
* entry conext menu
|
* entry conext menu
|
||||||
|
|
|
@ -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/gLiveSupport/src/ScratchpadWindow.h,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/ScratchpadWindow.h,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -73,7 +73,7 @@ using namespace LiveSupport::Widgets;
|
||||||
* playlists.
|
* playlists.
|
||||||
*
|
*
|
||||||
* @author $Author: fgerlits $
|
* @author $Author: fgerlits $
|
||||||
* @version $Revision: 1.7 $
|
* @version $Revision: 1.8 $
|
||||||
*/
|
*/
|
||||||
class ScratchpadWindow : public WhiteWindow,
|
class ScratchpadWindow : public WhiteWindow,
|
||||||
public LocalizedObject
|
public LocalizedObject
|
||||||
|
@ -87,7 +87,7 @@ class ScratchpadWindow : public WhiteWindow,
|
||||||
* Lists one clip per row.
|
* Lists one clip per row.
|
||||||
*
|
*
|
||||||
* @author $Author: fgerlits $
|
* @author $Author: fgerlits $
|
||||||
* @version $Revision: 1.7 $
|
* @version $Revision: 1.8 $
|
||||||
*/
|
*/
|
||||||
class ModelColumns : public PlayableTreeModelColumnRecord
|
class ModelColumns : public PlayableTreeModelColumnRecord
|
||||||
{
|
{
|
||||||
|
@ -179,7 +179,7 @@ class ScratchpadWindow : public WhiteWindow,
|
||||||
Button * clearListButton;
|
Button * clearListButton;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The "delete selected item" button.
|
* The "remove selected item" button.
|
||||||
*/
|
*/
|
||||||
Button * removeButton;
|
Button * removeButton;
|
||||||
|
|
||||||
|
@ -228,13 +228,6 @@ class ScratchpadWindow : public WhiteWindow,
|
||||||
virtual void
|
virtual void
|
||||||
onRemoveItem(void) throw ();
|
onRemoveItem(void) throw ();
|
||||||
|
|
||||||
/**
|
|
||||||
* Signal handler for the "delete" menu item selected from
|
|
||||||
* the entry context menu.
|
|
||||||
*/
|
|
||||||
virtual void
|
|
||||||
onDeleteItem(void) throw ();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Signal handler for the "up" menu item selected from
|
* Signal handler for the "up" menu item selected from
|
||||||
* the entry context menu.
|
* the entry context menu.
|
||||||
|
@ -270,15 +263,6 @@ class ScratchpadWindow : public WhiteWindow,
|
||||||
virtual void
|
virtual void
|
||||||
onAddToLiveMode(void) throw ();
|
onAddToLiveMode(void) throw ();
|
||||||
|
|
||||||
/**
|
|
||||||
* Delete an item from the storage and remove it from the Scratchpad.
|
|
||||||
*
|
|
||||||
* @param playable the Playable object to delete and remove.
|
|
||||||
* @exception XmlRpcException on XML-RPC errors.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
deleteItem(Ptr<Playable>::Ref playable) throw (XmlRpcException);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -56,7 +56,6 @@ es:table
|
||||||
removeMenuItem:string { "Eliminar" }
|
removeMenuItem:string { "Eliminar" }
|
||||||
addToPlaylistMenuItem:string { "Añadir a lista de reproducción" }
|
addToPlaylistMenuItem:string { "Añadir a lista de reproducción" }
|
||||||
schedulePlaylistMenuItem:string { "Programar lista de reproducción" }
|
schedulePlaylistMenuItem:string { "Programar lista de reproducción" }
|
||||||
deleteMenuItem:string { "Eliminar" }
|
|
||||||
cueMenuItem:string { "Previsualizar" }
|
cueMenuItem:string { "Previsualizar" }
|
||||||
addToLiveModeMenuItem:string { "Añadir a modo en vivo" }
|
addToLiveModeMenuItem:string { "Añadir a modo en vivo" }
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,10 +52,9 @@ hu:table
|
||||||
|
|
||||||
upMenuItem:string { "_Fel" }
|
upMenuItem:string { "_Fel" }
|
||||||
downMenuItem:string { "_Le" }
|
downMenuItem:string { "_Le" }
|
||||||
removeMenuItem:string { "_Eltávolítani" }
|
removeMenuItem:string { "_Törölni" }
|
||||||
addToPlaylistMenuItem:string { "Műsorhoz _hozzáadni" }
|
addToPlaylistMenuItem:string { "Műsorhoz _hozzáadni" }
|
||||||
schedulePlaylistMenuItem:string { "_Műsor időzítése" }
|
schedulePlaylistMenuItem:string { "_Műsor időzítése" }
|
||||||
deleteMenuItem:string { "_Törölni" }
|
|
||||||
cueMenuItem:string { "_Belehallgatni" }
|
cueMenuItem:string { "_Belehallgatni" }
|
||||||
addToLiveModeMenuItem:string { "Élő _adásba" }
|
addToLiveModeMenuItem:string { "Élő _adásba" }
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,6 @@ nl:table
|
||||||
removeMenuItem:string { "_Verwijderen" }
|
removeMenuItem:string { "_Verwijderen" }
|
||||||
addToPlaylistMenuItem:string { "_Toevoegen aan Playlist" }
|
addToPlaylistMenuItem:string { "_Toevoegen aan Playlist" }
|
||||||
schedulePlaylistMenuItem:string { "_Playlist plannen" }
|
schedulePlaylistMenuItem:string { "_Playlist plannen" }
|
||||||
deleteMenuItem:string { "_Verwijder" }
|
|
||||||
cueMenuItem:string { "_Cue" }
|
cueMenuItem:string { "_Cue" }
|
||||||
addToLiveModeMenuItem:string { "Aan _Live Mode toevoegen" }
|
addToLiveModeMenuItem:string { "Aan _Live Mode toevoegen" }
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,6 @@ root:table
|
||||||
removeMenuItem:string { "_Remove" }
|
removeMenuItem:string { "_Remove" }
|
||||||
addToPlaylistMenuItem:string { "_Add To Playlist" }
|
addToPlaylistMenuItem:string { "_Add To Playlist" }
|
||||||
schedulePlaylistMenuItem:string { "_Schedule Playlist" }
|
schedulePlaylistMenuItem:string { "_Schedule Playlist" }
|
||||||
deleteMenuItem:string { "_Delete" }
|
|
||||||
cueMenuItem:string { "Pre_view" }
|
cueMenuItem:string { "Pre_view" }
|
||||||
addToLiveModeMenuItem:string { "Add To _Live Mode" }
|
addToLiveModeMenuItem:string { "Add To _Live Mode" }
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,6 @@ sr_CS:table
|
||||||
removeMenuItem:string { "Ukloni" }
|
removeMenuItem:string { "Ukloni" }
|
||||||
addToPlaylistMenuItem:string { "Dodaj u plej listu" }
|
addToPlaylistMenuItem:string { "Dodaj u plej listu" }
|
||||||
schedulePlaylistMenuItem:string { "programiraj plej listu" }
|
schedulePlaylistMenuItem:string { "programiraj plej listu" }
|
||||||
deleteMenuItem:string { "Obriši" }
|
|
||||||
cueMenuItem:string { "Proba" }
|
cueMenuItem:string { "Proba" }
|
||||||
addToLiveModeMenuItem:string { "Dodaj u Program Uživo" }
|
addToLiveModeMenuItem:string { "Dodaj u Program Uživo" }
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,6 @@ sr_CS_CYRILLIC:table
|
||||||
removeMenuItem:string { "Уклони" }
|
removeMenuItem:string { "Уклони" }
|
||||||
addToPlaylistMenuItem:string { "Додај у плеј листу" }
|
addToPlaylistMenuItem:string { "Додај у плеј листу" }
|
||||||
schedulePlaylistMenuItem:string { "Програмирај плеј листу" }
|
schedulePlaylistMenuItem:string { "Програмирај плеј листу" }
|
||||||
deleteMenuItem:string { "Обриши" }
|
|
||||||
cueMenuItem:string { "Проба" }
|
cueMenuItem:string { "Проба" }
|
||||||
addToLiveModeMenuItem:string { "Додај у Програм Уживо" }
|
addToLiveModeMenuItem:string { "Додај у Програм Уживо" }
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Author : $Author: fgerlits $
|
# Author : $Author: fgerlits $
|
||||||
# Version : $Revision: 1.58 $
|
# Version : $Revision: 1.59 $
|
||||||
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/etc/Makefile.in,v $
|
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/etc/Makefile.in,v $
|
||||||
#
|
#
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
@ -185,7 +185,6 @@ SCHEDULER_OBJS = ${TMP_DIR}/SignalDispatcher.o \
|
||||||
${TMP_DIR}/RescheduleMethod.o \
|
${TMP_DIR}/RescheduleMethod.o \
|
||||||
${TMP_DIR}/ScheduleFactory.o \
|
${TMP_DIR}/ScheduleFactory.o \
|
||||||
${TMP_DIR}/PostgresqlSchedule.o \
|
${TMP_DIR}/PostgresqlSchedule.o \
|
||||||
${TMP_DIR}/DeletePlaylistMethod.o \
|
|
||||||
${TMP_DIR}/DisplayPlaylistsMethod.o \
|
${TMP_DIR}/DisplayPlaylistsMethod.o \
|
||||||
${TMP_DIR}/OpenPlaylistForEditingMethod.o \
|
${TMP_DIR}/OpenPlaylistForEditingMethod.o \
|
||||||
${TMP_DIR}/CreatePlaylistMethod.o \
|
${TMP_DIR}/CreatePlaylistMethod.o \
|
||||||
|
@ -235,8 +234,6 @@ TEST_RUNNER_OBJS = ${SCHEDULER_OBJS} \
|
||||||
${TMP_DIR}/RescheduleMethodTest.o \
|
${TMP_DIR}/RescheduleMethodTest.o \
|
||||||
${TMP_DIR}/RpcRescheduleTest.o \
|
${TMP_DIR}/RpcRescheduleTest.o \
|
||||||
${TMP_DIR}/PostgresqlScheduleTest.o \
|
${TMP_DIR}/PostgresqlScheduleTest.o \
|
||||||
${TMP_DIR}/DeletePlaylistMethodTest.o \
|
|
||||||
${TMP_DIR}/RpcDeletePlaylistTest.o \
|
|
||||||
${TMP_DIR}/DisplayPlaylistMethodTest.o \
|
${TMP_DIR}/DisplayPlaylistMethodTest.o \
|
||||||
${TMP_DIR}/RpcDisplayPlaylistTest.o \
|
${TMP_DIR}/RpcDisplayPlaylistTest.o \
|
||||||
${TMP_DIR}/DisplayPlaylistsMethodTest.o \
|
${TMP_DIR}/DisplayPlaylistsMethodTest.o \
|
||||||
|
|
|
@ -1,148 +0,0 @@
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
|
||||||
|
|
||||||
This file is part of the LiveSupport project.
|
|
||||||
http://livesupport.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
LiveSupport is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
LiveSupport is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with LiveSupport; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
|
||||||
Version : $Revision: 1.13 $
|
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/Attic/DeletePlaylistMethod.cxx,v $
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/* ============================================================ include files */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
#include "configure.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "LiveSupport/Storage/StorageClientInterface.h"
|
|
||||||
#include "LiveSupport/Storage/StorageClientFactory.h"
|
|
||||||
#include "ScheduleInterface.h"
|
|
||||||
#include "ScheduleFactory.h"
|
|
||||||
#include "LiveSupport/Core/XmlRpcTools.h"
|
|
||||||
|
|
||||||
#include "DeletePlaylistMethod.h"
|
|
||||||
|
|
||||||
|
|
||||||
using namespace LiveSupport;
|
|
||||||
using namespace LiveSupport::Core;
|
|
||||||
using namespace LiveSupport::Storage;
|
|
||||||
|
|
||||||
using namespace LiveSupport::Scheduler;
|
|
||||||
|
|
||||||
/* =================================================== local data structures */
|
|
||||||
|
|
||||||
|
|
||||||
/* ================================================ local constants & macros */
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* The name of this XML-RPC method.
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
const std::string DeletePlaylistMethod::methodName = "deletePlaylist";
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* The ID of this method for error reporting purposes.
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
const int DeletePlaylistMethod::errorId = 900;
|
|
||||||
|
|
||||||
|
|
||||||
/* =============================================== local function prototypes */
|
|
||||||
|
|
||||||
|
|
||||||
/* ============================================================= module code */
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* Construct the method and register it right away.
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
DeletePlaylistMethod :: DeletePlaylistMethod (
|
|
||||||
Ptr<XmlRpc::XmlRpcServer>::Ref xmlRpcServer) throw()
|
|
||||||
: XmlRpc::XmlRpcServerMethod(methodName, xmlRpcServer.get())
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* Execute the XML-RPC function call.
|
|
||||||
* (Overrides 'execute' in XmlRpcServerMethod.)
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
void
|
|
||||||
DeletePlaylistMethod :: execute(XmlRpc::XmlRpcValue & rootParameter,
|
|
||||||
XmlRpc::XmlRpcValue & returnValue)
|
|
||||||
throw (XmlRpc::XmlRpcException)
|
|
||||||
{
|
|
||||||
if (!rootParameter.valid() || rootParameter.size() != 1
|
|
||||||
|| !rootParameter[0].valid()) {
|
|
||||||
XmlRpcTools::markError(errorId+1, "invalid argument format",
|
|
||||||
returnValue);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
XmlRpc::XmlRpcValue parameters = rootParameter[0];
|
|
||||||
|
|
||||||
Ptr<SessionId>::Ref sessionId;
|
|
||||||
try{
|
|
||||||
sessionId = XmlRpcTools::extractSessionId(parameters);
|
|
||||||
} catch (std::invalid_argument &e) {
|
|
||||||
XmlRpcTools::markError(errorId+20,
|
|
||||||
"missing session ID argument",
|
|
||||||
returnValue);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Ptr<UniqueId>::Ref playlistId;
|
|
||||||
try{
|
|
||||||
playlistId = XmlRpcTools::extractPlaylistId(parameters);
|
|
||||||
} catch (std::invalid_argument &e) {
|
|
||||||
XmlRpcTools::markError(errorId+2, "missing playlist ID argument",
|
|
||||||
returnValue);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Ptr<StorageClientFactory>::Ref scf
|
|
||||||
= StorageClientFactory::getInstance();
|
|
||||||
Ptr<StorageClientInterface>::Ref storage
|
|
||||||
= scf->getStorageClient();
|
|
||||||
Ptr<Playlist>::Ref playlist;
|
|
||||||
try {
|
|
||||||
playlist = storage->getPlaylist(sessionId, playlistId);
|
|
||||||
} catch (Core::XmlRpcException &e) {
|
|
||||||
std::string eMsg = "playlist not found:\n";
|
|
||||||
eMsg += e.what();
|
|
||||||
XmlRpcTools::markError(errorId+3, eMsg, returnValue);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (playlist->isLocked()) {
|
|
||||||
XmlRpcTools::markError(errorId+4, "playlist is locked",
|
|
||||||
returnValue);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
storage->deletePlaylist(sessionId, playlistId);
|
|
||||||
} catch (Core::XmlRpcException &e) {
|
|
||||||
std::string eMsg = "playlist could not be deleted:\n";
|
|
||||||
eMsg += e.what();
|
|
||||||
XmlRpcTools::markError(errorId+5, eMsg, returnValue);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,152 +0,0 @@
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
|
||||||
|
|
||||||
This file is part of the LiveSupport project.
|
|
||||||
http://livesupport.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
LiveSupport is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
LiveSupport is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with LiveSupport; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
|
||||||
Version : $Revision: 1.7 $
|
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/Attic/DeletePlaylistMethod.h,v $
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
#ifndef DeletePlaylistMethod_h
|
|
||||||
#define DeletePlaylistMethod_h
|
|
||||||
|
|
||||||
#ifndef __cplusplus
|
|
||||||
#error This is a C++ include file
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* ============================================================ include files */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
#include "configure.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdexcept>
|
|
||||||
#include <string>
|
|
||||||
#include <XmlRpcServerMethod.h>
|
|
||||||
#include <XmlRpcValue.h>
|
|
||||||
#include <XmlRpcException.h>
|
|
||||||
|
|
||||||
#include "LiveSupport/Core/Ptr.h"
|
|
||||||
#include "LiveSupport/Core/Playlist.h"
|
|
||||||
|
|
||||||
|
|
||||||
namespace LiveSupport {
|
|
||||||
namespace Scheduler {
|
|
||||||
|
|
||||||
using namespace LiveSupport;
|
|
||||||
using namespace LiveSupport::Core;
|
|
||||||
|
|
||||||
/* ================================================================ constants */
|
|
||||||
|
|
||||||
|
|
||||||
/* =================================================================== macros */
|
|
||||||
|
|
||||||
|
|
||||||
/* =============================================================== data types */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An XML-RPC method object to delete a playlist given by its playlist id.
|
|
||||||
*
|
|
||||||
* The name of the method when called through XML-RPC is "deletePlaylist".
|
|
||||||
*
|
|
||||||
* The expected parameter is an XML-RPC structure, with the following
|
|
||||||
* members:
|
|
||||||
* <ul>
|
|
||||||
* <li>sessionId - string - the session ID obtained via the login()
|
|
||||||
* method of the authentication client </li>
|
|
||||||
* <li>playlistId - string - the unique id of the playlist
|
|
||||||
* to be deleted.</li>
|
|
||||||
* </ul>
|
|
||||||
*
|
|
||||||
* In case of an error, a standard XML-RPC fault response is generated,
|
|
||||||
* and a { faultCode, faultString } structure is returned. The
|
|
||||||
* possible errors are:
|
|
||||||
* <ul>
|
|
||||||
* <li>901 - invalid argument format </li>
|
|
||||||
* <li>902 - missing playlist ID argument </li>
|
|
||||||
* <li>903 - playlist not found </li>
|
|
||||||
* <li>904 - playlist is locked </li>
|
|
||||||
* <li>905 - playlist could not be deleted </li>
|
|
||||||
* <li>920- missing session ID argument </li>
|
|
||||||
* </ul>
|
|
||||||
*
|
|
||||||
* @author $Author: fgerlits $
|
|
||||||
* @version $Revision: 1.7 $
|
|
||||||
*/
|
|
||||||
class DeletePlaylistMethod : public XmlRpc::XmlRpcServerMethod
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
/**
|
|
||||||
* The name of this method, as it will be registered into the
|
|
||||||
* XML-RPC server.
|
|
||||||
*/
|
|
||||||
static const std::string methodName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The ID of this method for error reporting purposes.
|
|
||||||
*/
|
|
||||||
static const int errorId;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* A default constructor, for testing purposes.
|
|
||||||
*/
|
|
||||||
DeletePlaylistMethod(void) throw ()
|
|
||||||
: XmlRpc::XmlRpcServerMethod(methodName)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constuctor that registers the method with the server right away.
|
|
||||||
*
|
|
||||||
* @param xmlRpcServer the XML-RPC server to register with.
|
|
||||||
*/
|
|
||||||
DeletePlaylistMethod(
|
|
||||||
Ptr<XmlRpc::XmlRpcServer>::Ref xmlRpcServer)
|
|
||||||
throw ();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Execute the display schedule command on the Scheduler daemon.
|
|
||||||
*
|
|
||||||
* @param parameters XML-RPC function call parameters
|
|
||||||
* @param returnValue the return value of the call (out parameter)
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
execute( XmlRpc::XmlRpcValue & parameters,
|
|
||||||
XmlRpc::XmlRpcValue & returnValue)
|
|
||||||
throw (XmlRpc::XmlRpcException);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* ================================================= external data structures */
|
|
||||||
|
|
||||||
|
|
||||||
/* ====================================================== function prototypes */
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace Scheduler
|
|
||||||
} // namespace LiveSupport
|
|
||||||
|
|
||||||
#endif // DisplayPlaylistMethod_h
|
|
||||||
|
|
|
@ -1,160 +0,0 @@
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
|
||||||
|
|
||||||
This file is part of the LiveSupport project.
|
|
||||||
http://livesupport.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
LiveSupport is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
LiveSupport is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with LiveSupport; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
|
||||||
Version : $Revision: 1.11 $
|
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/Attic/DeletePlaylistMethodTest.cxx,v $
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/* ============================================================ include files */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
#include "configure.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#else
|
|
||||||
#error "Need unistd.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <iostream>
|
|
||||||
#include <XmlRpcValue.h>
|
|
||||||
|
|
||||||
#include "LiveSupport/Db/ConnectionManagerFactory.h"
|
|
||||||
#include "LiveSupport/Storage/StorageClientFactory.h"
|
|
||||||
#include "LiveSupport/Authentication/AuthenticationClientFactory.h"
|
|
||||||
|
|
||||||
#include "SchedulerDaemon.h"
|
|
||||||
#include "OpenPlaylistForEditingMethod.h"
|
|
||||||
#include "SavePlaylistMethod.h"
|
|
||||||
|
|
||||||
#include "DeletePlaylistMethod.h"
|
|
||||||
#include "DeletePlaylistMethodTest.h"
|
|
||||||
|
|
||||||
|
|
||||||
using namespace LiveSupport::Db;
|
|
||||||
using namespace LiveSupport::Storage;
|
|
||||||
using namespace LiveSupport::Scheduler;
|
|
||||||
using namespace LiveSupport::Authentication;
|
|
||||||
|
|
||||||
|
|
||||||
/* =================================================== local data structures */
|
|
||||||
|
|
||||||
|
|
||||||
/* ================================================ local constants & macros */
|
|
||||||
|
|
||||||
CPPUNIT_TEST_SUITE_REGISTRATION(DeletePlaylistMethodTest);
|
|
||||||
|
|
||||||
|
|
||||||
/* =============================================== local function prototypes */
|
|
||||||
|
|
||||||
|
|
||||||
/* ============================================================= module code */
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* Set up the test environment
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
void
|
|
||||||
DeletePlaylistMethodTest :: setUp(void) throw ()
|
|
||||||
{
|
|
||||||
Ptr<SchedulerDaemon>::Ref scheduler = SchedulerDaemon::getInstance();
|
|
||||||
try {
|
|
||||||
Ptr<StorageClientInterface>::Ref storage = scheduler->getStorage();
|
|
||||||
storage->reset();
|
|
||||||
|
|
||||||
} catch (std::invalid_argument &e) {
|
|
||||||
CPPUNIT_FAIL("semantic error in configuration file");
|
|
||||||
} catch (xmlpp::exception &e) {
|
|
||||||
CPPUNIT_FAIL("error parsing configuration file");
|
|
||||||
} catch (std::exception &e) {
|
|
||||||
CPPUNIT_FAIL(e.what());
|
|
||||||
}
|
|
||||||
|
|
||||||
authentication = scheduler->getAuthentication();
|
|
||||||
try {
|
|
||||||
sessionId = authentication->login("root", "q");
|
|
||||||
} catch (XmlRpcException &e) {
|
|
||||||
std::string eMsg = "could not log in:\n";
|
|
||||||
eMsg += e.what();
|
|
||||||
CPPUNIT_FAIL(eMsg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* Clean up the test environment
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
void
|
|
||||||
DeletePlaylistMethodTest :: tearDown(void) throw ()
|
|
||||||
{
|
|
||||||
authentication->logout(sessionId);
|
|
||||||
sessionId.reset();
|
|
||||||
authentication.reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* A very simple negative test
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
void
|
|
||||||
DeletePlaylistMethodTest :: negativeTest(void)
|
|
||||||
throw (CPPUNIT_NS::Exception)
|
|
||||||
{
|
|
||||||
Ptr<DeletePlaylistMethod>::Ref method(new DeletePlaylistMethod());
|
|
||||||
XmlRpc::XmlRpcValue parameter;
|
|
||||||
XmlRpc::XmlRpcValue rootParameter;
|
|
||||||
rootParameter.setSize(1);
|
|
||||||
XmlRpc::XmlRpcValue result;
|
|
||||||
|
|
||||||
parameter["sessionId"] = sessionId->getId();
|
|
||||||
parameter["playlistId"] = "0000000000009999";
|
|
||||||
rootParameter[0] = parameter;
|
|
||||||
|
|
||||||
result.clear();
|
|
||||||
try {
|
|
||||||
method->execute(rootParameter, result);
|
|
||||||
CPPUNIT_FAIL("allowed to delete non-existent playlist");
|
|
||||||
} catch (XmlRpc::XmlRpcException &e) {
|
|
||||||
CPPUNIT_ASSERT(e.getCode() == 903); // playlist not found
|
|
||||||
}
|
|
||||||
|
|
||||||
parameter.clear();
|
|
||||||
rootParameter.clear();
|
|
||||||
parameter["sessionId"] = sessionId->getId();
|
|
||||||
parameter["playlistId"] = "0000000000000001";
|
|
||||||
rootParameter[0] = parameter;
|
|
||||||
|
|
||||||
result.clear();
|
|
||||||
try {
|
|
||||||
method->execute(rootParameter, result);
|
|
||||||
CPPUNIT_FAIL("allowed disabled deletePlaylist method");
|
|
||||||
} catch (XmlRpc::XmlRpcException &e) {
|
|
||||||
CPPUNIT_ASSERT(e.getCode() == 905); // method disabled
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,127 +0,0 @@
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
|
||||||
|
|
||||||
This file is part of the LiveSupport project.
|
|
||||||
http://livesupport.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
LiveSupport is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
LiveSupport is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with LiveSupport; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
|
||||||
Version : $Revision: 1.6 $
|
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/Attic/DeletePlaylistMethodTest.h,v $
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
#ifndef DeletePlaylistMethodTest_h
|
|
||||||
#define DeletePlaylistMethodTest_h
|
|
||||||
|
|
||||||
#ifndef __cplusplus
|
|
||||||
#error This is a C++ include file
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* ============================================================ include files */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
#include "configure.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <cppunit/extensions/HelperMacros.h>
|
|
||||||
|
|
||||||
#include "LiveSupport/Authentication/AuthenticationClientInterface.h"
|
|
||||||
#include "LiveSupport/Core/SessionId.h"
|
|
||||||
#include "BaseTestMethod.h"
|
|
||||||
|
|
||||||
namespace LiveSupport {
|
|
||||||
namespace Scheduler {
|
|
||||||
|
|
||||||
using namespace LiveSupport;
|
|
||||||
using namespace LiveSupport::Core;
|
|
||||||
using namespace LiveSupport::Authentication;
|
|
||||||
|
|
||||||
/* ================================================================ constants */
|
|
||||||
|
|
||||||
|
|
||||||
/* =================================================================== macros */
|
|
||||||
|
|
||||||
|
|
||||||
/* =============================================================== data types */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unit test for the DeletePlaylistMethod class.
|
|
||||||
*
|
|
||||||
* @author $Author: maroy, fgerlits
|
|
||||||
$
|
|
||||||
* @version $Revision: 1.6 $
|
|
||||||
* @see DeletePlaylistMethod
|
|
||||||
*/
|
|
||||||
class DeletePlaylistMethodTest : public BaseTestMethod
|
|
||||||
{
|
|
||||||
CPPUNIT_TEST_SUITE(DeletePlaylistMethodTest);
|
|
||||||
CPPUNIT_TEST(negativeTest);
|
|
||||||
CPPUNIT_TEST_SUITE_END();
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The authentication client produced by the factory.
|
|
||||||
*/
|
|
||||||
Ptr<AuthenticationClientInterface>::Ref authentication;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A session ID from the authentication client login() method.
|
|
||||||
*/
|
|
||||||
Ptr<SessionId>::Ref sessionId;
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A simple negative test.
|
|
||||||
*
|
|
||||||
* @exception CPPUNIT_NS::Exception on test failures.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
negativeTest(void) throw (CPPUNIT_NS::Exception);
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set up the environment for the test case.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
setUp(void) throw ();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up the environment after the test case.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
tearDown(void) throw ();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* ================================================= external data structures */
|
|
||||||
|
|
||||||
|
|
||||||
/* ====================================================== function prototypes */
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace Scheduler
|
|
||||||
} // namespace LiveSupport
|
|
||||||
|
|
||||||
#endif // DeletePlaylistMethodTest_h
|
|
||||||
|
|
|
@ -1,143 +0,0 @@
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
|
||||||
|
|
||||||
This file is part of the LiveSupport project.
|
|
||||||
http://livesupport.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
LiveSupport is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
LiveSupport is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with LiveSupport; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
|
||||||
Version : $Revision: 1.7 $
|
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/Attic/RpcDeletePlaylistTest.cxx,v $
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/* ============================================================ include files */
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <XmlRpcClient.h>
|
|
||||||
#include <XmlRpcValue.h>
|
|
||||||
|
|
||||||
#include "SchedulerDaemon.h"
|
|
||||||
|
|
||||||
#include "RpcDeletePlaylistTest.h"
|
|
||||||
|
|
||||||
|
|
||||||
using namespace LiveSupport::Core;
|
|
||||||
using namespace LiveSupport::Scheduler;
|
|
||||||
|
|
||||||
/* =================================================== local data structures */
|
|
||||||
|
|
||||||
|
|
||||||
/* ================================================ local constants & macros */
|
|
||||||
|
|
||||||
CPPUNIT_TEST_SUITE_REGISTRATION(RpcDeletePlaylistTest);
|
|
||||||
|
|
||||||
|
|
||||||
/* =============================================== local function prototypes */
|
|
||||||
|
|
||||||
|
|
||||||
/* ============================================================= module code */
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* Set up the test environment
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
void
|
|
||||||
RpcDeletePlaylistTest :: setUp(void) throw ()
|
|
||||||
{
|
|
||||||
XmlRpc::XmlRpcValue parameters;
|
|
||||||
XmlRpc::XmlRpcValue result;
|
|
||||||
|
|
||||||
XmlRpc::XmlRpcClient xmlRpcClient(getXmlRpcHost().c_str(),
|
|
||||||
getXmlRpcPort(),
|
|
||||||
"/RPC2",
|
|
||||||
false);
|
|
||||||
|
|
||||||
CPPUNIT_ASSERT(xmlRpcClient.execute("resetStorage", parameters, result));
|
|
||||||
CPPUNIT_ASSERT(!xmlRpcClient.isFault());
|
|
||||||
|
|
||||||
parameters["login"] = "root";
|
|
||||||
parameters["password"] = "q";
|
|
||||||
CPPUNIT_ASSERT(xmlRpcClient.execute("login", parameters, result));
|
|
||||||
CPPUNIT_ASSERT(!xmlRpcClient.isFault());
|
|
||||||
CPPUNIT_ASSERT(result.hasMember("sessionId"));
|
|
||||||
|
|
||||||
xmlRpcClient.close();
|
|
||||||
|
|
||||||
sessionId.reset(new SessionId(std::string(result["sessionId"])));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* Clean up the test environment
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
void
|
|
||||||
RpcDeletePlaylistTest :: tearDown(void) throw ()
|
|
||||||
{
|
|
||||||
XmlRpc::XmlRpcValue parameters;
|
|
||||||
XmlRpc::XmlRpcValue result;
|
|
||||||
|
|
||||||
XmlRpc::XmlRpcClient xmlRpcClient(getXmlRpcHost().c_str(),
|
|
||||||
getXmlRpcPort(),
|
|
||||||
"/RPC2",
|
|
||||||
false);
|
|
||||||
|
|
||||||
parameters["sessionId"] = sessionId->getId();
|
|
||||||
CPPUNIT_ASSERT(xmlRpcClient.execute("logout", parameters, result));
|
|
||||||
CPPUNIT_ASSERT(!xmlRpcClient.isFault());
|
|
||||||
|
|
||||||
xmlRpcClient.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
* A very simple negative test
|
|
||||||
*----------------------------------------------------------------------------*/
|
|
||||||
void
|
|
||||||
RpcDeletePlaylistTest :: negativeTest(void)
|
|
||||||
throw (CPPUNIT_NS::Exception)
|
|
||||||
{
|
|
||||||
XmlRpc::XmlRpcClient xmlRpcClient(getXmlRpcHost().c_str(),
|
|
||||||
getXmlRpcPort(),
|
|
||||||
"/RPC2",
|
|
||||||
false);
|
|
||||||
XmlRpc::XmlRpcValue parameters;
|
|
||||||
XmlRpc::XmlRpcValue result;
|
|
||||||
|
|
||||||
parameters["sessionId"] = sessionId->getId();
|
|
||||||
parameters["playlistId"] = "0000000000009999";
|
|
||||||
|
|
||||||
result.clear();
|
|
||||||
xmlRpcClient.execute("deletePlaylist", parameters, result);
|
|
||||||
CPPUNIT_ASSERT(xmlRpcClient.isFault());
|
|
||||||
CPPUNIT_ASSERT(result.hasMember("faultCode"));
|
|
||||||
CPPUNIT_ASSERT(int(result["faultCode"]) == 903); // playlist not found
|
|
||||||
|
|
||||||
parameters.clear();
|
|
||||||
parameters["sessionId"] = sessionId->getId();
|
|
||||||
parameters["playlistId"] = "0000000000000001";
|
|
||||||
|
|
||||||
result.clear();
|
|
||||||
xmlRpcClient.execute("deletePlaylist", parameters, result);
|
|
||||||
CPPUNIT_ASSERT(xmlRpcClient.isFault());
|
|
||||||
CPPUNIT_ASSERT(result.hasMember("faultCode"));
|
|
||||||
CPPUNIT_ASSERT(int(result["faultCode"]) == 905); // method disabled
|
|
||||||
|
|
||||||
xmlRpcClient.close();
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,120 +0,0 @@
|
||||||
/*------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) 2004 Media Development Loan Fund
|
|
||||||
|
|
||||||
This file is part of the LiveSupport project.
|
|
||||||
http://livesupport.campware.org/
|
|
||||||
To report bugs, send an e-mail to bugs@campware.org
|
|
||||||
|
|
||||||
LiveSupport is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
LiveSupport is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with LiveSupport; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
|
||||||
Version : $Revision: 1.5 $
|
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/Attic/RpcDeletePlaylistTest.h,v $
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
#ifndef RpcDeletePlaylistTest_h
|
|
||||||
#define RpcDeletePlaylistTest_h
|
|
||||||
|
|
||||||
#ifndef __cplusplus
|
|
||||||
#error This is a C++ include file
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* ============================================================ include files */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
#include "configure.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <cppunit/extensions/HelperMacros.h>
|
|
||||||
|
|
||||||
#include "LiveSupport/Core/Ptr.h"
|
|
||||||
#include "LiveSupport/Core/SessionId.h"
|
|
||||||
|
|
||||||
#include "BaseTestMethod.h"
|
|
||||||
|
|
||||||
namespace LiveSupport {
|
|
||||||
namespace Scheduler {
|
|
||||||
|
|
||||||
using namespace LiveSupport::Core;
|
|
||||||
|
|
||||||
/* ================================================================ constants */
|
|
||||||
|
|
||||||
|
|
||||||
/* =================================================================== macros */
|
|
||||||
|
|
||||||
|
|
||||||
/* =============================================================== data types */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unit test for the DeletePlaylistMethod class.
|
|
||||||
*
|
|
||||||
* @author $Author: maroy, fgerlits
|
|
||||||
$
|
|
||||||
* @version $Revision: 1.5 $
|
|
||||||
* @see DeletePlaylistMethod
|
|
||||||
*/
|
|
||||||
class RpcDeletePlaylistTest : public BaseTestMethod
|
|
||||||
{
|
|
||||||
CPPUNIT_TEST_SUITE(RpcDeletePlaylistTest);
|
|
||||||
CPPUNIT_TEST(negativeTest);
|
|
||||||
CPPUNIT_TEST_SUITE_END();
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A session ID from the authentication client login() method.
|
|
||||||
*/
|
|
||||||
Ptr<SessionId>::Ref sessionId;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A simple negative test.
|
|
||||||
*
|
|
||||||
* @exception CPPUNIT_NS::Exception on test failures.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
negativeTest(void) throw (CPPUNIT_NS::Exception);
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set up the environment for the test case.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
setUp(void) throw ();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up the environment after the test case.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
tearDown(void) throw ();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* ================================================= external data structures */
|
|
||||||
|
|
||||||
|
|
||||||
/* ====================================================== function prototypes */
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace Scheduler
|
|
||||||
} // namespace LiveSupport
|
|
||||||
|
|
||||||
#endif // RpcDeletePlaylistTest_h
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.28 $
|
Version : $Revision: 1.29 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/SchedulerDaemon.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/SchedulerDaemon.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -119,7 +119,6 @@ SchedulerDaemon :: SchedulerDaemon (void) throw ()
|
||||||
{
|
{
|
||||||
addAudioClipToPlaylistMethod.reset(new AddAudioClipToPlaylistMethod());
|
addAudioClipToPlaylistMethod.reset(new AddAudioClipToPlaylistMethod());
|
||||||
createPlaylistMethod.reset(new CreatePlaylistMethod());
|
createPlaylistMethod.reset(new CreatePlaylistMethod());
|
||||||
deletePlaylistMethod.reset(new DeletePlaylistMethod());
|
|
||||||
displayAudioClipMethod.reset(new DisplayAudioClipMethod());
|
displayAudioClipMethod.reset(new DisplayAudioClipMethod());
|
||||||
displayAudioClipsMethod.reset(new DisplayAudioClipsMethod());
|
displayAudioClipsMethod.reset(new DisplayAudioClipsMethod());
|
||||||
displayPlaylistMethod.reset(new DisplayPlaylistMethod());
|
displayPlaylistMethod.reset(new DisplayPlaylistMethod());
|
||||||
|
@ -282,7 +281,6 @@ SchedulerDaemon :: registerXmlRpcFunctions(
|
||||||
{
|
{
|
||||||
xmlRpcServer->addMethod(addAudioClipToPlaylistMethod.get());
|
xmlRpcServer->addMethod(addAudioClipToPlaylistMethod.get());
|
||||||
xmlRpcServer->addMethod(createPlaylistMethod.get());
|
xmlRpcServer->addMethod(createPlaylistMethod.get());
|
||||||
xmlRpcServer->addMethod(deletePlaylistMethod.get());
|
|
||||||
xmlRpcServer->addMethod(displayAudioClipMethod.get());
|
xmlRpcServer->addMethod(displayAudioClipMethod.get());
|
||||||
xmlRpcServer->addMethod(displayAudioClipsMethod.get());
|
xmlRpcServer->addMethod(displayAudioClipsMethod.get());
|
||||||
xmlRpcServer->addMethod(displayPlaylistMethod.get());
|
xmlRpcServer->addMethod(displayPlaylistMethod.get());
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: maroy $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.20 $
|
Version : $Revision: 1.21 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/SchedulerDaemon.h,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/SchedulerDaemon.h,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -68,7 +68,6 @@
|
||||||
#include "LiveSupport/EventScheduler/EventScheduler.h"
|
#include "LiveSupport/EventScheduler/EventScheduler.h"
|
||||||
#include "AddAudioClipToPlaylistMethod.h"
|
#include "AddAudioClipToPlaylistMethod.h"
|
||||||
#include "CreatePlaylistMethod.h"
|
#include "CreatePlaylistMethod.h"
|
||||||
#include "DeletePlaylistMethod.h"
|
|
||||||
#include "DisplayAudioClipMethod.h"
|
#include "DisplayAudioClipMethod.h"
|
||||||
#include "DisplayAudioClipsMethod.h"
|
#include "DisplayAudioClipsMethod.h"
|
||||||
#include "DisplayPlaylistMethod.h"
|
#include "DisplayPlaylistMethod.h"
|
||||||
|
@ -167,8 +166,8 @@ using namespace LiveSupport::PlaylistExecutor;
|
||||||
* xmlRpcDaemon) >
|
* xmlRpcDaemon) >
|
||||||
* </code></pre>
|
* </code></pre>
|
||||||
*
|
*
|
||||||
* @author $Author: maroy $
|
* @author $Author: fgerlits $
|
||||||
* @version $Revision: 1.20 $
|
* @version $Revision: 1.21 $
|
||||||
* @see ConnectionManagerFactory
|
* @see ConnectionManagerFactory
|
||||||
* @see AuthenticationClientFactory
|
* @see AuthenticationClientFactory
|
||||||
* @see StorageClientFactory
|
* @see StorageClientFactory
|
||||||
|
@ -237,11 +236,6 @@ class SchedulerDaemon : public Installable,
|
||||||
*/
|
*/
|
||||||
Ptr<CreatePlaylistMethod>::Ref createPlaylistMethod;
|
Ptr<CreatePlaylistMethod>::Ref createPlaylistMethod;
|
||||||
|
|
||||||
/**
|
|
||||||
* The deletePlaylistMethod the daemon is providing.
|
|
||||||
*/
|
|
||||||
Ptr<DeletePlaylistMethod>::Ref deletePlaylistMethod;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The displayAudioClipMethod the daemon is providing.
|
* The displayAudioClipMethod the daemon is providing.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue