From fc3c50063f659584b2145addab8236a479a031b7 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 18 May 2009 19:53:51 +0200 Subject: Von sigc++ auf boost-signals migriert --- src/Daemon/Backends/Makefile.in | 4 ++-- src/Daemon/Backends/NetworkLogger.h | 4 +++- src/Daemon/Makefile.in | 4 ++-- src/Daemon/RequestHandlers/CommandRequestHandler.cpp | 12 +++++++----- src/Daemon/RequestHandlers/Makefile.in | 4 ++-- src/Daemon/Requests/Makefile.in | 4 ++-- 6 files changed, 18 insertions(+), 14 deletions(-) (limited to 'src/Daemon') diff --git a/src/Daemon/Backends/Makefile.in b/src/Daemon/Backends/Makefile.in index 31017c9..0500e0c 100644 --- a/src/Daemon/Backends/Makefile.in +++ b/src/Daemon/Backends/Makefile.in @@ -38,6 +38,7 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_signals.m4 \ $(top_srcdir)/m4/ax_boost_thread.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -65,6 +66,7 @@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ +BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ @@ -196,8 +198,6 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ -sigc_CFLAGS = @sigc_CFLAGS@ -sigc_LIBS = @sigc_LIBS@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ diff --git a/src/Daemon/Backends/NetworkLogger.h b/src/Daemon/Backends/NetworkLogger.h index 492fd87..a6b6c21 100644 --- a/src/Daemon/Backends/NetworkLogger.h +++ b/src/Daemon/Backends/NetworkLogger.h @@ -32,9 +32,11 @@ class NetworkLogger : public Common::Logger { private: Common::Connection *connection; + void requestFinished(const Common::Request&) {} + protected: virtual void logMessage(Common::Logger::MessageCategory category, Common::Logger::MessageLevel level, time_t messageTimestamp, const std::string &message) { - Common::RequestManager::get()->sendRequest(connection, Common::Request::slot_type(), + Common::RequestManager::get()->sendRequest(connection, boost::bind(&NetworkLogger::requestFinished, this, _1), category, level, messageTimestamp, message); } diff --git a/src/Daemon/Makefile.in b/src/Daemon/Makefile.in index a9faebf..4a1ef14 100644 --- a/src/Daemon/Makefile.in +++ b/src/Daemon/Makefile.in @@ -39,6 +39,7 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_signals.m4 \ $(top_srcdir)/m4/ax_boost_thread.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -91,6 +92,7 @@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ +BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ @@ -222,8 +224,6 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ -sigc_CFLAGS = @sigc_CFLAGS@ -sigc_LIBS = @sigc_LIBS@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ diff --git a/src/Daemon/RequestHandlers/CommandRequestHandler.cpp b/src/Daemon/RequestHandlers/CommandRequestHandler.cpp index 939f1f0..f7f21de 100644 --- a/src/Daemon/RequestHandlers/CommandRequestHandler.cpp +++ b/src/Daemon/RequestHandlers/CommandRequestHandler.cpp @@ -22,6 +22,8 @@ #include #include +#include + namespace Mad { namespace Daemon { namespace RequestHandlers { @@ -36,7 +38,7 @@ void CommandRequestHandler::handlePacket(const Common::XmlPacket &packet) { sendPacket(ret); - signalFinished().emit(); + signalFinished()(); return; } @@ -46,11 +48,11 @@ void CommandRequestHandler::handlePacket(const Common::XmlPacket &packet) { std::string command = packet["command"]; if(command == "reboot") { - if(Common::SystemManager::get()->shutdown(sigc::mem_fun(this, &CommandRequestHandler::sendReply))) + if(Common::SystemManager::get()->shutdown(boost::bind(&CommandRequestHandler::sendReply, this))) return; } else { - if(Common::SystemManager::get()->reboot(sigc::mem_fun(this, &CommandRequestHandler::sendReply))) + if(Common::SystemManager::get()->reboot(boost::bind(&CommandRequestHandler::sendReply, this))) return; } @@ -60,7 +62,7 @@ void CommandRequestHandler::handlePacket(const Common::XmlPacket &packet) { sendPacket(ret); - signalFinished().emit(); + signalFinished()(); } void CommandRequestHandler::sendReply() { @@ -69,7 +71,7 @@ void CommandRequestHandler::sendReply() { sendPacket(packet); - signalFinished().emit(); + signalFinished()(); } } diff --git a/src/Daemon/RequestHandlers/Makefile.in b/src/Daemon/RequestHandlers/Makefile.in index 3de4cbe..8b34d1a 100644 --- a/src/Daemon/RequestHandlers/Makefile.in +++ b/src/Daemon/RequestHandlers/Makefile.in @@ -39,6 +39,7 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_signals.m4 \ $(top_srcdir)/m4/ax_boost_thread.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -82,6 +83,7 @@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ +BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ @@ -213,8 +215,6 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ -sigc_CFLAGS = @sigc_CFLAGS@ -sigc_LIBS = @sigc_LIBS@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ diff --git a/src/Daemon/Requests/Makefile.in b/src/Daemon/Requests/Makefile.in index 0f16855..1492ca6 100644 --- a/src/Daemon/Requests/Makefile.in +++ b/src/Daemon/Requests/Makefile.in @@ -39,6 +39,7 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \ $(top_srcdir)/m4/ax_boost_base.m4 \ + $(top_srcdir)/m4/ax_boost_signals.m4 \ $(top_srcdir)/m4/ax_boost_thread.m4 \ $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -82,6 +83,7 @@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ +BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ @@ -213,8 +215,6 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ -sigc_CFLAGS = @sigc_CFLAGS@ -sigc_LIBS = @sigc_LIBS@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ -- cgit v1.2.3