mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Introduced cPlugin::Initialize()
This commit is contained in:
		
							
								
								
									
										25
									
								
								plugin.c
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								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.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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user