summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-02-03 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-02-03 18:00:00 +0100
commitef0a53af7282b14bd40f2087de28fc12a94e672b (patch)
tree8346e35a67828712f467afe6e371e54383f496ae /config.h
parent3db2d636b2757326323418b5293ebc7307bf161d (diff)
downloadvdr-patch-lnbsharing-ef0a53af7282b14bd40f2087de28fc12a94e672b.tar.gz
vdr-patch-lnbsharing-ef0a53af7282b14bd40f2087de28fc12a94e672b.tar.bz2
Version 0.99pre5vdr-0.99pre5
- Updated channel settings for 'N24' (thanks to Andreas Gebel). - Fixed handling hierarchical recordings menu in case of directories starting with the same sequence of characters. - Fixed handling timers on the 29th, 30th or 31st of a month in case the next month has less than 31 days. - Added a description of the sort order of individual episodes in the recordings menu to the MANUAL. - Removed the EPG bugfix for "Title / Subtitle" cleanup. Apparently Pro-7 has finally stopped this nasty habit. - Added some EPG bugfix statistics (printed to the log file every time the EPG data is cleaned up and when VDR is terminated). Maybe somebody in charge of the EPG data at the listed channels will read this and take the necessary actions to fix these things... - Changed the [dei]syslog macros in tools.h to use a variable number of args, thus making it safe to use them in nested 'if/else' statements. - Fixed error handling in establishing an SVDRP connection (thanks to Davide Achilli) for pointing this out). - The new configuration file 'svdrphosts.conf' is now used to define which hosts may access the SVDRP port (by default only 'localhost' has access). See FORMATS for details. - The special keywords TITLE and EPISODE can now be used in timer file names (see MANUAL and FORMATS for details). - The new setup parameter NameInstantRecord can be used to define how an instant recording will be named (see MANUAL for details). - When looking for the EPG record of the timer that starts a recording, now that record is taken which covers the time calculated as 'start + (Setup.MarginStart * 2) + 1)' in order to have a better chance of hitting the right record in case of an instant recording. Timers that start further in the future should always be programmed via the "Schedules" menu. - The special VPIDs '0' and '1' are now used to enable recording radio channels. Actually '0' should be enough, but '1' must be used with encrypted channels (driver bug?). Note, though, that since VDR is mainly a *video recorder*, some features like, e. g., the progress display, may not work as expected with radio recordings. Thanks to Michael Paar. - Fixed a problem with the ERR macro defined by ncurses.h (thanks to Artur Skawina).
Diffstat (limited to 'config.h')
-rw-r--r--config.h35
1 files changed, 30 insertions, 5 deletions
diff --git a/config.h b/config.h
index 42f7337..325f4ef 100644
--- a/config.h
+++ b/config.h
@@ -4,12 +4,13 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h 1.90 2002/01/30 18:30:03 kls Exp $
+ * $Id: config.h 1.93 2002/02/03 15:16:21 kls Exp $
*/
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <arpa/inet.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
@@ -18,7 +19,7 @@
#include "eit.h"
#include "tools.h"
-#define VDRVERSION "0.99pre4"
+#define VDRVERSION "0.99pre5"
#define MAXPRIORITY 99
#define MAXLIFETIME 99
@@ -65,6 +66,8 @@ enum eKeys { // "Up" and "Down" must be the first two keys!
#define ISRAWKEY(k) ((k) != kNone && ((k) & k_Flags) == 0)
#define NORMALKEY(k) (eKeys((k) & ~k_Repeat))
+#define MaxFileName 256
+
struct tKey {
eKeys type;
char *name;
@@ -122,7 +125,6 @@ private:
static char *buffer;
static const char *ToText(cTimer *Timer);
public:
- enum { MaxFileName = 256 };
bool recording, pending;
int active;
int channel;
@@ -148,6 +150,7 @@ public:
bool DayMatches(time_t t);
time_t IncDay(time_t t, int Days);
time_t SetTime(time_t t, int SecondsFromMidnight);
+ char *SetFile(const char *File);
bool Matches(time_t t = 0);
time_t StartTime(void);
time_t StopTime(void);
@@ -171,6 +174,16 @@ public:
const char *Execute(void);
};
+class cSVDRPhost : public cListObject {
+private:
+ struct in_addr addr;
+ in_addr_t mask;
+public:
+ cSVDRPhost(void);
+ bool Parse(const char *s);
+ bool Accepts(in_addr_t Address);
+ };
+
template<class T> class cConfig : public cList<T> {
private:
char *fileName;
@@ -182,7 +195,7 @@ private:
public:
cConfig(void) { fileName = NULL; }
virtual ~cConfig() { delete fileName; }
- virtual bool Load(const char *FileName)
+ virtual bool Load(const char *FileName, bool AllowComments = false)
{
Clear();
fileName = strdup(FileName);
@@ -196,6 +209,11 @@ public:
result = true;
while (fgets(buffer, sizeof(buffer), f) > 0) {
line++;
+ if (AllowComments) {
+ char *p = strchr(buffer, '#');
+ if (p)
+ *p = 0;
+ }
if (!isempty(buffer)) {
T *l = new T;
if (l->Parse(buffer))
@@ -242,7 +260,7 @@ protected:
int maxNumber;
public:
cChannels(void) { maxNumber = 0; }
- virtual bool Load(const char *FileName);
+ virtual bool Load(const char *FileName, bool AllowComments = false);
int GetNextGroup(int Idx); // Get next channel group
int GetPrevGroup(int Idx); // Get previous channel group
int GetNextNormal(int Idx); // Get next normal channel (not group)
@@ -263,10 +281,16 @@ public:
class cCommands : public cConfig<cCommand> {};
+class cSVDRPhosts : public cConfig<cSVDRPhost> {
+public:
+ bool Acceptable(in_addr_t Address);
+ };
+
extern cChannels Channels;
extern cTimers Timers;
extern cKeys Keys;
extern cCommands Commands;
+extern cSVDRPhosts SVDRPhosts;
class cSetup {
private:
@@ -279,6 +303,7 @@ public:
int ShowInfoOnChSwitch;
int MenuScrollPage;
int MarkInstantRecord;
+ char NameInstantRecord[MaxFileName];
int LnbSLOF;
int LnbFrequLo;
int LnbFrequHi;