summaryrefslogtreecommitdiff
path: root/timers.h
diff options
context:
space:
mode:
authorSascha Volkenandt <sascha (at) akv-soft (dot) de>2007-01-06 18:02:27 +0000
committerSascha Volkenandt <sascha (at) akv-soft (dot) de>2007-01-06 18:02:27 +0000
commit3155e0fa9b133aa5c296e324de2c1f657b1bd31d (patch)
tree682e8385ca2cc1c8cb49638460e156c78c0b7479 /timers.h
parente05144439c243c4aa765df1464da2e300c1375ae (diff)
downloadvdr-plugin-live-3155e0fa9b133aa5c296e324de2c1f657b1bd31d.tar.gz
vdr-plugin-live-3155e0fa9b133aa5c296e324de2c1f657b1bd31d.tar.bz2
- implemented updating and adding timers from background thread
- added function to "Save"-button of edit_timer
Diffstat (limited to 'timers.h')
-rw-r--r--timers.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/timers.h b/timers.h
index e6a275d..1400dab 100644
--- a/timers.h
+++ b/timers.h
@@ -33,14 +33,31 @@ class TimerManager: public cMutex
public:
SortedTimers& GetTimers() { return m_timers; }
+ std::string UpdateTimer( cTimer* timer, std::string const& timerString );
+
// may only be called from Plugin::MainThreadHook
void DoPendingWork();
private:
+ typedef std::pair< cTimer*, std::string > TimerPair;
+ typedef std::pair< TimerPair, std::string > ErrorPair;
+ typedef std::list< TimerPair > TimerList;
+ typedef std::list< ErrorPair > ErrorList;
+
TimerManager();
TimerManager( TimerManager const& );
SortedTimers m_timers;
+ TimerList m_updateTimers;
+ ErrorList m_failedUpdates;
+ cCondVar m_updateWait;
+
+ void DoUpdateTimers();
+ void DoInsertTimer( TimerPair& timerData );
+ void DoUpdateTimer( TimerPair& timerData );
+
+ void StoreError( TimerPair const& timerData, std::string const& error );
+ std::string GetError( TimerPair const& timerData );
};
TimerManager& LiveTimerManager();