summaryrefslogtreecommitdiff
path: root/sections.h
blob: a62a2f7141908ad798cda09695b6f7c1efd1be17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * sections.h: Section data handling
 *
 * See the main source file 'vdr.c' for copyright information and
 * how to reach the author.
 *
 * $Id: sections.h 1.2 2004/01/10 11:42:49 kls Exp $
 */

#ifndef __SECTIONS_H
#define __SECTIONS_H

#include <time.h>
#include "filter.h"
#include "thread.h"
#include "tools.h"

class cDevice;
class cFilterHandle;

class cSectionHandler : public cThread {
  friend class cFilter;
private:
  cDevice *device;
  bool active;
  int source;
  int transponder;
  int statusCount;
  bool on;
  time_t lastIncompleteSection;
  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();
  int Source(void) { return source; }
  int Transponder(void) { return transponder; }
  void Attach(cFilter *Filter);
  void Detach(cFilter *Filter);
  void SetSource(int Source, int Transponder);
  void SetStatus(bool On);
  };

#endif //__SECTIONS_H