diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2007-04-30 12:53:35 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2007-04-30 12:53:35 +0200 |
commit | 6e93ac95258aeb37b6b642484ccaa37e091b84ab (patch) | |
tree | 2f967a2c89c9b9910ab5896f8d538f73e7a6613d /svdrp.c | |
parent | d8264ee1b2c6331bbf5979e6e8dff1e2c00d95bf (diff) | |
download | vdr-6e93ac95258aeb37b6b642484ccaa37e091b84ab.tar.gz vdr-6e93ac95258aeb37b6b642484ccaa37e091b84ab.tar.bz2 |
Implemented the SVDRP command REMO
Diffstat (limited to 'svdrp.c')
-rw-r--r-- | svdrp.c | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -10,7 +10,7 @@ * and interact with the Video Disk Recorder - or write a full featured * graphical interface that sits on top of an SVDRP connection. * - * $Id: svdrp.c 1.100 2006/08/12 09:09:55 kls Exp $ + * $Id: svdrp.c 1.101 2007/04/30 12:41:07 kls Exp $ */ #include "svdrp.h" @@ -290,6 +290,9 @@ const char *HelpPages[] = { " format defined in vdr(5) for the 'epg.data' file. A '.' on a line\n" " by itself terminates the input and starts processing of the data (all\n" " entered data is buffered until the terminating '.' is seen).", + "REMO [ on | off ]\n" + " Turns the remote control on or off. Without a parameter, the current\n" + " status of the remote control is reported.", "SCAN\n" " Forces an EPG scan. If this is a single DVB device system, the scan\n" " will be done on the primary device unless it is currently recording.", @@ -1406,6 +1409,24 @@ void cSVDRP::CmdPUTE(const char *Option) DELETENULL(PUTEhandler); } +void cSVDRP::CmdREMO(const char *Option) +{ + if (*Option) { + if (!strcasecmp(Option, "ON")) { + cRemote::SetEnabled(true); + Reply(250, "Remote control enabled"); + } + else if (!strcasecmp(Option, "OFF")) { + cRemote::SetEnabled(false); + Reply(250, "Remote control disabled"); + } + else + Reply(501, "Invalid Option \"%s\"", Option); + } + else + Reply(250, "Remote control is %s", cRemote::Enabled() ? "enabled" : "disabled"); +} + void cSVDRP::CmdSCAN(const char *Option) { EITScanner.ForceScan(); @@ -1526,6 +1547,7 @@ void cSVDRP::Execute(char *Cmd) else if (CMD("PLAY")) CmdPLAY(s); else if (CMD("PLUG")) CmdPLUG(s); else if (CMD("PUTE")) CmdPUTE(s); + else if (CMD("REMO")) CmdREMO(s); else if (CMD("SCAN")) CmdSCAN(s); else if (CMD("STAT")) CmdSTAT(s); else if (CMD("UPDT")) CmdUPDT(s); |