summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-07-15 12:39:20 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2000-07-15 12:39:20 +0200
commit20019e7ce51b9e14ce28f96b263b76e6becd4184 (patch)
tree183c0f3bac333786eb71f6825ce40412b8cb7ab4 /config.c
parent5c574ffb7bba34506479247bf6d924e090bc2d10 (diff)
downloadvdr-20019e7ce51b9e14ce28f96b263b76e6becd4184.tar.gz
vdr-20019e7ce51b9e14ce28f96b263b76e6becd4184.tar.bz2
Added support for LIRC remote control0.0.6
Diffstat (limited to 'config.c')
-rw-r--r--config.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/config.c b/config.c
index 7e02c916..16f44124 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c 1.7 2000/05/27 14:44:15 kls Exp $
+ * $Id: config.c 1.8 2000/07/15 12:39:20 kls Exp $
*/
#include "config.h"
@@ -146,6 +146,17 @@ eKeys cKeys::Get(unsigned int Code)
return kNone;
}
+unsigned int cKeys::Encode(const char *Command)
+{
+ if (Command != NULL) {
+ const tKey *k = keys;
+ while ((k->type != kNone) && strncmp(k->name, Command, strlen(k->name)) != 0) // must use 'strncmp()' because LIRC delivers trailing characters!
+ k++;
+ return k->code;
+ }
+ return 0;
+}
+
void cKeys::Set(eKeys Key, unsigned int Code)
{
for (tKey *k = keys; k->type != kNone; k++) {