--- old/plugin.c +++ new/plugin.c @@ -47,6 +47,8 @@ public: virtual bool Initialize(); virtual bool Start(); virtual void Housekeeping(); + virtual const char **SVDRPHelpPages(void); + virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode); virtual void MainThreadHook(void); virtual const char * MainMenuEntry() { return MAINMENUENTRY; } virtual cOsdObject * MainMenuAction(); @@ -202,6 +204,33 @@ void cPluginGraphLCD::MainThreadHook() mDisplay->Tick(); } +const char **cPluginGraphLCD::SVDRPHelpPages(void) +{ + static const char *HelpPages[] = { + "OFF\n" + " no further acitivies on display", + "ON\n" + " resume ouput on display", + NULL + }; + return HelpPages; +} + +cString cPluginGraphLCD::SVDRPCommand(const char *Command, const char *Option, int &ReplyCode) +{ + if (strcasecmp(Command, "OFF") == 0) { + // we use the default reply code here + GraphLCDSetup.PluginActive = 0; + return "display turned off."; + } + if (strcasecmp(Command, "ON") == 0) { + // we use the default reply code here + GraphLCDSetup.PluginActive = 1; + return "display turned on."; + } + return NULL; +} + cOsdObject * cPluginGraphLCD::MainMenuAction() { return NULL;