summaryrefslogtreecommitdiff
path: root/softhddevice.cpp
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-04-05 15:43:32 +0200
committerJohns <johns98@gmx.net>2012-04-05 15:43:32 +0200
commit8612044b9bf051e0ecd9b900e1f8a3ce1b035483 (patch)
tree20ada0245d1acb97c08fd856c502d23501df6d0f /softhddevice.cpp
parentc19b86411a97d81b32bac9dc6c8fe7bc6c4564c0 (diff)
downloadvdr-plugin-softhddevice-8612044b9bf051e0ecd9b900e1f8a3ce1b035483.tar.gz
vdr-plugin-softhddevice-8612044b9bf051e0ecd9b900e1f8a3ce1b035483.tar.bz2
Move suspend on inactivity to houesekeeping.
Diffstat (limited to 'softhddevice.cpp')
-rw-r--r--softhddevice.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/softhddevice.cpp b/softhddevice.cpp
index 8be2e9d..61c32b1 100644
--- a/softhddevice.cpp
+++ b/softhddevice.cpp
@@ -1402,7 +1402,7 @@ class cPluginSoftHdDevice:public cPlugin
virtual bool Initialize(void);
virtual bool Start(void);
virtual void Stop(void);
- // virtual void Housekeeping(void);
+ virtual void Housekeeping(void);
virtual void MainThreadHook(void);
virtual const char *MainMenuEntry(void);
virtual cOsdObject *MainMenuAction(void);
@@ -1501,6 +1501,10 @@ bool cPluginSoftHdDevice::Start(void)
return true;
}
+/**
+** Shutdown plugin. Stop any background activities the plugin is
+** performing.
+*/
void cPluginSoftHdDevice::Stop(void)
{
//dsyslog("[softhddev]%s:\n", __FUNCTION__);
@@ -1508,8 +1512,6 @@ void cPluginSoftHdDevice::Stop(void)
::Stop();
}
-#if 0
-
/**
** Perform any cleanup or other regular tasks.
*/
@@ -1517,10 +1519,18 @@ void cPluginSoftHdDevice::Housekeeping(void)
{
dsyslog("[softhddev]%s:\n", __FUNCTION__);
- // ::Housekeeping();
-}
+ // check if user is inactive, automatic enter suspend mode
+ // FIXME: cControl prevents shutdown, disable this until fixed
+ if (0 && SuspendMode == NOT_SUSPENDED && ShutdownHandler.IsUserInactive()) {
+ // don't overwrite already suspended suspend mode
+ cControl::Launch(new cSoftHdControl);
+ cControl::Attach();
+ Suspend(ConfigSuspendClose, ConfigSuspendClose, ConfigSuspendX11);
+ SuspendMode = SUSPEND_NORMAL;
+ }
-#endif
+ ::Housekeeping();
+}
/**
** Create main menu entry.
@@ -1556,16 +1566,6 @@ void cPluginSoftHdDevice::MainThreadHook(void)
cDevice::SetPrimaryDevice(DoMakePrimary);
DoMakePrimary = 0;
}
- // check if user is inactive, automatic enter suspend mode
- // FIXME: cControl prevents shutdown, disable this until fixed
- // FIXME: move this to ::Housekeeping
- if (0 && SuspendMode == NOT_SUSPENDED && ShutdownHandler.IsUserInactive()) {
- // don't overwrite already suspended suspend mode
- cControl::Launch(new cSoftHdControl);
- cControl::Attach();
- Suspend(ConfigSuspendClose, ConfigSuspendClose, ConfigSuspendX11);
- SuspendMode = SUSPEND_NORMAL;
- }
::MainThreadHook();
}