summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Component')
-rw-r--r--Swiften/Component/CoreComponent.cpp2
-rw-r--r--Swiften/Component/CoreComponent.h6
2 files changed, 3 insertions, 5 deletions
diff --git a/Swiften/Component/CoreComponent.cpp b/Swiften/Component/CoreComponent.cpp
index 656f967..c3451de 100644
--- a/Swiften/Component/CoreComponent.cpp
+++ b/Swiften/Component/CoreComponent.cpp
@@ -62,7 +62,7 @@ void CoreComponent::handleConnectorFinished(boost::shared_ptr<Connection> connec
connection_ = connection;
assert(!sessionStream_);
- sessionStream_ = boost::shared_ptr<BasicSessionStream>(new BasicSessionStream(ComponentStreamType, connection_, &payloadParserFactories_, &payloadSerializers_, NULL, networkFactories->getTimerFactory()));
+ sessionStream_ = boost::shared_ptr<BasicSessionStream>(new BasicSessionStream(ComponentStreamType, connection_, getPayloadParserFactories(), getPayloadSerializers(), NULL, networkFactories->getTimerFactory()));
sessionStream_->onDataRead.connect(boost::bind(&CoreComponent::handleDataRead, this, _1));
sessionStream_->onDataWritten.connect(boost::bind(&CoreComponent::handleDataWritten, this, _1));
sessionStream_->initialize();
diff --git a/Swiften/Component/CoreComponent.h b/Swiften/Component/CoreComponent.h
index dd4c5fd..8ebf80f 100644
--- a/Swiften/Component/CoreComponent.h
+++ b/Swiften/Component/CoreComponent.h
@@ -20,8 +20,8 @@
#include "Swiften/Base/String.h"
#include "Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h"
#include "Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h"
-
#include "Swiften/Component/ComponentSessionStanzaChannel.h"
+#include <Swiften/Entity/Entity.h>
namespace Swift {
class IQRouter;
@@ -39,7 +39,7 @@ namespace Swift {
* subclass provides more functionality and interfaces, and is better suited
* for most needs.
*/
- class CoreComponent {
+ class CoreComponent : public Entity {
public:
CoreComponent(EventLoop* eventLoop, NetworkFactories* networkFactories, const JID& jid, const String& secret);
~CoreComponent();
@@ -94,8 +94,6 @@ namespace Swift {
ComponentSessionStanzaChannel* stanzaChannel_;
IQRouter* iqRouter_;
ComponentConnector::ref connector_;
- FullPayloadParserFactoryCollection payloadParserFactories_;
- FullPayloadSerializerCollection payloadSerializers_;
boost::shared_ptr<Connection> connection_;
boost::shared_ptr<BasicSessionStream> sessionStream_;
boost::shared_ptr<ComponentSession> session_;