mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
#ifndef __TVGUIDE_SWITCHTIMER_H
|
|
#define __TVGUIDE_SWITCHTIMER_H
|
|
|
|
#include <vdr/plugin.h>
|
|
#include "config.h"
|
|
|
|
class cSwitchTimer : public cListObject {
|
|
public:
|
|
tEventID eventID;
|
|
time_t startTime;
|
|
tChannelID channelID;
|
|
int switchMinsBefore;
|
|
int announceOnly;
|
|
#if VDRVERSNUM >= 20305
|
|
cSwitchTimer(const cSwitchTimer &SwitchTimer) { *this = SwitchTimer; };
|
|
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;
|
|
};
|
|
#endif
|
|
cSwitchTimer(void);
|
|
cSwitchTimer(const cEvent* Event);
|
|
bool Parse(const char *s);
|
|
void SetEventID(tEventID eventID) { this->eventID = eventID; };
|
|
void SetStartTime(time_t startTime) { this->startTime = startTime; };
|
|
};
|
|
|
|
class cSwitchTimers : public cConfig<cSwitchTimer>, public cMutex {
|
|
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
|