diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-07-11 14:35:20 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-07-11 14:35:20 (GMT) |
commit | a7963958d9a649dd77c22e65edcf35210a1f66c1 (patch) | |
tree | 686b3861f5aabb0270f3118d054a19642fc835bf /Swiften/QA | |
parent | 47426398550342d5480e7a4ca62db2bf0ad36b15 (diff) | |
download | swift-contrib-a7963958d9a649dd77c22e65edcf35210a1f66c1.zip swift-contrib-a7963958d9a649dd77c22e65edcf35210a1f66c1.tar.bz2 |
Use ClientXMLTracer in ClientTest.
Diffstat (limited to 'Swiften/QA')
-rw-r--r-- | Swiften/QA/ClientTest/ClientTest.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/Swiften/QA/ClientTest/ClientTest.cpp b/Swiften/QA/ClientTest/ClientTest.cpp index d3e8c67..163eacd 100644 --- a/Swiften/QA/ClientTest/ClientTest.cpp +++ b/Swiften/QA/ClientTest/ClientTest.cpp @@ -6,6 +6,7 @@ #include "Swiften/EventLoop/MainEventLoop.h" #include "Swiften/EventLoop/SimpleEventLoop.h" #include "Swiften/Queries/Requests/GetRosterRequest.h" +#include "Swiften/Client/ClientXMLTracer.h" using namespace Swift; @@ -14,14 +15,6 @@ SimpleEventLoop eventLoop; Client* client = 0; bool rosterReceived = false; -void printIncomingData(const String& data) { - std::cout << "<- " << data << std::endl; -} - -void printOutgoingData(const String& data) { - std::cout << "-> " << data << std::endl; -} - void handleRosterReceived(boost::shared_ptr<Payload>) { rosterReceived = true; eventLoop.stop(); @@ -46,9 +39,8 @@ int main(int, char**) { } client = new Swift::Client(JID(jid), String(pass)); + ClientXMLTracer* tracer = new ClientXMLTracer(client); client->onConnected.connect(&handleConnected); - client->onDataRead.connect(&printIncomingData); - client->onDataWritten.connect(&printOutgoingData); client->connect(); { @@ -58,6 +50,7 @@ int main(int, char**) { eventLoop.run(); } + delete tracer; delete client; return !rosterReceived; } |