diff options
author | Keine_Ahnung <no@mail.com> | 2013-01-25 23:44:14 +0100 |
---|---|---|
committer | Keine_Ahnung <no@mail.com> | 2013-01-25 23:44:14 +0100 |
commit | ae5b527244847d6477ca31f09b0dac808346d660 (patch) | |
tree | 56e2d4f7b85593195d3da11d68d2a95d8e3a0f05 /uactivity.c | |
parent | 5727d72f708345a39e1ccda222f7643a25732191 (diff) | |
download | vdr-plugin-uactivity-ae5b527244847d6477ca31f09b0dac808346d660.tar.gz vdr-plugin-uactivity-ae5b527244847d6477ca31f09b0dac808346d660.tar.bz2 |
watchdog/key demos
Diffstat (limited to 'uactivity.c')
-rw-r--r-- | uactivity.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/uactivity.c b/uactivity.c index 44b7323..ed6ab97 100644 --- a/uactivity.c +++ b/uactivity.c @@ -55,7 +55,7 @@ protected: eOSState state = cOsdMenu::ProcessKey(Key); if (state == osUnknown) if ((Key >= kUp) && (Key < kNone)) { - Run.Call(Key); + Run.Call(oRunning, Key); return osEnd; } return state; @@ -116,12 +116,14 @@ bool cPluginUactivity::Start(void) Run.SetResourceDirectory(ConfigDirectory(PLUGIN_NAME_I18N)); #endif + Run.Call(oStartUp, k_Setup); + bool ActivityStatus = !ShutdownHandler.IsUserInactive(); LastActivity = ActivityStatus; Run.Call(oStartUp, ActivityStatus); time(&LastTime); - if (WatchdogTimer > 0) Run.Call(); + if (WatchdogTimer > 0) Run.Call(oStartUp); return true; } @@ -129,6 +131,8 @@ bool cPluginUactivity::Start(void) void cPluginUactivity::Stop(void) { // Stop any background activities the plugin is performing. + Run.Call(oShutDown, k_Setup); + Run.Call(oShutDown, false); Run.Call(oShutDown); } @@ -147,7 +151,7 @@ void cPluginUactivity::MainThreadHook(void) time(&Seconds); if (difftime(Seconds, LastTime) >= WatchdogTimer) { time(&LastTime); - Run.Call(); + Run.Call(oRunning); } } } |