diff options
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | remote.c | 8 | ||||
-rw-r--r-- | remote.h | 6 | ||||
-rw-r--r-- | vdr.c | 4 |
4 files changed, 17 insertions, 3 deletions
@@ -3779,3 +3779,5 @@ Video Disk Recorder Revision History SVDRP). - The menu timeout handling is now done centrally in the main program loop. - Added missing help for the 'help' keyword in the SVDRP command PLUG. +- The main menu function of a plugin can now be called programmatically through + the static function cRemote::CallPlugin(). @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: remote.c 1.44 2005/08/14 10:53:55 kls Exp $ + * $Id: remote.c 1.45 2005/09/03 12:29:48 kls Exp $ */ #include "remote.h" @@ -143,6 +143,12 @@ bool cRemote::Put(const char *Code, bool Repeat, bool Release) return false; } +void cRemote::CallPlugin(const char *Plugin) +{ + plugin = Plugin; + Put(k_Plugin); +} + bool cRemote::HasKeys(void) { cMutexLock MutexLock(&mutex); @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: remote.h 1.30 2005/08/13 11:28:10 kls Exp $ + * $Id: remote.h 1.31 2005/09/03 12:28:42 kls Exp $ */ #ifndef __REMOTE_H @@ -44,6 +44,10 @@ public: static void Clear(void); static bool Put(eKeys Key, bool AtFront = false); static bool PutMacro(eKeys Key); + static void CallPlugin(const char *Plugin); + ///< Initiates calling the given plugin's main menu function. + ///< The Plugin parameter is the name of the plugin, and must be + ///< a static string. static const char *GetPlugin(void) { return plugin; } static bool HasKeys(void); static eKeys Get(int WaitMs = 1000, char **UnknownCode = NULL); @@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/vdr * - * $Id: vdr.c 1.213 2005/09/03 11:50:28 kls Exp $ + * $Id: vdr.c 1.214 2005/09/03 12:35:29 kls Exp $ */ #include <getopt.h> @@ -724,6 +724,8 @@ int main(int argc, char *argv[]) ((cOsdMenu*)Menu)->Display(); } } + else + esyslog("ERROR: unknown plugin '%s'", cRemote::GetPlugin()); key = kNone; // nobody else needs to see these keys } break; |