summaryrefslogtreecommitdiff
path: root/timers.h
diff options
context:
space:
mode:
authorSascha Volkenandt <sascha (at) akv-soft (dot) de>2007-01-05 20:31:33 +0000
committerSascha Volkenandt <sascha (at) akv-soft (dot) de>2007-01-05 20:31:33 +0000
commit07aebf937a6a196114e7136f77eb5adefa2eeeb1 (patch)
tree64fe06420e825f80e02ec9e9f3198306b79d42ab /timers.h
parent8d278564f8350647964b5b9ccf3a6183ac7e2f0e (diff)
downloadvdr-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.h25
1 files changed, 6 insertions, 19 deletions
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