summaryrefslogtreecommitdiff
path: root/timers.h
diff options
context:
space:
mode:
authorJasmin Jessich <jasmin@anw.at>2017-06-09 23:36:48 +0200
committerJasmin Jessich <jasmin@anw.at>2017-06-09 23:36:48 +0200
commit5e9bd5cf83b8a7312e3c6543f757bf723e342e8e (patch)
treeb26304aa0bd5bf135cdc279550a3c0a40a30fbd5 /timers.h
parentc430d84a28a320ad91fd42d6d108d30812fd5c8c (diff)
downloadvdr-plugin-live-5e9bd5cf83b8a7312e3c6543f757bf723e342e8e.tar.gz
vdr-plugin-live-5e9bd5cf83b8a7312e3c6543f757bf723e342e8e.tar.bz2
Update internal timer list if VDR timers have been changed
- New function StatusMonitor::TimerChange. - New function TimerManager::SetReloadTimers. - VDR will execute TimerChange which will use SetReloadTimers to store a timer update needs to be done. Later TimerManager::DoPendingWork will reload the actual timers from VDR. - Added missing locking to StatusMonitor functions.
Diffstat (limited to 'timers.h')
-rw-r--r--timers.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/timers.h b/timers.h
index 1952524..968cd8a 100644
--- a/timers.h
+++ b/timers.h
@@ -53,8 +53,9 @@ namespace vdrlive {
void ToggleTimerActive( cTimer* timer);
// may only be called from Plugin::MainThreadHook
void DoPendingWork();
- void DoReloadTimers() { m_timers.ReloadTimers(); }
+ void DoReloadTimers() { m_timers.ReloadTimers(); m_reloadTimers = false; }
const cTimer* GetTimer(tEventID eventid, tChannelID channelid);
+ void SetReloadTimers() { m_reloadTimers = true; }
private:
typedef std::pair< cTimer*, std::string > TimerPair;
@@ -69,6 +70,7 @@ namespace vdrlive {
TimerList m_updateTimers;
ErrorList m_failedUpdates;
cCondVar m_updateWait;
+ bool m_reloadTimers;
void DoUpdateTimers();
void DoInsertTimer( TimerPair& timerData );