vdr  2.2.0
filter.h
Go to the documentation of this file.
1 /*
2  * filter.h: Section filter
3  *
4  * See the main source file 'vdr.c' for copyright information and
5  * how to reach the author.
6  *
7  * $Id: filter.h 3.0 2004/01/11 13:31:59 kls Exp $
8  */
9 
10 #ifndef __FILTER_H
11 #define __FILTER_H
12 
13 #include <sys/types.h>
14 #include "tools.h"
15 
17 private:
19  bool synced;
20 public:
21  cSectionSyncer(void);
22  void Reset(void);
23  bool Sync(uchar Version, int Number, int LastNumber);
24  };
25 
26 class cFilterData : public cListObject {
27 public:
28  u_short pid;
31  bool sticky;
32  cFilterData(void);
33  cFilterData(u_short Pid, u_char Tid, u_char Mask, bool Sticky);
34  bool Is(u_short Pid, u_char Tid, u_char Mask);
35  bool Matches(u_short Pid, u_char Tid);
36  };
37 
38 class cChannel;
39 class cSectionHandler;
40 
41 class cFilter : public cListObject {
42  friend class cSectionHandler;
43 private:
46  bool on;
47 protected:
48  cFilter(void);
49  cFilter(u_short Pid, u_char Tid, u_char Mask = 0xFF);
50  virtual ~cFilter();
51  virtual void SetStatus(bool On);
58  virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length) = 0;
69  int Source(void);
71  int Transponder(void);
73  const cChannel *Channel(void);
75  bool Matches(u_short Pid, u_char Tid);
77  void Set(u_short Pid, u_char Tid, u_char Mask = 0xFF);
79  void Add(u_short Pid, u_char Tid, u_char Mask = 0xFF, bool Sticky = false);
83  void Del(u_short Pid, u_char Tid, u_char Mask = 0xFF);
85  };
86 
87 #endif //__FILTER_H
bool synced
Definition: filter.h:19
unsigned char uchar
Definition: tools.h:30
bool sticky
Definition: filter.h:31
int Transponder(void)
Definition: sections.c:69
int lastVersion
Definition: filter.h:18
const cChannel * Channel(void)
Definition: sections.c:74
cList< cFilterData > data
Definition: filter.h:45
void SetStatus(bool On)
Definition: sections.c:146
bool on
Definition: filter.h:46
u_short pid
Definition: filter.h:28
void Add(const cFilterData *FilterData)
Definition: sections.c:79
Definition: filter.h:41
friend class cFilter
Definition: sections.h:24
bool Sync(uchar Version, int Number, int LastNumber)
Definition: filter.c:26
int Source(void)
Definition: sections.c:64
cSectionSyncer(void)
Definition: filter.c:15
u_char mask
Definition: filter.h:30
cSectionHandler * sectionHandler
Definition: filter.h:44
u_char tid
Definition: filter.h:29
unsigned char u_char
Definition: headers.h:24
void Reset(void)
Definition: filter.c:20
void Del(const cFilterData *FilterData)
Definition: sections.c:101