diff --git a/include/transport/transport.h b/include/transport/transport.h index b31ee1504edf9a2450451ce36b90152c532f6767..4eb24ada13c47c9d78b20fcf56333679ec27d8e1 100644 --- a/include/transport/transport.h +++ b/include/transport/transport.h @@ -33,6 +33,7 @@ #include "Swiften/Server/UserRegistry.h" #include #include "transport/config.h" +#include "transport/factory.h" #define tr(lang,STRING) (STRING) #define _(STRING) (STRING) @@ -48,6 +49,7 @@ namespace Transport { class DiscoInfoResponder; class DiscoItemsResponder; class RosterResponder; + class Factory; /// Represents one transport instance. @@ -63,7 +65,7 @@ namespace Transport { /// - service.password /// - service.server /// - service.port - Component(Swift::EventLoop *loop, Config *config); + Component(Swift::EventLoop *loop, Config *config, Factory *factory); /// Component destructor. ~Component(); @@ -103,6 +105,8 @@ namespace Transport { Swift::BoostNetworkFactories *getFactories() { return m_factories; } + Factory *getFactory() { return m_factory; } + /// This signal is emitted when server disconnects the transport because of some error. /// \param error disconnection error boost::signal onConnectionError; @@ -160,6 +164,7 @@ namespace Transport { Config* m_config; std::string m_protocol; Swift::JID m_jid; + Factory *m_factory; friend class User; friend class UserRegistration;