2013-07-09 00:17:42 +02:00
|
|
|
#ifndef __TVGUIDE_SWITCHTIMER_H
|
|
|
|
#define __TVGUIDE_SWITCHTIMER_H
|
|
|
|
|
|
|
|
#include <vdr/plugin.h>
|
2019-03-22 13:52:26 +01:00
|
|
|
#include "config.h"
|
2013-07-09 00:17:42 +02:00
|
|
|
|
2014-01-10 12:44:01 +01:00
|
|
|
class cSwitchTimer : public cListObject {
|
2013-07-09 00:17:42 +02:00
|
|
|
public:
|
|
|
|
tEventID eventID;
|
|
|
|
time_t startTime;
|
|
|
|
tChannelID channelID;
|
2014-01-10 12:44:01 +01:00
|
|
|
int switchMinsBefore;
|
|
|
|
int announceOnly;
|
2018-03-08 13:30:41 +01:00
|
|
|
#if VDRVERSNUM >= 20305
|
|
|
|
cSwitchTimer(const cSwitchTimer &SwitchTimer) { *this = SwitchTimer; };
|
2019-03-22 13:21:18 +01:00
|
|
|
cSwitchTimer& operator= (const cSwitchTimer &SwitchTimer)
|
|
|
|
{
|
|
|
|
this->eventID = SwitchTimer.eventID;
|
|
|
|
this->startTime = SwitchTimer.startTime;
|
|
|
|
this->channelID = SwitchTimer.channelID;
|
|
|
|
this->switchMinsBefore = SwitchTimer.switchMinsBefore;
|
|
|
|
this->announceOnly = SwitchTimer.announceOnly;
|
|
|
|
return *this;
|
|
|
|
};
|
2018-03-08 13:30:41 +01:00
|
|
|
#endif
|
2013-07-09 00:17:42 +02:00
|
|
|
cSwitchTimer(void);
|
|
|
|
cSwitchTimer(const cEvent* Event);
|
|
|
|
bool Parse(const char *s);
|
2014-01-10 12:44:01 +01:00
|
|
|
void SetEventID(tEventID eventID) { this->eventID = eventID; };
|
|
|
|
void SetStartTime(time_t startTime) { this->startTime = startTime; };
|
2013-07-09 00:17:42 +02:00
|
|
|
};
|
|
|
|
|
2014-01-10 12:44:01 +01:00
|
|
|
class cSwitchTimers : public cConfig<cSwitchTimer>, public cMutex {
|
2013-07-09 00:17:42 +02:00
|
|
|
public:
|
|
|
|
cSwitchTimers(void) {}
|
|
|
|
~cSwitchTimers(void) {}
|
|
|
|
bool EventInSwitchList(const cEvent* event);
|
|
|
|
bool ChannelInSwitchList(const cChannel* channel);
|
|
|
|
void DeleteSwitchTimer(const cEvent *event);
|
|
|
|
};
|
|
|
|
|
|
|
|
extern cSwitchTimers SwitchTimers;
|
|
|
|
|
|
|
|
#endif //__TVGUIDE_SWITCHTIMER_H
|