*** empty log message ***
This commit is contained in:
parent
1ce290554d
commit
ca278cecdd
24 changed files with 86 additions and 48 deletions
|
@ -4,6 +4,7 @@
|
|||
<!ELEMENT storageClientFactory (testStorage) >
|
||||
|
||||
<!ELEMENT testStorage (playlist*) >
|
||||
<!ATTLIST testStorage tempFiles CDATA #REQUIRED >
|
||||
|
||||
<!ELEMENT playlist (playlistElement*) >
|
||||
<!ATTLIST playlist id NMTOKEN #REQUIRED >
|
||||
|
@ -19,7 +20,7 @@
|
|||
<!ATTLIST audioClip uri CDATA #REQUIRED >
|
||||
]>
|
||||
<storageClientFactory>
|
||||
<testStorage>
|
||||
<testStorage tempFiles="file:///tmp/tempPlaylist">
|
||||
<playlist id="1" playlength="01:30:00.000">
|
||||
<playlistElement id="101" relativeOffset="0" >
|
||||
<audioClip id="10001" playlength="01:00:00.000"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<!DOCTYPE testStorage [
|
||||
|
||||
<!ELEMENT testStorage (playlist*, audioClip*) >
|
||||
<!ATTLIST testStorage tempFiles CDATA #REQUIRED >
|
||||
|
||||
<!ELEMENT playlist (playlistElement*) >
|
||||
<!ATTLIST playlist id NMTOKEN #REQUIRED >
|
||||
|
@ -16,7 +17,7 @@
|
|||
<!ATTLIST audioClip playlength NMTOKEN #REQUIRED >
|
||||
<!ATTLIST audioClip uri CDATA #REQUIRED >
|
||||
]>
|
||||
<testStorage>
|
||||
<testStorage tempFiles="file:///tmp/tempPlaylist">
|
||||
<playlist id="1" playlength="01:30:00.000">
|
||||
<playlistElement id="101" relativeOffset="0" >
|
||||
<audioClip id="10001" playlength="01:00:00.000"
|
||||
|
|
|
@ -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/TestStorageClient.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -59,6 +59,11 @@ using namespace LiveSupport::Storage;
|
|||
*----------------------------------------------------------------------------*/
|
||||
const std::string TestStorageClient::configElementNameStr = "testStorage";
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* The name of the config element for this class
|
||||
*----------------------------------------------------------------------------*/
|
||||
static const std::string localTempStorageAttrName = "tempFiles";
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* The XML version used to create the SMIL file.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
@ -131,6 +136,16 @@ TestStorageClient :: configure(const xmlpp::Element & element)
|
|||
throw std::invalid_argument(eMsg);
|
||||
}
|
||||
|
||||
const xmlpp::Attribute * attribute;
|
||||
|
||||
if (!(attribute = element.get_attribute(localTempStorageAttrName))) {
|
||||
std::string eMsg = "Missing attribute ";
|
||||
eMsg += localTempStorageAttrName;
|
||||
throw std::invalid_argument(eMsg);
|
||||
}
|
||||
|
||||
localTempStorage = attribute->get_value();
|
||||
|
||||
// iterate through the playlist elements ...
|
||||
xmlpp::Node::NodeList nodes
|
||||
= element.get_children(Playlist::getConfigElementName());
|
||||
|
@ -250,7 +265,7 @@ TestStorageClient :: acquirePlaylist(Ptr<const UniqueId>::Ref id) const
|
|||
}
|
||||
|
||||
std::stringstream fileName;
|
||||
fileName << "file:///tmp/tempPlaylist" << newPlaylist->getId()->getId()
|
||||
fileName << localTempStorage << newPlaylist->getId()->getId()
|
||||
<< "#" << std::rand() << ".smil";
|
||||
|
||||
smilDocument->write_to_file(fileName.str(), "UTF-8");
|
||||
|
|
|
@ -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.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.12 $
|
||||
* @version $Revision: 1.13 $
|
||||
*/
|
||||
class TestStorageClient :
|
||||
virtual public Configurable,
|
||||
|
@ -79,11 +79,6 @@ class TestStorageClient :
|
|||
*/
|
||||
static const std::string configElementNameStr;
|
||||
|
||||
/**
|
||||
* The path to the local temp storage
|
||||
*/
|
||||
static const std::string localTempStoragePath;
|
||||
|
||||
/**
|
||||
* The map type containing the playlists by their ids.
|
||||
*/
|
||||
|
@ -106,6 +101,11 @@ class TestStorageClient :
|
|||
*/
|
||||
AudioClipMap audioClipMap;
|
||||
|
||||
/**
|
||||
* The path where the temporary SMIL files are strored.
|
||||
*/
|
||||
std::string localTempStorage;
|
||||
|
||||
|
||||
public:
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue