2002-05-20 11:18:09 +02:00
|
|
|
/*
|
|
|
|
* eitscan.h: EIT scanner
|
|
|
|
*
|
|
|
|
* See the main source file 'vdr.c' for copyright information and
|
|
|
|
* how to reach the author.
|
|
|
|
*
|
2003-09-06 13:22:24 +02:00
|
|
|
* $Id: eitscan.h 1.4 2003/09/06 13:05:51 kls Exp $
|
2002-05-20 11:18:09 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __EITSCAN_H
|
|
|
|
#define __EITSCAN_H
|
|
|
|
|
|
|
|
#include <time.h>
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
class cEITScanner {
|
|
|
|
private:
|
|
|
|
enum { ActivityTimeout = 60,
|
|
|
|
ScanTimeout = 20
|
|
|
|
};
|
|
|
|
time_t lastScan, lastActivity;
|
2003-09-06 13:22:24 +02:00
|
|
|
cDevice *currentDevice;
|
2003-03-16 13:29:55 +01:00
|
|
|
int currentChannel;
|
|
|
|
int lastChannel[MAXDEVICES];
|
2002-05-20 11:18:09 +02:00
|
|
|
int numTransponders, *transponders;
|
|
|
|
bool TransponderScanned(cChannel *Channel);
|
|
|
|
public:
|
|
|
|
cEITScanner(void);
|
|
|
|
~cEITScanner();
|
|
|
|
bool Active(void) { return currentChannel; }
|
2003-09-06 13:22:24 +02:00
|
|
|
bool UsesDevice(const cDevice *Device) { return currentDevice == Device; }
|
2002-05-20 11:18:09 +02:00
|
|
|
void Activity(void);
|
|
|
|
void Process(void);
|
|
|
|
};
|
|
|
|
|
2003-05-24 13:38:28 +02:00
|
|
|
extern cEITScanner EITScanner;
|
|
|
|
|
2002-05-20 11:18:09 +02:00
|
|
|
#endif //__EITSCAN_H
|