summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-04 11:10:09 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-04 11:10:09 (GMT)
commitebd2b8b8a2f1ad2812543c5350c0acf0a5b8c188 (patch)
treef9a867414377906898d39305f317301ab7dc0023 /Swiften/Component
parent8611f09eccb6ea84c7852d197a1cc0ae55dbfa6d (diff)
downloadswift-ebd2b8b8a2f1ad2812543c5350c0acf0a5b8c188.zip
swift-ebd2b8b8a2f1ad2812543c5350c0acf0a5b8c188.tar.bz2
Added addPayloadParserFactory() and addSerializer() on Entity API.
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_;