diff --git a/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientInterface.h b/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientInterface.h index 681e71989..372b62f98 100644 --- a/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientInterface.h +++ b/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientInterface.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.2 $ + Version : $Revision: 1.3 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientInterface.h,v $ ------------------------------------------------------------------------------*/ @@ -65,7 +65,7 @@ using namespace Core; * An interface for storage clients. * * @author $Author: fgerlits $ - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ */ class StorageClientInterface { @@ -244,12 +244,11 @@ class StorageClientInterface * * @param sessionId the session ID from the authentication client * @param audioClip the audio clip to store. - * @return true if the operation was successful. * * @exception StorageException if there is a problem with the XML-RPC * call or we have not logged in yet. */ - virtual bool + virtual void storeAudioClip(Ptr::Ref sessionId, Ptr::Ref audioClip) throw (StorageException) diff --git a/livesupport/modules/storage/src/TestStorageClient.cxx b/livesupport/modules/storage/src/TestStorageClient.cxx index 34a226183..dee263eb2 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.24 $ + Version : $Revision: 1.25 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.cxx,v $ ------------------------------------------------------------------------------*/ @@ -489,7 +489,7 @@ TestStorageClient :: getAudioClip(Ptr::Ref sessionId, /*------------------------------------------------------------------------------ * Store an audio clip. *----------------------------------------------------------------------------*/ -bool +void TestStorageClient :: storeAudioClip(Ptr::Ref sessionId, Ptr::Ref audioClip) throw (StorageException) @@ -499,7 +499,6 @@ TestStorageClient :: storeAudioClip(Ptr::Ref sessionId, } audioClipMap[audioClip->getId()->getId()] = audioClip; - return true; } diff --git a/livesupport/modules/storage/src/TestStorageClient.h b/livesupport/modules/storage/src/TestStorageClient.h index c98575230..d6faf1662 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.20 $ + Version : $Revision: 1.21 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.h,v $ ------------------------------------------------------------------------------*/ @@ -90,7 +90,7 @@ using namespace LiveSupport::Core; * * * @author $Author: fgerlits $ - * @version $Revision: 1.20 $ + * @version $Revision: 1.21 $ */ class TestStorageClient : virtual public Configurable, @@ -323,11 +323,10 @@ class TestStorageClient : * * @param sessionId the session ID from the authentication client * @param audioClip the audio clip to store. - * @return true if the operation was successful. * * @exception StorageException if we have not logged in yet. */ - virtual bool + virtual void storeAudioClip(Ptr::Ref sessionId, Ptr::Ref audioClip) throw (StorageException); diff --git a/livesupport/modules/storage/src/WebStorageClient.cxx b/livesupport/modules/storage/src/WebStorageClient.cxx index 104fdb050..eab96d677 100644 --- a/livesupport/modules/storage/src/WebStorageClient.cxx +++ b/livesupport/modules/storage/src/WebStorageClient.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.19 $ + Version : $Revision: 1.20 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClient.cxx,v $ ------------------------------------------------------------------------------*/ @@ -464,6 +464,11 @@ static const std::string storeAudioClipAudioClipIdParamName = "gunid"; *----------------------------------------------------------------------------*/ static const std::string storeAudioClipMetadataParamName = "metadata"; +/*------------------------------------------------------------------------------ + * The name of the binary file name parameter in the input structure + *----------------------------------------------------------------------------*/ +static const std::string storeAudioClipFileNameParamName = "fname"; + /*------------------------------------------------------------------------------ * The name of the checksum of the binary file name in the input structure *----------------------------------------------------------------------------*/ @@ -1412,7 +1417,7 @@ WebStorageClient :: getAudioClip(Ptr::Ref sessionId, /*------------------------------------------------------------------------------ * Upload an audio clip to the local storage. *----------------------------------------------------------------------------*/ -bool +void WebStorageClient :: storeAudioClip(Ptr::Ref sessionId, Ptr::Ref audioClip) throw (StorageException) @@ -1447,6 +1452,8 @@ WebStorageClient :: storeAudioClip(Ptr::Ref sessionId, } parameters[storeAudioClipMetadataParamName] = std::string(*audioClip->getMetadataString()); + parameters[storeAudioClipFileNameParamName] + = std::string(*audioClip->getUri()); parameters[storeAudioClipChecksumParamName] = md5string; @@ -1564,8 +1571,6 @@ WebStorageClient :: storeAudioClip(Ptr::Ref sessionId, result[storeAudioClipAudioClipIdParamName] ))); audioClip->setId(newId); } - - return true; } diff --git a/livesupport/modules/storage/src/WebStorageClient.h b/livesupport/modules/storage/src/WebStorageClient.h index ce6e12490..211dc2ce8 100644 --- a/livesupport/modules/storage/src/WebStorageClient.h +++ b/livesupport/modules/storage/src/WebStorageClient.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.14 $ + Version : $Revision: 1.15 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClient.h,v $ ------------------------------------------------------------------------------*/ @@ -99,7 +99,7 @@ using namespace LiveSupport::Core; * * * @author $Author: fgerlits $ - * @version $Revision: 1.14 $ + * @version $Revision: 1.15 $ */ class WebStorageClient : virtual public Configurable, @@ -371,12 +371,11 @@ class WebStorageClient : * * @param sessionId the session ID from the authentication client * @param audioClip the audio clip to store. - * @return true if the operation was successful. * * @exception StorageException if there is a problem with the XML-RPC * call or we have not logged in yet. */ - virtual bool + virtual void storeAudioClip(Ptr::Ref sessionId, Ptr::Ref audioClip) throw (StorageException); diff --git a/livesupport/modules/storage/src/WebStorageClientTest.cxx b/livesupport/modules/storage/src/WebStorageClientTest.cxx index 085d8cfd1..760abe46f 100644 --- a/livesupport/modules/storage/src/WebStorageClientTest.cxx +++ b/livesupport/modules/storage/src/WebStorageClientTest.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.21 $ + Version : $Revision: 1.22 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/WebStorageClientTest.cxx,v $ ------------------------------------------------------------------------------*/ @@ -310,21 +310,22 @@ WebStorageClientTest :: playlistTest(void) } CPPUNIT_ASSERT(newPlaylist); CPPUNIT_ASSERT(newPlaylist->getUri()); -//std::cerr << "url:\n" << *newPlaylist->getUri() << "\n"; +// std::cerr << "url:\n" << *newPlaylist->getUri() << "\n"; +// sleep(30); std::ifstream ifs(newPlaylist->getUri()->substr(7).c_str()); if (!ifs) { // cut off "file://" ifs.close(); CPPUNIT_FAIL("playlist temp file not found"); } -// std::stringstream playlistSmilFile; -// std::string tempString; -// while (ifs) { -// std::getline(ifs, tempString); -// playlistSmilFile << tempString << "\n"; -// } -//std::cerr << "smil:\n" << playlistSmilFile.str() << "\n"; -//sleep(60); +// std::stringstream playlistSmilFile; +// std::string tempString; +// while (ifs) { +// std::getline(ifs, tempString); +// playlistSmilFile << tempString << "\n"; +// } +// std::cerr << "smil:\n" << playlistSmilFile.str() << "\n"; +// sleep(60); ifs.close(); try {