From ad40eaa28e6e9f0fa594937453b5ae53b88dce75 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 28 Aug 2005 18:00:00 +0200 Subject: =?UTF-8?q?Version=201.3.31=20-=20Added=20missing=20German=20OSD?= =?UTF-8?q?=20texts=20for=20'Audio=20language'.=20-=20The=20Setup/CICAM=20?= =?UTF-8?q?menu=20now=20only=20contains=20the=20devices=20that=20actually?= =?UTF-8?q?=20have=20a=20CI=20and=20=20=20dynamically=20detects=20the=20nu?= =?UTF-8?q?mber=20of=20slots=20a=20CI=20provides.=20-=20Implemented=20cAud?= =?UTF-8?q?ioRepacker=20for=20better=20handling=20of=20audio=20PES=20packe?= =?UTF-8?q?ts=20(thanks=20to=20=20=20Reinhard=20Nissl).=20-=20Modified=20h?= =?UTF-8?q?andling=20of=20audio=20packets=20for=20radio=20channels=20in=20?= =?UTF-8?q?remux.c=20(thanks=20to=20=20=20Reinhard=20Nissl).=20-=20Updated?= =?UTF-8?q?=20the=20Danish=20OSD=20texts=20(thanks=20to=20Mogens=20Elneff)?= =?UTF-8?q?.=20-=20Fixed=20the=20EPG=20scan,=20so=20that=20it=20doesn't=20?= =?UTF-8?q?use=20the=20primary=20device=20if=20that=20is=20=20=20currently?= =?UTF-8?q?=20in=20Transfer-Mode=20from=20itself=20(thanks=20to=20Marcus?= =?UTF-8?q?=20Hilbrich=20for=20a=20bug=20=20=20report=20that=20lead=20to?= =?UTF-8?q?=20this).=20-=20Removed=20the=20TUNER=5FLOCK=5FTIMEOUT=20in=20c?= =?UTF-8?q?Device::AttachReceiver()=20since=20it=20caused=20more=20=20=20t?= =?UTF-8?q?rouble=20than=20it=20fixed.=20-=20Fixed=20detecting=20short=20c?= =?UTF-8?q?hannel=20names=20for=20"Kabel=20Deutschland",=20who=20uses=20a?= =?UTF-8?q?=20comma=20=20=20as=20delimiter=20(thanks=20to=20Marco=20Schl?= =?UTF-8?q?=C3=BC=C3=9Fler).=20-=20Moved=20cMenuEditTimer=20and=20cMenuEve?= =?UTF-8?q?nt=20to=20menu.h=20so=20that=20plugins=20can=20use=20it=20(sugg?= =?UTF-8?q?ested=20=20=20by=20Thomas=20G=C3=BCnther).=20-=20The=20new=20st?= =?UTF-8?q?atic=20function=20cString::sprintf()=20can=20be=20used=20to=20e?= =?UTF-8?q?asily=20create=20a=20formatted=20=20=20string.=20-=20Plugins=20?= =?UTF-8?q?can=20now=20implement=20their=20own=20SVDRP=20commands=20(based?= =?UTF-8?q?=20on=20a=20patch=20from=20Hardy=20=20=20Flor).=20See=20PLUGINS?= =?UTF-8?q?.html,=20section=20"SVDRP=20commands"=20for=20details.=20The=20?= =?UTF-8?q?SVDRP=20commands=20=20=20of=20a=20plugin=20are=20accessed=20thr?= =?UTF-8?q?ough=20the=20new=20SVDRP=20command=20PLUG.=20=20=20See=20PLUGIN?= =?UTF-8?q?S/src/svdrpdemo=20for=20an=20example=20of=20how=20to=20use=20th?= =?UTF-8?q?is=20feature.=20-=20The=20new=20SVDRP=20command=20PLAY=20can=20?= =?UTF-8?q?be=20used=20to=20start=20replaying=20a=20recording=20(thanks=20?= =?UTF-8?q?to=20=20=20Hardy=20Flor).=20-=20The=20new=20SVDRP=20command=20E?= =?UTF-8?q?DIT=20can=20be=20used=20to=20start=20the=20editing=20process=20?= =?UTF-8?q?of=20a=20recording=20=20=20(based=20on=20the=20CUTR=20patch=20b?= =?UTF-8?q?y=20Harald=20Milz).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PLUGINS/src/svdrpdemo/svdrpdemo.c | 60 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 PLUGINS/src/svdrpdemo/svdrpdemo.c (limited to 'PLUGINS/src/svdrpdemo/svdrpdemo.c') diff --git a/PLUGINS/src/svdrpdemo/svdrpdemo.c b/PLUGINS/src/svdrpdemo/svdrpdemo.c new file mode 100644 index 0000000..b6ee9a7 --- /dev/null +++ b/PLUGINS/src/svdrpdemo/svdrpdemo.c @@ -0,0 +1,60 @@ +/* + * svdrpdemo.c: A plugin for the Video Disk Recorder + * + * See the README file for copyright information and how to reach the author. + * + * $Id: svdrpdemo.c 1.1 2005/08/27 16:28:58 kls Exp $ + */ + +#include + +static const char *VERSION = "0.0.1"; +static const char *DESCRIPTION = "How to add SVDRP support to a plugin"; +static const char *MAINMENUENTRY = NULL; + +class cPluginSvdrpdemo : public cPlugin { +private: + // Add any member variables or functions you may need here. +public: + virtual const char *Version(void) { return VERSION; } + virtual const char *Description(void) { return DESCRIPTION; } + virtual const char **SVDRPHelpPages(void); + virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode); + }; + +const char **cPluginSvdrpdemo::SVDRPHelpPages(void) +{ + static const char *HelpPages[] = { + "DATE\n" + " Print the current date.", + "TIME [ raw ]\n" + " Print the current time.\n" + " If the optional keyword 'raw' is given, the result will be the\n" + " raw time_t data.", + NULL + }; + return HelpPages; +} + +cString cPluginSvdrpdemo::SVDRPCommand(const char *Command, const char *Option, int &ReplyCode) +{ + if (strcasecmp(Command, "DATE") == 0) { + // we use the default reply code here + return DateString(time(NULL)); + } + else if (strcasecmp(Command, "TIME") == 0) { + ReplyCode = 901; + if (*Option) { + if (strcasecmp(Option, "RAW") == 0) + return cString::sprintf("%ld\nThis is the number of seconds since the epoch\nand a demo of a multi-line reply", time(NULL)); + else { + ReplyCode = 504; + return cString::sprintf("Unknown option: \"%s\"", Option); + } + } + return TimeString(time(NULL)); + } + return NULL; +} + +VDRPLUGINCREATOR(cPluginSvdrpdemo); // Don't touch this! -- cgit v1.2.3