removed the URIs from released playlists and audio clips

added the XmlRpcServerMethod external to the Scheduler documentation
This commit is contained in:
fgerlits 2004-11-10 17:45:53 +00:00
parent 321955070f
commit 9db6d24725
12 changed files with 43 additions and 185 deletions

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.13 $
Version : $Revision: 1.14 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/Playlist.h,v $
------------------------------------------------------------------------------*/
@ -71,7 +71,7 @@ using namespace boost::posix_time;
* the playlist.
*
* @author $Author: fgerlits $
* @version $Revision: 1.13 $
* @version $Revision: 1.14 $
*/
class Playlist : public Configurable
{
@ -398,14 +398,6 @@ class Playlist : public Configurable
*/
void
revertToSavedCopy(void) throw (std::logic_error);
/**
* Return a SMIL XML document representation of the playlist.
* The playlist needs to be opened for playing first; otherwise
* an exception is thrown.
*/
Ptr<xmlpp::Document>::Ref
toSmil(void) const throw (std::logic_error);
};

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.4 $
Version : $Revision: 1.5 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/PlaylistElement.h,v $
------------------------------------------------------------------------------*/
@ -74,7 +74,7 @@ using namespace LiveSupport::Core;
* An item in a playlist.
*
* @author $Author: fgerlits $
* @version $Revision: 1.4 $
* @version $Revision: 1.5 $
*/
class PlaylistElement : public Configurable
{
@ -218,7 +218,7 @@ class PlaylistElement : public Configurable
*
* @return the audio clip associated with the element.
*/
Ptr<const AudioClip>::Ref
Ptr<AudioClip>::Ref
getAudioClip(void) const throw ()
{
return audioClip;

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.11 $
Version : $Revision: 1.12 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/Attic/StorageClientInterface.h,v $
------------------------------------------------------------------------------*/
@ -61,7 +61,7 @@ namespace Core {
* An interface for storage clients.
*
* @author $Author: fgerlits $
* @version $Revision: 1.11 $
* @version $Revision: 1.12 $
*/
class StorageClientInterface
{
@ -114,7 +114,7 @@ class StorageClientInterface
* or the file does not exist, etc.
*/
virtual void
releasePlaylist(Ptr<const Playlist>::Ref playlist) const
releasePlaylist(Ptr<Playlist>::Ref playlist) const
throw (std::logic_error)
= 0;
/**
@ -191,7 +191,7 @@ class StorageClientInterface
* or the file does not exist, etc.
*/
virtual void
releaseAudioClip(Ptr<const AudioClip>::Ref audioClip) const
releaseAudioClip(Ptr<AudioClip>::Ref audioClip) const
throw (std::logic_error)
= 0;

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.12 $
Version : $Revision: 1.13 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/Playlist.cxx,v $
------------------------------------------------------------------------------*/
@ -66,58 +66,6 @@ static const std::string playlengthAttrName = "playlength";
*/
static const std::string elementListAttrName = "playlistElement";
/**
* The XML version used to create the SMIL file.
*/
static const std::string xmlVersion = "1.0";
/**
* The name of the SMIL root node.
*/
static const std::string smilRootNodeName = "smil";
/**
* The name of the SMIL language description attribute.
*/
static const std::string smilLanguageAttrName = "xmlns";
/**
* The value of the SMIL language description attribute.
*/
static const std::string smilLanguageAttrValue
= "http://www.w3.org/2001/SMIL20/Language";
/**
* The name of the SMIL real networks extension attribute.
*/
static const std::string smilExtensionsAttrName = "xmlns:rn";
/**
* The value of the SMIL real networks extension attribute.
*/
static const std::string smilExtensionsAttrValue
= "http://features.real.com/2001/SMIL20/Extensions";
/**
* The name of the body node in the SMIL file.
*/
static const std::string smilBodyNodeName = "body";
/**
* The name of the sequential audio clip list node in the SMIL file.
*/
static const std::string smilSeqNodeName = "seq";
/**
* The name of the audio clip element node in the SMIL file.
*/
static const std::string smilAudioClipNodeName = "audio";
/**
* The name of the attribute containing the URI of the audio clip element.
*/
static const std::string smilAudioClipUriAttrName = "src";
/* =============================================== local function prototypes */
@ -364,42 +312,3 @@ Playlist::revertToSavedCopy(void) throw (std::logic_error)
savedCopy.reset();
}
/*------------------------------------------------------------------------------
* Return a SMIL XML element representation of the playlist.
*----------------------------------------------------------------------------*/
Ptr<xmlpp::Document>::Ref
Playlist::toSmil(void) const throw (std::logic_error)
{
if (!isLockedForPlaying) {
throw (std::logic_error("playlist not open for playing"));
}
Ptr<xmlpp::Document>::Ref
smilDocument(new xmlpp::Document(xmlVersion));
xmlpp::Element * smilRootNode
= smilDocument->create_root_node(smilRootNodeName);
smilRootNode->set_attribute(smilLanguageAttrName,
smilLanguageAttrValue);
smilRootNode->set_attribute(smilExtensionsAttrName,
smilExtensionsAttrValue);
xmlpp::Element * smilBodyNode
= smilRootNode->add_child(smilBodyNodeName);
xmlpp::Element * smilSeqNode
= smilBodyNode->add_child(smilSeqNodeName);
PlaylistElementListType::const_iterator it = elementList->begin();
while (it != elementList->end()) {
xmlpp::Element * smilAudioClipNode
= smilSeqNode->add_child(smilAudioClipNodeName);
smilAudioClipNode->set_attribute(
smilAudioClipUriAttrName,
*(it->second->getAudioClip()->getUri()));
++it;
}
return smilDocument;
}

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.11 $
Version : $Revision: 1.12 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/PlaylistTest.cxx,v $
------------------------------------------------------------------------------*/
@ -63,21 +63,6 @@ CPPUNIT_TEST_SUITE_REGISTRATION(PlaylistTest);
*/
static const std::string configFileName = "etc/playlist.xml";
/**
* The playlist in SMIL XML format.
*/
static const std::string smilPlaylist =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<smil xmlns=\"http://www.w3.org/2001/SMIL20/Language\""
" xmlns:rn=\"http://features.real.com/2001/SMIL20/Extensions\">\n"
" <body>\n"
" <seq>\n"
" <audio src=\"file:var/test1.mp3\"/>\n"
" <audio src=\"file:var/test2.mp3\"/>\n"
" </seq>\n"
" </body>\n"
"</smil>\n";
/* =============================================== local function prototypes */
@ -369,26 +354,3 @@ PlaylistTest :: fadeInfoTest(void)
catch (std::invalid_argument &e) {
}
}
/*------------------------------------------------------------------------------
* Check if the conversion to SMIL works
*----------------------------------------------------------------------------*/
void
PlaylistTest :: toSmilTest(void)
throw (CPPUNIT_NS::Exception)
{
playlist->setLockedForPlaying(true);
std::string newSmilPlaylist;
try {
newSmilPlaylist = playlist->toSmil()
->write_to_string_formatted("UTF-8");
}
catch (std::logic_error &e) {
CPPUNIT_FAIL(e.what());
}
CPPUNIT_ASSERT(newSmilPlaylist == smilPlaylist);
playlist->setLockedForPlaying(false);
}

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.7 $
Version : $Revision: 1.8 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/PlaylistTest.h,v $
------------------------------------------------------------------------------*/
@ -58,7 +58,7 @@ namespace Core {
* Unit test for the UploadPlaylistMetohd class.
*
* @author $Author: fgerlits $
* @version $Revision: 1.7 $
* @version $Revision: 1.8 $
* @see Playlist
*/
class PlaylistTest : public CPPUNIT_NS::TestFixture
@ -69,7 +69,6 @@ class PlaylistTest : public CPPUNIT_NS::TestFixture
CPPUNIT_TEST(audioClipTest);
CPPUNIT_TEST(savedCopyTest);
CPPUNIT_TEST(fadeInfoTest);
CPPUNIT_TEST(toSmilTest);
CPPUNIT_TEST_SUITE_END();
private:
@ -121,14 +120,6 @@ class PlaylistTest : public CPPUNIT_NS::TestFixture
void
fadeInfoTest(void) throw (CPPUNIT_NS::Exception);
/**
* Check if the conversion to SMIL works.
*
* @exception CPPUNIT_NS::Exception on test failures.
*/
void
toSmilTest(void) throw (CPPUNIT_NS::Exception);
public: