summaryrefslogtreecommitdiffstats
path: root/src/mad.cpp
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-06-04 22:23:07 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-06-04 22:23:07 +0200
commit0b27c37fe95c6aced613d51a3624f8930a96ad3f (patch)
tree5cb92568f70fe9789e99633ec71048389efb7fa4 /src/mad.cpp
parent50d92f64547c5c06851976ceab5ed631ec93f647 (diff)
downloadmad-0b27c37fe95c6aced613d51a3624f8930a96ad3f.tar
mad-0b27c37fe95c6aced613d51a3624f8930a96ad3f.zip
RequestHandler-Interface ?berarbeitet
Diffstat (limited to 'src/mad.cpp')
-rw-r--r--src/mad.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mad.cpp b/src/mad.cpp
index c89487b..42afc87 100644
--- a/src/mad.cpp
+++ b/src/mad.cpp
@@ -35,10 +35,6 @@
using namespace Mad;
-static void requestFinished(Common::Request&) {
- Common::Logger::log("Identified.");
-}
-
int main() {
Net::ThreadManager::get()->init();
@@ -69,7 +65,13 @@ int main() {
//char hostname[256];
//gethostname(hostname, sizeof(hostname));
//Common::RequestManager::get()->sendRequest<Daemon::Requests::IdentifyRequest>(connection, sigc::ptr_fun(requestFinished), hostname);
- Common::RequestManager::get()->sendRequest1<Common::Requests::IdentifyRequest>(connection, "test", &requestFinished);
+ //Common::RequestManager::get()->sendRequest1<Common::Requests::IdentifyRequest>(connection, "test")->wait();
+ {
+ boost::shared_ptr<Common::Requests::IdentifyRequest> request(new Common::Requests::IdentifyRequest("test"));
+ Common::RequestManager::get()->sendRequest(connection, request);
+ request->wait();
+ }
+ Common::Logger::log("Identified.");
connection->waitWhileConnected();