The new function cPlugin::MainThreadHook() can be used by plugins to perform actions in the context of the main program thread

This commit is contained in:
Klaus Schmidinger
2006-04-17 10:02:18 +02:00
parent acf716f1ef
commit 8433190d5a
6 changed files with 53 additions and 4 deletions

View File

@@ -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 <name>\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