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/Client
parent8611f09eccb6ea84c7852d197a1cc0ae55dbfa6d (diff)
downloadswift-ebd2b8b8a2f1ad2812543c5350c0acf0a5b8c188.zip
swift-ebd2b8b8a2f1ad2812543c5350c0acf0a5b8c188.tar.bz2
Added addPayloadParserFactory() and addSerializer() on Entity API.
Diffstat (limited to 'Swiften/Client')
-rw-r--r--Swiften/Client/CoreClient.cpp2
-rw-r--r--Swiften/Client/CoreClient.h5
2 files changed, 3 insertions, 4 deletions
diff --git a/Swiften/Client/CoreClient.cpp b/Swiften/Client/CoreClient.cpp
index de0785f..c4e5225 100644
--- a/Swiften/Client/CoreClient.cpp
+++ b/Swiften/Client/CoreClient.cpp
@@ -75,7 +75,7 @@ void CoreClient::handleConnectorFinished(boost::shared_ptr<Connection> connectio
connection_ = connection;
assert(!sessionStream_);
- sessionStream_ = boost::shared_ptr<BasicSessionStream>(new BasicSessionStream(ClientStreamType, connection_, &payloadParserFactories_, &payloadSerializers_, tlsFactories->getTLSContextFactory(), networkFactories->getTimerFactory()));
+ sessionStream_ = boost::shared_ptr<BasicSessionStream>(new BasicSessionStream(ClientStreamType, connection_, getPayloadParserFactories(), getPayloadSerializers(), tlsFactories->getTLSContextFactory(), networkFactories->getTimerFactory()));
if (!certificate_.isEmpty()) {
sessionStream_->setTLSCertificate(PKCS12Certificate(certificate_, password_));
}
diff --git a/Swiften/Client/CoreClient.h b/Swiften/Client/CoreClient.h
index d104148..146e219 100644
--- a/Swiften/Client/CoreClient.h
+++ b/Swiften/Client/CoreClient.h
@@ -21,6 +21,7 @@
#include "Swiften/Client/StanzaChannel.h"
#include "Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h"
#include "Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h"
+#include <Swiften/Entity/Entity.h>
#include "Swiften/Client/ClientSessionStanzaChannel.h"
@@ -46,7 +47,7 @@ namespace Swift {
* subclass provides more functionality and interfaces, and is better suited
* for most needs.
*/
- class CoreClient {
+ class CoreClient : public Entity {
public:
/**
* Constructs a client for the given JID with the given password.
@@ -211,8 +212,6 @@ namespace Swift {
IQRouter* iqRouter_;
Connector::ref connector_;
PlatformTLSFactories* tlsFactories;
- FullPayloadParserFactoryCollection payloadParserFactories_;
- FullPayloadSerializerCollection payloadSerializers_;
boost::shared_ptr<Connection> connection_;
boost::shared_ptr<BasicSessionStream> sessionStream_;
boost::shared_ptr<ClientSession> session_;