summaryrefslogtreecommitdiffstats
path: root/src/Client
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-05-30 13:37:06 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-05-30 13:37:06 +0200
commita77d2d1e08e4e2e8dfb5e4fc326f6c8fe315a898 (patch)
tree36a4c899af336c7e9dc326da7231d4d9e17e8a1b /src/Client
parentcb8e66c1b1f1c8076053d71347d0b1f96ca0bca1 (diff)
downloadmad-a77d2d1e08e4e2e8dfb5e4fc326f6c8fe315a898.tar
mad-a77d2d1e08e4e2e8dfb5e4fc326f6c8fe315a898.zip
Thread-sichere Signale implementiert
Diffstat (limited to 'src/Client')
-rw-r--r--src/Client/CommandManager.h10
-rw-r--r--src/Client/InformationManager.cpp4
2 files changed, 8 insertions, 6 deletions
diff --git a/src/Client/CommandManager.h b/src/Client/CommandManager.h
index 137ec8e..3ab5d9c 100644
--- a/src/Client/CommandManager.h
+++ b/src/Client/CommandManager.h
@@ -20,7 +20,7 @@
#ifndef MAD_CLIENT_COMMANDMANAGER_H_
#define MAD_CLIENT_COMMANDMANAGER_H_
-#include <boost/signal.hpp>
+#include <Net/Signals/Signals.h>
namespace Mad {
@@ -39,14 +39,14 @@ class CommandManager {
unsigned int activeRequests;
- boost::signal0<void> finished;
+ Net::Signals::Signal0<void> finished;
bool disconnect;
void requestFinished() {
activeRequests--;
- finished();
+ finished.emit();
}
void printFSInfo(const Common::XmlPacket &packet);
@@ -74,7 +74,9 @@ class CommandManager {
bool requestsActive() {return (activeRequests > 0);}
bool willDisconnect() {return disconnect;}
- boost::signal0<void>& signalFinished() {return finished;}
+ Net::Signals::Connection connectSignalFinished(const Net::Signals::Signal0<void>::slot_type &slot) {
+ return finished.connect(slot);
+ }
};
}
diff --git a/src/Client/InformationManager.cpp b/src/Client/InformationManager.cpp
index 8fde6f7..b878b94 100644
--- a/src/Client/InformationManager.cpp
+++ b/src/Client/InformationManager.cpp
@@ -39,7 +39,7 @@ void InformationManager::DaemonStateUpdateRequestHandler::handlePacket(const Com
sendPacket(ret);
- signalFinished()();
+ signalFinished();
return;
}
@@ -59,7 +59,7 @@ void InformationManager::DaemonStateUpdateRequestHandler::handlePacket(const Com
ret.setType("OK");
sendPacket(ret);
- signalFinished()();
+ signalFinished();
}