From 8433190d5a461248552d3e41c5863ca608f12cda Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Mon, 17 Apr 2006 10:02:18 +0200 Subject: The new function cPlugin::MainThreadHook() can be used by plugins to perform actions in the context of the main program thread --- plugin.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'plugin.c') diff --git a/plugin.c b/plugin.c index 88841899..82cbd692 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.21 2006/04/16 09:23:30 kls Exp $ + * $Id: plugin.c 1.22 2006/04/17 09:20:05 kls Exp $ */ #include "plugin.h" @@ -70,6 +70,10 @@ void cPlugin::Housekeeping(void) { } +void cPlugin::MainThreadHook(void) +{ +} + cString cPlugin::Active(void) { return NULL; @@ -370,6 +374,15 @@ void cPluginManager::Housekeeping(void) } } +void cPluginManager::MainThreadHook(void) +{ + for (cDll *dll = pluginManager->dlls.First(); dll; dll = pluginManager->dlls.Next(dll)) { + cPlugin *p = dll->Plugin(); + if (p) + p->MainThreadHook(); + } +} + bool cPluginManager::Active(const char *Prompt) { if (pluginManager) { -- cgit v1.2.3