/* * 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 #ifdef HAVE_PCREPOSIX #include #endif typedef enum { REGEXP_TITLE,REGEXP_SHORTTEXT,REGEXP_DESCRIPTION,REGEXP_UNDEFINED } sources; class cRegexp : public cListItem { private: char *regexp; int source; pcre *re; pcre_extra *sd; void Compile(); void FreeCompiled(); 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 EpgfixerRegexps; #endif //__EPGFIXER_REGEXP_H_