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 --- newplugin | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'newplugin') diff --git a/newplugin b/newplugin index 9ac83c85..2a7cac2a 100755 --- a/newplugin +++ b/newplugin @@ -12,7 +12,7 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: newplugin 1.25 2006/04/16 09:04:21 kls Exp $ +# $Id: newplugin 1.26 2006/04/17 09:49:13 kls Exp $ $PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin \n"; @@ -165,6 +165,7 @@ public: virtual bool Start(void); virtual void Stop(void); virtual void Housekeeping(void); + virtual void MainThreadHook(void); virtual cString Active(void); virtual const char *MainMenuEntry(void) { return MAINMENUENTRY; } virtual cOsdObject *MainMenuAction(void); @@ -221,6 +222,12 @@ void cPlugin${PLUGIN_CLASS}::Housekeeping(void) // Perform any cleanup or other regular tasks. } +void cPlugin${PLUGIN_CLASS}::MainThreadHook(void) +{ + // Perform actions in the context of the main program thread. + // WARNING: Use with great care - see PLUGINS.html! +} + cString cPlugin${PLUGIN_CLASS}::Active(void) { // Return a message string if shutdown should be postponed -- cgit v1.2.3