added some stuff to the WebStorageClient, not much to show for it yet

This commit is contained in:
fgerlits 2004-12-08 12:50:09 +00:00
parent 705bd34c33
commit 089744e465
12 changed files with 260 additions and 55 deletions

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.9 $
Version : $Revision: 1.10 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/AudioClip.h,v $
------------------------------------------------------------------------------*/
@ -95,7 +95,7 @@ using namespace boost::posix_time;
* </code></pre>
*
* @author $Author: fgerlits $
* @version $Revision: 1.9 $
* @version $Revision: 1.10 $
*/
class AudioClip : public Configurable,
public Playable
@ -256,6 +256,16 @@ class AudioClip : public Configurable,
{
this->token = token;
}
/**
* Return an XML representation of this audio clip. This contains
* the metadata fields of the audio clip, and it's roughly the
* inverse of the configure() method.
*
* @return an xmlpp::Document containing the metadata.
*/
Ptr<xmlpp::Document>::Ref
getMetadata() throw ();
};

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.18 $
Version : $Revision: 1.19 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/Playlist.h,v $
------------------------------------------------------------------------------*/
@ -93,7 +93,7 @@ using namespace boost::posix_time;
* </code></pre>
*
* @author $Author: fgerlits $
* @version $Revision: 1.18 $
* @version $Revision: 1.19 $
*/
class Playlist : public Configurable,
public Playable
@ -138,7 +138,7 @@ class Playlist : public Configurable,
* A map type for storing the playlist elements associated with
* this playlist, indexed by their relative offsets.
*/
typedef std::map<const time_duration, Ptr<PlaylistElement>::Ref>
typedef std::map<time_duration, Ptr<PlaylistElement>::Ref>
PlaylistElementListType;
/**
@ -343,8 +343,14 @@ class Playlist : public Configurable,
throw ();
/**
* The iterator type for this class.
* The iterator type for this class. A Playlist::const_iterator
* is a (constant) pointer to a <code>pair &lt; time_duration,
* Ptr&lt;PlaylistElement&gt;::Ref &gt;</code>.
* If <code>it</code> is such an iterator, then <code>it->second</code>
* is the playlist element referenced by the iterator, and
* <code>it->first</code> is its relative offset in the playlist.
*
* @see begin(), end(), find()
*/
typedef PlaylistElementListType::const_iterator const_iterator;
@ -372,7 +378,7 @@ class Playlist : public Configurable,
* @param relativeOffset (a pointer to) the relative offset where
* the playlist element is.
* @return a constant iterator to the playlist element if it exists,
* or playlist->end() if it does not.
* or <code>this->end()</code> if it does not.
*/
const_iterator
find(Ptr<const time_duration>::Ref relativeOffset) const

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/core/include/LiveSupport/Core/Attic/StorageClientInterface.h,v $
------------------------------------------------------------------------------*/
@ -62,7 +62,7 @@ namespace Core {
* An interface for storage clients.
*
* @author $Author: fgerlits $
* @version $Revision: 1.15 $
* @version $Revision: 1.16 $
*/
class StorageClientInterface
{
@ -221,6 +221,21 @@ class StorageClientInterface
throw (std::logic_error)
= 0;
/**
* Store an audio clip.
*
* @param sessionId the session ID from the authentication client
* @param audioClip the audio clip to store.
* @return true if the operation was successful.
*
* @exception std::logic_error if we have not logged in yet.
*/
virtual bool
storeAudioClip(Ptr<SessionId>::Ref sessionId,
Ptr<AudioClip>::Ref audioClip)
throw (std::logic_error)
= 0;
/**
* Acquire the resources for the audio clip with the specified id.
*

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.6 $
Version : $Revision: 1.7 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/AudioClip.cxx,v $
------------------------------------------------------------------------------*/
@ -110,3 +110,16 @@ AudioClip :: configure(const xmlpp::Element & element)
uri.reset(new std::string(uriValue));
}
}
/*------------------------------------------------------------------------------
* Create an XML element from this audio clip.
*----------------------------------------------------------------------------*/
Ptr<xmlpp::Document>::Ref
AudioClip :: getMetadata()
throw ()
{
Ptr<xmlpp::Document>::Ref metadata(new xmlpp::Document);
return metadata;
}