vdr  2.0.2
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 
7 #include <vdr/plugin.h>
8 #include <vdr/shutdown.h>
9 #include "dvbhdffdevice.h"
10 #include "menu.h"
11 #include "setup.h"
12 
13 static const char *VERSION = "2.0.1";
14 static const char *DESCRIPTION = trNOOP("HD Full Featured DVB device");
15 static const char *MAINMENUENTRY = "dvbhddevice";
16 
17 class cPluginDvbhddevice : public cPlugin {
18 private:
21 public:
22  cPluginDvbhddevice(void);
23  virtual ~cPluginDvbhddevice();
24  virtual const char *Version(void) { return VERSION; }
25  virtual const char *Description(void) { return tr(DESCRIPTION); }
26  virtual void MainThreadHook(void);
27  virtual void Stop(void);
28  virtual const char *MainMenuEntry(void);
29  virtual cOsdObject *MainMenuAction(void);
30  virtual cMenuSetupPage *SetupMenu(void);
31  virtual bool SetupParse(const char *Name, const char *Value);
32  };
33 
35 : mIsUserInactive(true)
36 {
38 }
39 
41 {
42  delete probe;
43 }
44 
46 {
47  bool isUserInactive = ShutdownHandler.IsUserInactive();
48  if (isUserInactive != mIsUserInactive)
49  {
50  mIsUserInactive = isUserInactive;
52  {
54  if (hdffCmdIf && !mIsUserInactive)
55  {
57  }
58  }
59  }
60 }
61 
63 {
65  {
67  if (hdffCmdIf)
68  {
70  isyslog("HDFF_CEC_COMMAND_TV_OFF");
71  }
72  }
73 }
74 
76 {
77  return gHdffSetup.HideMainMenu ? NULL : MAINMENUENTRY;
78 }
79 
81 {
83  return hdffCmdIf ? new cHdffMenu(hdffCmdIf) : NULL;
84 }
85 
87 {
89  return hdffCmdIf ? new cHdffSetupPage(hdffCmdIf) : NULL;
90 }
91 
92 bool cPluginDvbhddevice::SetupParse(const char *Name, const char *Value)
93 {
94  return gHdffSetup.SetupParse(Name, Value);
95 }
96 
97 VDRPLUGINCREATOR(cPluginDvbhddevice); // Don't touch this!
98