diff options
author | Sascha Volkenandt <sascha (at) akv-soft (dot) de> | 2007-01-05 20:31:33 +0000 |
---|---|---|
committer | Sascha Volkenandt <sascha (at) akv-soft (dot) de> | 2007-01-05 20:31:33 +0000 |
commit | 07aebf937a6a196114e7136f77eb5adefa2eeeb1 (patch) | |
tree | 64fe06420e825f80e02ec9e9f3198306b79d42ab /timers.h | |
parent | 8d278564f8350647964b5b9ccf3a6183ac7e2f0e (diff) | |
download | vdr-plugin-live-07aebf937a6a196114e7136f77eb5adefa2eeeb1.tar.gz vdr-plugin-live-07aebf937a6a196114e7136f77eb5adefa2eeeb1.tar.bz2 |
- incorporated all code into one shared object
- added several functions for timer identification
Diffstat (limited to 'timers.h')
-rw-r--r-- | timers.h | 25 |
1 files changed, 6 insertions, 19 deletions
@@ -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 |