vdr-plugin-tvguide/timer.h

52 lines
1.5 KiB
C
Raw Normal View History

2013-01-17 13:16:44 +01:00
#ifndef __TVGUIDE_TIMER_H
#define __TVGUIDE_TIMER_H
2013-12-07 15:51:50 +01:00
#include <vdr/tools.h>
2013-01-17 13:16:44 +01:00
// --- cMyTime -------------------------------------------------------------
class cMyTime {
2013-05-26 11:38:05 +02:00
private:
time_t t;
time_t tStart;
time_t tEnd;
public:
cMyTime(){};
virtual ~cMyTime(void);
static cString printTime(time_t displayTime);
2013-05-26 11:38:05 +02:00
void Now();
2014-01-15 18:25:37 +01:00
time_t GetNow() { return t; };
2013-05-26 11:38:05 +02:00
void AddStep(int step);
bool DelStep(int step);
void SetTime(time_t newTime);
time_t Get() {return t;};
time_t GetStart() {return tStart;};
time_t GetEnd() {return tEnd;};
cString GetCurrentTime();
cString GetDate();
cString GetWeekday();
time_t getPrevPrimetime(time_t current);
time_t getNextPrimetime(time_t current);
bool tooFarInPast(time_t current);
int GetTimelineOffset();
time_t GetRounded();
2014-01-15 18:25:37 +01:00
bool NowVisible(void);
2013-05-26 11:38:05 +02:00
void debug();
2013-01-17 13:16:44 +01:00
};
2013-07-09 00:17:42 +02:00
// --- cTimeInterval -------------------------------------------------------------
class cTimeInterval {
private:
time_t start;
time_t stop;
public:
cTimeInterval(time_t start, time_t stop);
virtual ~cTimeInterval(void);
time_t Start(void) { return start; };
time_t Stop(void) { return stop; };
cTimeInterval *Intersect(cTimeInterval *interval);
cTimeInterval *Union(cTimeInterval *interval);
};
2013-01-17 13:16:44 +01:00
#endif //__TVGUIDE_TIMER_H