diff options
author | Remko Tronçon <git@el-tramo.be> | 2013-08-25 16:39:06 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2013-08-27 19:47:48 (GMT) |
commit | 1bb607f96e79845ce30dd5590b0d53cc394ac150 (patch) | |
tree | 6156622ddd1b3238aec73536e0dc25b632965a71 /Swiften/Client | |
parent | c4431ee90f3f1daac0a12b35bfa3378d5c570eaa (diff) | |
download | swift-1bb607f96e79845ce30dd5590b0d53cc394ac150.zip swift-1bb607f96e79845ce30dd5590b0d53cc394ac150.tar.bz2 |
PubSub implementation & Sluift refactoring.
Change-Id: I04ff7111b73565c00bff6db183451774a633344f
Diffstat (limited to 'Swiften/Client')
-rw-r--r-- | Swiften/Client/Client.cpp | 4 | ||||
-rw-r--r-- | Swiften/Client/Client.h | 7 | ||||
-rw-r--r-- | Swiften/Client/ClientXMLTracer.cpp | 6 |
3 files changed, 17 insertions, 0 deletions
diff --git a/Swiften/Client/Client.cpp b/Swiften/Client/Client.cpp index da497bc..f158370 100644 --- a/Swiften/Client/Client.cpp +++ b/Swiften/Client/Client.cpp @@ -14,6 +14,7 @@ #include <Swiften/Presence/DirectedPresenceSender.h> #include <Swiften/MUC/MUCRegistry.h> #include <Swiften/MUC/MUCManager.h> +#include <Swiften/PubSub/PubSubManagerImpl.h> #include <Swiften/Client/MemoryStorages.h> #include <Swiften/VCards/VCardManager.h> #include <Swiften/VCards/VCardManager.h> @@ -76,9 +77,12 @@ Client::Client(const JID& jid, const SafeString& password, NetworkFactories* net #ifdef SWIFT_EXPERIMENTAL_WB whiteboardSessionManager = new WhiteboardSessionManager(getIQRouter(), getStanzaChannel(), presenceOracle, getEntityCapsProvider()); #endif + + pubsubManager = new PubSubManagerImpl(getStanzaChannel(), getIQRouter()); } Client::~Client() { + delete pubsubManager; delete whiteboardSessionManager; delete fileTransferManager; diff --git a/Swiften/Client/Client.h b/Swiften/Client/Client.h index f192539..9253074 100644 --- a/Swiften/Client/Client.h +++ b/Swiften/Client/Client.h @@ -38,6 +38,7 @@ namespace Swift { class FileTransferManager; class WhiteboardSessionManager; class ClientBlockListManager; + class PubSubManager; /** * Provides the core functionality for writing XMPP client software. @@ -158,6 +159,11 @@ namespace Swift { void setAlwaysTrustCertificates(); WhiteboardSessionManager* getWhiteboardSessionManager() const; + + PubSubManager* getPubSubManager() const { + return pubsubManager; + } + public: /** @@ -195,5 +201,6 @@ namespace Swift { BlindCertificateTrustChecker* blindCertificateTrustChecker; WhiteboardSessionManager* whiteboardSessionManager; ClientBlockListManager* blockListManager; + PubSubManager* pubsubManager; }; } diff --git a/Swiften/Client/ClientXMLTracer.cpp b/Swiften/Client/ClientXMLTracer.cpp index d2b5446..b413f40 100644 --- a/Swiften/Client/ClientXMLTracer.cpp +++ b/Swiften/Client/ClientXMLTracer.cpp @@ -9,10 +9,16 @@ #include <iostream> #include <boost/bind.hpp> +#include <Swiften/Base/Platform.h> + namespace Swift { ClientXMLTracer::ClientXMLTracer(CoreClient* client, bool bosh) : bosh(bosh) { +#ifdef SWIFTEN_PLATFORM_WIN32 + beautifier = new XMLBeautifier(true, false); +#else beautifier = new XMLBeautifier(true, true); +#endif client->onDataRead.connect(boost::bind(&ClientXMLTracer::printData, this, '<', _1)); client->onDataWritten.connect(boost::bind(&ClientXMLTracer::printData, this, '>', _1)); } |