From 9db6d2472542855541d04de5b3fac27b1b2c8664 Mon Sep 17 00:00:00 2001 From: fgerlits Date: Wed, 10 Nov 2004 17:45:53 +0000 Subject: [PATCH] removed the URIs from released playlists and audio clips added the XmlRpcServerMethod external to the Scheduler documentation --- .../core/include/LiveSupport/Core/Playlist.h | 12 +-- .../LiveSupport/Core/PlaylistElement.h | 6 +- .../LiveSupport/Core/StorageClientInterface.h | 8 +- livesupport/modules/core/src/Playlist.cxx | 93 +------------------ livesupport/modules/core/src/PlaylistTest.cxx | 40 +------- livesupport/modules/core/src/PlaylistTest.h | 13 +-- .../modules/storage/src/TestStorageClient.cxx | 17 ++-- .../modules/storage/src/TestStorageClient.h | 8 +- .../storage/src/TestStorageClientTest.cxx | 6 +- .../products/scheduler/etc/Makefile.in | 5 +- .../products/scheduler/etc/doxygen.config | 8 +- .../xmlrpc++/xmlrpc++-20040713/bin/install.sh | 12 ++- 12 files changed, 43 insertions(+), 185 deletions(-) diff --git a/livesupport/modules/core/include/LiveSupport/Core/Playlist.h b/livesupport/modules/core/include/LiveSupport/Core/Playlist.h index 229f9fdd1..d2985bd9e 100644 --- a/livesupport/modules/core/include/LiveSupport/Core/Playlist.h +++ b/livesupport/modules/core/include/LiveSupport/Core/Playlist.h @@ -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::Ref - toSmil(void) const throw (std::logic_error); }; diff --git a/livesupport/modules/core/include/LiveSupport/Core/PlaylistElement.h b/livesupport/modules/core/include/LiveSupport/Core/PlaylistElement.h index ad8fd94b8..a5cd676f3 100644 --- a/livesupport/modules/core/include/LiveSupport/Core/PlaylistElement.h +++ b/livesupport/modules/core/include/LiveSupport/Core/PlaylistElement.h @@ -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::Ref + Ptr::Ref getAudioClip(void) const throw () { return audioClip; diff --git a/livesupport/modules/core/include/LiveSupport/Core/StorageClientInterface.h b/livesupport/modules/core/include/LiveSupport/Core/StorageClientInterface.h index 95668c7da..815c44b4f 100644 --- a/livesupport/modules/core/include/LiveSupport/Core/StorageClientInterface.h +++ b/livesupport/modules/core/include/LiveSupport/Core/StorageClientInterface.h @@ -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::Ref playlist) const + releasePlaylist(Ptr::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::Ref audioClip) const + releaseAudioClip(Ptr::Ref audioClip) const throw (std::logic_error) = 0; diff --git a/livesupport/modules/core/src/Playlist.cxx b/livesupport/modules/core/src/Playlist.cxx index 3289e2dc5..fbb794556 100644 --- a/livesupport/modules/core/src/Playlist.cxx +++ b/livesupport/modules/core/src/Playlist.cxx @@ -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::Ref -Playlist::toSmil(void) const throw (std::logic_error) -{ - if (!isLockedForPlaying) { - throw (std::logic_error("playlist not open for playing")); - } - - Ptr::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; -} diff --git a/livesupport/modules/core/src/PlaylistTest.cxx b/livesupport/modules/core/src/PlaylistTest.cxx index 02985dadc..1b6a17a99 100644 --- a/livesupport/modules/core/src/PlaylistTest.cxx +++ b/livesupport/modules/core/src/PlaylistTest.cxx @@ -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 = - "\n" - "\n" - " \n" - " \n" - " \n" - " \n" - "\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); -} diff --git a/livesupport/modules/core/src/PlaylistTest.h b/livesupport/modules/core/src/PlaylistTest.h index fb1465726..ec74c93fe 100644 --- a/livesupport/modules/core/src/PlaylistTest.h +++ b/livesupport/modules/core/src/PlaylistTest.h @@ -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: diff --git a/livesupport/modules/storage/src/TestStorageClient.cxx b/livesupport/modules/storage/src/TestStorageClient.cxx index c499de8dc..1b87b4bd4 100644 --- a/livesupport/modules/storage/src/TestStorageClient.cxx +++ b/livesupport/modules/storage/src/TestStorageClient.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.12 $ + Version : $Revision: 1.13 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.cxx,v $ ------------------------------------------------------------------------------*/ @@ -59,11 +59,6 @@ using namespace LiveSupport::Storage; *----------------------------------------------------------------------------*/ const std::string TestStorageClient::configElementNameStr = "testStorage"; -/*------------------------------------------------------------------------------ - * The path to the local temp storage - *----------------------------------------------------------------------------*/ -const std::string TestStorageClient::localTempStoragePath = "var/"; - /*------------------------------------------------------------------------------ * The XML version used to create the SMIL file. *----------------------------------------------------------------------------*/ @@ -282,7 +277,7 @@ TestStorageClient :: acquirePlaylist(Ptr::Ref id) const * Release a playlist. *----------------------------------------------------------------------------*/ void -TestStorageClient :: releasePlaylist(Ptr::Ref playlist) const +TestStorageClient :: releasePlaylist(Ptr::Ref playlist) const throw (std::logic_error) { if (! playlist->getUri()) { @@ -311,6 +306,9 @@ TestStorageClient :: releasePlaylist(Ptr::Ref playlist) const ++it; } + Ptr::Ref nullPointer; + playlist->setUri(nullPointer); + if (badAudioClips) { std::stringstream eMsg; eMsg << "could not release " << badAudioClips @@ -450,12 +448,15 @@ TestStorageClient :: acquireAudioClip(Ptr::Ref id) const * Release an audio clip. *----------------------------------------------------------------------------*/ void -TestStorageClient :: releaseAudioClip(Ptr::Ref audioClip) const +TestStorageClient :: releaseAudioClip(Ptr::Ref audioClip) const throw (std::logic_error) { if (*(audioClip->getUri()) == "") { throw std::logic_error("audio clip URI not found"); } + + Ptr::Ref nullPointer; + audioClip->setUri(nullPointer); } diff --git a/livesupport/modules/storage/src/TestStorageClient.h b/livesupport/modules/storage/src/TestStorageClient.h index 8c3b6e7dc..7eae1cf31 100644 --- a/livesupport/modules/storage/src/TestStorageClient.h +++ b/livesupport/modules/storage/src/TestStorageClient.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.11 $ + Version : $Revision: 1.12 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.h,v $ ------------------------------------------------------------------------------*/ @@ -67,7 +67,7 @@ using namespace LiveSupport::Core; * A dummy storage client, only used for test purposes. * * @author $Author: fgerlits $ - * @version $Revision: 1.11 $ + * @version $Revision: 1.12 $ */ class TestStorageClient : virtual public Configurable, @@ -191,7 +191,7 @@ class TestStorageClient : * or the file does not exist, etc. */ virtual void - releasePlaylist(Ptr::Ref playlist) const + releasePlaylist(Ptr::Ref playlist) const throw (std::logic_error); /** @@ -268,7 +268,7 @@ class TestStorageClient : * or the file does not exist, etc. */ virtual void - releaseAudioClip(Ptr::Ref audioClip) const + releaseAudioClip(Ptr::Ref audioClip) const throw (std::logic_error); /** diff --git a/livesupport/modules/storage/src/TestStorageClientTest.cxx b/livesupport/modules/storage/src/TestStorageClientTest.cxx index 97cd279b8..85053bfdc 100644 --- a/livesupport/modules/storage/src/TestStorageClientTest.cxx +++ b/livesupport/modules/storage/src/TestStorageClientTest.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.11 $ + Version : $Revision: 1.12 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClientTest.cxx,v $ ------------------------------------------------------------------------------*/ @@ -288,8 +288,8 @@ TestStorageClientTest :: acquirePlaylistTest(void) eMsg += e.what(); CPPUNIT_FAIL(eMsg); } - - std::ifstream ifs2(playlist->getUri()->substr(7).c_str()); + CPPUNIT_ASSERT(!playlist->getUri()); + std::ifstream ifs2(savedTempFilePath.c_str()); if (ifs2) { ifs2.close(); CPPUNIT_FAIL("temp file not destroyed correctly"); diff --git a/livesupport/products/scheduler/etc/Makefile.in b/livesupport/products/scheduler/etc/Makefile.in index 2a784ce39..7ba3ca7a3 100644 --- a/livesupport/products/scheduler/etc/Makefile.in +++ b/livesupport/products/scheduler/etc/Makefile.in @@ -20,8 +20,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # -# Author : $Author: maroy $ -# Version : $Revision: 1.22 $ +# Author : $Author: fgerlits $ +# Version : $Revision: 1.23 $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/etc/Makefile.in,v $ # # @configure_input@ @@ -35,7 +35,6 @@ RM = rm -f RMDIR = rm -rf DOXYGEN = doxygen - #------------------------------------------------------------------------------- # Basic directory and file definitions #------------------------------------------------------------------------------- diff --git a/livesupport/products/scheduler/etc/doxygen.config b/livesupport/products/scheduler/etc/doxygen.config index d9ddbf251..662eb8431 100644 --- a/livesupport/products/scheduler/etc/doxygen.config +++ b/livesupport/products/scheduler/etc/doxygen.config @@ -20,8 +20,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # -# Author : $Author: maroy $ -# Version : $Revision: 1.2 $ +# Author : $Author: fgerlits $ +# Version : $Revision: 1.3 $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/etc/doxygen.config,v $ #------------------------------------------------------------------------------- @@ -977,7 +977,7 @@ SKIP_FUNCTION_MACROS = YES # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = ../../usr/share/doc/xmlrpc++/xmlrpc++.tag=../../../../../usr/share/doc/xmlrpc++ # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. @@ -988,7 +988,7 @@ GENERATE_TAGFILE = # in the class index. If set to NO only the inherited external classes # will be listed. -ALLEXTERNALS = NO +ALLEXTERNALS = YES # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will diff --git a/livesupport/tools/xmlrpc++/xmlrpc++-20040713/bin/install.sh b/livesupport/tools/xmlrpc++/xmlrpc++-20040713/bin/install.sh index 1ff6fd0fa..4a992dd73 100755 --- a/livesupport/tools/xmlrpc++/xmlrpc++-20040713/bin/install.sh +++ b/livesupport/tools/xmlrpc++/xmlrpc++-20040713/bin/install.sh @@ -21,8 +21,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # -# Author : $Author: maroy $ -# Version : $Revision: 1.1 $ +# Author : $Author: fgerlits $ +# Version : $Revision: 1.2 $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/tools/xmlrpc++/xmlrpc++-20040713/bin/Attic/install.sh,v $ #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- @@ -37,10 +37,10 @@ installdir=`cd $basedir/../../../usr; pwd; cd -` tmpdir=$basedir/tmp etcdir=$basedir/etc tar=$basedir/src/$product.tar.gz +docdir=$installdir/share/doc/xmlrpc++ echo "installing $product from $basedir to $installdir" - mkdir -p $tmpdir cd $tmpdir @@ -51,6 +51,10 @@ patch -p1 < $etcdir/uninitialised_XmlRpcSource_ssl_ssl.patch sh autogen.sh --prefix=$installdir make install +cd $docdir +doxytag -t xmlrpc++.tag XmlRpcServerMethod_8h-source.html \ + classXmlRpc_1_1XmlRpcServerMethod.html \ + classXmlRpc_1_1XmlRpcServerMethod-members.html + cd $basedir rm -rf tmp -