summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-01-18 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-01-18 18:00:00 +0100
commit3fe3c15d5db9c1f3982ffe6dac1ae4ad56d1664d (patch)
treee1c4e489899c119fdfaad6f6bdf9bde988616df2 /config.h
parent9aa2cda494d7af2733362de78234441a25959e86 (diff)
downloadvdr-patch-lnbsharing-3fe3c15d5db9c1f3982ffe6dac1ae4ad56d1664d.tar.gz
vdr-patch-lnbsharing-3fe3c15d5db9c1f3982ffe6dac1ae4ad56d1664d.tar.bz2
Version 0.70vdr-0.70
- VDR now requires driver version 0.8.1 or higher. - Recordings are now saved in PES mode. Note that you now need to install the driver *WITHOUT* 'outstream=0'! This is the default when you 'make insmod' in the DVB/driver directory. Old recordings (in AV_PES mode) can still be replayed (as long as the driver still supports replaying AV_PES files). The only limitation with this is that in fast forward/back mode the picture may be slightly distorted and there may be sound fragments. - The EPG data is now dumped into the file /video/epg.data every ten minutes. Use the Perl script 'epg2html.pl' to convert the raw EPG data into a simple HTML programme listing. - Fixed handling of channel switching with the "Blue" button in the "What's on now/next?" menus. - Fixed saving the MarginStop setup parameter. - Fixed missing initialization in cConfig. - Implemented "On Disk Editing". - There is no more default 'timers.conf' file. - Added Italian language texts (thanks to Alberto Carraro). - Fixed starting a replay session when the program is currently in "transfer mode". - Fixed setting/modifying timers via SVDRP with empty summary fields. - Fixed a problem with recordings that have a single quote character in their name (this is now mapped to 0x01). - Changed the value for Diseqc to '0' in the default 'channels.conf'. - Fixed displaying channels and recording status in the RCU's LED display when a recording is interrupted due to higher priority. - Implemented safe writing of config files (first writes into a temporary file and then renames it). - In case the video data stream is broken the log message will come only every 5 seconds. - The current channel is now saved in the 'setup.conf' file when VDR is cancelled, and will be restored next time it is started (thanks to Deti Fliegl). - The EIT scanning thread is now locked when switching channels to avoid problems. - Encrypted channels can now be selected even without knowing the PNR (however, it is still necessary for the EPG info).
Diffstat (limited to 'config.h')
-rw-r--r--config.h73
1 files changed, 42 insertions, 31 deletions
diff --git a/config.h b/config.h
index db3f1ed..277e957 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h 1.34 2000/11/18 13:25:53 kls Exp $
+ * $Id: config.h 1.38 2001/01/14 15:29:27 kls Exp $
*/
#ifndef __CONFIG_H
@@ -14,11 +14,12 @@
#include <stdio.h>
#include <string.h>
#include <time.h>
+#include <unistd.h>
#include "dvbapi.h"
#include "eit.h"
#include "tools.h"
-#define VDRVERSION "0.68"
+#define VDRVERSION "0.70"
#define MaxBuffer 10000
@@ -42,6 +43,15 @@ enum eKeys { // "Up" and "Down" must be the first two keys!
k_Flags = k_Repeat | k_Release,
};
+// This is in preparation for having more key codes:
+#define kMarkToggle k0
+#define kMarkMoveBack k4
+#define kMarkMoveForward k6
+#define kMarkJumpBack k7
+#define kMarkJumpForward k9
+#define kEditCut k2
+#define kEditTest k8
+
#define RAWKEY(k) ((k) & ~k_Flags)
#define ISRAWKEY(k) ((k) != kNone && ((k) & k_Flags) == 0)
#define NORMALKEY(k) ((k) & ~k_Repeat)
@@ -157,43 +167,45 @@ private:
cList<T>::Clear();
}
public:
+ cConfig(void) { fileName = NULL; }
+ virtual ~cConfig() { delete fileName; }
virtual bool Load(const char *FileName)
{
- isyslog(LOG_INFO, "loading %s", FileName);
- bool result = true;
Clear();
fileName = strdup(FileName);
- FILE *f = fopen(fileName, "r");
- if (f) {
- int line = 0;
- char buffer[MaxBuffer];
- while (fgets(buffer, sizeof(buffer), f) > 0) {
- line++;
- T *l = new T;
- if (l->Parse(buffer))
- Add(l);
- else {
- esyslog(LOG_ERR, "error in %s, line %d\n", fileName, line);
- delete l;
- result = false;
- break;
+ bool result = false;
+ if (access(FileName, F_OK) == 0) {
+ isyslog(LOG_INFO, "loading %s", FileName);
+ FILE *f = fopen(fileName, "r");
+ if (f) {
+ int line = 0;
+ char buffer[MaxBuffer];
+ result = true;
+ while (fgets(buffer, sizeof(buffer), f) > 0) {
+ line++;
+ T *l = new T;
+ if (l->Parse(buffer))
+ Add(l);
+ else {
+ esyslog(LOG_ERR, "error in %s, line %d\n", fileName, line);
+ delete l;
+ result = false;
+ break;
+ }
}
- }
- fclose(f);
- }
- else {
- LOG_ERROR_STR(fileName);
- result = false;
+ fclose(f);
+ }
+ else
+ LOG_ERROR_STR(fileName);
}
return result;
}
bool Save(void)
{
- //TODO make backup copies???
bool result = true;
T *l = (T *)First();
- FILE *f = fopen(fileName, "w");
- if (f) {
+ cSafeFile f(fileName);
+ if (f.Open()) {
while (l) {
if (!l->Save(f)) {
result = false;
@@ -201,12 +213,10 @@ public:
}
l = (T *)l->Next();
}
- fclose(f);
+ f.Close();
}
- else {
- LOG_ERROR_STR(fileName);
+ else
result = false;
- }
return result;
}
};
@@ -258,6 +268,7 @@ public:
int SetSystemTime;
int MarginStart, MarginStop;
int EPGScanTimeout;
+ int CurrentChannel;
cSetup(void);
bool Load(const char *FileName);
bool Save(const char *FileName = NULL);