LiveSupport::Scheduler::ScheduleInterface Class Reference

#include <ScheduleInterface.h>

Inheritance diagram for LiveSupport::Scheduler::ScheduleInterface:

[legend]
List of all members.

Detailed Description

The generic interface for the component scheduling events.

Author:
Author
paul
Version:
Revision
2833

Definition at line 74 of file ScheduleInterface.h.

Public Types

typedef std::vector< Ptr<
ScheduleEntry >::Ref > 
ScheduleEntryList
 A vector of ScheduleEntry objects.

Public Member Functions

virtual bool isTimeframeAvailable (Ptr< ptime >::Ref from, Ptr< ptime >::Ref to)=0 throw ()
 Check if a timeframe is available for scheduling.
virtual Ptr< UniqueId >::Ref schedulePlaylist (Ptr< Playlist >::Ref playlist, Ptr< ptime >::Ref playtime)=0 throw (std::invalid_argument)
 Schedule a playlist.
virtual Ptr< ScheduleEntryList
>::Ref 
getScheduleEntries (Ptr< ptime >::Ref fromTime, Ptr< ptime >::Ref toTime)=0 throw ()
 Return the list of scheduled entries for a specified time interval.
virtual void exportScheduleEntries (xmlpp::Element *element, Ptr< ptime >::Ref fromTime, Ptr< ptime >::Ref toTime)=0 throw ()
 Export schedule entries to a DOM tree.
virtual void importScheduleEntries (const xmlpp::Element *domTree)=0 throw (std::invalid_argument)
 Import schedule entries from a DOM tree.
virtual Ptr< ScheduleEntry
>::Ref 
getCurrentlyPlaying (void)=0 throw ()
 Return the schedule entry that is being played at the moment.
virtual Ptr< ScheduleEntry
>::Ref 
getNextEntry (Ptr< ptime >::Ref fromTime)=0 throw ()
 Return the next schedule entry, after (but not including) the specified timepoint.
virtual bool scheduleEntryExists (Ptr< const UniqueId >::Ref entryId)=0 throw ()
 Tell if a schedule entry exists by the give name.
virtual void removeFromSchedule (Ptr< const UniqueId >::Ref entryId)=0 throw (std::invalid_argument)
 Remove a schedule entry from the schedule.
virtual Ptr< ScheduleEntry
>::Ref 
getScheduleEntry (Ptr< UniqueId >::Ref entryId)=0 throw (std::invalid_argument)
 Return a schedule entry for a specified id.
virtual void reschedule (Ptr< UniqueId >::Ref entryId, Ptr< ptime >::Ref playtime)=0 throw (std::invalid_argument)
 Reschedule an event to a different time.
virtual ~ScheduleInterface (void) throw ()
 A virtual destructor, as this class has virtual functions.


Member Typedef Documentation

typedef std::vector<Ptr<ScheduleEntry>::Ref> LiveSupport::Scheduler::ScheduleInterface::ScheduleEntryList

A vector of ScheduleEntry objects.

Definition at line 80 of file ScheduleInterface.h.


Constructor & Destructor Documentation

virtual LiveSupport::Scheduler::ScheduleInterface::~ScheduleInterface ( void   )  throw () [inline, virtual]

A virtual destructor, as this class has virtual functions.

Definition at line 236 of file ScheduleInterface.h.


Member Function Documentation

virtual void LiveSupport::Scheduler::ScheduleInterface::exportScheduleEntries ( xmlpp::Element *  element,
Ptr< ptime >::Ref  fromTime,
Ptr< ptime >::Ref  toTime 
) throw () [pure virtual]

Export schedule entries to a DOM tree.

Parameters:
element a new DOM element will be added as a child to this element, which will contain the export.
fromTime entries are included in the export starting from this time.
toTime entries as included in the export up to but not including this time.
Returns:
a DOM element, which is the export. it is the responsibility of the caller to free up the returned element.
See also:
importScheduleEntries

Implemented in LiveSupport::Scheduler::PostgresqlSchedule.

virtual Ptr<ScheduleEntry>::Ref LiveSupport::Scheduler::ScheduleInterface::getCurrentlyPlaying ( void   )  throw () [pure virtual]

Return the schedule entry that is being played at the moment.

Returns:
the schedule entry that is being played at the monent, or a reference to null, if nothing is playing currently.

Implemented in LiveSupport::Scheduler::PostgresqlSchedule.

virtual Ptr<ScheduleEntry>::Ref LiveSupport::Scheduler::ScheduleInterface::getNextEntry ( Ptr< ptime >::Ref  fromTime  )  throw () [pure virtual]

Return the next schedule entry, after (but not including) the specified timepoint.

Parameters:
fromTime the start of the time of the interval queried, inclusive
Returns:
the first schedule entry, after the specified timepoint.

Implemented in LiveSupport::Scheduler::PostgresqlSchedule.

virtual Ptr<ScheduleEntryList>::Ref LiveSupport::Scheduler::ScheduleInterface::getScheduleEntries ( Ptr< ptime >::Ref  fromTime,
Ptr< ptime >::Ref  toTime 
) throw () [pure virtual]

Return the list of scheduled entries for a specified time interval.

It returns all entries which intersect the interval (i.e., start before toTime, and end later than fromTime).

Parameters:
fromTime the start of the time of the interval queried
toTime to end of the time of the interval queried
Returns:
a vector of the scheduled entries for the time region.

Implemented in LiveSupport::Scheduler::PostgresqlSchedule.

virtual Ptr<ScheduleEntry>::Ref LiveSupport::Scheduler::ScheduleInterface::getScheduleEntry ( Ptr< UniqueId >::Ref  entryId  )  throw (std::invalid_argument) [pure virtual]

Return a schedule entry for a specified id.

Parameters:
entryId the id of the entry to get.
Returns:
the ScheduleEntry for the specified id.
Exceptions:
std::invalid_argument if no entry by the specified id exists.

Implemented in LiveSupport::Scheduler::PostgresqlSchedule.

virtual void LiveSupport::Scheduler::ScheduleInterface::importScheduleEntries ( const xmlpp::Element *  domTree  )  throw (std::invalid_argument) [pure virtual]

Import schedule entries from a DOM tree.

Parameters:
domTree the DOM tree containing schedule entries, to import.
Exceptions:
std::invalid_argument if the supplied DOM tree is not valid.
See also:
exportScheduleEntries

Implemented in LiveSupport::Scheduler::PostgresqlSchedule.

virtual bool LiveSupport::Scheduler::ScheduleInterface::isTimeframeAvailable ( Ptr< ptime >::Ref  from,
Ptr< ptime >::Ref  to 
) throw () [pure virtual]

Check if a timeframe is available for scheduling.

Parameters:
from the start time of the timeframe.
to the end time of the timeframe.
Returns:
true if the timeframe is available, false otherwise.

Implemented in LiveSupport::Scheduler::PostgresqlSchedule.

virtual void LiveSupport::Scheduler::ScheduleInterface::removeFromSchedule ( Ptr< const UniqueId >::Ref  entryId  )  throw (std::invalid_argument) [pure virtual]

Remove a schedule entry from the schedule.

Parameters:
entryId the id of the schedule to remove.
Exceptions:
std::invalid_argument if no schedule with the specified id exists.

Implemented in LiveSupport::Scheduler::PostgresqlSchedule.

virtual void LiveSupport::Scheduler::ScheduleInterface::reschedule ( Ptr< UniqueId >::Ref  entryId,
Ptr< ptime >::Ref  playtime 
) throw (std::invalid_argument) [pure virtual]

Reschedule an event to a different time.

Parameters:
entryId the id of the entry to reschedule.
playtime the new time for the schedule.
Exceptions:
std::invalid_argument if there is something already scheduled for the new duration.

Implemented in LiveSupport::Scheduler::PostgresqlSchedule.

virtual bool LiveSupport::Scheduler::ScheduleInterface::scheduleEntryExists ( Ptr< const UniqueId >::Ref  entryId  )  throw () [pure virtual]

Tell if a schedule entry exists by the give name.

Parameters:
entryId the id of the schedule entry to check for.
Returns:
true if the schedule entry exists in the Schedule, false otherwise.

Implemented in LiveSupport::Scheduler::PostgresqlSchedule.

virtual Ptr<UniqueId>::Ref LiveSupport::Scheduler::ScheduleInterface::schedulePlaylist ( Ptr< Playlist >::Ref  playlist,
Ptr< ptime >::Ref  playtime 
) throw (std::invalid_argument) [pure virtual]

Schedule a playlist.

Parameters:
playlist the playlist to schedule.
playtime the time to schedule the playlist for.
Returns:
the id of the newly created playlist.
Exceptions:
std::invalid_argument if there is something already scheduled for the duration of the playlist.

Implemented in LiveSupport::Scheduler::PostgresqlSchedule.


The documentation for this class was generated from the following file:
Generated on Thu Sep 20 02:00:44 2007 for Campcaster by  1.4.7