#ifndef VDR_SEARCHTIMER_THREAD_H
#define VDR_SEARCHTIMER_THREAD_H

#include <vdr/thread.h>
#include "epgsearchext.h"

class cSearchTimerThread: public cThread {
private:
        bool m_Active;
        static cSearchTimerThread *m_Instance;
	time_t m_lastUpdate;
protected:
        virtual void Action(void);
	void AddModTimer(cTimer* Timer, int, cSearchExt*, const cEvent*, int Prio, int Lifetime);
        void Stop(void);
	bool NeedUpdate();
	cTimer* GetTimer(cSearchExt *searchExt, const cEvent *pEvent, bool& bTimesMatchExactly);
public:
        cSearchTimerThread(void);
        virtual ~cSearchTimerThread();
        static void Init(void);
        static void Exit(void);
};

#endif 
