summaryrefslogtreecommitdiff
path: root/epg_events.h
blob: 61ba3ffa9fd1521a503e6692cd401804f760e4d0 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef VDR_LIVE_WHATS_ON_H
#define VDR_LIVE_WHATS_ON_H

#include <ctime>
#include <vector>
#include <boost/shared_ptr.hpp>

#include <vdr/plugin.h>
#include <vdr/channels.h>
#include <vdr/epg.h>
#include <vdr/config.h>
#include <vdr/i18n.h>

#include "live.h"

namespace vdrlive
{

	class EpgEvent
	{
		public:
			EpgEvent(const std::string& id, const cEvent* event, const char* channelName = "");

			virtual ~EpgEvent();

			const std::string& Id() const { return eventId; }

			const std::string& Title() const { return title; }

			const std::string& ChannelName() const { return channel_name; }

			const std::string& ShortDescr() const { return short_descr; }

			const std::string& LongDescr() const { return long_descr; }

			const std::string StartTime(const char* format) const;

			const std::string EndTime(const char* format) const;

		private:
			std::string eventId;
			std::string title;
			std::string channel_name;
			std::string short_descr;
			std::string long_descr;
			time_t start_time;
			time_t end_time;
	};

	typedef boost::shared_ptr<EpgEvent> EpgEventPtr;

	class EpgEvents : public std::vector<EpgEventPtr> {
		public:
			EpgEvents();
			virtual ~EpgEvents();

		private:
	};
}; // namespace vdrlive

#endif // VDR_LIVE_WHATS_ON_H