diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2002-05-13 18:00:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2002-05-13 18:00:00 +0200 |
commit | d07e3829f7c44d713b2677ef73f864af80b3dea3 (patch) | |
tree | 8d6d89b303900b502ec52e83e408795a5728db52 /plugin.h | |
parent | 803c6c6bf6340302f78171892bef599aa272c266 (diff) | |
download | vdr-patch-lnbsharing-d07e3829f7c44d713b2677ef73f864af80b3dea3.tar.gz vdr-patch-lnbsharing-d07e3829f7c44d713b2677ef73f864af80b3dea3.tar.bz2 |
Version 1.1.2vdr-1.1.2
- Changed the cPlugin::Start() function to return a boolean value that indicates
if the plugin will not be able to perform its task (suggested by Stefan Huelswitt).
- Added the cPlugin::Housekeeping() function (suggested by Stefan Huelswitt).
- Updated channels.conf.cable (thanks to Uwe Scheffler).
- Added 'insert' capabilities to cList (suggested by Stefan Huelswitt).
- Changed the 'package' target in the plugin's Makefile to produce a package that
expands to a directory with just the plugin name and version number (suggested
by Stefan Huelswitt).
- Made the config directory available to plugins (suggested by Stefan Huelswitt).
See PLUGINS.html, section "Configuration files" for details.
- Improved the [eid]syslog() macros, so that the LOG_... macros don't need to be
given any more.
Diffstat (limited to 'plugin.h')
-rw-r--r-- | plugin.h | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: plugin.h 1.1 2002/05/09 10:16:09 kls Exp $ + * $Id: plugin.h 1.4 2002/05/13 15:32:14 kls Exp $ */ #ifndef __PLUGIN_H @@ -20,6 +20,7 @@ class cPlugin { friend class cDll; private: + static char *configDirectory; const char *name; void SetName(const char *s); public: @@ -32,7 +33,8 @@ public: virtual const char *CommandLineHelp(void); virtual bool ProcessArgs(int argc, char *argv[]); - virtual void Start(void); + virtual bool Start(void); + virtual void Housekeeping(void); virtual const char *MainMenuEntry(void); virtual cOsdMenu *MainMenuAction(void); @@ -43,6 +45,9 @@ public: void SetupStore(const char *Name, int Value); void RegisterI18n(const tI18nPhrase * const Phrases); + + static void SetConfigDirectory(const char *Dir); + static const char *ConfigDirectory(const char *PluginName = NULL); }; class cDll : public cListObject { @@ -64,6 +69,8 @@ class cPluginManager { private: static cPluginManager *pluginManager; char *directory; + time_t lastHousekeeping; + int nextHousekeeping; cDlls dlls; public: cPluginManager(const char *Directory); @@ -71,7 +78,8 @@ public: void SetDirectory(const char *Directory); void AddPlugin(const char *Args); bool LoadPlugins(bool Log = false); - void StartPlugins(void); + bool StartPlugins(void); + void Housekeeping(void); static bool HasPlugins(void); static cPlugin *GetPlugin(int Index); static cPlugin *GetPlugin(const char *Name); |