summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-10-07 18:09:30 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-10-07 18:09:30 (GMT)
commit6b98253a4127c975bd59b6a49ddb203337a8c32b (patch)
tree546a24e1687f50e403215152d65e21971568f166 /Slimber
parentb2f58c4f3eb93e3a32062670df5eb6682aed273a (diff)
downloadswift-contrib-6b98253a4127c975bd59b6a49ddb203337a8c32b.zip
swift-contrib-6b98253a4127c975bd59b6a49ddb203337a8c32b.tar.bz2
Hoist XML parser factory creation out of Swiften.
Diffstat (limited to 'Slimber')
-rw-r--r--Slimber/Server.cpp6
-rw-r--r--Slimber/Server.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/Slimber/Server.cpp b/Slimber/Server.cpp
index 84b33fa..769217f 100644
--- a/Slimber/Server.cpp
+++ b/Slimber/Server.cpp
@@ -147,7 +147,7 @@ void Server::handleNewClientConnection(boost::shared_ptr<Connection> connection)
}
serverFromClientSession = boost::shared_ptr<ServerFromClientSession>(
new ServerFromClientSession(idGenerator.generateID(), connection,
- &payloadParserFactories, &payloadSerializers, &userRegistry));
+ &payloadParserFactories, &payloadSerializers, &xmlParserFactory, &userRegistry));
serverFromClientSession->setAllowSASLEXTERNAL();
serverFromClientSession->onSessionStarted.connect(
boost::bind(&Server::handleSessionStarted, this));
@@ -281,7 +281,7 @@ void Server::handleNewLinkLocalConnection(boost::shared_ptr<Connection> connecti
boost::shared_ptr<IncomingLinkLocalSession> session(
new IncomingLinkLocalSession(
selfJID, connection,
- &payloadParserFactories, &payloadSerializers));
+ &payloadParserFactories, &payloadSerializers, &xmlParserFactory));
registerLinkLocalSession(session);
}
@@ -312,7 +312,7 @@ void Server::handleConnectFinished(boost::shared_ptr<LinkLocalConnector> connect
boost::shared_ptr<OutgoingLinkLocalSession> outgoingSession(
new OutgoingLinkLocalSession(
selfJID, connector->getService().getJID(), connector->getConnection(),
- &payloadParserFactories, &payloadSerializers));
+ &payloadParserFactories, &payloadSerializers, &xmlParserFactory));
foreach(const boost::shared_ptr<Element> element, connector->getQueuedElements()) {
outgoingSession->queueElement(element);
}
diff --git a/Slimber/Server.h b/Slimber/Server.h
index 58b1e7c..96401d9 100644
--- a/Slimber/Server.h
+++ b/Slimber/Server.h
@@ -14,6 +14,7 @@
#include "Swiften/Network/BoostConnectionServer.h"
#include "Limber/Server/UserRegistry.h"
#include "Swiften/Base/IDGenerator.h"
+#include "Swiften/Parser/PlatformXMLParserFactory.h"
#include "Limber/Server/ServerFromClientSession.h"
#include "Swiften/JID/JID.h"
#include "Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h"
@@ -98,6 +99,7 @@ namespace Swift {
FullPayloadSerializerCollection payloadSerializers;
BoostIOServiceThread boostIOServiceThread;
DummyUserRegistry userRegistry;
+ PlatformXMLParserFactory xmlParserFactory;
bool linkLocalServiceRegistered;
bool rosterRequested;
int clientConnectionPort;