summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Client')
-rw-r--r--Swiften/Client/Client.cpp4
-rw-r--r--Swiften/Client/Client.h7
-rw-r--r--Swiften/Client/ClientXMLTracer.cpp6
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));
}