diff options
Diffstat (limited to 'Swiften/Component/ComponentSession.h')
-rw-r--r-- | Swiften/Component/ComponentSession.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Swiften/Component/ComponentSession.h b/Swiften/Component/ComponentSession.h index 647bad7..1fa7b5c 100644 --- a/Swiften/Component/ComponentSession.h +++ b/Swiften/Component/ComponentSession.h @@ -1,4 +1,4 @@ /* - * Copyright (c) 2010 Remko Tronçon + * Copyright (c) 2010-2014 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. @@ -10,9 +10,10 @@ #include <boost/enable_shared_from_this.hpp> +#include <Swiften/Base/API.h> #include <Swiften/JID/JID.h> #include <Swiften/Base/boost_bsignals.h> #include <Swiften/Base/Error.h> #include <string> -#include <Swiften/Elements/Element.h> +#include <Swiften/Elements/ToplevelElement.h> #include <Swiften/Elements/Stanza.h> #include <Swiften/Session/SessionStream.h> @@ -20,6 +21,7 @@ namespace Swift { class ComponentAuthenticator; + class CryptoProvider; - class ComponentSession : public boost::enable_shared_from_this<ComponentSession> { + class SWIFTEN_API ComponentSession : public boost::enable_shared_from_this<ComponentSession> { public: enum State { @@ -35,5 +37,5 @@ namespace Swift { enum Type { AuthenticationFailedError, - UnexpectedElementError, + UnexpectedElementError } type; Error(Type type) : type(type) {} @@ -42,6 +44,6 @@ namespace Swift { ~ComponentSession(); - static boost::shared_ptr<ComponentSession> create(const JID& jid, const std::string& secret, boost::shared_ptr<SessionStream> stream) { - return boost::shared_ptr<ComponentSession>(new ComponentSession(jid, secret, stream)); + static boost::shared_ptr<ComponentSession> create(const JID& jid, const std::string& secret, boost::shared_ptr<SessionStream> stream, CryptoProvider* crypto) { + return boost::shared_ptr<ComponentSession>(new ComponentSession(jid, secret, stream, crypto)); } @@ -61,5 +63,5 @@ namespace Swift { private: - ComponentSession(const JID& jid, const std::string& secret, boost::shared_ptr<SessionStream>); + ComponentSession(const JID& jid, const std::string& secret, boost::shared_ptr<SessionStream>, CryptoProvider*); void finishSession(Error::Type error); @@ -68,5 +70,5 @@ namespace Swift { void sendStreamHeader(); - void handleElement(boost::shared_ptr<Element>); + void handleElement(boost::shared_ptr<ToplevelElement>); void handleStreamStart(const ProtocolHeader&); void handleStreamClosed(boost::shared_ptr<Swift::Error>); @@ -78,4 +80,5 @@ namespace Swift { std::string secret; boost::shared_ptr<SessionStream> stream; + CryptoProvider* crypto; boost::shared_ptr<Swift::Error> error; State state; |