2003-12-22 13:29:24 +01:00
|
|
|
/*
|
|
|
|
* sections.h: Section data handling
|
|
|
|
*
|
|
|
|
* See the main source file 'vdr.c' for copyright information and
|
|
|
|
* how to reach the author.
|
|
|
|
*
|
2021-06-08 15:10:51 +02:00
|
|
|
* $Id: sections.h 5.1 2021/06/08 15:10:51 kls Exp $
|
2003-12-22 13:29:24 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __SECTIONS_H
|
|
|
|
#define __SECTIONS_H
|
|
|
|
|
2004-01-10 11:45:42 +01:00
|
|
|
#include <time.h>
|
2003-12-22 13:29:24 +01:00
|
|
|
#include "filter.h"
|
|
|
|
#include "thread.h"
|
|
|
|
#include "tools.h"
|
|
|
|
|
|
|
|
class cDevice;
|
2004-01-11 15:54:37 +01:00
|
|
|
class cChannel;
|
2003-12-22 13:29:24 +01:00
|
|
|
class cFilterHandle;
|
2004-01-11 15:54:37 +01:00
|
|
|
class cSectionHandlerPrivate;
|
2003-12-22 13:29:24 +01:00
|
|
|
|
|
|
|
class cSectionHandler : public cThread {
|
|
|
|
friend class cFilter;
|
|
|
|
private:
|
2004-01-11 15:54:37 +01:00
|
|
|
cSectionHandlerPrivate *shp;
|
2003-12-22 13:29:24 +01:00
|
|
|
cDevice *device;
|
|
|
|
int statusCount;
|
2004-08-08 14:12:43 +02:00
|
|
|
bool on, waitForLock;
|
2021-06-08 15:10:51 +02:00
|
|
|
bool flush;
|
|
|
|
bool startFilters;
|
|
|
|
cTimeMs flushTimer;
|
2003-12-22 13:29:24 +01:00
|
|
|
cList<cFilter> filters;
|
|
|
|
cList<cFilterHandle> filterHandles;
|
|
|
|
void Add(const cFilterData *FilterData);
|
|
|
|
void Del(const cFilterData *FilterData);
|
|
|
|
virtual void Action(void);
|
|
|
|
public:
|
|
|
|
cSectionHandler(cDevice *Device);
|
|
|
|
virtual ~cSectionHandler();
|
2004-01-11 15:54:37 +01:00
|
|
|
int Source(void);
|
|
|
|
int Transponder(void);
|
|
|
|
const cChannel *Channel(void);
|
2003-12-22 13:29:24 +01:00
|
|
|
void Attach(cFilter *Filter);
|
|
|
|
void Detach(cFilter *Filter);
|
2004-01-11 15:54:37 +01:00
|
|
|
void SetChannel(const cChannel *Channel);
|
2003-12-22 13:29:24 +01:00
|
|
|
void SetStatus(bool On);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //__SECTIONS_H
|