summaryrefslogtreecommitdiff
path: root/dvdplugin.h
diff options
context:
space:
mode:
authoranbr <vdr07@deltab.de>2010-12-21 20:36:58 +0100
committeranbr <vdr07@deltab.de>2010-12-21 20:36:58 +0100
commit10a33e14d6338ff004410413f6fe52810be43f67 (patch)
tree6f71b062e9235be1383a9e6c536fea336d400e6c /dvdplugin.h
downloadvdr-plugin-dvdswitch-10a33e14d6338ff004410413f6fe52810be43f67.tar.gz
vdr-plugin-dvdswitch-10a33e14d6338ff004410413f6fe52810be43f67.tar.bz2
release 0.1.0 from http://www.schmidtie.de/download/vdr-dvdswitch-0.1.0.tar.bz20.1.0
Diffstat (limited to 'dvdplugin.h')
-rw-r--r--dvdplugin.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/dvdplugin.h b/dvdplugin.h
new file mode 100644
index 0000000..6591370
--- /dev/null
+++ b/dvdplugin.h
@@ -0,0 +1,48 @@
+#ifndef __DVDPLUGIN_DVDSWITCH_H
+#define __DVDPLUGIN_DVDSWITCH_H
+
+#include <vdr/thread.h>
+#include "helpers.h"
+#include "setup.h"
+
+#define LINK "ln -nfs '%s' '%s' 2> /dev/null"
+
+class cDVDPluginThread : public cThread
+{
+ private:
+ char *Image;
+ protected:
+ virtual void Action(void);
+ public:
+ cDVDPluginThread(char *image = NULL);
+ ~cDVDPluginThread(void);
+};
+
+class cDVDPlugin
+{
+ private:
+ static cDVDPluginThread *thread;
+ static void DetectDevice(void);
+ static void SetLink(void);
+ static void KillLink(void)
+ {
+ cFileCMD::Del(DVDSwitchSetup.DVDLink);
+ };
+ public:
+ static void Start(char *image = NULL);
+ static void Exit(void);
+ static void ChangeLink(char *target);
+ static void Init(void)
+ {
+ DetectDevice();
+ ChangeLink(DVDSwitchSetup.DVDLinkOrg);
+ SetLink();
+ }
+ static void Finish(void)
+ {
+ Exit();
+ KillLink();
+ }
+};
+
+#endif // __DVDPLUGIN_DVDSWITCH_H