From a77d2d1e08e4e2e8dfb5e4fc326f6c8fe315a898 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 30 May 2009 13:37:06 +0200 Subject: Thread-sichere Signale implementiert --- src/Client/CommandManager.h | 10 ++++++---- src/Client/InformationManager.cpp | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/Client') 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 +#include namespace Mad { @@ -39,14 +39,14 @@ class CommandManager { unsigned int activeRequests; - boost::signal0 finished; + Net::Signals::Signal0 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& signalFinished() {return finished;} + Net::Signals::Connection connectSignalFinished(const Net::Signals::Signal0::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(); } -- cgit v1.2.3