mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-12-27 07:11:05 +01:00
Implemented strict locking of global lists
This commit is contained in:
13
filter.h
13
filter.h
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user