1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00
vdr/rcu.h

47 lines
1.3 KiB
C
Raw Permalink Normal View History

2002-09-29 13:40:45 +02:00
/*
* 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.7 2007/08/24 13:15:48 kls Exp $
2002-09-29 13:40:45 +02:00
*/
#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 number;
unsigned int data;
2002-09-29 13:40:45 +02:00
bool receivedCommand;
bool SendCommand(unsigned char Cmd);
int ReceiveByte(int TimeoutMs = 0);
bool SendByteHandshake(unsigned char c);
bool SendByte(unsigned char c);
bool SendData(unsigned int n);
void SetCode(unsigned char Code);
void SetMode(unsigned char Mode);
void SetNumber(int n, bool Hex = false);
2002-09-29 13:40:45 +02:00
void SetPoints(unsigned char Dp, bool On);
void SetString(const char *s);
2002-09-29 13:40:45 +02:00
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, const char *FileName, bool On);
2002-09-29 13:40:45 +02:00
public:
cRcuRemote(const char *DeviceName);
2002-09-29 13:40:45 +02:00
virtual ~cRcuRemote();
virtual bool Ready(void);
2002-09-29 13:40:45 +02:00
virtual bool Initialize(void);
};
#endif //__RCU_H