#include <ScheduleInterface.h>
Inheritance diagram for LiveSupport::Scheduler::ScheduleInterface:
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. |
typedef std::vector<Ptr<ScheduleEntry>::Ref> LiveSupport::Scheduler::ScheduleInterface::ScheduleEntryList |
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.
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.
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. |
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.
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.
fromTime | the start of the time of the interval queried, inclusive |
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).
fromTime | the start of the time of the interval queried | |
toTime | to end of the time of the interval queried |
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.
entryId | the id of the entry to get. |
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.
domTree | the DOM tree containing schedule entries, to import. |
std::invalid_argument | if the supplied DOM tree is not valid. |
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.
from | the start time of the timeframe. | |
to | the end time of the timeframe. |
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.
entryId | the id of the schedule to remove. |
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.
entryId | the id of the entry to reschedule. | |
playtime | the new time for the schedule. |
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.
entryId | the id of the schedule entry to check for. |
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.
playlist | the playlist to schedule. | |
playtime | the time to schedule the playlist for. |
std::invalid_argument | if there is something already scheduled for the duration of the playlist. |
Implemented in LiveSupport::Scheduler::PostgresqlSchedule.