changed StorageClientFactory to produce only one kind of client

added some documentation (of xml configuration file format)
This commit is contained in:
fgerlits 2004-11-24 16:21:59 +00:00
parent bcbe880d42
commit 8d7e16a0c4
17 changed files with 168 additions and 85 deletions

View file

@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE authenticationClientFactory [
<!ELEMENT authenticationClientFactory (testAuthentication?,
webAuthentication?)>
<!ELEMENT authenticationClientFactory (testAuthentication)>
<!ELEMENT testAuthentication (user) >
@ -10,20 +9,9 @@
<!ATTLIST user login CDATA #REQUIRED >
<!ATTLIST user password CDATA #REQUIRED >
<!ELEMENT webAuthentication (location) >
<!ELEMENT location EMPTY >
<!ATTLIST location server CDATA #REQUIRED >
<!ATTLIST location port NMTOKEN #REQUIRED >
<!ATTLIST location path CDATA #REQUIRED >
]>
<authenticationClientFactory>
<testAuthentication>
<user login="root" password="q" />
</testAuthentication>
<webAuthentication>
<location server="localhost" port="80"
path="/storage/var/xmlrpc/xrLocStor.php" />
</webAuthentication>
</authenticationClientFactory>

View file

@ -12,5 +12,5 @@
]>
<webStorage tempFiles="file:///tmp/tempPlaylist" >
<location server="localhost" port="80"
path="/storage/var/xmlrpc/xrLocStor.php" />
path="/livesupportStorageServer/xmlrpc/xrLocStor.php" />
</webStorage>

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.3 $
Author : $Author: fgerlits $
Version : $Revision: 1.4 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/include/LiveSupport/Storage/StorageClientFactory.h,v $
------------------------------------------------------------------------------*/
@ -61,12 +61,12 @@ using namespace LiveSupport::Core;
/* =============================================================== data types */
/**
* The factory to create appropriate StorageClient objects.
* The factory to create StorageClientInterface objects.
*
* This object has to be configured with an XML configuration element
* called storageClientFactory. This element contains a child element
* specifying and configuring the kind of StorageClient that the
* factory builds. Currently on the TestStorageClient is supported.
* factory builds. Currently only the TestStorageClient is supported.
*
* A storageClientFactory configuration element may look like the following:
*
@ -87,8 +87,8 @@ using namespace LiveSupport::Core;
* &lt;!ELEMENT storageClientFactory (testStorage) &gt;
* </code></pre>
*
* @author $Author: maroy $
* @version $Revision: 1.3 $
* @author $Author: fgerlits $
* @version $Revision: 1.4 $
* @see TestStorageClient
*/
class StorageClientFactory :

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.17 $
Version : $Revision: 1.18 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.cxx,v $
------------------------------------------------------------------------------*/
@ -270,7 +270,7 @@ TestStorageClient :: acquirePlaylist(Ptr<SessionId>::Ref sessionId,
std::stringstream fileName;
fileName << localTempStorage << newPlaylist->getId()->getId()
<< "#" << std::rand() << ".smil";
<< "-" << std::rand() << ".smil";
smilDocument->write_to_file(fileName.str(), "UTF-8");

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.15 $
Version : $Revision: 1.16 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClient.h,v $
------------------------------------------------------------------------------*/
@ -67,8 +67,30 @@ using namespace LiveSupport::Core;
/**
* A dummy storage client, only used for test purposes.
*
* This object has to be configured with an XML configuration element
* called testStorage. This may look like the following:
*
* <pre><code>
* &lt;testStorage tempFiles="file:///tmp/tempPlaylist" &gt;
* &lt;playlist&gt; ... &lt;/playlist&gt;
* ...
* &lt;audioClip&gt; ... &lt;/audioClip&gt;
* ...
* &lt;/testStorage&gt;
* </code></pre>
*
* For detais of the playlist and audioClip elements, see the documentation
* for the Core::Playlist and Core::AudioClip classes.
*
* The DTD for the above element is:
*
* <pre><code>
* &lt;!ELEMENT testStorage (playlist*, audioClip*) &gt;
* &lt;!ATTLIST testStorage tempFiles CDATA #REQUIRED &gt;
* </code></pre>
*
* @author $Author: fgerlits $
* @version $Revision: 1.15 $
* @version $Revision: 1.16 $
*/
class TestStorageClient :
virtual public Configurable,