blob: 970091add031acf9134241f54b0621fe59ba4dd8 (
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
|
/*
* regexp.h: Regular expression list item
*
* See the README file for copyright information and how to reach the author.
*
*/
#ifndef __EPGFIXER_REGEXP_H_
#define __EPGFIXER_REGEXP_H_
#include "tools.h"
#include <vdr/epg.h>
#ifdef HAVE_PCREPOSIX
#include <pcre.h>
#endif
typedef enum { REGEXP_TITLE,REGEXP_SHORTTEXT,REGEXP_DESCRIPTION,REGEXP_UNDEFINED } sources;
class cRegexp : public cListItem
{
private:
char *regexp;
char *replacement;
int replace;
int modifiers;
int source;
pcre *re;
pcre_extra *sd;
void Compile();
void FreeCompiled();
void ParseRegexp(char *restring);
public:
cRegexp();
virtual ~cRegexp();
using cListItem::Apply;
virtual bool Apply(cEvent *Event);
void SetFromString(char *string, bool Enabled);
int GetSource() { return source; };
void ToggleEnabled(void);
};
// Global instance
extern cEpgfixerList<cRegexp, cEvent> EpgfixerRegexps;
#endif //__EPGFIXER_REGEXP_H_
|