LiveSupport::Core::Playlist Class Reference

#include <Playlist.h>

Inheritance diagram for LiveSupport::Core::Playlist:

[legend]
Collaboration diagram for LiveSupport::Core::Playlist:

[legend]
List of all members.

Detailed Description

A class representing playlist.

Playlist are containers for AudioClips, with the additional information of when and how each audio clip is played inside the playlist.

This object has to be configured with an XML configuration element called playlist. This may look like the following:


  <playlist id="0000000000000001"
            title="My Playlist" 
            playlength="00:18:30.000000">
      <playlistElement> ... </playlistElement>
      ...
      <playlistElement> ... </playlistElement>
      <metadata xmlns="http://mdlf.org/livesupport/elements/1.0/"
                 xmlns:ls="http://mdlf.org/livesupport/elements/1.0/"
                 xmlns:dc="http://purl.org/dc/elements/1.1/"
                 xmlns:dcterms="http://purl.org/dc/terms/"
                 xmlns:xml="http://www.w3.org/XML/1998/namespace">
          <dc:title>File Title txt</dc:title>
          <dcterms:extent>00:02:30.000000</dcterms:extent>
          ...
      </metadata>
  </playlist>
  

The DTD for the above element is:


  <!ELEMENT playlist (playlistElement*, metadata?) >
  <!ATTLIST playlist  id           NMTOKEN    REQUIRED >
  <!ATTLIST playlist  title        CDATA      ""        >
  <!ATTLIST playlist  playlength   NMTOKEN    IMPLIED  >
  

For detais of the playlistElement element, see the documentation for the PlaylistElement class.

The metadata element is optional. The configure() method sets only those fields which had not been set previously: e.g., if we set some or all fields of the Playlist in the constructor, then these fields in the XML element will be ignored by configure(). The title attribute and the <dc:title> element set the same field; if both are present, the title is set from the attribute and the element is ignored.. The same is true for the playlength attribute and the <dcterms:extent> element.

It is required that by the end of the configure() method, the playlength is set somehow (from a constructor, the attribute or the element). If the title is not set by the end of the configure() method, it is then set to the empty string.

A Playlist can be of various kinds, depending on what we want to use it for, and how we got it from the StorageClientInterface:

The playlists are stored by the storage server in the format returned by the getXmlDocumentString() function:

An example:


  <playlist id="0000000000000001">
      <playlistElement id="0000000000000101"
                       relativeOffset="00:00:00.000000">
          <audioClip id="0000000000010001" 
                    title="My Audio Clip"
                    playlength="00:02:30.000000"/>
          <fadeInfo id="0000000000009901" 
                    fadeIn="00:00:02.000000"
                    fadeOut="00:00:01.500000"/>
      </playlistElement>
      <playlistElement id="0000000000000102"
                       relativeOffset="00:02:30.000000">
          <playlist id="0000000000000002" 
                    title="Embedded Playlist"
                    playlength="00:18:30.000000"/>
      </playlistElement>
      <metadata xmlns="http://mdlf.org/livesupport/elements/1.0/"
                xmlns:ls="http://mdlf.org/livesupport/elements/1.0/"
                xmlns:dc="http://purl.org/dc/elements/1.1/"
                xmlns:dcterms="http://purl.org/dc/terms/"
                xmlns:xml="http://www.w3.org/XML/1998/namespace">
          <dc:title>My Playlist</dc:title>
          <dcterms:extent>00:21:00.000000</dcterms:extent>
          ...
      </metadata>
  </playlist>
  

Author:
Author
fgerlits
Version:
Revision
3185

Definition at line 199 of file Playlist.h.

Public Types

typedef PlaylistElementListType::const_iterator const_iterator
 The iterator type for this class.

Public Member Functions

 Playlist (const Playlist &otherPlaylist) throw ()
 Copy constructor.
 Playlist (void) throw ()
 Default constructor.
 Playlist (Ptr< UniqueId >::Ref id) throw ()
 Create a playlist by specifying its ID only.
 Playlist (Ptr< UniqueId >::Ref id, Ptr< time_duration >::Ref playlength, Ptr< const std::string >::Ref uri=Ptr< std::string >::Ref()) throw ()
 Create a playlist by specifying all details, except the title.
 Playlist (Ptr< UniqueId >::Ref id, Ptr< const Glib::ustring >::Ref title, Ptr< time_duration >::Ref playlength, Ptr< const std::string >::Ref uri=Ptr< std::string >::Ref()) throw ()
 Create a playlist by specifying all details.
 operator XmlRpc::XmlRpcValue () const throw ()
 Convert the playlist to an XmlRpcValue (marshalling).
 Playlist (XmlRpc::XmlRpcValue &xmlRpcValue) throw (std::invalid_argument)
 Construct a playlist from an XmlRpcValue (demarshalling).
virtual ~Playlist (void) throw ()
 A virtual destructor, as this class has virtual functions.
virtual void configure (const xmlpp::Element &element) throw (std::invalid_argument)
 Configure the object based on the XML element supplied.
virtual Ptr< UniqueId >::Ref getId (void) const throw ()
 Return the id of the playlist.
virtual Ptr< const Glib::ustring
>::Ref 
getTitle (void) const throw ()
 Return the title of this playlist.
virtual void setTitle (Ptr< const Glib::ustring >::Ref title) throw ()
 Set the title of this playlist.
virtual Ptr< time_duration
>::Ref 
getPlaylength (void) const throw ()
 Return the total playing length for this playlist.
virtual Ptr< const string
>::Ref 
getUri (void) const throw ()
 Return the URI of the SMIL file created from this playlist, which can be played by the audio player.
virtual void setUri (Ptr< const std::string >::Ref uri) throw ()
 Set the URI of the SMIL file created from this playlist, which can be played by the audio player.
virtual Ptr< const std::string
>::Ref 
getToken (void) const throw ()
 Return the token which is used to identify this playlist to the storage server.
virtual void setToken (Ptr< const std::string >::Ref token) throw ()
 Set the token which is used to identify this playlist to the storage server.
virtual Ptr< const std::string
>::Ref 
getEditToken (void) const throw ()
 Return the token which is used to identify this playlist to the storage server.
virtual void setEditToken (Ptr< const std::string >::Ref token) throw ()
 Set the token which is used to identify this playlist to the storage server.
bool isLocked () const throw ()
 Test whether the playlist is locked for editing.
const_iterator begin () const throw ()
 Get an iterator pointing to the first playlist element.
const_iterator end () const throw ()
 Get an iterator pointing to one after the last playlist element.
const_iterator find (Ptr< const time_duration >::Ref relativeOffset) const throw ()
 Get an iterator pointing to the first playlist element at a given relative offset.
int size () const throw ()
 Return the number of playlist elements in the playlist.
Ptr< UniqueId >::Ref addPlayable (Ptr< Playable >::Ref playable, Ptr< time_duration >::Ref relativeOffset, Ptr< FadeInfo >::Ref fadeInfo=Ptr< FadeInfo >::Ref()) throw (std::invalid_argument)
 Add a new audio clip or sub-playlist to the playlist.
Ptr< UniqueId >::Ref addAudioClip (Ptr< AudioClip >::Ref audioClip, Ptr< time_duration >::Ref relativeOffset, Ptr< FadeInfo >::Ref fadeInfo=Ptr< FadeInfo >::Ref()) throw ()
 Add a new audio clip to the playlist.
Ptr< UniqueId >::Ref addPlaylist (Ptr< Playlist >::Ref playlist, Ptr< time_duration >::Ref relativeOffset, Ptr< FadeInfo >::Ref fadeInfo=Ptr< FadeInfo >::Ref()) throw ()
 Add a new sub-playlist to the playlist.
void addPlaylistElement (Ptr< PlaylistElement >::Ref playlistElement) throw ()
 Add a new playlist element to the playlist.
void setFadeInfo (Ptr< UniqueId >::Ref playlistElementId, Ptr< FadeInfo >::Ref fadeInfo) throw (std::invalid_argument)
 Set the fade in / fade out info for a playlist element.
void removePlaylistElement (Ptr< UniqueId >::Ref playlistElementId) throw (std::invalid_argument)
 Remove a playlist element from the playlist.
bool valid (void) const throw ()
 Check if the playlist is valid.
void createSavedCopy (void) throw ()
 Create a saved copy of this playlist.
void deleteSavedCopy (void) throw ()
 Delete the saved copy of the playlist, if exists (or do nothing).
void revertToSavedCopy (void) throw (std::invalid_argument)
 Revert to the saved copy of this playlist.
virtual Ptr< Glib::ustring
>::Ref 
getMetadata (const std::string &key) const throw ()
 Return the value of a metadata field in this playlist.
virtual void setMetadata (Ptr< const Glib::ustring >::Ref value, const std::string &key) throw (std::invalid_argument)
 Set the value of a metadata field in this playlist.
virtual Ptr< Glib::ustring
>::Ref 
getXmlElementString (void) const throw ()
 Return a partial XML representation of this audio clip or playlist.
virtual Ptr< Glib::ustring
>::Ref 
getXmlDocumentString (void) const throw ()
 Return a complete XML representation of this playlist.
virtual bool eliminateGaps (void) throw ()
 Eliminate the gaps in the playlist.
Ptr< PlaylistElement >::Ref findAtOffset (Ptr< const time_duration >::Ref offset) const throw ()
 Find the playlist element at the specified offset.

Static Public Member Functions

static const std::string getConfigElementName (void) throw ()
 Return the name of the XML element this object expects to be sent to a call to configure().


Member Typedef Documentation

typedef PlaylistElementListType::const_iterator LiveSupport::Core::Playlist::const_iterator

The iterator type for this class.

A Playlist::const_iterator is a (constant) pointer to a pair < time_duration, Ptr<PlaylistElement>Ref >. If it is such an iterator, then it->second is the playlist element referenced by the iterator, and it->first is its relative offset in the playlist. The playlist elements are listed in the order of their relative offset (starting time).

See also:
begin(), end(), find()

Definition at line 623 of file Playlist.h.


Constructor & Destructor Documentation

Playlist::Playlist ( const Playlist otherPlaylist  )  throw ()

Copy constructor.

Parameters:
otherPlaylist the playlist to be copied

Definition at line 149 of file Playlist.cxx.

LiveSupport::Core::Playlist::Playlist ( void   )  throw () [inline]

Default constructor.

NOTE: this constructor creates a Playlist with a null pointer for both the ID and the playlength fields! It is meant for internal use only.

If you want to create an empty Playlist, use the storage client:


  Ptr<StorageClientFactory>::Ref
          storageClientFactory = StorageClientFactory::getInstance();
  Ptr<StorageClientInterface>::Ref
          storageClient = storageClientFactory->getStorageClient();
  Ptr<Playlist>::Ref
          playlist = storageClient->createPlaylist(sessionId);
  

See also:
StorageClient::StorageClientFactory

StorageClient::StorageClientInterface

Definition at line 359 of file Playlist.h.

Referenced by createSavedCopy().

LiveSupport::Core::Playlist::Playlist ( Ptr< UniqueId >::Ref  id  )  throw () [inline]

Create a playlist by specifying its ID only.

For internal use; see the note at the default constructor.

Definition at line 370 of file Playlist.h.

Playlist::Playlist ( Ptr< UniqueId >::Ref  id,
Ptr< time_duration >::Ref  playlength,
Ptr< const std::string >::Ref  uri = Ptr< std::string >::Ref() 
) throw ()

Create a playlist by specifying all details, except the title.

This is used for testing purposes; see the note at the default constructor.

Parameters:
id the id of the playlist.
playlength the playing length of the playlist.
uri the location of the SMIL file representing this playlist (optional)

Definition at line 182 of file Playlist.cxx.

Playlist::Playlist ( Ptr< UniqueId >::Ref  id,
Ptr< const Glib::ustring >::Ref  title,
Ptr< time_duration >::Ref  playlength,
Ptr< const std::string >::Ref  uri = Ptr< std::string >::Ref() 
) throw ()

Create a playlist by specifying all details.

This is used for testing purposes; see the note at the default constructor.

Parameters:
id the id of the playlist.
title the title of the playlist.
playlength the playing length of the playlist.
uri the location of the SMIL file representing this playlist (optional)

Definition at line 202 of file Playlist.cxx.

Playlist::Playlist ( XmlRpc::XmlRpcValue &  xmlRpcValue  )  throw (std::invalid_argument)

Construct a playlist from an XmlRpcValue (demarshalling).

Parameters:
xmlRpcValue an XmlRpcValue struct, containing a field named playlist, with value of type string, which contains an XML document, the root node of which can be passed to the configure() method.
Exceptions:
std::invalid_argument if the argument is invalid

Definition at line 234 of file Playlist.cxx.

virtual LiveSupport::Core::Playlist::~Playlist ( void   )  throw () [inline, virtual]

A virtual destructor, as this class has virtual functions.

Definition at line 439 of file Playlist.h.


Member Function Documentation

Ptr< UniqueId >::Ref Playlist::addAudioClip ( Ptr< AudioClip >::Ref  audioClip,
Ptr< time_duration >::Ref  relativeOffset,
Ptr< FadeInfo >::Ref  fadeInfo = PtrFadeInfo >::Ref() 
) throw ()

Add a new audio clip to the playlist.

The playlist is not checked for gaps (use valid() for that), but the playlength is adjusted if the new audio clip is added at the end of the playlist.

Parameters:
audioClip the new audio clip to be added
relativeOffset the start of the audio clip, relative to the start of the playlist
fadeInfo the fade in / fade out info (optional)
Returns:
the ID of the new PlaylistElement

Definition at line 471 of file Playlist.cxx.

Ptr< UniqueId >::Ref Playlist::addPlayable ( Ptr< Playable >::Ref  playable,
Ptr< time_duration >::Ref  relativeOffset,
Ptr< FadeInfo >::Ref  fadeInfo = PtrFadeInfo >::Ref() 
) throw (std::invalid_argument)

Add a new audio clip or sub-playlist to the playlist.

Checks the type of the playlist, and calls either addAudioClip() or addPlaylist().

Parameters:
playable the new playable item to be added
relativeOffset the start of the playable item, relative to the start of the playlist
fadeInfo the fade in / fade out info (optional)
Returns:
the ID of the new PlaylistElement
Exceptions:
std::invalid_argument if playable is neither an AudioClip nor a Playlist

Definition at line 443 of file Playlist.cxx.

References LiveSupport::Core::Playable::AudioClipType, and LiveSupport::Core::Playable::PlaylistType.

Ptr< UniqueId >::Ref Playlist::addPlaylist ( Ptr< Playlist >::Ref  playlist,
Ptr< time_duration >::Ref  relativeOffset,
Ptr< FadeInfo >::Ref  fadeInfo = PtrFadeInfo >::Ref() 
) throw ()

Add a new sub-playlist to the playlist.

The playlist is not checked for gaps (use valid() for that), but the playlength is adjusted if the new sub-playlist is added at the end of the playlist.

Parameters:
playlist the sub-playlist to be added
relativeOffset the start of the sub-playlist, relative to the start of the containing playlist
fadeInfo the fade in / fade out info (optional)
Returns:
the ID of the new PlaylistElement

Definition at line 495 of file Playlist.cxx.

void Playlist::addPlaylistElement ( Ptr< PlaylistElement >::Ref  playlistElement  )  throw ()

Add a new playlist element to the playlist.

Parameters:
playlistElement the new playlist element to be added

Definition at line 430 of file Playlist.cxx.

const_iterator LiveSupport::Core::Playlist::begin ( void   )  const throw () [inline]

Get an iterator pointing to the first playlist element.

Definition at line 629 of file Playlist.h.

Referenced by eliminateGaps(), and getXmlDocumentString().

void Playlist::configure ( const xmlpp::Element &  element  )  throw (std::invalid_argument) [virtual]

Configure the object based on the XML element supplied.

The supplied element is expected to be of the name returned by configElementName().

Parameters:
element the XML element to configure the object from.
Exceptions:
std::invalid_argument if the supplied XML element contains bad configuraiton information

Implements LiveSupport::Core::Configurable.

Definition at line 300 of file Playlist.cxx.

References elementListAttrName, extentElementName, extentElementPrefix, idAttrName, metadataElementName, playlengthAttrName, titleAttrName, titleElementName, and titleElementPrefix.

void Playlist::createSavedCopy ( void   )  throw ()

Create a saved copy of this playlist.

If a saved copy exists already, it is replaced by the current state.

Definition at line 610 of file Playlist.cxx.

References Playlist().

void LiveSupport::Core::Playlist::deleteSavedCopy ( void   )  throw () [inline]

Delete the saved copy of the playlist, if exists (or do nothing).

Definition at line 794 of file Playlist.h.

bool Playlist::eliminateGaps ( void   )  throw () [virtual]

Eliminate the gaps in the playlist.

If there is a 2s gap between elements 2 and 3, then elements 3, 4, etc. are moved to 2s earlier. Elements 2 and 3 will not overlap, even if the first has a fade-out and the second has a fade-in.

Returns:
true if some gaps have been found and eliminated

Definition at line 852 of file Playlist.cxx.

References begin(), getPlaylength(), and LiveSupport::Core::PlaylistElement::PlaylistType.

const_iterator LiveSupport::Core::Playlist::end ( void   )  const throw () [inline]

Get an iterator pointing to one after the last playlist element.

Definition at line 638 of file Playlist.h.

const_iterator LiveSupport::Core::Playlist::find ( Ptr< const time_duration >::Ref  relativeOffset  )  const throw () [inline]

Get an iterator pointing to the first playlist element at a given relative offset.

Parameters:
relativeOffset (a pointer to) the relative offset where the playlist element is.
Returns:
a constant iterator to the playlist element if it exists, or this->end() if it does not.

Definition at line 653 of file Playlist.h.

Ptr< PlaylistElement >::Ref Playlist::findAtOffset ( Ptr< const time_duration >::Ref  offset  )  const throw ()

Find the playlist element at the specified offset.

This is used by the Master Panel to display the contents of the currently playing Playlist. When there are more than one playlist elements at the given offset, the one with the greatest relativeOffset is chosen. Can return a 0 pointer if there is no playlist element at the given offset.

Parameters:
offset the elapsed time relative to the Playlist.
Returns:
the playlist element at the given offset.

Definition at line 909 of file Playlist.cxx.

static const std::string LiveSupport::Core::Playlist::getConfigElementName ( void   )  throw () [inline, static]

Return the name of the XML element this object expects to be sent to a call to configure().

Returns:
the name of the expected XML configuration element.

Definition at line 451 of file Playlist.h.

Referenced by LiveSupport::StorageClient::TestStorageClient::reset().

virtual Ptr<const std::string>::Ref LiveSupport::Core::Playlist::getEditToken ( void   )  const throw () [inline, virtual]

Return the token which is used to identify this playlist to the storage server.

The edit token is set when the Playable object is opened for editing and unset (made null again) when it is saved or reverted.

Returns:
the token.

Definition at line 578 of file Playlist.h.

virtual Ptr<UniqueId>::Ref LiveSupport::Core::Playlist::getId ( void   )  const throw () [inline, virtual]

Return the id of the playlist.

Returns:
the unique id of the playlist.

Implements LiveSupport::Core::Playable.

Definition at line 475 of file Playlist.h.

Referenced by getXmlElementString().

Ptr< Glib::ustring >::Ref Playlist::getMetadata ( const std::string &  key  )  const throw () [virtual]

Return the value of a metadata field in this playlist.

If the playlist does not have this metadata field, returns a null pointer.

Parameters:
key the name of the metadata field
Returns:
the value of the metadata field; 0 if there is no such field;

Implements LiveSupport::Core::Playable.

Definition at line 642 of file Playlist.cxx.

References metadataElementName, and LiveSupport::Core::separateNameAndNameSpace().

virtual Ptr<time_duration>::Ref LiveSupport::Core::Playlist::getPlaylength ( void   )  const throw () [inline, virtual]

Return the total playing length for this playlist.

Returns:
the playing length in microseconds precision.

Implements LiveSupport::Core::Playable.

Definition at line 508 of file Playlist.h.

Referenced by eliminateGaps(), getXmlElementString(), and valid().

virtual Ptr<const Glib::ustring>::Ref LiveSupport::Core::Playlist::getTitle ( void   )  const throw () [inline, virtual]

Return the title of this playlist.

Returns:
the title.

Implements LiveSupport::Core::Playable.

Definition at line 487 of file Playlist.h.

Referenced by getXmlElementString().

virtual Ptr<const std::string>::Ref LiveSupport::Core::Playlist::getToken ( void   )  const throw () [inline, virtual]

Return the token which is used to identify this playlist to the storage server.

The token is set when the Playable object is acquired and unset (made null again) when it is released.

Returns:
the token.

Implements LiveSupport::Core::Playable.

Definition at line 547 of file Playlist.h.

virtual Ptr<const string>::Ref LiveSupport::Core::Playlist::getUri ( void   )  const throw () [inline, virtual]

Return the URI of the SMIL file created from this playlist, which can be played by the audio player.

Returns:
the URI.

Implements LiveSupport::Core::Playable.

Definition at line 520 of file Playlist.h.

Ptr< Glib::ustring >::Ref Playlist::getXmlDocumentString ( void   )  const throw () [virtual]

Return a complete XML representation of this playlist.

This is a string containing a an XML document with a <playlist> root node, together with an XML header and a <metadata> element (for the outermost playlist only).

The playlist elements listed are only stubs returned by getXmlElementString(), i.e., { id, title, playlength } triples, without their contents. See the more detailed description at the top of this page.

The encoding is UTF-8. IDs are 16-digit hexadecimal numbers, time durations have the format "hh:mm:ss.ssssss".

The uri, token and editToken fields are not part of the XML document string returned.

Returns:
a string representation of the playlist as an XML document

Implements LiveSupport::Core::Playable.

Definition at line 804 of file Playlist.cxx.

References begin(), dcNamespaceUri, dctermsNamespaceUri, defaultNamespaceUri, extentElementPrefix, idAttrName, liveSupportNamespacePrefix, liveSupportNamespaceUri, metadataElementName, titleElementPrefix, xmlNamespacePrefix, and xmlNamespaceUri.

Referenced by operator XmlRpc::XmlRpcValue().

Ptr< Glib::ustring >::Ref Playlist::getXmlElementString ( void   )  const throw () [virtual]

Return a partial XML representation of this audio clip or playlist.

This is a string containing a single <playlist> XML element, with minimal information { id, title, playlength } only, without an XML header or any other metadata. It does not contain the list of playlist elements in the playlist.

The encoding is UTF-8. IDs are 16-digit hexadecimal numbers, time durations have the format "hh:mm:ss.ssssss".

Returns:
a string representation of the playlist as an XML element

Implements LiveSupport::Core::Playable.

Definition at line 780 of file Playlist.cxx.

References getId(), getPlaylength(), getTitle(), idAttrName, playlengthAttrName, and titleAttrName.

bool LiveSupport::Core::Playlist::isLocked (  )  const throw () [inline]

Test whether the playlist is locked for editing.

Returns:
true if the playlist is currently being edited

Definition at line 605 of file Playlist.h.

Playlist::operator XmlRpc::XmlRpcValue (  )  const throw ()

Convert the playlist to an XmlRpcValue (marshalling).

Returns:
an XmlRpcValue struct, containing a field named playlist, with value of type string, which contains an XML document representing the playlist.

Definition at line 221 of file Playlist.cxx.

References getXmlDocumentString().

void Playlist::removePlaylistElement ( Ptr< UniqueId >::Ref  playlistElementId  )  throw (std::invalid_argument)

Remove a playlist element from the playlist.

Parameters:
playlistElementId the ID of the playlist element
Exceptions:
std::invalid_argument if the playlist element does not exist

Definition at line 553 of file Playlist.cxx.

void Playlist::revertToSavedCopy ( void   )  throw (std::invalid_argument)

Revert to the saved copy of this playlist.

If there is no saved copy, do nothing and throw an exception.

Definition at line 620 of file Playlist.cxx.

virtual void LiveSupport::Core::Playlist::setEditToken ( Ptr< const std::string >::Ref  token  )  throw () [inline, virtual]

Set the token which is used to identify this playlist to the storage server.

The edit token is set when the Playable object is opened for editing and unset (made null again) when it is saved or reverted.

Parameters:
token a new token.

Definition at line 593 of file Playlist.h.

void Playlist::setFadeInfo ( Ptr< UniqueId >::Ref  playlistElementId,
Ptr< FadeInfo >::Ref  fadeInfo 
) throw (std::invalid_argument)

Set the fade in / fade out info for a playlist element.

Parameters:
playlistElementId the ID of the playlist element
fadeInfo the new fade in / fade out info
Exceptions:
std::invalid_argument if there is no playlist element at the given relative offset

Definition at line 535 of file Playlist.cxx.

void Playlist::setMetadata ( Ptr< const Glib::ustring >::Ref  value,
const std::string &  key 
) throw (std::invalid_argument) [virtual]

Set the value of a metadata field in this playlist.

Parameters:
value the new value of the metadata field.
key the name of the metadata field
Exceptions:
std::invalid_argument if the key is dcterms:extent, but the value is not a valid ISO-8601 time

Implements LiveSupport::Core::Playable.

Definition at line 690 of file Playlist.cxx.

References LiveSupport::Core::separateNameAndNameSpace().

void Playlist::setTitle ( Ptr< const Glib::ustring >::Ref  title  )  throw () [virtual]

Set the title of this playlist.

Parameters:
title a new title.

Implements LiveSupport::Core::Playable.

Definition at line 259 of file Playlist.cxx.

References titleElementName, and titleElementPrefix.

virtual void LiveSupport::Core::Playlist::setToken ( Ptr< const std::string >::Ref  token  )  throw () [inline, virtual]

Set the token which is used to identify this playlist to the storage server.

The token is set when the Playable object is acquired and unset (made null again) when it is released.

Parameters:
token a new token.

Implements LiveSupport::Core::Playable.

Definition at line 562 of file Playlist.h.

virtual void LiveSupport::Core::Playlist::setUri ( Ptr< const std::string >::Ref  uri  )  throw () [inline, virtual]

Set the URI of the SMIL file created from this playlist, which can be played by the audio player.

Parameters:
uri the new URI.

Implements LiveSupport::Core::Playable.

Definition at line 532 of file Playlist.h.

int LiveSupport::Core::Playlist::size (  )  const throw () [inline]

Return the number of playlist elements in the playlist.

Definition at line 663 of file Playlist.h.

bool Playlist::valid ( void   )  const throw ()

Check if the playlist is valid.

This means that

This is checked for the playlist itself, and all sub-playlists contained inside it.

NOTE: all kinds of overlaps are allowed. TODO: restrict it somehow?

Definition at line 570 of file Playlist.cxx.

References getPlaylength(), and LiveSupport::Core::PlaylistElement::PlaylistType.


The documentation for this class was generated from the following files:
Generated on Sat Sep 22 02:00:38 2007 for Campcaster by  1.4.7