diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2015-09-01 11:14:27 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2015-09-01 11:14:27 +0200 |
commit | 3cd5294d8a337ee5cd2ec894c9fbe04ad3a7690d (patch) | |
tree | da57ce74189de9bfb27e1a747063c37cd62de501 /filter.h | |
parent | 8a7bc6a0bbf60cae8b6391a630880aad5cba3363 (diff) | |
download | vdr-3cd5294d8a337ee5cd2ec894c9fbe04ad3a7690d.tar.gz vdr-3cd5294d8a337ee5cd2ec894c9fbe04ad3a7690d.tar.bz2 |
Implemented strict locking of global lists
Diffstat (limited to 'filter.h')
-rw-r--r-- | filter.h | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: filter.h 4.1 2015/03/17 15:00:08 kls Exp $ + * $Id: filter.h 4.2 2015/07/25 10:03:44 kls Exp $ */ #ifndef __FILTER_H @@ -15,13 +15,18 @@ class cSectionSyncer { private: - int lastVersion; - int thisVersion; - int nextNumber; + int currentVersion; + int currentSection; + bool synced; + bool complete; + uchar sections[32]; // holds 32 * 8 = 256 bits, as flags for the sections + void SetSectionFlag(uchar Section, bool On) { if (On) sections[Section / 8] |= (1 << (Section % 8)); else sections[Section / 8] &= ~(1 << (Section % 8)); } + bool GetSectionFlag(uchar Section) { return sections[Section / 8] & (1 << (Section % 8)); } public: cSectionSyncer(void); void Reset(void); void Repeat(void); + bool Complete(void) { return complete; } bool Sync(uchar Version, int Number, int LastNumber); }; |