diff options
| author | Sascha Volkenandt <sascha (at) akv-soft (dot) de> | 2007-01-07 18:42:45 +0000 |
|---|---|---|
| committer | Sascha Volkenandt <sascha (at) akv-soft (dot) de> | 2007-01-07 18:42:45 +0000 |
| commit | ab7a2112f96bb48ee2713ada4c9ce73322cf3cba (patch) | |
| tree | 44f229f1c011fc135571849c386f78bbb5a9af48 /timers.cpp | |
| parent | 9508850d788d905b21cd2622b22cb76e80cf34ca (diff) | |
| download | vdr-plugin-live-ab7a2112f96bb48ee2713ada4c9ce73322cf3cba.tar.gz vdr-plugin-live-ab7a2112f96bb48ee2713ada4c9ce73322cf3cba.tar.bz2 | |
- simplified error handling
- moved error_widget to error.ecpp as subcomponent
- introduced error handling where necessary
- moved creation of timer settings string from page to code
- added redirect to edit_timer.ecpp after saving a timer
Diffstat (limited to 'timers.cpp')
| -rw-r--r-- | timers.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -1,6 +1,7 @@ #include <memory> #include <sstream> #include <vector> +#include "exception.h" #include "timers.h" #include "tools.h" @@ -78,16 +79,26 @@ TimerManager::TimerManager() { } -string TimerManager::UpdateTimer( cTimer* timer, std::string const& timerString ) +void TimerManager::UpdateTimer( cTimer* timer, int flags, string const& channel, string const& weekdays, string const& day, + int start, int stop, int priority, int lifetime, string const& title, string const& aux ) { - TimerPair timerData( timer, timerString ); + ostringstream builder; + builder << flags << ":" << channel << ":" << ( weekdays != "-------" ? weekdays : "" ) + << ( weekdays == "-------" || day.empty() ? "" : "@" ) << day << ":" << start << ":" << stop << ":" + << priority << ":" << lifetime << ":" << title << ":" << aux; + dsyslog("%s", builder.str().c_str()); + + TimerPair timerData( timer, builder.str() ); dsyslog("SV: in UpdateTimer"); m_updateTimers.push_back( timerData ); dsyslog("SV: wait for update"); m_updateWait.Wait( *this ); dsyslog("SV: update done"); - return GetError( timerData ); + + string error = GetError( timerData ); + if ( !error.empty() ) + throw HtmlError( error ); } void TimerManager::DoPendingWork() |
