summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeine_Ahnung <dirk-vdr@gmx.de>2013-05-01 14:38:14 +0200
committerKeine_Ahnung <dirk-vdr@gmx.de>2013-05-01 14:38:14 +0200
commite01109afcb7f91071b5a0fb64865218228267756 (patch)
treee96540cb6f760e546e251c5eebee9f0e6175f14b
parent4a117e09935f5cff4b2c4184cc1b7731dc7c2a3b (diff)
downloadvdr-plugin-uactivity-e01109afcb7f91071b5a0fb64865218228267756.tar.gz
vdr-plugin-uactivity-e01109afcb7f91071b5a0fb64865218228267756.tar.bz2
Make Variale more unique
-rw-r--r--run.h2
-rw-r--r--uactivity.c34
2 files changed, 18 insertions, 18 deletions
diff --git a/run.h b/run.h
index ecdd462..4be6a6e 100644
--- a/run.h
+++ b/run.h
@@ -24,6 +24,6 @@ public:
void CallWatchdog(eOrgin Orgin, bool Active);
};
-extern cRun Run;
+extern cRun uactivityRun;
#endif //__RUN_H
diff --git a/uactivity.c b/uactivity.c
index 5e9516e..7a6aad3 100644
--- a/uactivity.c
+++ b/uactivity.c
@@ -58,7 +58,7 @@ protected:
eOSState state = cOsdMenu::ProcessKey(Key);
if (state == osUnknown)
if ((Key >= kUp) && (Key < kNone)) {
- Run.CallKey(oRunning, Key);
+ uactivityRun.CallKey(oRunning, Key);
return osEnd;
}
return state;
@@ -111,25 +111,25 @@ bool cPluginUactivity::ProcessArgs(int argc, char *argv[])
bool cPluginUactivity::Start(void)
{
// Start any background activities the plugin shall perform.
- Run.SetConfigDirectory(ConfigDirectory(PLUGIN_NAME_I18N));
+ uactivityRun.SetConfigDirectory(ConfigDirectory(PLUGIN_NAME_I18N));
#if VDRVERSNUM >= 10729
- Run.SetCacheDirectory(CacheDirectory(PLUGIN_NAME_I18N));
- Run.SetResourceDirectory(ResourceDirectory(PLUGIN_NAME_I18N));
+ uactivityRun.SetCacheDirectory(CacheDirectory(PLUGIN_NAME_I18N));
+ uactivityRun.SetResourceDirectory(ResourceDirectory(PLUGIN_NAME_I18N));
#else
- Run.SetCacheDirectory(ConfigDirectory(PLUGIN_NAME_I18N));
- Run.SetResourceDirectory(ConfigDirectory(PLUGIN_NAME_I18N));
+ uactivityRun.SetCacheDirectory(ConfigDirectory(PLUGIN_NAME_I18N));
+ uactivityRun.SetResourceDirectory(ConfigDirectory(PLUGIN_NAME_I18N));
#endif
time(&Alive);
- Run.CallKey(oStartUp, k_Setup);
+ uactivityRun.CallKey(oStartUp, k_Setup);
bool ActivityStatus = !ShutdownHandler.IsUserInactive();
LastActivity = ActivityStatus;
- Run.CallActivity(oStartUp, ActivityStatus);
+ uactivityRun.CallActivity(oStartUp, ActivityStatus);
time(&LastTime);
- if (WatchdogTimer > 0) Run.CallWatchdog(oStartUp, ActivityStatus);
+ if (WatchdogTimer > 0) uactivityRun.CallWatchdog(oStartUp, ActivityStatus);
return true;
}
@@ -138,9 +138,9 @@ void cPluginUactivity::Stop(void)
{
// Stop any background activities the plugin is performing.
bool ActivityStatus = !ShutdownHandler.IsUserInactive();
- Run.CallKey(oShutDown, k_Setup);
- Run.CallActivity(oShutDown, ActivityStatus);
- Run.CallWatchdog(oShutDown, ActivityStatus);
+ uactivityRun.CallKey(oShutDown, k_Setup);
+ uactivityRun.CallActivity(oShutDown, ActivityStatus);
+ uactivityRun.CallWatchdog(oShutDown, ActivityStatus);
}
void cPluginUactivity::MainThreadHook(void)
@@ -154,15 +154,15 @@ void cPluginUactivity::MainThreadHook(void)
bool ActivityStatus = !ShutdownHandler.IsUserInactive();
if (FirstMainThreadHook) {
- Run.CallKey(oStarted, k_Setup);
- Run.CallActivity(oStarted, ActivityStatus);
- Run.CallWatchdog(oStarted, ActivityStatus);
+ uactivityRun.CallKey(oStarted, k_Setup);
+ uactivityRun.CallActivity(oStarted, ActivityStatus);
+ uactivityRun.CallWatchdog(oStarted, ActivityStatus);
FirstMainThreadHook = false;
}
if (ActivityStatus != LastActivity) {
LastActivity = ActivityStatus;
- Run.CallActivity(oRunning, ActivityStatus);
+ uactivityRun.CallActivity(oRunning, ActivityStatus);
}
if (WatchdogTimer > 0) {
@@ -170,7 +170,7 @@ void cPluginUactivity::MainThreadHook(void)
time(&Seconds);
if (difftime(Seconds, LastTime) >= WatchdogTimer) {
time(&LastTime);
- Run.CallWatchdog(oRunning, ActivityStatus);
+ uactivityRun.CallWatchdog(oRunning, ActivityStatus);
}
}
}