#include <PlaylistEvent.h>
Inheritance diagram for LiveSupport::Scheduler::PlaylistEvent:
Definition at line 77 of file PlaylistEvent.h.
Public Member Functions | |
PlaylistEvent (Ptr< SessionId >::Ref sessionId, Ptr< AudioPlayerInterface >::Ref audioPlayer, Ptr< StorageClientInterface >::Ref storage, Ptr< PlayLogInterface >::Ref playLog, Ptr< ScheduleEntry >::Ref scheduleEntry) throw () | |
Constructor. | |
virtual | ~PlaylistEvent (void) throw () |
A virtual destructor, as this class has virtual functions. | |
virtual Ptr< const ptime >::Ref | getScheduledTime (void) throw () |
Tell the time this event is scheduled for. | |
virtual void | initialize (void) throw (std::exception) |
Initialize the event object. | |
virtual Ptr< const time_duration >::Ref | maxTimeToInitialize (void) throw () |
The maximum time for the initalize() function to complete. | |
virtual void | deInitialize (void) throw () |
De-initialize the event object. | |
virtual void | start (void) throw () |
Start the event. | |
virtual Ptr< const time_duration >::Ref | eventLength (void) throw () |
The length of the event. | |
virtual void | stop (void) throw () |
Stop the event. |
PlaylistEvent::PlaylistEvent | ( | Ptr< SessionId >::Ref | sessionId, | |
Ptr< AudioPlayerInterface >::Ref | audioPlayer, | |||
Ptr< StorageClientInterface >::Ref | storage, | |||
Ptr< PlayLogInterface >::Ref | playLog, | |||
Ptr< ScheduleEntry >::Ref | scheduleEntry | |||
) | throw () |
Constructor.
sessionId | the session id used to access the storage. | |
audioPlayer | the audio player to play the playlist with. | |
storage | the storage containing the playlist to play, and all the related audio clips. | |
playLog | the play log facility. | |
scheduleEntry | the schedule entry this event is playing. |
Definition at line 71 of file PlaylistEvent.cxx.
virtual LiveSupport::Scheduler::PlaylistEvent::~PlaylistEvent | ( | void | ) | throw () [inline, virtual] |
A virtual destructor, as this class has virtual functions.
Definition at line 155 of file PlaylistEvent.h.
void PlaylistEvent::deInitialize | ( | void | ) | throw () [virtual] |
De-initialize the event object.
Implements LiveSupport::EventScheduler::ScheduledEventInterface.
Definition at line 125 of file PlaylistEvent.cxx.
References DEBUG_BLOCK, endl(), error(), and LiveSupport::Core::XmlRpcException::what().
virtual Ptr<const time_duration>::Ref LiveSupport::Scheduler::PlaylistEvent::eventLength | ( | void | ) | throw () [inline, virtual] |
The length of the event.
The scheduler will call stop() when this much time has passed after calling start().
Implements LiveSupport::EventScheduler::ScheduledEventInterface.
Definition at line 220 of file PlaylistEvent.h.
virtual Ptr<const ptime>::Ref LiveSupport::Scheduler::PlaylistEvent::getScheduledTime | ( | void | ) | throw () [inline, virtual] |
Tell the time this event is scheduled for.
Implements LiveSupport::EventScheduler::ScheduledEventInterface.
Definition at line 165 of file PlaylistEvent.h.
void PlaylistEvent::initialize | ( | void | ) | throw (std::exception) [virtual] |
Initialize the event object.
This should finishin at most maxTimeToInitialize() time. Use this call to allocate any resources that will be needed by the event itself.
std::exception | on initialization problems. a raised exception will result in the cancellation of the event. |
Implements LiveSupport::EventScheduler::ScheduledEventInterface.
Definition at line 96 of file PlaylistEvent.cxx.
References LiveSupport::Core::XmlRpcException::what().
virtual Ptr<const time_duration>::Ref LiveSupport::Scheduler::PlaylistEvent::maxTimeToInitialize | ( | void | ) | throw () [inline, virtual] |
The maximum time for the initalize() function to complete.
It is the responsibility of the ScheduledEventInterface object to complete the initialization in that time.
Implements LiveSupport::EventScheduler::ScheduledEventInterface.
Definition at line 193 of file PlaylistEvent.h.
void PlaylistEvent::start | ( | void | ) | throw () [virtual] |
Start the event.
This function call should start the execution of the event in a separate thread, and return immediately.
Implements LiveSupport::EventScheduler::ScheduledEventInterface.
Definition at line 150 of file PlaylistEvent.cxx.
References DEBUG_BLOCK, endl(), error(), and LiveSupport::Core::TimeConversion::now().
void PlaylistEvent::stop | ( | void | ) | throw () [virtual] |
Stop the event.
This function call should result in the event stopping, if this has not happened yet. The processing of this event should persue in a seperate thread, and the function itself should return immediately.
Implements LiveSupport::EventScheduler::ScheduledEventInterface.
Definition at line 180 of file PlaylistEvent.cxx.
References DEBUG_BLOCK, endl(), and error().