diff options
Diffstat (limited to 'plugin.c')
-rw-r--r-- | plugin.c | 27 |
1 files changed, 26 insertions, 1 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.24 2006/10/14 09:49:16 kls Exp $ + * $Id: plugin.c 1.25 2007/02/24 13:44:23 kls Exp $ */ #include "plugin.h" @@ -80,6 +80,11 @@ cString cPlugin::Active(void) return NULL; } +time_t cPlugin::WakeupTime(void) +{ + return 0; +} + const char *cPlugin::MainMenuEntry(void) { return NULL; @@ -403,6 +408,26 @@ bool cPluginManager::Active(const char *Prompt) return false; } +cPlugin *cPluginManager::GetNextWakeupPlugin(void) +{ + cPlugin *NextPlugin = NULL; + if (pluginManager) { + time_t Now = time(NULL); + time_t Next = 0; + for (cDll *dll = pluginManager->dlls.First(); dll; dll = pluginManager->dlls.Next(dll)) { + cPlugin *p = dll->Plugin(); + if (p) { + time_t t = p->WakeupTime(); + if (t > Now && (!Next || t < Next)) { + Next = t; + NextPlugin = p; + } + } + } + } + return NextPlugin; +} + bool cPluginManager::HasPlugins(void) { return pluginManager && pluginManager->dlls.Count(); |