summaryrefslogtreecommitdiff
path: root/rcu.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-09-29 13:40:45 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-09-29 13:40:45 +0200
commitfc668608474ed16f015f71e57366f6bd2c5d8c8d (patch)
treecc94791b1001e240ded1dc7afdae8ed0e0c1a3b7 /rcu.h
parentf3af8e065a6022ca7234bd6c60e061d2064a6dff (diff)
downloadvdr-fc668608474ed16f015f71e57366f6bd2c5d8c8d.tar.gz
vdr-fc668608474ed16f015f71e57366f6bd2c5d8c8d.tar.bz2
Made remote controls plugin aware
Diffstat (limited to 'rcu.h')
-rw-r--r--rcu.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/rcu.h b/rcu.h
new file mode 100644
index 00000000..1c54999c
--- /dev/null
+++ b/rcu.h
@@ -0,0 +1,44 @@
+/*
+ * rcu.h: RCU remote control
+ *
+ * See the main source file 'vdr.c' for copyright information and
+ * how to reach the author.
+ *
+ * $Id: rcu.h 1.1 2002/09/29 08:56:15 kls Exp $
+ */
+
+#ifndef __RCU_H
+#define __RCU_H
+
+#include "remote.h"
+#include "status.h"
+#include "thread.h"
+
+class cRcuRemote : public cRemote, private cThread, private cStatus {
+private:
+ enum { modeH = 'h', modeB = 'b', modeS = 's' };
+ int f;
+ unsigned char dp, code, mode;
+ int lastNumber;
+ bool receivedCommand;
+ bool SendCommand(unsigned char Cmd);
+ int ReceiveByte(int TimeoutMs = 0);
+ bool SendByteHandshake(unsigned char c);
+ bool SendByte(unsigned char c);
+ bool Digit(int n, int v);
+ bool SetCode(unsigned char Code);
+ bool SetMode(unsigned char Mode);
+ bool Number(int n, bool Hex = false);
+ void SetPoints(unsigned char Dp, bool On);
+ bool String(char *s);
+ bool DetectCode(unsigned char *Code);
+ virtual void Action(void);
+ virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber);
+ virtual void Recording(const cDevice *Device, const char *Name);
+public:
+ cRcuRemote(char *DeviceName);
+ virtual ~cRcuRemote();
+ virtual bool Initialize(void);
+ };
+
+#endif //__RCU_H