diff options
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 29 |
1 files changed, 20 insertions, 9 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.7 2000/06/24 13:42:32 kls Exp $ + * $Id: config.h 1.11 2000/07/23 17:17:10 kls Exp $ */ #ifndef __CONFIG_H @@ -17,7 +17,7 @@ #include "dvbapi.h" #include "tools.h" -#define MaxBuffer 1000 +#define MaxBuffer 10000 enum eKeys { // "Up" and "Down" must be the first two keys! kUp, @@ -50,7 +50,8 @@ public: tKey *keys; cKeys(void); void Clear(void); - bool Load(char *FileName = NULL); + void SetDummyValues(void); + bool Load(const char *FileName = NULL); bool Save(void); unsigned int Encode(const char *Command); eKeys Get(unsigned int Code); @@ -58,6 +59,9 @@ public: }; class cChannel : public cListObject { +private: + static char *buffer; + static const char *ToText(cChannel *Channel); public: enum { MaxChannelName = 32 }; // 31 chars + terminating 0! char name[MaxChannelName]; @@ -71,7 +75,8 @@ public: int pnr; cChannel(void); cChannel(const cChannel *Channel); - bool Parse(char *s); + const char *ToText(void); + bool Parse(const char *s); bool Save(FILE *f); bool Switch(cDvbApi *DvbApi = NULL); static bool SwitchTo(int i, cDvbApi *DvbApi = NULL); @@ -81,6 +86,8 @@ public: class cTimer : public cListObject { private: time_t startTime, stopTime; + static char *buffer; + static const char *ToText(cTimer *Timer); public: enum { MaxFileName = 256 }; bool recording; @@ -93,19 +100,23 @@ public: int priority; int lifetime; char file[MaxFileName]; + char *summary; cTimer(bool Instant = false); - bool Parse(char *s); + ~cTimer(); + cTimer& operator= (const cTimer &Timer); + const char *ToText(void); + bool Parse(const char *s); bool Save(FILE *f); bool IsSingleEvent(void); - bool Matches(void); + bool Matches(time_t t = 0); time_t StartTime(void); time_t StopTime(void); void SetRecording(bool Recording); static cTimer *GetMatch(void); static int TimeToInt(int t); static time_t Day(time_t t); - static int ParseDay(char *s); - static char *PrintDay(int d); + static int ParseDay(const char *s); + static const char *PrintDay(int d); }; template<class T> class cConfig : public cList<T> { @@ -117,7 +128,7 @@ private: cList<T>::Clear(); } public: - bool Load(char *FileName) + bool Load(const char *FileName) { isyslog(LOG_INFO, "loading %s", FileName); bool result = true; |