blob: f2f7fc276ff6928d79e1739dcb320da8e9d3a5c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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
|