summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Keil <tkeil (at) datacrystal (dot) de>2007-04-24 10:40:33 +0000
committerThomas Keil <tkeil (at) datacrystal (dot) de>2007-04-24 10:40:33 +0000
commit613c0f504635d2dc19c567045e329a66d137821d (patch)
tree388eae80b75384537ef4964f4a0efcc804a1ade4
parent8b66fc4dcc96a631a79775d68c053ae69b4e8ba6 (diff)
downloadvdr-plugin-live-613c0f504635d2dc19c567045e329a66d137821d.tar.gz
vdr-plugin-live-613c0f504635d2dc19c567045e329a66d137821d.tar.bz2
Added Function DelTimer
-rw-r--r--timers.cpp8
-rw-r--r--timers.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/timers.cpp b/timers.cpp
index 68bb9b7..3c1fa79 100644
--- a/timers.cpp
+++ b/timers.cpp
@@ -98,6 +98,14 @@ void TimerManager::UpdateTimer( cTimer* timer, int flags, tChannelID& channel, s
throw HtmlError( error );
}
+void TimerManager::DelTimer( cTimer* timer)
+{
+ cTimer* delTimer = Timers.GetTimer(timer);
+ Timers.Del(delTimer, true);
+ Timers.SetModified();
+ m_timers.ReloadTimers(false);
+}
+
void TimerManager::DoPendingWork()
{
if ( m_updateTimers.size() == 0 && !m_timers.Modified() )
diff --git a/timers.h b/timers.h
index 0ada455..a2e8a8b 100644
--- a/timers.h
+++ b/timers.h
@@ -39,6 +39,7 @@ public:
void UpdateTimer( cTimer* timer, int flags, tChannelID& channel, std::string const& weekdays, std::string const& day,
int start, int stop, int priority, int lifetime, std::string const& title, std::string const& aux );
+ void DelTimer( cTimer* timer);
// may only be called from Plugin::MainThreadHook
void DoPendingWork();
void DoReloadTimers() { m_timers.ReloadTimers(); }