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.
|
|
|
|
*
|
2005-09-04 14:48:39 +02:00
|
|
|
* $Id: eitscan.h 1.9 2005/09/04 10:51:35 kls Exp $
|
2002-05-20 11:18:09 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __EITSCAN_H
|
|
|
|
#define __EITSCAN_H
|
|
|
|
|
|
|
|
#include <time.h>
|
2005-09-04 14:48:39 +02:00
|
|
|
#include "channels.h"
|
2002-05-20 11:18:09 +02:00
|
|
|
#include "config.h"
|
2005-09-04 14:48:39 +02:00
|
|
|
#include "device.h"
|
2002-05-20 11:18:09 +02:00
|
|
|
|
2004-01-04 12:30:00 +01:00
|
|
|
class cScanList;
|
2004-01-11 15:54:37 +01:00
|
|
|
class cTransponderList;
|
2004-01-04 12:30:00 +01:00
|
|
|
|
2002-05-20 11:18:09 +02:00
|
|
|
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;
|
2004-01-04 12:30:00 +01:00
|
|
|
cScanList *scanList;
|
2004-01-11 15:54:37 +01:00
|
|
|
cTransponderList *transponderList;
|
2002-05-20 11:18:09 +02:00
|
|
|
public:
|
|
|
|
cEITScanner(void);
|
|
|
|
~cEITScanner();
|
2004-01-17 15:38:11 +01:00
|
|
|
bool Active(void) { return currentChannel || lastActivity == 0; }
|
2003-09-06 13:22:24 +02:00
|
|
|
bool UsesDevice(const cDevice *Device) { return currentDevice == Device; }
|
2004-01-11 15:54:37 +01:00
|
|
|
void AddTransponder(cChannel *Channel);
|
2004-01-17 15:38:11 +01:00
|
|
|
void ForceScan(void);
|
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
|