From 07aebf937a6a196114e7136f77eb5adefa2eeeb1 Mon Sep 17 00:00:00 2001 From: Sascha Volkenandt Date: Fri, 5 Jan 2007 20:31:33 +0000 Subject: - incorporated all code into one shared object - added several functions for timer identification --- timers.h | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'timers.h') diff --git a/timers.h b/timers.h index 339ead4..e6a275d 100644 --- a/timers.h +++ b/timers.h @@ -9,39 +9,29 @@ namespace vdrlive { -class Plugin; - -class SortedTimersInterface: public std::list< cTimer > -{ -public: - virtual ~SortedTimersInterface() {} - - virtual std::string GetTimerId( cTimer const& timer ) = 0; -}; - -class SortedTimers: public SortedTimersInterface +class SortedTimers: public std::list< cTimer > { friend class TimerManager; public: - virtual std::string GetTimerId( cTimer const& timer ); + std::string GetTimerId( cTimer const& timer ); + cTimer* GetByTimerId( std::string const& timerid ); private: SortedTimers(); SortedTimers( SortedTimers const& ); int m_state; - int m_refs; void ReloadTimers( bool initial = false ); }; class TimerManager: public cMutex { - friend TimerManager& Plugin::GetLiveTimerManager(); + friend TimerManager& LiveTimerManager(); public: - SortedTimersInterface& GetTimers() { return m_timers; } + SortedTimers& GetTimers() { return m_timers; } // may only be called from Plugin::MainThreadHook void DoPendingWork(); @@ -53,10 +43,7 @@ private: SortedTimers m_timers; }; -inline TimerManager& LiveTimerManager() -{ - return LivePlugin().GetLiveTimerManager(); -} +TimerManager& LiveTimerManager(); } // namespace vdrlive -- cgit v1.2.3