diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-09-12 21:37:23 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-09-12 21:37:57 (GMT) |
commit | 326c0620a103d621bcdd74341cd0117816acca03 (patch) | |
tree | 03195c594b88d478f2c01576ebc6e87f7668b595 /Swiften/Client | |
parent | 0da93507bea788cf6bd8f327478caddf3ea679e5 (diff) | |
download | swift-contrib-326c0620a103d621bcdd74341cd0117816acca03.zip swift-contrib-326c0620a103d621bcdd74341cd0117816acca03.tar.bz2 |
Remove IQRouter from client inheritance list.
Diffstat (limited to 'Swiften/Client')
-rw-r--r-- | Swiften/Client/Client.cpp | 6 | ||||
-rw-r--r-- | Swiften/Client/Client.h | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/Swiften/Client/Client.cpp b/Swiften/Client/Client.cpp index bf651cc..13e7a9b 100644 --- a/Swiften/Client/Client.cpp +++ b/Swiften/Client/Client.cpp @@ -17,11 +17,12 @@ #include "Swiften/Network/BoostTimerFactory.h" #include "Swiften/TLS/PKCS12Certificate.h" #include "Swiften/Session/BasicSessionStream.h" +#include "Swiften/Queries/IQRouter.h" namespace Swift { -Client::Client(const JID& jid, const String& password) : - IQRouter(this), jid_(jid), password_(password) { +Client::Client(const JID& jid, const String& password) : jid_(jid), password_(password) { + iqRouter_ = new IQRouter(this); connectionFactory_ = new BoostConnectionFactory(&MainBoostIOServiceThread::getInstance().getIOService()); timerFactory_ = new BoostTimerFactory(&MainBoostIOServiceThread::getInstance().getIOService()); tlsLayerFactory_ = new PlatformTLSLayerFactory(); @@ -34,6 +35,7 @@ Client::~Client() { delete tlsLayerFactory_; delete timerFactory_; delete connectionFactory_; + delete iqRouter_; } bool Client::isAvailable() { diff --git a/Swiften/Client/Client.h b/Swiften/Client/Client.h index 1023108..cb07036 100644 --- a/Swiften/Client/Client.h +++ b/Swiften/Client/Client.h @@ -20,18 +20,18 @@ #include "Swiften/Base/String.h" #include "Swiften/Base/IDGenerator.h" #include "Swiften/Client/StanzaChannel.h" -#include "Swiften/Queries/IQRouter.h" #include "Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h" #include "Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h" namespace Swift { + class IQRouter; class TLSLayerFactory; class ConnectionFactory; class TimerFactory; class ClientSession; class BasicSessionStream; - class Client : public StanzaChannel, public IQRouter, public boost::bsignals::trackable { + class Client : public StanzaChannel, public boost::bsignals::trackable { public: Client(const JID& jid, const String& password); ~Client(); @@ -50,6 +50,10 @@ namespace Swift { virtual void sendMessage(boost::shared_ptr<Message>); virtual void sendPresence(boost::shared_ptr<Presence>); + IQRouter* getIQRouter() const { + return iqRouter_; + } + public: boost::signal<void (const ClientError&)> onError; boost::signal<void ()> onConnected; @@ -75,6 +79,7 @@ namespace Swift { JID jid_; String password_; IDGenerator idGenerator_; + IQRouter* iqRouter_; Connector::ref connector_; ConnectionFactory* connectionFactory_; TimerFactory* timerFactory_; |