summaryrefslogtreecommitdiff
path: root/channelepg.h
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2015-03-12 17:22:16 +0100
committerlouis <louis.braun@gmx.de>2015-03-12 17:22:16 +0100
commit3cc8e78e1bf00e16b49520ac416b74b5fd73c906 (patch)
tree4425c4eb4b9833d927aae2f65d0f3a99d3792f83 /channelepg.h
downloadvdr-plugin-tvguideng-3cc8e78e1bf00e16b49520ac416b74b5fd73c906.tar.gz
vdr-plugin-tvguideng-3cc8e78e1bf00e16b49520ac416b74b5fd73c906.tar.bz2
Version 0.0.10.0.1
Diffstat (limited to 'channelepg.h')
-rw-r--r--channelepg.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/channelepg.h b/channelepg.h
new file mode 100644
index 0000000..2a575ce
--- /dev/null
+++ b/channelepg.h
@@ -0,0 +1,61 @@
+#ifndef __TVGUIDE_CHANNELEPG_H
+#define __TVGUIDE_CHANNELEPG_H
+
+#include <set>
+#include <vdr/tools.h>
+#include "libskindesigner/osdelements.h"
+#include "config.h"
+#include "gridelement.h"
+#include "epgelement.h"
+#include "dummyelement.h"
+#include "timemanager.h"
+#include "switchtimer.h"
+
+// --- cChannelEpg -------------------------------------------------------------
+
+class cChannelEpg : public cListObject {
+private:
+ bool init;
+ int channelsPerPage;
+ cTimeManager *timeManager;
+ int position;
+ const cChannel *channel;
+ cList<cGridElement> grids;
+ set<long> deletedElements;
+ cSchedulesLock *schedulesLock;
+ const cSchedules *schedules;
+ bool hasTimer;
+ bool hasSwitchTimer;
+ cGridElement *AddEpgGrid(const cEvent *event, cGridElement *after = NULL);
+ cGridElement *AddDummyGrid(time_t start, time_t end, cGridElement *after = NULL);
+public:
+ cChannelEpg(int position, const cChannel *channel, cTimeManager *timeManager);
+ virtual ~cChannelEpg(void);
+ void SetPosition(int newPos) { position = newPos; };
+ bool ReadGrids(void);
+ const cChannel *Channel(void) { return channel; };
+ const char* Name(void) { return channel->Name(); };
+ int GetChannelNumber(void) {return channel->Number();}
+ cGridElement * GetActive(void);
+ cGridElement * GetNext(cGridElement *activeGrid);
+ cGridElement * GetPrev(cGridElement *activeGrid);
+ cGridElement * GetNeighbor(cGridElement *activeGrid);
+ bool IsFirst(cGridElement *grid);
+ void AddNewGridsAtStart(void);
+ void AddNewGridsAtEnd(void);
+ void ClearOutdatedStart(void);
+ void ClearOutdatedEnd(void);
+ void SetTimers(void);
+ void SetTimer(void) { hasTimer = channel->HasTimer(); };
+ bool HasTimer(void) { return hasTimer; };
+ void SetSwitchTimer() {hasSwitchTimer = SwitchTimers.ChannelInSwitchList(channel);};
+ bool HasSwitchTimer() { return hasSwitchTimer; };
+ void ClearGrids(void);
+ void DrawHeader(cViewGrid *channelsGrid);
+ void DrawGrids(cViewGrid *epgGrid);
+ void DeleteOutdated(cViewGrid *epgGrid);
+ void DeleteGridViews(cViewGrid *epgGrid);
+ void Debug(void);
+};
+
+#endif //__TVGUIDE_CHANNELEPG_H