summaryrefslogtreecommitdiff
path: root/tasks.h
diff options
context:
space:
mode:
Diffstat (limited to 'tasks.h')
-rw-r--r--tasks.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/tasks.h b/tasks.h
new file mode 100644
index 0000000..21a0ae4
--- /dev/null
+++ b/tasks.h
@@ -0,0 +1,31 @@
+#ifndef VDR_LIVE_TASKS_H
+#define VDR_LIVE_TASKS_H
+
+#include <vdr/thread.h>
+
+namespace vdrlive {
+
+class TaskManager: public cMutex
+{
+ friend TaskManager& LiveTaskManager();
+
+public:
+ bool SwitchChannel( int number );
+
+ // may only be called from Plugin::MainThreadHook
+ void DoScheduledWork();
+
+private:
+ TaskManager();
+ TaskManager( TaskManager const& );
+
+ int m_switchChannel;
+ bool m_switchResult;
+ cCondVar m_scheduleWait;
+};
+
+TaskManager& LiveTaskManager();
+
+} // namespace vdrlive
+
+#endif // VDR_LIVE_TASKS_H