summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY2
-rw-r--r--eit.c9
-rw-r--r--eit.h3
-rw-r--r--svdrp.c11
-rw-r--r--svdrp.h3
6 files changed, 25 insertions, 4 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index a3c12fa3..1428070b 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -54,6 +54,7 @@ Matthias Schniedermeyer <ms@citd.de>
for his "schnitt" tools
for his "master-timer" tool
for helping to debug the "move to last position in list" bug
+ for suggesting the SVDRP command CLRE
Miha Setina <mihasetina@softhome.net>
for translating OSD texts to the Slovenian language
diff --git a/HISTORY b/HISTORY
index 266a1c5d..9f99066b 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1425,3 +1425,5 @@ Video Disk Recorder Revision History
OSD capabilities (thanks to Andreas Schultz).
- Added cPalette::AllColors() for plugins that need to get the color entries of
a cPalette (see osdbase.h).
+- The new SVDRP command CLRE can be used to clear the entire EPG data (suggested
+ by Matthias Schniedermeyer).
diff --git a/eit.c b/eit.c
index ca319138..86590490 100644
--- a/eit.c
+++ b/eit.c
@@ -16,7 +16,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: eit.c 1.48 2002/08/11 11:11:12 kls Exp $
+ * $Id: eit.c 1.49 2002/08/25 10:43:36 kls Exp $
***************************************************************************/
#include "eit.h"
@@ -1035,6 +1035,13 @@ bool cSIProcessor::Read(FILE *f)
return result;
}
+void cSIProcessor::Clear(void)
+{
+ cMutexLock MutexLock(&schedulesMutex);
+ delete schedules;
+ schedules = new cSchedules;
+}
+
void cSIProcessor::SetEpgDataFileName(const char *FileName)
{
epgDataFileName = NULL;
diff --git a/eit.h b/eit.h
index 981f4e59..33a49a0e 100644
--- a/eit.h
+++ b/eit.h
@@ -16,7 +16,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: eit.h 1.17 2002/08/04 11:30:24 kls Exp $
+ * $Id: eit.h 1.18 2002/08/25 10:38:34 kls Exp $
***************************************************************************/
#ifndef __EIT_H
@@ -156,6 +156,7 @@ public:
// time the returned cSchedules is accessed. Once the cSchedules is no
// longer used, the cMutexLock must be destroyed.
static bool Read(FILE *f = NULL);
+ static void Clear(void);
void SetStatus(bool On);
void SetCurrentTransponder(int CurrentTransponder);
static bool SetCurrentServiceID(unsigned short servid);
diff --git a/svdrp.c b/svdrp.c
index b59cb393..92365e72 100644
--- a/svdrp.c
+++ b/svdrp.c
@@ -10,7 +10,7 @@
* and interact with the Video Disk Recorder - or write a full featured
* graphical interface that sits on top of an SVDRP connection.
*
- * $Id: svdrp.c 1.39 2002/08/11 12:01:28 kls Exp $
+ * $Id: svdrp.c 1.40 2002/08/25 10:40:46 kls Exp $
*/
#include "svdrp.h"
@@ -174,6 +174,8 @@ const char *HelpPages[] = {
" Switch channel up, down or to the given channel number or name.\n"
" Without option (or after successfully switching to the channel)\n"
" it returns the current channel number and name.",
+ "CLRE\n"
+ " Clear the entire EPG list.",
"DELC <number>\n"
" Delete channel.",
"DELR <number>\n"
@@ -438,6 +440,12 @@ void cSVDRP::CmdCHAN(const char *Option)
Reply(550, "Unable to find channel \"%d\"", cDevice::CurrentChannel());
}
+void cSVDRP::CmdCLRE(const char *Option)
+{
+ cSIProcessor::Clear();
+ Reply(250, "EPG data cleared");
+}
+
void cSVDRP::CmdDELC(const char *Option)
{
//TODO combine this with menu action (timers must be updated)
@@ -967,6 +975,7 @@ void cSVDRP::Execute(char *Cmd)
*s++ = 0;
s = skipspace(s);
if (CMD("CHAN")) CmdCHAN(s);
+ else if (CMD("CLRE")) CmdCLRE(s);
else if (CMD("DELC")) CmdDELC(s);
else if (CMD("DELR")) CmdDELR(s);
else if (CMD("DELT")) CmdDELT(s);
diff --git a/svdrp.h b/svdrp.h
index 29ef83cd..879fb649 100644
--- a/svdrp.h
+++ b/svdrp.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: svdrp.h 1.15 2002/03/08 16:40:23 kls Exp $
+ * $Id: svdrp.h 1.16 2002/08/25 10:35:25 kls Exp $
*/
#ifndef __SVDRP_H
@@ -53,6 +53,7 @@ private:
bool Send(const char *s, int length = -1);
void Reply(int Code, const char *fmt, ...);
void CmdCHAN(const char *Option);
+ void CmdCLRE(const char *Option);
void CmdDELC(const char *Option);
void CmdDELR(const char *Option);
void CmdDELT(const char *Option);