summaryrefslogtreecommitdiffstats
path: root/src/modules/SystemBackendProc/SystemBackendProc.cpp
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-06-18 22:03:02 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-06-18 22:03:02 +0200
commit7234fe326d16d6bf9f4374a09ddc6ef790e6723f (patch)
tree437d4c40eeb1e9b34b369e4b82064a1572c7dac9 /src/modules/SystemBackendProc/SystemBackendProc.cpp
parentbf561f8226e97f4ace4f04bddf198175e91ee7f0 (diff)
downloadmad-7234fe326d16d6bf9f4374a09ddc6ef790e6723f.tar
mad-7234fe326d16d6bf9f4374a09ddc6ef790e6723f.zip
Globale Variablen durch Application-Klasse ersetzt
Diffstat (limited to 'src/modules/SystemBackendProc/SystemBackendProc.cpp')
-rw-r--r--src/modules/SystemBackendProc/SystemBackendProc.cpp21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/modules/SystemBackendProc/SystemBackendProc.cpp b/src/modules/SystemBackendProc/SystemBackendProc.cpp
index e8b45cd..daae55b 100644
--- a/src/modules/SystemBackendProc/SystemBackendProc.cpp
+++ b/src/modules/SystemBackendProc/SystemBackendProc.cpp
@@ -26,11 +26,10 @@
namespace Mad {
namespace Modules {
-
-boost::shared_ptr<SystemBackendProc> SystemBackendProc::backend;
+namespace SystemBackendProc {
void SystemBackendProc::getUptimeInfo(unsigned long *uptime, unsigned long *idleTime) throw(Core::Exception) {
- Core::ThreadManager::get()->detach();
+ application->getThreadManager()->detach();
uptimeFile.seekg(0, std::ios::beg);
@@ -51,7 +50,7 @@ void SystemBackendProc::getUptimeInfo(unsigned long *uptime, unsigned long *idle
}
void SystemBackendProc::getMemoryInfo(unsigned long *totalMem, unsigned long *freeMem, unsigned long *totalSwap, unsigned long *freeSwap) throw(Core::Exception) {
- Core::ThreadManager::get()->detach();
+ application->getThreadManager()->detach();
if(totalMem)
*totalMem = 0;
@@ -93,7 +92,7 @@ void SystemBackendProc::getMemoryInfo(unsigned long *totalMem, unsigned long *fr
}
void SystemBackendProc::getLoadInfo(unsigned long *currentLoad, unsigned long *nProcesses, float *loadAvg1, float *loadAvg5, float *loadAvg15) throw(Core::Exception) {
- Core::ThreadManager::get()->detach();
+ application->getThreadManager()->detach();
unsigned long currentLoadValue = 0, nProcessesValue = 0;
float loadAvg1Value = 0, loadAvg5Value = 0, loadAvg15Value = 0;
@@ -129,16 +128,4 @@ void SystemBackendProc::getLoadInfo(unsigned long *currentLoad, unsigned long *n
}
}
-
-
-extern "C" {
-
-void SystemBackendProc_init() {
- Mad::Modules::SystemBackendProc::registerBackend();
-}
-
-void SystemBackendProc_deinit() {
- Mad::Modules::SystemBackendProc::unregisterBackend();
-}
-
}