pin & epgsearch plugins compatibility

Message ID 4D28E5B7.1020405@centrum.cz
State New
Headers

Commit Message

jdobry@centrum.cz Jan. 8, 2011, 10:31 p.m. UTC
  Hello all,

I found that pin & epgsearch plugins are not compatible if it is 
compiled on 1.7.16 (maybe more versions).

Patch for epgsearch-0.9.25.beta18 is in attachment

Jiri Dobry
  

Comments

Christian Wieninger Jan. 9, 2011, 12:54 p.m. UTC | #1
Hi Jiri,

thanks for the patch. I just lost track about the pin patch ;-)
I've just added it to the git and uploaded a new beta too.

Cheers,
Christian

Am 08.01.2011 23:31, schrieb jdobry@centrum.cz:
> Hello all,
>
> I found that pin & epgsearch plugins are not compatible if it is 
> compiled on 1.7.16 (maybe more versions).
>
> Patch for epgsearch-0.9.25.beta18 is in attachment
>
> Jiri Dobry
>
>
> _______________________________________________
> vdr mailing list
> vdr@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
  
Helmut Auer Jan. 22, 2011, 3:49 p.m. UTC | #2
Hello
>
> I found that pin&  epgsearch plugins are not compatible if it is
> compiled on 1.7.16 (maybe more versions).
>
> Patch for epgsearch-0.9.25.beta18 is in attachment
>
This patch doesn't compile on my system.
 >menu_commands.c: In member function ‘virtual eOSState cMenuSearchCommands::Record()’:
 >menu_commands.c:168:62: error: ‘tfProtected’ was not declared in this scope

Where is tfProtected defined ?
  

Patch

diff -rupN epgsearch-0.9.25.beta18/menu_commands.c epgsearch-0.9.25.beta18-1/menu_commands.c
--- epgsearch-0.9.25.beta18/menu_commands.c	2010-09-19 20:01:58.000000000 +0200
+++ epgsearch-0.9.25.beta18-1/menu_commands.c	2011-01-08 22:42:28.000000000 +0100
@@ -165,7 +165,7 @@  eOSState cMenuSearchCommands::Record(voi
       }
 #ifdef USE_PINPLUGIN
       aux = "";
-      aux = UpdateAuxValue(aux, "protected", timer->FskProtection() ? "yes" : "no");
+      aux = UpdateAuxValue(aux, "protected", timer->HasFlags(tfProtected) ? "yes" : "no");
       fullaux = UpdateAuxValue(fullaux, "pin-plugin", aux);
 #endif
 
diff -rupN epgsearch-0.9.25.beta18/menu_main.c epgsearch-0.9.25.beta18-1/menu_main.c
--- epgsearch-0.9.25.beta18/menu_main.c	2010-09-19 20:01:58.000000000 +0200
+++ epgsearch-0.9.25.beta18-1/menu_main.c	2011-01-08 22:42:46.000000000 +0100
@@ -226,7 +226,7 @@  eOSState cMenuSearchMain::Record(void)
 	 }
 #ifdef USE_PINPLUGIN
       aux = "";
-      aux = UpdateAuxValue(aux, "protected", timer->FskProtection() ? "yes" : "no");
+      aux = UpdateAuxValue(aux, "protected", timer->HasFlags(tfProtected) ? "yes" : "no");
       fullaux = UpdateAuxValue(fullaux, "pin-plugin", aux);
 #endif
 
diff -rupN epgsearch-0.9.25.beta18/menu_myedittimer.c epgsearch-0.9.25.beta18-1/menu_myedittimer.c
--- epgsearch-0.9.25.beta18/menu_myedittimer.c	2010-09-19 20:01:57.000000000 +0200
+++ epgsearch-0.9.25.beta18-1/menu_myedittimer.c	2011-01-08 22:59:59.000000000 +0100
@@ -34,6 +34,9 @@  The project's page is at http://winni.vd
 #include "menu_deftimercheckmethod.h"
 #include "timerstatus.h"
 #include <math.h>
+#ifdef USE_PINPLUGIN
+#include "../pin/pin.h"
+#endif
 
 const char *cMenuMyEditTimer::CheckModes[3];
 
@@ -63,7 +66,7 @@  cMenuMyEditTimer::cMenuMyEditTimer(cTime
 	strcpy(file, Timer->File());
 	channel = Timer->Channel()->Number();
 #ifdef USE_PINPLUGIN
-    fskProtection = Timer->FskProtection();  
+    fskProtection = Timer->HasFlags(tfProtected);  
 #endif
 	if (forcechannel)
 	    channel = forcechannel->Number();
@@ -125,7 +128,7 @@  void cMenuMyEditTimer::Set()
     Add(new cMenuEditStrItem( tr("Directory"), directory, MaxFileName, tr(AllowedChars)));
     Add(new cMenuEditBitItem( trVDR("Active"),       &flags, tfActive));
 #ifdef USE_PINPLUGIN
-    if (cOsd::pinValid) Add(new cMenuEditChanItem(tr("Channel"), &channel));
+    if (PinService::pinValid) Add(new cMenuEditChanItem(tr("Channel"), &channel));
     else {
       cString buf = cString::sprintf("%s\t%s", tr("Channel"), Channels.GetByNumber(channel)->Name());
       Add(new cOsdItem(buf));
@@ -144,7 +147,7 @@  void cMenuMyEditTimer::Set()
     Add(new cMenuEditIntItem( trVDR("Priority"),     &priority, 0, MAXPRIORITY));
     Add(new cMenuEditIntItem( trVDR("Lifetime"),     &lifetime, 0, MAXLIFETIME));
 #ifdef USE_PINPLUGIN
-    if (cOsd::pinValid || !fskProtection) Add(new cMenuEditBoolItem(tr("Childlock"),&fskProtection));
+    if (PinService::pinValid || !fskProtection) Add(new cMenuEditBoolItem(tr("Childlock"),&fskProtection));
     else {
       cString buf = cString::sprintf("%s\t%s", tr("Childlock"), fskProtection ? trVDR("yes") : trVDR("no"));
       Add(new cOsdItem(buf));
diff -rupN epgsearch-0.9.25.beta18/menu_searchresults.c epgsearch-0.9.25.beta18-1/menu_searchresults.c
--- epgsearch-0.9.25.beta18/menu_searchresults.c	2010-09-19 20:01:56.000000000 +0200
+++ epgsearch-0.9.25.beta18-1/menu_searchresults.c	2011-01-08 22:44:10.000000000 +0100
@@ -259,7 +259,7 @@  eOSState cMenuSearchResults::Record(void
 
 #ifdef USE_PINPLUGIN
          aux = "";
-         aux = UpdateAuxValue(aux, "protected", timer->FskProtection() ? "yes" : "no");
+         aux = UpdateAuxValue(aux, "protected", timer->HasFlags(tfProtected) ? "yes" : "no");
          fullaux = UpdateAuxValue(fullaux, "pin-plugin", aux);
 #endif
 
diff -rupN epgsearch-0.9.25.beta18/menu_whatson.c epgsearch-0.9.25.beta18-1/menu_whatson.c
--- epgsearch-0.9.25.beta18/menu_whatson.c	2010-11-24 19:14:00.000000000 +0100
+++ epgsearch-0.9.25.beta18-1/menu_whatson.c	2011-01-08 22:44:01.000000000 +0100
@@ -580,7 +580,7 @@  eOSState cMenuWhatsOnSearch::Record(void
          }
 #ifdef USE_PINPLUGIN
          aux = "";
-         aux = UpdateAuxValue(aux, "protected", timer->FskProtection() ? "yes" : "no");
+         aux = UpdateAuxValue(aux, "protected", timer->HasFlags(tfProtected) ? "yes" : "no");
          fullaux = UpdateAuxValue(fullaux, "pin-plugin", aux);
 #endif
          SetAux(timer, fullaux);