summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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(); }