mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
- Changed name from 'osm' to 'vdr' to avoid mixups with the 'oms' program that appears to be in use with DVD replay. - Implemented a channel display in the top menu line. - Implemented replay progress display (press "Ok" when replaying to bring it up). - Implemented direct channel selecting by pressing the numeric keys. - Added several 'const' keywords to please stricter compilers. - The repeat function for the remote control no longer adapts dynamically to the timing of the RCU (this sometimes caused the repeat function to kick in too early). - Channel selection is now blocked when recording or replaying. - Improved process handling.
45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
/*
|
|
* remote.h: Interface to the Remote Control Unit
|
|
*
|
|
* See the main source file 'vdr.c' for copyright information and
|
|
* how to reach the author.
|
|
*
|
|
* $Id: remote.h 1.4 2000/04/24 09:46:00 kls Exp $
|
|
*/
|
|
|
|
#ifndef __REMOTE_H
|
|
#define __REMOTE_H
|
|
|
|
#include <stdio.h>
|
|
#include <time.h>
|
|
|
|
class cRcIo {
|
|
private:
|
|
int f;
|
|
unsigned char dp, code, mode;
|
|
unsigned short address;
|
|
time_t t;
|
|
int firstTime, lastTime;
|
|
unsigned int lastCommand;
|
|
bool SendCommand(unsigned char Cmd);
|
|
int ReceiveByte(bool Wait = true);
|
|
bool SendByteHandshake(unsigned char c);
|
|
bool SendByte(unsigned char c);
|
|
public:
|
|
enum { modeH = 'h', modeB = 'b', modeS = 's' };
|
|
cRcIo(char *DeviceName);
|
|
~cRcIo();
|
|
bool InputAvailable(bool Wait = false);
|
|
void Flush(int WaitSeconds = 0);
|
|
bool SetCode(unsigned char Code, unsigned short Address);
|
|
bool SetMode(unsigned char Mode);
|
|
bool GetCommand(unsigned int *Command, unsigned short *Address = NULL);
|
|
bool Digit(int n, int v);
|
|
bool Number(int n, bool Hex = false);
|
|
void Points(unsigned char Dp) { dp = Dp; }
|
|
bool String(char *s);
|
|
bool DetectCode(unsigned char *Code, unsigned short *Address);
|
|
};
|
|
|
|
#endif //__REMOTE_H
|