vdr  1.7.27
eitscan.h
Go to the documentation of this file.
00001 /*
00002  * eitscan.h: EIT scanner
00003  *
00004  * See the main source file 'vdr.c' for copyright information and
00005  * how to reach the author.
00006  *
00007  * $Id: eitscan.h 2.1 2012/03/07 13:54:16 kls Exp $
00008  */
00009 
00010 #ifndef __EITSCAN_H
00011 #define __EITSCAN_H
00012 
00013 #include <time.h>
00014 #include "channels.h"
00015 #include "config.h"
00016 #include "device.h"
00017 
00018 class cScanList;
00019 class cTransponderList;
00020 
00021 class cEITScanner {
00022 private:
00023   enum { ActivityTimeout = 60,
00024          ScanTimeout = 20
00025        };
00026   time_t lastScan, lastActivity;
00027   int currentChannel;
00028   cScanList *scanList;
00029   cTransponderList *transponderList;
00030 public:
00031   cEITScanner(void);
00032   ~cEITScanner();
00033   bool Active(void) { return currentChannel || lastActivity == 0; }
00034   void AddTransponder(cChannel *Channel);
00035   void ForceScan(void);
00036   void Activity(void);
00037   void Process(void);
00038   };
00039 
00040 extern cEITScanner EITScanner;
00041 
00042 #endif //__EITSCAN_H