summaryrefslogtreecommitdiffstats
path: root/src/Client
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-05-18 19:53:51 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-05-18 19:53:51 +0200
commitfc3c50063f659584b2145addab8236a479a031b7 (patch)
tree0aa7057cb9fa7523ace98e0776d46609de58954e /src/Client
parenta3e566c4d3631076e29f3651554603184b6351a7 (diff)
downloadmad-fc3c50063f659584b2145addab8236a479a031b7.tar
mad-fc3c50063f659584b2145addab8236a479a031b7.zip
Von sigc++ auf boost-signals migriert
Diffstat (limited to 'src/Client')
-rw-r--r--src/Client/CommandManager.h6
-rw-r--r--src/Client/CommandParser.cpp21
-rw-r--r--src/Client/InformationManager.cpp6
-rw-r--r--src/Client/Makefile.in4
-rw-r--r--src/Client/Requests/Makefile.in4
5 files changed, 21 insertions, 20 deletions
diff --git a/src/Client/CommandManager.h b/src/Client/CommandManager.h
index f1689b1..7635542 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 <sigc++/signal.h>
+#include <boost/signal.hpp>
namespace Mad {
@@ -39,7 +39,7 @@ class CommandManager {
unsigned int activeRequests;
- sigc::signal<void> finished;
+ boost::signal0<void> finished;
bool disconnect;
@@ -71,7 +71,7 @@ class CommandManager {
bool requestsActive() {return (activeRequests > 0);}
bool willDisconnect() {return disconnect;}
- sigc::signal<void> signalFinished() const {return finished;}
+ boost::signal0<void>& signalFinished() {return finished;}
};
}
diff --git a/src/Client/CommandParser.cpp b/src/Client/CommandParser.cpp
index 1b40046..78b3570 100644
--- a/src/Client/CommandParser.cpp
+++ b/src/Client/CommandParser.cpp
@@ -33,7 +33,8 @@
#include <iostream>
#include <cstdio>
-#include <sigc++/bind.h>
+
+#include <boost/bind.hpp>
namespace Mad {
namespace Client {
@@ -111,9 +112,9 @@ std::map<std::string, Common::HostInfo> CommandParser::parseHostList(const std::
void CommandParser::fsinfoCommand(const std::vector<std::string> &args) {
if(args.size() == 1)
- Common::RequestManager::get()->sendRequest<Common::Requests::FSInfoRequest>(connection, sigc::mem_fun(CommandManager::get(), &CommandManager::fsInfoRequestFinished));
+ Common::RequestManager::get()->sendRequest<Common::Requests::FSInfoRequest>(connection, boost::bind(&CommandManager::fsInfoRequestFinished, CommandManager::get(), _1));
else if(args.size() == 2)
- Common::RequestManager::get()->sendRequest<Requests::DaemonFSInfoRequest>(connection, sigc::mem_fun(CommandManager::get(), &CommandManager::daemonFSInfoRequestFinished), args[1]);
+ Common::RequestManager::get()->sendRequest<Requests::DaemonFSInfoRequest>(connection, boost::bind(&CommandManager::daemonFSInfoRequestFinished, CommandManager::get(), _1), args[1]);
else {
Common::Logger::logf(Common::Logger::ERROR, "%s: Too many arguments.", args[0].c_str());
printUsage("fsinfo");
@@ -215,7 +216,7 @@ void CommandParser::rebootCommand(const std::vector<std::string> &args) {
for(std::map<std::string, Common::HostInfo>::iterator host = hosts.begin(); host != hosts.end(); ++host) {
Common::RequestManager::get()->sendRequest<Requests::DaemonCommandRequest>(connection,
- sigc::mem_fun(CommandManager::get(), &CommandManager::daemonCommandRequestFinished), host->first, true
+ boost::bind(&CommandManager::daemonCommandRequestFinished, CommandManager::get(), _1), host->first, true
);
++CommandManager::get()->activeRequests;
@@ -233,7 +234,7 @@ void CommandParser::shutdownCommand(const std::vector<std::string> &args) {
for(std::map<std::string, Common::HostInfo>::iterator host = hosts.begin(); host != hosts.end(); ++host) {
Common::RequestManager::get()->sendRequest<Requests::DaemonCommandRequest>(connection,
- sigc::mem_fun(CommandManager::get(), &CommandManager::daemonCommandRequestFinished), host->first, false
+ boost::bind(&CommandManager::daemonCommandRequestFinished, CommandManager::get(), _1), host->first, false
);
++CommandManager::get()->activeRequests;
@@ -243,10 +244,10 @@ void CommandParser::shutdownCommand(const std::vector<std::string> &args) {
void CommandParser::statusCommand(const std::vector<std::string> &args) {
if(args.size() == 1)
Common::RequestManager::get()->sendRequest<Common::Requests::StatusRequest>(connection,
- sigc::mem_fun(CommandManager::get(), &CommandManager::statusRequestFinished));
+ boost::bind(&CommandManager::statusRequestFinished, CommandManager::get(), _1));
else if(args.size() == 2)
Common::RequestManager::get()->sendRequest<Requests::DaemonStatusRequest>(connection,
- sigc::mem_fun(CommandManager::get(), &CommandManager::daemonStatusRequestFinished), args[1]);
+ boost::bind(&CommandManager::daemonStatusRequestFinished, CommandManager::get(), _1), args[1]);
else {
Common::Logger::logf(Common::Logger::ERROR, "%s: Too many arguments.", args[0].c_str());
printUsage("status");
@@ -279,21 +280,21 @@ void CommandParser::userInfoCommand(const std::vector<std::string> &args) {
++CommandManager::get()->activeRequests;
Common::RequestManager::get()->sendRequest<Common::Requests::UserInfoRequest>(connection,
- sigc::mem_fun(CommandManager::get(), &CommandManager::userInfoRequestFinished), uid);
+ boost::bind(&CommandManager::userInfoRequestFinished, CommandManager::get(), _1), uid);
}
void CommandParser::listUsersCommand(const std::vector<std::string>&) {
++CommandManager::get()->activeRequests;
Common::RequestManager::get()->sendRequest<Common::Requests::UserListRequest>(connection,
- sigc::mem_fun(CommandManager::get(), &CommandManager::userListRequestFinished));
+ boost::bind(&CommandManager::userListRequestFinished, CommandManager::get(), _1));
}
void CommandParser::exitCommand(const std::vector<std::string>&) {
++CommandManager::get()->activeRequests;
Common::RequestManager::get()->sendRequest<Common::Requests::DisconnectRequest>(connection,
- sigc::mem_fun(CommandManager::get(), &CommandManager::disconnectRequestFinished));
+ boost::bind(&CommandManager::disconnectRequestFinished, CommandManager::get(), _1));
}
bool CommandParser::parse(const std::string &cmd) {
diff --git a/src/Client/InformationManager.cpp b/src/Client/InformationManager.cpp
index 6c36495..f1627f4 100644
--- a/src/Client/InformationManager.cpp
+++ b/src/Client/InformationManager.cpp
@@ -39,7 +39,7 @@ void InformationManager::DaemonStateUpdateRequestHandler::handlePacket(const Com
sendPacket(ret);
- signalFinished().emit();
+ signalFinished()();
return;
}
@@ -55,7 +55,7 @@ void InformationManager::DaemonStateUpdateRequestHandler::handlePacket(const Com
ret.setType("OK");
sendPacket(ret);
- signalFinished().emit();
+ signalFinished()();
}
@@ -72,7 +72,7 @@ void InformationManager::updateDaemonList(Common::Connection *con) {
return;
Common::RequestManager::get()->sendRequest<Requests::DaemonListRequest>(con,
- sigc::mem_fun(this, &InformationManager::daemonListRequestFinished));
+ boost::bind(&InformationManager::daemonListRequestFinished, this, _1));
updating = true;
}
diff --git a/src/Client/Makefile.in b/src/Client/Makefile.in
index 94a059f..29cec75 100644
--- a/src/Client/Makefile.in
+++ b/src/Client/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 \
@@ -93,6 +94,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@
@@ -224,8 +226,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/Client/Requests/Makefile.in b/src/Client/Requests/Makefile.in
index 820cb4d..01665de 100644
--- a/src/Client/Requests/Makefile.in
+++ b/src/Client/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 \
@@ -83,6 +84,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@
@@ -214,8 +216,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@