diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2003-05-09 15:27:46 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2003-05-09 15:27:46 +0200 |
commit | dc8fd12f91713c2eec49ae38ab34f09fd7e73369 (patch) | |
tree | db9d260ccc995af10dbec6b7e1485679f600a341 /plugin.c | |
parent | aaeaf4582dd40677965f562283cf67cf0986eb65 (diff) | |
download | vdr-dc8fd12f91713c2eec49ae38ab34f09fd7e73369.tar.gz vdr-dc8fd12f91713c2eec49ae38ab34f09fd7e73369.tar.bz2 |
Introduced cPlugin::Initialize()
Diffstat (limited to 'plugin.c')
-rw-r--r-- | plugin.c | 25 |
1 files changed, 23 insertions, 2 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: plugin.c 1.8 2002/11/16 14:22:37 kls Exp $ + * $Id: plugin.c 1.9 2003/05/09 15:01:26 kls Exp $ */ #include "plugin.h" @@ -50,6 +50,11 @@ bool cPlugin::ProcessArgs(int argc, char *argv[]) return true; } +bool cPlugin::Initialize(void) +{ + return true; +} + bool cPlugin::Start(void) { return true; @@ -293,6 +298,22 @@ bool cPluginManager::LoadPlugins(bool Log) return true; } +bool cPluginManager::InitializePlugins(void) +{ + for (cDll *dll = dlls.First(); dll; dll = dlls.Next(dll)) { + cPlugin *p = dll->Plugin(); + if (p) { + int Language = Setup.OSDLanguage; + Setup.OSDLanguage = 0; // the i18n texts are only available _after_ Start() + isyslog("initializing plugin: %s (%s): %s", p->Name(), p->Version(), p->Description()); + Setup.OSDLanguage = Language; + if (!p->Initialize()) + return false; + } + } + return true; +} + bool cPluginManager::StartPlugins(void) { for (cDll *dll = dlls.First(); dll; dll = dlls.Next(dll)) { @@ -300,7 +321,7 @@ bool cPluginManager::StartPlugins(void) if (p) { int Language = Setup.OSDLanguage; Setup.OSDLanguage = 0; // the i18n texts are only available _after_ Start() - isyslog("starting plugin: %s (%s): %s", p->Name(), p->Version(), p->Description()); + isyslog("starting plugin: %s", p->Name()); Setup.OSDLanguage = Language; if (!p->Start()) return false; |