diff options
Diffstat (limited to 'epg_events.cpp')
-rw-r--r-- | epg_events.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/epg_events.cpp b/epg_events.cpp new file mode 100644 index 0000000..f2f7fc2 --- /dev/null +++ b/epg_events.cpp @@ -0,0 +1,47 @@ +#include "tools.h" + +#include "epg_events.h" + +namespace vdrlive +{ + EpgEvent::EpgEvent(const std::string& id, const cEvent* event, const char* channelName) : + eventId(id), + title(event->Title() ? event->Title() : ""), + channel_name(channelName), + short_descr(event->ShortText() ? event->ShortText() : ""), + long_descr(event->Description() ? event->Description() : ""), + start_time(event->StartTime()), + end_time(event->EndTime()) + { + } + + EpgEvent::~EpgEvent() + { + } + + const std::string EpgEvent::StartTime(const char* format) const + { + return FormatDateTime(format, start_time); + } + + const std::string EpgEvent::EndTime(const char* format) const + { + return FormatDateTime(format, end_time); + } + + EpgEvents::EpgEvents() : + std::vector<EpgEventPtr>() + { + } + + EpgEvents::~EpgEvents() + { + } +#ifdef never + EpgEventsPtr EpgEvents::dim(size_t count) + { + EpgEventsPtr ePtr(new EpgEvents(count)); + return ePtr; + } +#endif +}; // namespace vdrlive |