From dc58a33ca4525760d7a1405259461dad8a1debee Mon Sep 17 00:00:00 2001 From: fgerlits Date: Thu, 11 Nov 2004 15:39:15 +0000 Subject: [PATCH] mostly cosmetic changes to TestStorageClient & fiddling with doxytag --- .../modules/storage/src/TestStorageClient.cxx | 34 ++++++------------- .../storage/src/TestStorageClientTest.cxx | 8 ++--- .../products/scheduler/etc/doxygen.config | 5 +-- .../xmlrpc++/xmlrpc++-20040713/bin/install.sh | 11 +++--- 4 files changed, 24 insertions(+), 34 deletions(-) diff --git a/livesupport/modules/storage/src/TestStorageClient.cxx b/livesupport/modules/storage/src/TestStorageClient.cxx index 1b87b4bd4..2193753bf 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.13 $ + Version : $Revision: 1.14 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.cxx,v $ ------------------------------------------------------------------------------*/ @@ -249,25 +249,13 @@ TestStorageClient :: acquirePlaylist(Ptr::Ref id) const ++it; } - char fileName[] = "/tmp/tempPlaylistXXXXXX"; - if (!mkstemp(fileName)) { - throw std::logic_error("could not create temp file"); - } - std::string sysCommand = "mv "; - sysCommand += fileName; - sysCommand += " "; - sysCommand += fileName; - sysCommand += ".smil > /dev/null 2>&1"; - if (system(sysCommand.c_str()) != 0) { - throw std::logic_error("could not rename temp file"); - } + std::stringstream fileName; + fileName << "file:///tmp/tempPlaylist" << newPlaylist->getId()->getId() + << "#" << std::rand() << ".smil"; - std::string smilFileName("file://"); - smilFileName += fileName; - smilFileName += ".smil"; - smilDocument->write_to_file(smilFileName, "UTF-8"); + smilDocument->write_to_file(fileName.str(), "UTF-8"); - Ptr::Ref playlistUri(new std::string(smilFileName)); + Ptr::Ref playlistUri(new std::string(fileName.str())); newPlaylist->setUri(playlistUri); return newPlaylist; } @@ -285,12 +273,11 @@ TestStorageClient :: releasePlaylist(Ptr::Ref playlist) const } std::ifstream ifs(playlist->getUri()->substr(7).c_str()); - if (ifs) { + if (!ifs) { ifs.close(); - } - else { throw std::logic_error("playlist temp file not found"); } + ifs.close(); std::remove(playlist->getUri()->substr(7).c_str()); @@ -425,12 +412,11 @@ TestStorageClient :: acquireAudioClip(Ptr::Ref id) const std::string audioClipFileName = storedAudioClip->getUri()->substr(5); std::ifstream ifs(audioClipFileName.c_str()); - if (ifs) { + if (!ifs) { ifs.close(); - } - else { throw std::logic_error("could not read audio clip"); } + ifs.close(); Ptr::Ref audioClip(new AudioClip(*storedAudioClip)); diff --git a/livesupport/modules/storage/src/TestStorageClientTest.cxx b/livesupport/modules/storage/src/TestStorageClientTest.cxx index 85053bfdc..1024bdb69 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.12 $ + Version : $Revision: 1.13 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClientTest.cxx,v $ ------------------------------------------------------------------------------*/ @@ -272,12 +272,11 @@ TestStorageClientTest :: acquirePlaylistTest(void) CPPUNIT_ASSERT(playlist->getUri()->substr(0,7) == "file://"); std::ifstream ifs1(playlist->getUri()->substr(7).c_str()); - if (ifs1) { + if (!ifs1) { ifs1.close(); - } - else { CPPUNIT_FAIL("temp file not created correctly"); } + ifs1.close(); string savedTempFilePath = playlist->getUri()->substr(7); try { @@ -294,6 +293,7 @@ TestStorageClientTest :: acquirePlaylistTest(void) ifs2.close(); CPPUNIT_FAIL("temp file not destroyed correctly"); } + ifs2.close(); try { playlist = tsc->acquirePlaylist(id77); diff --git a/livesupport/products/scheduler/etc/doxygen.config b/livesupport/products/scheduler/etc/doxygen.config index 662eb8431..62d963815 100644 --- a/livesupport/products/scheduler/etc/doxygen.config +++ b/livesupport/products/scheduler/etc/doxygen.config @@ -21,7 +21,7 @@ # # # Author : $Author: fgerlits $ -# Version : $Revision: 1.3 $ +# Version : $Revision: 1.4 $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/etc/doxygen.config,v $ #------------------------------------------------------------------------------- @@ -977,7 +977,8 @@ 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 = ../../usr/share/doc/xmlrpc++/xmlrpc++.tag=../../../../../usr/share/doc/xmlrpc++ +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. diff --git a/livesupport/tools/xmlrpc++/xmlrpc++-20040713/bin/install.sh b/livesupport/tools/xmlrpc++/xmlrpc++-20040713/bin/install.sh index 4a992dd73..f6f2aa4a6 100755 --- a/livesupport/tools/xmlrpc++/xmlrpc++-20040713/bin/install.sh +++ b/livesupport/tools/xmlrpc++/xmlrpc++-20040713/bin/install.sh @@ -22,7 +22,7 @@ # # # Author : $Author: fgerlits $ -# Version : $Revision: 1.2 $ +# Version : $Revision: 1.3 $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/tools/xmlrpc++/xmlrpc++-20040713/bin/Attic/install.sh,v $ #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- @@ -37,7 +37,12 @@ installdir=`cd $basedir/../../../usr; pwd; cd -` tmpdir=$basedir/tmp etcdir=$basedir/etc tar=$basedir/src/$product.tar.gz + docdir=$installdir/share/doc/xmlrpc++ +tagfile="xmlrpc++.tag" +external_doc_pages="XmlRpcServerMethod_8h-source.html \ + classXmlRpc_1_1XmlRpcServerMethod.html \ + classXmlRpc_1_1XmlRpcServerMethod-members.html" echo "installing $product from $basedir to $installdir" @@ -52,9 +57,7 @@ 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 +doxytag -t $tagfile $external_doc_pages cd $basedir rm -rf tmp