vdr  1.7.31
dvbhddevice.c
Go to the documentation of this file.
1 /*
2  * dvbhddevice.c: A plugin for the Video Disk Recorder
3  *
4  * See the README file for copyright information and how to reach the author.
5  *
6  * $Id: dvbhddevice.c 1.17 2012/06/07 09:33:18 kls Exp $
7  */
8 
9 #include <vdr/plugin.h>
10 #include <vdr/shutdown.h>
11 #include "dvbhdffdevice.h"
12 #include "menu.h"
13 #include "setup.h"
14 
15 static const char *VERSION = "0.0.4";
16 static const char *DESCRIPTION = trNOOP("HD Full Featured DVB device");
17 static const char *MAINMENUENTRY = "dvbhddevice";
18 
19 class cPluginDvbhddevice : public cPlugin {
20 private:
23 public:
24  cPluginDvbhddevice(void);
25  virtual ~cPluginDvbhddevice();
26  virtual const char *Version(void) { return VERSION; }
27  virtual const char *Description(void) { return tr(DESCRIPTION); }
28  virtual void MainThreadHook(void);
29  virtual const char *MainMenuEntry(void);
30  virtual cOsdObject *MainMenuAction(void);
31  virtual cMenuSetupPage *SetupMenu(void);
32  virtual bool SetupParse(const char *Name, const char *Value);
33  };
34 
36 : mIsUserInactive(true)
37 {
39 }
40 
42 {
43  delete probe;
44 }
45 
47 {
48  bool isUserInactive = ShutdownHandler.IsUserInactive();
49  if (isUserInactive != mIsUserInactive)
50  {
51  mIsUserInactive = isUserInactive;
53  {
55  if (hdffCmdIf && !mIsUserInactive)
56  {
58  }
59  }
60  }
61 }
62 
64 {
65  return gHdffSetup.HideMainMenu ? NULL : MAINMENUENTRY;
66 }
67 
69 {
71  return hdffCmdIf ? new cHdffMenu(hdffCmdIf) : NULL;
72 }
73 
75 {
77  return hdffCmdIf ? new cHdffSetupPage(hdffCmdIf) : NULL;
78 }
79 
80 bool cPluginDvbhddevice::SetupParse(const char *Name, const char *Value)
81 {
82  return gHdffSetup.SetupParse(Name, Value);
83 }
84 
85 VDRPLUGINCREATOR(cPluginDvbhddevice); // Don't touch this!