Blob Blame History Raw
From 1a055e2b409eec52dc75641c436605712af14a49 Mon Sep 17 00:00:00 2001
From: Christian Wieninger <cwieninger@gmx.de>
Date: Sat, 8 Dec 2012 20:24:28 +0100
Subject: [PATCH 11/21] support for vdr-1.7.33, thanks for a patch provided by
 Wolfgang Rohdewald

---
 epgsearchsvdrp.c     | 2 +-
 epgsearchtools.h     | 4 ++++
 mail.c               | 2 +-
 menu_commands.c      | 2 +-
 menu_event.c         | 2 +-
 menu_main.c          | 2 +-
 menu_searchresults.c | 6 +++---
 menu_searchresults.h | 2 +-
 menu_whatson.c       | 4 ++--
 menu_whatson.h       | 2 +-
 services.c           | 2 +-
 11 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/epgsearchsvdrp.c b/epgsearchsvdrp.c
index 4edc640..59c4d1c 100644
--- a/epgsearchsvdrp.c
+++ b/epgsearchsvdrp.c
@@ -560,7 +560,7 @@ cString cPluginEpgsearch::SVDRPCommand(const char *Command, const char *Option,
             strftime(bufStart, sizeof(bufStart), "%H%M", localtime_r(&start, &tm_r));
             strftime(bufEnd, sizeof(bufEnd), "%H%M", localtime_r(&stop, &tm_r));
 
-            int timerMatch;
+            eTimerMatch timerMatch;
             bool hasTimer = false;
             if (Timers.GetMatch(pEvent, &timerMatch))
                hasTimer = (timerMatch == tmFull);
diff --git a/epgsearchtools.h b/epgsearchtools.h
index 94b1378..069cb1e 100644
--- a/epgsearchtools.h
+++ b/epgsearchtools.h
@@ -31,6 +31,10 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
 
 using std::string;
 
+#if VDRVERSNUM < 10733
+#define eTimerMatch int
+#endif 
+
 #define MAXPARSEBUFFER KILOBYTE(10)
 
 #undef CHANNELNAME
diff --git a/mail.c b/mail.c
index 0738fae..0cb9934 100644
--- a/mail.c
+++ b/mail.c
@@ -49,7 +49,7 @@ string cMailTimerNotification::Format(const string& templ) const
     const cEvent* pEvent = GetEvent();
     if (!pEvent) return "";
 
-    int TimerMatch = tmNone;
+    eTimerMatch TimerMatch = tmNone;
     cTimer* pTimer = Timers.GetMatch(pEvent, &TimerMatch);
     if (!pTimer) return "";
 
diff --git a/menu_commands.c b/menu_commands.c
index 9d33863..309aef5 100644
--- a/menu_commands.c
+++ b/menu_commands.c
@@ -121,7 +121,7 @@ eOSState cMenuSearchCommands::Record(void)
 {
    if (!event) return osContinue;
 
-   int timerMatch = tmNone;
+   eTimerMatch timerMatch = tmNone;
    cTimer* timer = Timers.GetMatch(event, &timerMatch);
    if (timerMatch == tmFull)
    {
diff --git a/menu_event.c b/menu_event.c
index b1e8880..a51f56e 100644
--- a/menu_event.c
+++ b/menu_event.c
@@ -95,7 +95,7 @@ void cMenuEventSearch::Set()
       cEventObj* eventObjPrev = GetPrev(event);
       cEventObj* eventObjNext = GetNext(event);
 
-      int timerMatch = tmNone;
+      eTimerMatch timerMatch = tmNone;
       Timers.GetMatch(event, &timerMatch);
       const char* szRed = trVDR("Button$Record");
       if (timerMatch == tmFull)
diff --git a/menu_main.c b/menu_main.c
index 830f43a..a38e640 100644
--- a/menu_main.c
+++ b/menu_main.c
@@ -184,7 +184,7 @@ eOSState cMenuSearchMain::Record(void)
   if (item) {
       if (item->timerMatch == tmFull)
       {
-	  int tm = tmNone;
+	  eTimerMatch tm = tmNone;
 	  cTimer *timer = Timers.GetMatch(item->event, &tm);
 	  if (timer)
 	    {
diff --git a/menu_searchresults.c b/menu_searchresults.c
index b6511b9..6c7c261 100644
--- a/menu_searchresults.c
+++ b/menu_searchresults.c
@@ -77,7 +77,7 @@ bool cMenuSearchResultsItem::Update(bool Force)
 
    bool result = false;
 
-   int OldTimerMatch = timerMatch;
+   eTimerMatch OldTimerMatch = timerMatch;
    bool OldInSwitchList = inSwitchList;
    bool hasMatch = false;
    cTimer* timer = NULL;
@@ -176,7 +176,7 @@ cMenuSearchResultsItem::cMenuSearchResultsItem(cRecording *Recording)
    previewTimer = false;
    episodeOnly = false;
    menuTemplate = NULL;
-   timerMatch = 0;
+   timerMatch = tmNone;
    inSwitchList = false;
    event = NULL;
    search = NULL;
@@ -228,7 +228,7 @@ eOSState cMenuSearchResults::Record(void)
    if (item) {
       if (item->timerMatch == tmFull)
       {
-         int tm = tmNone;
+         eTimerMatch tm = tmNone;
          cTimer *timer = Timers.GetMatch(item->event, &tm);
          if (timer)
 	   {
diff --git a/menu_searchresults.h b/menu_searchresults.h
index fef2055..61634db 100644
--- a/menu_searchresults.h
+++ b/menu_searchresults.h
@@ -50,7 +50,7 @@ class cMenuSearchResultsItem : public cOsdItem {
     bool episodeOnly;
     cMenuTemplate* menuTemplate;
  public:
-    int timerMatch;
+    eTimerMatch timerMatch;
     bool inSwitchList;
     const cEvent *event;
     const cSearchExt* search;
diff --git a/menu_whatson.c b/menu_whatson.c
index 2c907af..4f1cc03 100644
--- a/menu_whatson.c
+++ b/menu_whatson.c
@@ -77,7 +77,7 @@ bool cMenuMyScheduleItem::Update(bool Force)
 
    bool result = false;
 
-   int OldTimerMatch = timerMatch;
+   eTimerMatch OldTimerMatch = timerMatch;
    bool OldInSwitchList = inSwitchList;
    bool hasMatch = false;
    cTimer* timer = NULL;
@@ -520,7 +520,7 @@ eOSState cMenuWhatsOnSearch::Record(void)
    {
       if (item->timerMatch == tmFull)
       {
-         int tm = tmNone;
+         eTimerMatch tm = tmNone;
          cTimer *timer = Timers.GetMatch(item->event, &tm);
          if (timer)
 	   {
diff --git a/menu_whatson.h b/menu_whatson.h
index bc65a7c..fa0f3ec 100644
--- a/menu_whatson.h
+++ b/menu_whatson.h
@@ -35,7 +35,7 @@ public:
   const cEvent *event;
   cChannel *channel;
   showMode mode;
-  int timerMatch;
+  eTimerMatch timerMatch;
   bool inSwitchList;
   cMenuTemplate* menuTemplate;
 
diff --git a/services.c b/services.c
index 985763c..71ecc22 100644
--- a/services.c
+++ b/services.c
@@ -143,7 +143,7 @@ std::list<std::string> cEpgsearchServiceHandler::TranslateResults(cSearchResults
          strftime(bufStart, sizeof(bufStart), "%H%M", localtime_r(&start, &tm_r));
          strftime(bufEnd, sizeof(bufEnd), "%H%M", localtime_r(&stop, &tm_r));
 
-         int timerMatch;
+         eTimerMatch timerMatch;
          bool hasTimer = false;
          if (Timers.GetMatch(pEvent, &timerMatch))
             hasTimer = (timerMatch == tmFull);
-- 
1.7.11.7