summaryrefslogtreecommitdiff
path: root/plugin.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-04-15 11:18:36 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-04-15 11:18:36 +0200
commit4ba450b7372709507a8602ae5c80b47ef39b6d38 (patch)
tree325667a6b015156e4e25c5f14bf6b02959bff064 /plugin.c
parent3d8a9c965366f35ceeadcceb9744ef0fc8f26455 (diff)
downloadvdr-4ba450b7372709507a8602ae5c80b47ef39b6d38.tar.gz
vdr-4ba450b7372709507a8602ae5c80b47ef39b6d38.tar.bz2
Implemented cPlugin::Active()
Diffstat (limited to 'plugin.c')
-rw-r--r--plugin.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/plugin.c b/plugin.c
index fc1a25ac..4f673f76 100644
--- a/plugin.c
+++ b/plugin.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: plugin.c 1.19 2006/04/14 11:45:43 kls Exp $
+ * $Id: plugin.c 1.20 2006/04/15 11:17:03 kls Exp $
*/
#include "plugin.h"
@@ -14,6 +14,7 @@
#include <stdlib.h>
#include <time.h>
#include "config.h"
+#include "interface.h"
#define LIBVDR_PREFIX "libvdr-"
#define SO_INDICATOR ".so."
@@ -69,6 +70,11 @@ void cPlugin::Housekeeping(void)
{
}
+cString cPlugin::Active(void)
+{
+ return NULL;
+}
+
const char *cPlugin::MainMenuEntry(void)
{
return NULL;
@@ -364,6 +370,23 @@ void cPluginManager::Housekeeping(void)
}
}
+bool cPluginManager::Active(const char *Prompt)
+{
+ if (pluginManager) {
+ for (cDll *dll = pluginManager->dlls.First(); dll; dll = pluginManager->dlls.Next(dll)) {
+ cPlugin *p = dll->Plugin();
+ if (p) {
+ cString s = p->Active();
+ if (!isempty(*s)) {
+ if (!Prompt || !Interface->Confirm(cString::sprintf("%s - %s", *s, Prompt)))
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
bool cPluginManager::HasPlugins(void)
{
return pluginManager && pluginManager->dlls.Count();