summaryrefslogtreecommitdiffstats
path: root/src/Server
diff options
context:
space:
mode:
Diffstat (limited to 'src/Server')
-rw-r--r--src/Server/ConnectionManager.cpp12
-rw-r--r--src/Server/ConnectionManager.h3
-rw-r--r--src/Server/Makefile.in4
-rw-r--r--src/Server/RequestHandlers/DaemonCommandRequestHandler.cpp6
-rw-r--r--src/Server/RequestHandlers/DaemonFSInfoRequestHandler.cpp6
-rw-r--r--src/Server/RequestHandlers/DaemonListRequestHandler.cpp4
-rw-r--r--src/Server/RequestHandlers/DaemonStatusRequestHandler.cpp6
-rw-r--r--src/Server/RequestHandlers/GSSAPIAuthRequestHandler.cpp4
-rw-r--r--src/Server/RequestHandlers/IdentifyRequestHandler.cpp4
-rw-r--r--src/Server/RequestHandlers/LogRequestHandler.cpp4
-rw-r--r--src/Server/RequestHandlers/Makefile.in4
-rw-r--r--src/Server/RequestHandlers/UserInfoRequestHandler.cpp10
-rw-r--r--src/Server/RequestHandlers/UserListRequestHandler.cpp10
-rw-r--r--src/Server/Requests/Makefile.in4
-rw-r--r--src/Server/UserBackend.h10
-rw-r--r--src/Server/UserManager.cpp8
-rw-r--r--src/Server/UserManager.h10
17 files changed, 57 insertions, 52 deletions
diff --git a/src/Server/ConnectionManager.cpp b/src/Server/ConnectionManager.cpp
index 99f5680..6ef918a 100644
--- a/src/Server/ConnectionManager.cpp
+++ b/src/Server/ConnectionManager.cpp
@@ -41,8 +41,6 @@
#include <unistd.h>
#include <algorithm>
-#include <sigc++/bind.h>
-
namespace Mad {
namespace Server {
@@ -54,7 +52,7 @@ bool ConnectionManager::Connection::send(const Net::Packet &packet) {
ConnectionManager::Connection::Connection(Net::ServerConnection *connection0)
: connection(connection0), type(connection0->isDaemonConnection() ? DAEMON : CLIENT), hostInfo(0) {
- connection->signalReceive().connect(sigc::mem_fun(this, &Connection::receive));
+ connection->signalReceive().connect(boost::bind(&Connection::receive, this, _1));
}
ConnectionManager::Connection::~Connection() {
@@ -90,7 +88,7 @@ void ConnectionManager::updateState(Common::HostInfo *hostInfo, Common::HostInfo
for(std::set<Connection*>::iterator con = connections.begin(); con != connections.end(); ++con) {
if((*con)->getConnectionType() == Connection::CLIENT)
- Common::RequestManager::get()->sendRequest<Requests::DaemonStateUpdateRequest>(*con, Common::Request::slot_type(), hostInfo->getName(), state);
+ Common::RequestManager::get()->sendRequest<Requests::DaemonStateUpdateRequest>(*con, boost::bind(&ConnectionManager::updateStateFinished, this, _1), hostInfo->getName(), state);
}
}
@@ -150,7 +148,7 @@ void ConnectionManager::configFinished() {
if(listenerAddresses.empty()) {
try {
Net::Listener *listener = new Net::Listener(x509CertFile, x509KeyFile);
- listener->signalNewConnection().connect(sigc::mem_fun(this, &ConnectionManager::newConnectionHandler));
+ listener->signalNewConnection().connect(boost::bind(&ConnectionManager::newConnectionHandler, this, _1));
listeners.push_back(listener);
}
catch(Net::Exception &e) {
@@ -161,7 +159,7 @@ void ConnectionManager::configFinished() {
for(std::vector<Net::IPAddress>::const_iterator address = listenerAddresses.begin(); address != listenerAddresses.end(); ++address) {
try {
Net::Listener *listener = new Net::Listener(x509CertFile, x509KeyFile, *address);
- listener->signalNewConnection().connect(sigc::mem_fun(this, &ConnectionManager::newConnectionHandler));
+ listener->signalNewConnection().connect(boost::bind(&ConnectionManager::newConnectionHandler, this, _1));
listeners.push_back(listener);
}
catch(Net::Exception &e) {
@@ -173,7 +171,7 @@ void ConnectionManager::configFinished() {
void ConnectionManager::newConnectionHandler(Net::ServerConnection *con) {
Connection *connection = new Connection(con);
- con->signalDisconnected().connect(sigc::bind(sigc::mem_fun(this, &ConnectionManager::disconnectHandler), connection));
+ con->signalDisconnected().connect(boost::bind(&ConnectionManager::disconnectHandler, this, connection));
connections.insert(connection);
Common::RequestManager::get()->registerConnection(connection);
diff --git a/src/Server/ConnectionManager.h b/src/Server/ConnectionManager.h
index 691d51f..7d97edc 100644
--- a/src/Server/ConnectionManager.h
+++ b/src/Server/ConnectionManager.h
@@ -101,6 +101,9 @@ class ConnectionManager : public Common::Configurable, public Common::Initializa
ConnectionManager& operator=(const ConnectionManager &o);
void updateState(Common::HostInfo *hostInfo, Common::HostInfo::State state);
+ void updateStateFinished(const Common::Request&) {
+ // TODO Error handling (updateStateFinished)
+ }
ConnectionManager() {}
diff --git a/src/Server/Makefile.in b/src/Server/Makefile.in
index 66a02a0..7389540 100644
--- a/src/Server/Makefile.in
+++ b/src/Server/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/Server/RequestHandlers/DaemonCommandRequestHandler.cpp b/src/Server/RequestHandlers/DaemonCommandRequestHandler.cpp
index 314aa97..17a7e5d 100644
--- a/src/Server/RequestHandlers/DaemonCommandRequestHandler.cpp
+++ b/src/Server/RequestHandlers/DaemonCommandRequestHandler.cpp
@@ -37,7 +37,7 @@ void DaemonCommandRequestHandler::handlePacket(const Common::XmlPacket &packet)
sendPacket(ret);
- signalFinished().emit();
+ signalFinished()();
return;
}
@@ -48,7 +48,7 @@ void DaemonCommandRequestHandler::handlePacket(const Common::XmlPacket &packet)
try {
Common::Connection *daemonCon = ConnectionManager::get()->getDaemonConnection(packet["daemon"]);
Common::RequestManager::get()->sendRequest<Requests::CommandRequest>(daemonCon,
- sigc::mem_fun(this, &DaemonCommandRequestHandler::requestFinished), command == "reboot");
+ boost::bind(&DaemonCommandRequestHandler::requestFinished, this, _1), command == "reboot");
}
catch(Net::Exception &e) {
Common::XmlPacket ret;
@@ -77,7 +77,7 @@ void DaemonCommandRequestHandler::requestFinished(const Common::Request &request
sendPacket(ret);
}
- signalFinished().emit();
+ signalFinished()();
}
}
diff --git a/src/Server/RequestHandlers/DaemonFSInfoRequestHandler.cpp b/src/Server/RequestHandlers/DaemonFSInfoRequestHandler.cpp
index eadc0d5..df57a94 100644
--- a/src/Server/RequestHandlers/DaemonFSInfoRequestHandler.cpp
+++ b/src/Server/RequestHandlers/DaemonFSInfoRequestHandler.cpp
@@ -37,7 +37,7 @@ void DaemonFSInfoRequestHandler::handlePacket(const Common::XmlPacket &packet) {
sendPacket(ret);
- signalFinished().emit();
+ signalFinished()();
return;
}
@@ -46,7 +46,7 @@ void DaemonFSInfoRequestHandler::handlePacket(const Common::XmlPacket &packet) {
try {
Common::Connection *daemonCon = ConnectionManager::get()->getDaemonConnection(packet["daemon"]);
Common::RequestManager::get()->sendRequest<Common::Requests::FSInfoRequest>(daemonCon,
- sigc::mem_fun(this, &DaemonFSInfoRequestHandler::requestFinished));
+ boost::bind(&DaemonFSInfoRequestHandler::requestFinished, this, _1));
}
catch(Net::Exception &e) {
Common::XmlPacket ret;
@@ -75,7 +75,7 @@ void DaemonFSInfoRequestHandler::requestFinished(const Common::Request &request)
sendPacket(ret);
}
- signalFinished().emit();
+ signalFinished()();
}
}
diff --git a/src/Server/RequestHandlers/DaemonListRequestHandler.cpp b/src/Server/RequestHandlers/DaemonListRequestHandler.cpp
index 2b21a29..541148d 100644
--- a/src/Server/RequestHandlers/DaemonListRequestHandler.cpp
+++ b/src/Server/RequestHandlers/DaemonListRequestHandler.cpp
@@ -35,7 +35,7 @@ void DaemonListRequestHandler::handlePacket(const Common::XmlPacket &packet) {
sendPacket(ret);
- signalFinished().emit();
+ signalFinished()();
return;
}
@@ -57,7 +57,7 @@ void DaemonListRequestHandler::handlePacket(const Common::XmlPacket &packet) {
sendPacket(ret);
- signalFinished().emit();
+ signalFinished()();
}
}
diff --git a/src/Server/RequestHandlers/DaemonStatusRequestHandler.cpp b/src/Server/RequestHandlers/DaemonStatusRequestHandler.cpp
index 9e21127..3d99c57 100644
--- a/src/Server/RequestHandlers/DaemonStatusRequestHandler.cpp
+++ b/src/Server/RequestHandlers/DaemonStatusRequestHandler.cpp
@@ -37,7 +37,7 @@ void DaemonStatusRequestHandler::handlePacket(const Common::XmlPacket &packet) {
sendPacket(ret);
- signalFinished().emit();
+ signalFinished()();
return;
}
@@ -48,7 +48,7 @@ void DaemonStatusRequestHandler::handlePacket(const Common::XmlPacket &packet) {
try {
Common::Connection *daemonCon = ConnectionManager::get()->getDaemonConnection(daemonName);
Common::RequestManager::get()->sendRequest<Common::Requests::StatusRequest>(daemonCon,
- sigc::mem_fun(this, &DaemonStatusRequestHandler::requestFinished));
+ boost::bind(&DaemonStatusRequestHandler::requestFinished, this, _1));
}
catch(Net::Exception &e) {
Common::XmlPacket ret;
@@ -77,7 +77,7 @@ void DaemonStatusRequestHandler::requestFinished(const Common::Request &request)
sendPacket(ret);
}
- signalFinished().emit();
+ signalFinished()();
}
}
diff --git a/src/Server/RequestHandlers/GSSAPIAuthRequestHandler.cpp b/src/Server/RequestHandlers/GSSAPIAuthRequestHandler.cpp
index 5272d7a..ade8329 100644
--- a/src/Server/RequestHandlers/GSSAPIAuthRequestHandler.cpp
+++ b/src/Server/RequestHandlers/GSSAPIAuthRequestHandler.cpp
@@ -39,7 +39,7 @@ void GSSAPIAuthRequestHandler::handlePacket(const Common::XmlPacket &packet) {
sendPacket(ret);
- signalFinished().emit();
+ signalFinished()();
return;
}
@@ -118,7 +118,7 @@ void GSSAPIAuthRequestHandler::handlePacket(const Common::XmlPacket &packet) {
if(majStat != GSS_S_COMPLETE)
return;
- signalFinished().emit();
+ signalFinished()();
}
}
diff --git a/src/Server/RequestHandlers/IdentifyRequestHandler.cpp b/src/Server/RequestHandlers/IdentifyRequestHandler.cpp
index ac8bb42..f69b3f5 100644
--- a/src/Server/RequestHandlers/IdentifyRequestHandler.cpp
+++ b/src/Server/RequestHandlers/IdentifyRequestHandler.cpp
@@ -36,7 +36,7 @@ void IdentifyRequestHandler::handlePacket(const Common::XmlPacket &packet) {
sendPacket(ret);
- signalFinished().emit();
+ signalFinished()();
return;
}
@@ -59,7 +59,7 @@ void IdentifyRequestHandler::handlePacket(const Common::XmlPacket &packet) {
sendPacket(ret);
}
- signalFinished().emit();
+ signalFinished()();
}
}
diff --git a/src/Server/RequestHandlers/LogRequestHandler.cpp b/src/Server/RequestHandlers/LogRequestHandler.cpp
index 557a97c..f4547e4 100644
--- a/src/Server/RequestHandlers/LogRequestHandler.cpp
+++ b/src/Server/RequestHandlers/LogRequestHandler.cpp
@@ -36,7 +36,7 @@ void LogRequestHandler::handlePacket(const Common::XmlPacket &packet) {
sendPacket(ret);
- signalFinished().emit();
+ signalFinished()();
return;
}
@@ -55,7 +55,7 @@ void LogRequestHandler::handlePacket(const Common::XmlPacket &packet) {
sendPacket(ret);
- signalFinished().emit();
+ signalFinished()();
}
}
diff --git a/src/Server/RequestHandlers/Makefile.in b/src/Server/RequestHandlers/Makefile.in
index 4d0d9ce..3ee761b 100644
--- a/src/Server/RequestHandlers/Makefile.in
+++ b/src/Server/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 \
@@ -86,6 +87,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@
@@ -217,8 +219,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/Server/RequestHandlers/UserInfoRequestHandler.cpp b/src/Server/RequestHandlers/UserInfoRequestHandler.cpp
index 39fa63e..740c2a9 100644
--- a/src/Server/RequestHandlers/UserInfoRequestHandler.cpp
+++ b/src/Server/RequestHandlers/UserInfoRequestHandler.cpp
@@ -22,6 +22,8 @@
#include <Net/Exception.h>
#include <Common/Logger.h>
+#include <boost/bind.hpp>
+
namespace Mad {
namespace Server {
namespace RequestHandlers {
@@ -36,19 +38,19 @@ void UserInfoRequestHandler::handlePacket(const Common::XmlPacket &packet) {
sendPacket(ret);
- signalFinished().emit();
+ signalFinished()();
return;
}
// TODO Require authentication
- if(!UserManager::get()->getUserInfo(packet["uid"], sigc::mem_fun(this, &UserInfoRequestHandler::userInfoHandler))) {
+ if(!UserManager::get()->getUserInfo(packet["uid"], boost::bind(&UserInfoRequestHandler::userInfoHandler, this, _1))) {
Common::XmlPacket ret;
ret.setType("Error");
ret.add("ErrorCode", Net::Exception::NOT_IMPLEMENTED);
sendPacket(ret);
- signalFinished().emit();
+ signalFinished()();
}
}
@@ -62,7 +64,7 @@ void UserInfoRequestHandler::userInfoHandler(const Common::UserInfo &info) {
ret.add("fullName", info.getFullName());
sendPacket(ret);
- signalFinished().emit();
+ signalFinished()();
}
}
diff --git a/src/Server/RequestHandlers/UserListRequestHandler.cpp b/src/Server/RequestHandlers/UserListRequestHandler.cpp
index 66f67bd..cd05c12 100644
--- a/src/Server/RequestHandlers/UserListRequestHandler.cpp
+++ b/src/Server/RequestHandlers/UserListRequestHandler.cpp
@@ -22,6 +22,8 @@
#include <Net/Exception.h>
#include <Common/Logger.h>
+#include <boost/bind.hpp>
+
namespace Mad {
namespace Server {
namespace RequestHandlers {
@@ -36,19 +38,19 @@ void UserListRequestHandler::handlePacket(const Common::XmlPacket &packet) {
sendPacket(ret);
- signalFinished().emit();
+ signalFinished()();
return;
}
// TODO Require authentication
- if(!UserManager::get()->getUserList(sigc::mem_fun(this, &UserListRequestHandler::userListHandler))) {
+ if(!UserManager::get()->getUserList(boost::bind(&UserListRequestHandler::userListHandler, this, _1))) {
Common::XmlPacket ret;
ret.setType("Error");
ret.add("ErrorCode", Net::Exception::NOT_IMPLEMENTED);
sendPacket(ret);
- signalFinished().emit();
+ signalFinished()();
}
}
@@ -68,7 +70,7 @@ void UserListRequestHandler::userListHandler(const std::map<unsigned long, Commo
}
sendPacket(ret);
- signalFinished().emit();
+ signalFinished()();
}
}
diff --git a/src/Server/Requests/Makefile.in b/src/Server/Requests/Makefile.in
index 428400d..1fbdd8f 100644
--- a/src/Server/Requests/Makefile.in
+++ b/src/Server/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@
diff --git a/src/Server/UserBackend.h b/src/Server/UserBackend.h
index cf88095..6aac7bc 100644
--- a/src/Server/UserBackend.h
+++ b/src/Server/UserBackend.h
@@ -27,7 +27,7 @@
#include <map>
#include <string>
-#include <sigc++/signal.h>
+#include <boost/signal.hpp>
namespace Mad {
@@ -41,19 +41,19 @@ class UserBackend {
UserBackend() {}
- virtual bool getUserList(const sigc::slot<void, const std::map<unsigned long, Common::UserInfo>& > &callback _UNUSED_PARAMETER_) {
+ virtual bool getUserList(const boost::function1<void, const std::map<unsigned long, Common::UserInfo>& > &callback _UNUSED_PARAMETER_) {
return false;
}
- virtual bool getUserInfo(unsigned long uid _UNUSED_PARAMETER_, const sigc::slot<void, const Common::UserInfo&> &callback _UNUSED_PARAMETER_) {
+ virtual bool getUserInfo(unsigned long uid _UNUSED_PARAMETER_, const boost::function1<void, const Common::UserInfo&> &callback _UNUSED_PARAMETER_) {
return false;
}
- virtual bool setPassword(unsigned long uid _UNUSED_PARAMETER_, const std::string&, const sigc::slot<void, bool> &callback _UNUSED_PARAMETER_) {
+ virtual bool setPassword(unsigned long uid _UNUSED_PARAMETER_, const std::string&, const boost::function1<void, bool> &callback _UNUSED_PARAMETER_) {
return false;
}
- virtual bool addUser(const Common::UserInfo &userInfo _UNUSED_PARAMETER_, const sigc::slot<void, bool> &callback _UNUSED_PARAMETER_) {
+ virtual bool addUser(const Common::UserInfo &userInfo _UNUSED_PARAMETER_, const boost::function1<void, bool> &callback _UNUSED_PARAMETER_) {
return false;
}
diff --git a/src/Server/UserManager.cpp b/src/Server/UserManager.cpp
index 2f58b7a..d763a8b 100644
--- a/src/Server/UserManager.cpp
+++ b/src/Server/UserManager.cpp
@@ -34,7 +34,7 @@ bool UserManager::Compare::operator() (const UserBackend *b1, const UserBackend
}
-bool UserManager::getUserList(const sigc::slot<void, const std::map<unsigned long, Common::UserInfo>& > &callback) {
+bool UserManager::getUserList(const boost::function1<void, const std::map<unsigned long, Common::UserInfo>& > &callback) {
for(std::set<UserBackend*>::iterator backend = backends.begin(); backend != backends.end(); ++backend) {
if((*backend)->getUserList(callback))
return true;
@@ -43,7 +43,7 @@ bool UserManager::getUserList(const sigc::slot<void, const std::map<unsigned lon
return false;
}
-bool UserManager::getUserInfo(unsigned long uid, const sigc::slot<void, const Common::UserInfo&> &callback) {
+bool UserManager::getUserInfo(unsigned long uid, const boost::function1<void, const Common::UserInfo&> &callback) {
for(std::set<UserBackend*>::iterator backend = backends.begin(); backend != backends.end(); ++backend) {
if((*backend)->getUserInfo(uid, callback))
return true;
@@ -52,7 +52,7 @@ bool UserManager::getUserInfo(unsigned long uid, const sigc::slot<void, const Co
return false;
}
-bool UserManager::setPassword(unsigned long uid, const std::string &password, const sigc::slot<void, bool> &callback) {
+bool UserManager::setPassword(unsigned long uid, const std::string &password, const boost::function1<void, bool> &callback) {
for(std::set<UserBackend*>::iterator backend = backends.begin(); backend != backends.end(); ++backend) {
if((*backend)->setPassword(uid, password, callback))
return true;
@@ -61,7 +61,7 @@ bool UserManager::setPassword(unsigned long uid, const std::string &password, co
return false;
}
-bool UserManager::addUser(const Common::UserInfo &userInfo, const sigc::slot<void, bool> &callback) {
+bool UserManager::addUser(const Common::UserInfo &userInfo, const boost::function1<void, bool> &callback) {
for(std::set<UserBackend*>::iterator backend = backends.begin(); backend != backends.end(); ++backend) {
if((*backend)->addUser(userInfo, callback))
return true;
diff --git a/src/Server/UserManager.h b/src/Server/UserManager.h
index 3c4097b..d0e7074 100644
--- a/src/Server/UserManager.h
+++ b/src/Server/UserManager.h
@@ -25,7 +25,7 @@
#include <map>
#include <set>
-#include <sigc++/slot.h>
+#include <boost/function.hpp>
namespace Mad {
namespace Server {
@@ -54,12 +54,12 @@ class UserManager {
}
- bool getUserList(const sigc::slot<void, const std::map<unsigned long, Common::UserInfo>& > &callback);
- bool getUserInfo(unsigned long uid, const sigc::slot<void, const Common::UserInfo&> &callback);
+ bool getUserList(const boost::function1<void, const std::map<unsigned long, Common::UserInfo>& > &callback);
+ bool getUserInfo(unsigned long uid, const boost::function1<void, const Common::UserInfo&> &callback);
- bool setPassword(unsigned long uid, const std::string &password, const sigc::slot<void, bool> &callback);
+ bool setPassword(unsigned long uid, const std::string &password, const boost::function1<void, bool> &callback);
- bool addUser(const Common::UserInfo &userInfo, const sigc::slot<void, bool> &callback);
+ bool addUser(const Common::UserInfo &userInfo, const boost::function1<void, bool> &callback);
static UserManager *get() {